libMesh
advection_system.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #ifndef ADVECTION_SYSTEM_H
19 #define ADVECTION_SYSTEM_H
20 
21 // Application includes
22 #include "claw_system.h" // base class
23 
24 namespace libMesh
25 {
26 
35 {
36 public:
37 
43  const std::string& name,
44  const unsigned int number);
45 
49  virtual ~AdvectionSystem ();
50 
55 
62  sys_type & system () { return *this; }
63 
67  typedef ClawSystem Parent;
68 
76  virtual void assemble_claw_rhs(NumericVector<Number> & q) override;
77 
81  virtual void init_data() override;
82 
88  virtual void process_parameters_file (const std::string & parameters_filename) override;
89 
93  virtual void print_info() override;
94 
95 protected:
96 
103 
108  std::vector<std::unique_ptr<NumericVector<Number>>> _Fh;
109 
113  unsigned int _q1_var;
114 
119 
126 };
127 
128 } // namespace libMesh
129 
130 #endif
This is the EquationSystems class.
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
This class encapsulates functionality that allows us to solve conservation laws.
Definition: claw_system.h:36
virtual void init_data() override
Initialize the system (e.g.
virtual void print_info() override
Print out some info about the system&#39;s configuration.
The libMesh namespace provides an interface to certain functionality in the library.
ClawSystem Parent
The type of the parent.
virtual void process_parameters_file(const std::string &parameters_filename) override
Read in data from input file.
unsigned int _q1_var
Variable number for q1.
unsigned int number() const
Definition: system.h:2350
AdvectionSystem sys_type
The type of system.
AdvectionSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
Order _fe_order
Store the FE Order and family specified by the input file.
This class extends ClawSystem to implement pure advection in 2D.
std::vector< std::unique_ptr< NumericVector< Number > > > _Fh
The advective flux vectors.
const std::string & name() const
Definition: system.h:2342
FEFamily
defines an enum for finite element families.
Point _u
The (assumed constant) advection velocity.
virtual void assemble_claw_rhs(NumericVector< Number > &q) override
Right-hand side assembly.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
void update_Fh(NumericVector< Number > &q)
Computes the vectors "uq" and "vq" where (u,v) are the (given, constant) advective velocity coefficie...
virtual ~AdvectionSystem()
Destructor.