Advanced Multi-Physics (AMP)
On-Line Documentation
ManufacturedSourceModel2.h
Go to the documentation of this file.
1#ifndef included_AMP_ManufacturedSourceModel2
2#define included_AMP_ManufacturedSourceModel2
3
4#include "AMP/operators/ElementPhysicsModel.h"
5#include <memory>
6
7
8namespace AMP::Operator {
9
10
12
13
15{
16public:
18 std::shared_ptr<const ManufacturedSourceModel2Parameters> params )
19 : ElementPhysicsModel( params )
20 {
21 d_Dzero = 1.0;
22 d_beta = 1.0;
23 }
24
26
27 virtual void getManufacturedSource2( std::vector<double> &result,
28 const std::vector<double> &T,
29 const std::vector<libMesh::Point> &Coordinates )
30 {
31 AMP_ASSERT( ( Coordinates.size() == T.size() ) && ( T.size() == result.size() ) );
32
33 for ( unsigned int qp = 0; qp < Coordinates.size(); qp++ ) {
34 double x = Coordinates[qp]( 0 );
35 double y = Coordinates[qp]( 1 );
36 double z = Coordinates[qp]( 2 );
37 double r = std::sqrt( x * x + y * y + z * z );
38
39 double temp = 12 * d_Dzero * r * r * r * r * r * exp( -r * T[qp] );
40
41 result[qp] = temp;
42 }
43 }
44
45
46protected:
47private:
48 double d_Dzero;
49 double d_beta;
50};
51
52
53} // namespace AMP::Operator
54
55#endif
ManufacturedSourceModel2(std::shared_ptr< const ManufacturedSourceModel2Parameters > params)
virtual void getManufacturedSource2(std::vector< double > &result, const std::vector< double > &T, const std::vector< libMesh::Point > &Coordinates)
#define AMP_ASSERT(EXP)
Assert error.
ElementPhysicsModelParameters ManufacturedSourceModel2Parameters



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