Advanced Multi-Physics (AMP)
On-Line Documentation
ManufacturedSourceModel1.h
Go to the documentation of this file.
1#ifndef included_AMP_ManufacturedSourceModel1
2#define included_AMP_ManufacturedSourceModel1
3
4#include "AMP/operators/ElementPhysicsModel.h"
5#include <memory>
6
7
8// LibMesh include
10#include "libmesh/point.h"
12
13#include <iostream>
14#include <string>
15
16
17namespace AMP::Operator {
18
19
21
22
24{
25public:
27 std::shared_ptr<const ManufacturedSourceModel1Parameters> params )
28 : ElementPhysicsModel( params )
29 {
30 d_Dzero = 1.0;
31 d_beta = 1.0;
32 }
33
35
36
37 virtual void getManufacturedSource1( std::vector<double> &result,
38 const std::vector<double> &T,
39 const std::vector<libMesh::Point> &Coordinates )
40 {
41 AMP_ASSERT( ( Coordinates.size() == T.size() ) && ( T.size() == result.size() ) );
42
43 for ( unsigned int qp = 0; qp < Coordinates.size(); qp++ ) {
44 double x = Coordinates[qp]( 0 );
45 double y = Coordinates[qp]( 1 );
46 double z = Coordinates[qp]( 2 );
47 double r = std::sqrt( x * x + y * y + z * z );
48 double temp = d_beta * r * r * r + d_Dzero * exp( -r * T[qp] ) * ( 12 * r - 3 * r * r );
49 result[qp] = temp;
50 }
51 }
52
53 // virtual void getManufacturedSource(std::vector<double> & result,
54 // std::vector<std::vector<double> >& args);
55
56protected:
57private:
58 double d_Dzero;
59 double d_beta;
60};
61
62
63} // namespace AMP::Operator
64
65#endif
virtual void getManufacturedSource1(std::vector< double > &result, const std::vector< double > &T, const std::vector< libMesh::Point > &Coordinates)
ManufacturedSourceModel1(std::shared_ptr< const ManufacturedSourceModel1Parameters > params)
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.
#define AMP_ASSERT(EXP)
Assert error.
ElementPhysicsModelParameters ManufacturedSourceModel1Parameters



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