libMesh
Loading...
Searching...
No Matches
advection_system.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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
24namespace libMesh
25{
26
35{
36public:
37
43 const std::string& name,
44 const unsigned int number);
45
49 virtual ~AdvectionSystem ();
50
55
62 sys_type & system () { return *this; }
63
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
95protected:
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 class extends ClawSystem to implement pure advection in 2D.
Point _u
The (assumed constant) advection velocity.
virtual void init_data() override
Initialize the system (e.g.
virtual void print_info() override
Print out some info about the system's configuration.
virtual void assemble_claw_rhs(NumericVector< Number > &q) override
Right-hand side assembly.
AdvectionSystem sys_type
The type of system.
unsigned int _q1_var
Variable number for q1.
ClawSystem Parent
The type of the parent.
std::vector< std::unique_ptr< NumericVector< Number > > > _Fh
The advective flux vectors.
Order _fe_order
Store the FE Order and family specified by the input file.
virtual void process_parameters_file(const std::string &parameters_filename) override
Read in data from input file.
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.
This class encapsulates functionality that allows us to solve conservation laws.
Definition claw_system.h:37
This is the EquationSystems class.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
const std::string & name() const
Definition system.h:2385
unsigned int number() const
Definition system.h:2393
The libMesh namespace provides an interface to certain functionality in the library.