libMesh
Loading...
Searching...
No Matches
sigma_physics.h
Go to the documentation of this file.
1#include "libmesh/fem_system.h"
2#include "libmesh/mesh.h"
3#include "libmesh/mesh_function.h"
4#include "libmesh/fem_physics.h"
5#include "libmesh/system.h"
6
7// Using namespace libMesh
8using namespace libMesh;
9
10// FEMSystem, TimeSolver and NewtonSolver will handle most tasks,
11// but we must specify element residuals
13{
14public:
15 // Constructor
17
18 // Special functions
19 SigmaPhysics (SigmaPhysics &&) = default;
20 SigmaPhysics (const SigmaPhysics &) = default;
21 SigmaPhysics & operator= (const SigmaPhysics &) = default;
23 virtual ~SigmaPhysics () = default;
24
25 Real & k() { return _k; }
27
28 // System initialization
29 virtual void init_data (System & sys);
30
31 virtual std::unique_ptr<DifferentiablePhysics> clone_physics() override;
32
33protected:
34
35 // Context initialization
36 virtual void init_context (DiffContext & context) override;
37
38 // Element residual and jacobian calculations
39 // Time dependent parts
40 virtual bool element_time_derivative (bool request_jacobian,
41 DiffContext & context) override;
42
43 // The parameters to solve for
45
46 // Variables to hold the computed QoIs
48
49 // The FE type to use
50 std::string _fe_family;
51 unsigned int _fe_order;
52
53 // Index for T variable
54 unsigned int T_var;
55
56 // Calculate Jacobians analytically or not?
58};
unsigned int _fe_order
std::string _fe_family
virtual ~SigmaPhysics()=default
SigmaPhysics(const SigmaPhysics &)=default
bool & analytic_jacobians()
virtual void init_data(System &sys)
virtual std::unique_ptr< DifferentiablePhysics > clone_physics() override
Copy of this object.
unsigned int T_var
Number computed_QoI[1]
SigmaPhysics(SigmaPhysics &&)=default
virtual void init_context(DiffContext &context) override
virtual bool element_time_derivative(bool request_jacobian, DiffContext &context) override
Adds the time derivative contribution on elem to elem_residual.
SigmaPhysics & operator=(const SigmaPhysics &)=default
bool _analytic_jacobians
This class provides all data required for a physics package (e.g.
This class provides a specific system class.
Definition fem_physics.h:45
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition system.h:100
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real