Go to the documentation of this file.
   20 #ifndef LIBMESH_FREQUENCY_SYSTEM_H 
   21 #define LIBMESH_FREQUENCY_SYSTEM_H 
   23 #include "libmesh/libmesh_config.h" 
   26 #if defined(LIBMESH_USE_COMPLEX_NUMBERS) 
   29 #include "libmesh/linear_implicit_system.h" 
   72                    const std::string & name_in,
 
   73                    const unsigned int number_in);
 
   85   virtual void clear () 
override;
 
  103   virtual void solve () 
override;
 
  113   void solve (
const unsigned int n_start,
 
  114               const unsigned int n_stop);
 
  120   virtual std::string 
system_type ()
 const override { 
return "Frequency"; }
 
  140                                  const Number freq_step=0.,
 
  141                                  const unsigned int n_freq=1,
 
  142                                  const bool allocate_solution_duplicates=
true);
 
  155                                  const unsigned int n_freq,
 
  156                                  const bool allocate_solution_duplicates=
true);
 
  166                         const bool allocate_solution_duplicates=
true);
 
  170                         const bool allocate_solution_duplicates=
true);
 
  184                                        const std::string & 
name));
 
  190                          const std::string & 
name);
 
  195   std::pair<unsigned int, Real> 
get_rval (
unsigned int n) 
const;
 
  270   std::vector<std::pair<unsigned int, Real>> 
vec_rval;
 
  281   libmesh_assert_less (n, 
vec_rval.size());
 
  289 #endif // if defined(LIBMESH_USE_COMPLEX_NUMBERS) 
  291 #endif // LIBMESH_FREQUENCY_SYSTEM_H 
  
virtual void assemble() override
Assemble the linear system.
 
virtual std::string system_type() const override
 
std::vector< std::pair< unsigned int, Real > > vec_rval
The number of iterations and the final residual when the Ax=b is solved for multiple frequencies.
 
void attach_solve_function(void fptr(EquationSystems &es, const std::string &name))
Register a required user function to use in assembling/solving the system.
 
The libMesh namespace provides an interface to certain functionality in the library.
 
bool _finished_assemble
true when we have finished the assemble() phase.
 
std::string form_solu_vec_name(const unsigned int n) const
 
unsigned int n_frequencies() const
 
void(* solve_system)(EquationSystems &es, const std::string &name)
Function that computes frequency-dependent data of the system.
 
virtual void init_data() override
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.
 
void set_frequencies_by_range(const Number min_freq, const Number max_freq, const unsigned int n_freq, const bool allocate_solution_duplicates=true)
Set the frequency range for which the system should be solved.
 
std::pair< unsigned int, Real > get_rval(unsigned int n) const
 
FrequencySystem provides a specific system class for frequency-dependent (linear) systems.
 
bool _finished_set_frequencies
true when we have frequencies to solve for.
 
std::string form_freq_param_name(const unsigned int n) const
 
This is the EquationSystems class.
 
void set_frequencies(const std::vector< Real > &frequencies, const bool allocate_solution_duplicates=true)
Set the frequency range by simply copying the values from frequencies.
 
bool _keep_solution_duplicates
when the solution for each frequency should be stored in an additional vector, then this bool is true...
 
void set_frequencies_by_steps(const Number base_freq, const Number freq_step=0., const unsigned int n_freq=1, const bool allocate_solution_duplicates=true)
Set the frequency range for which the system should be solved.
 
const std::string & name() const
 
virtual void clear() override
Clear all the data structures associated with the system, but leave the frequencies untouched.
 
FrequencySystem(EquationSystems &es, const std::string &name_in, const unsigned int number_in)
Constructor.
 
virtual void solve() override
Solves the system for all frequencies.
 
bool _finished_init
true when we have finished the init() phase.
 
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
 
Number fptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
 
void set_current_frequency(unsigned int n)
Sets the current frequency to the n-th entry in the vector _frequencies.
 
void clear_all()
The full clear method also clears the frequencies (stored as parameters of the EquationSystems object...
 
~FrequencySystem()
Destructor.