libMesh
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
L2System Class Reference

#include <L2system.h>

Inheritance diagram for L2System:
[legend]

Public Types

typedef FEMSystem sys_type
 The type of system. More...
 
typedef DifferentiableSystem Parent
 The type of the parent. More...
 
typedef bool(TimeSolver::* TimeSolverResPtr) (bool, DiffContext &)
 Syntax sugar to make numerical_jacobian() declaration easier. More...
 
typedef std::map< std::string, SparseMatrix< Number > * >::iterator matrices_iterator
 Matrix iterator typedefs. More...
 
typedef std::map< std::string, SparseMatrix< Number > * >::const_iterator const_matrices_iterator
 
typedef Number(* ValueFunctionPointer) (const Point &p, const Parameters &Parameters, const std::string &sys_name, const std::string &unknown_name)
 Projects arbitrary functions onto the current solution. More...
 
typedef Gradient(* GradientFunctionPointer) (const Point &p, const Parameters &parameters, const std::string &sys_name, const std::string &unknown_name)
 
typedef std::map< std::string, NumericVector< Number > * >::iterator vectors_iterator
 Vector iterator typedefs. More...
 
typedef std::map< std::string, NumericVector< Number > * >::const_iterator const_vectors_iterator
 

Public Member Functions

 L2System (libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
 
 ~L2System ()
 
std::string & fe_family ()
 
unsigned int & fe_order ()
 
virtual void assembly (bool get_residual, bool get_jacobian, bool apply_heterogeneous_constraints=false, bool apply_no_constraints=false) override
 Prepares matrix or rhs for matrix assembly. More...
 
virtual void solve () override
 Invokes the solver associated with the system. More...
 
void mesh_position_get ()
 Tells the FEMSystem to set the degree of freedom coefficients which should correspond to mesh nodal coordinates. More...
 
void mesh_position_set ()
 Tells the FEMSystem to set the mesh nodal coordinates which should correspond to degree of freedom coefficients. More...
 
virtual std::unique_ptr< DiffContext > build_context () override
 Builds a FEMContext object with enough information to do evaluations on each element. More...
 
virtual void postprocess () override
 Runs a postprocessing loop over all elements, and if postprocess_sides is true over all sides. More...
 
virtual void assemble_qoi (const QoISet &indices=QoISet()) override
 Runs a qoi assembly loop over all elements, and if assemble_qoi_sides is true over all sides. More...
 
virtual void assemble_qoi_derivative (const QoISet &qoi_indices=QoISet(), bool include_liftfunc=true, bool apply_constraints=true) override
 Runs a qoi derivative assembly loop over all elements, and if assemble_qoi_sides is true over all sides. More...
 
Real numerical_jacobian_h_for_var (unsigned int var_num) const
 If numerical_jacobian_h_for_var(var_num) is changed from its default value (numerical_jacobian_h), the FEMSystem will perturb solution vector entries for variable var_num by that amount when calculating finite differences with respect to that variable. More...
 
void set_numerical_jacobian_h_for_var (unsigned int var_num, Real new_h)
 
void numerical_jacobian (TimeSolverResPtr res, FEMContext &context) const
 Uses the results of multiple res calls to numerically differentiate the corresponding jacobian. More...
 
void numerical_elem_jacobian (FEMContext &context) const
 Uses the results of multiple element_residual() calls to numerically differentiate the corresponding jacobian on an element. More...
 
void numerical_side_jacobian (FEMContext &context) const
 Uses the results of multiple side_residual() calls to numerically differentiate the corresponding jacobian on an element's side. More...
 
void numerical_nonlocal_jacobian (FEMContext &context) const
 Uses the results of multiple side_residual() calls to numerically differentiate the corresponding jacobian on nonlocal DoFs. More...
 
virtual void clear () override
 Clear all the data structures associated with the system. More...
 
virtual void reinit () override
 Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be used. More...
 
virtual void assemble () override
 Prepares matrix and rhs for matrix assembly. More...
 
virtual LinearSolver< Number > * get_linear_solver () const override
 
virtual std::pair< unsigned int, Real > get_linear_solve_parameters () const override
 
virtual void release_linear_solver (LinearSolver< Number > *) const override
 Releases a pointer to a linear solver acquired by this->get_linear_solver() More...
 
virtual std::pair< unsigned int, Real > adjoint_solve (const QoISet &qoi_indices=QoISet()) override
 This function sets the _is_adjoint boolean member of TimeSolver to true and then calls the adjoint_solve in implicit system. More...
 
virtual std::unique_ptr< DifferentiablePhysicsclone_physics () override
 We don't allow systems to be attached to each other. More...
 
virtual std::unique_ptr< DifferentiableQoIclone () override
 We don't allow systems to be attached to each other. More...
 
const DifferentiablePhysicsget_physics () const
 
DifferentiablePhysicsget_physics ()
 
void attach_physics (DifferentiablePhysics *physics_in)
 Attach external Physics object. More...
 
void swap_physics (DifferentiablePhysics *&swap_physics)
 Swap current physics object with external object. More...
 
const DifferentiableQoIget_qoi () const
 
DifferentiableQoIget_qoi ()
 
void attach_qoi (DifferentiableQoI *qoi_in)
 Attach external QoI object. More...
 
void set_time_solver (std::unique_ptr< TimeSolver > _time_solver)
 Sets the time_solver FIXME: This code is a little dangerous as it transfers ownership from the TimeSolver creator to this class. More...
 
TimeSolver & get_time_solver ()
 
const TimeSolver & get_time_solver () const
 Non-const version of the above. More...
 
virtual void element_postprocess (DiffContext &)
 Does any work that needs to be done on elem in a postprocessing loop. More...
 
virtual void side_postprocess (DiffContext &)
 Does any work that needs to be done on side of elem in a postprocessing loop. More...
 
unsigned int get_second_order_dot_var (unsigned int var) const
 For a given second order (in time) variable var, this method will return the index to the corresponding "dot" variable. More...
 
bool have_first_order_scalar_vars () const
 Check for any first order vars that are also belong to FEFamily::SCALAR. More...
 
bool have_second_order_scalar_vars () const
 Check for any second order vars that are also belong to FEFamily::SCALAR. More...
 
sys_typesystem ()
 
virtual void disable_cache () override
 Avoids use of any cached data that might affect any solve result. More...
 
virtual std::string system_type () const override
 
virtual void assemble_residual_derivatives (const ParameterVector &parameters) override
 Residual parameter derivative function. More...
 
virtual std::pair< unsigned int, Real > sensitivity_solve (const ParameterVector &parameters) override
 Assembles & solves the linear system(s) (dR/du)*u_p = -dR/dp, for those parameters contained within parameters. More...
 
virtual std::pair< unsigned int, Real > weighted_sensitivity_solve (const ParameterVector &parameters, const ParameterVector &weights) override
 Assembles & solves the linear system(s) (dR/du)*u_w = sum(w_p*-dR/dp), for those parameters p contained within parameters weighted by the values w_p found within weights. More...
 
virtual std::pair< unsigned int, Real > weighted_sensitivity_adjoint_solve (const ParameterVector &parameters, const ParameterVector &weights, const QoISet &qoi_indices=QoISet()) override
 Assembles & solves the linear system(s) (dR/du)^T*z_w = sum(w_p*(d^2q/dudp - d^2R/dudp*z)), for those parameters p contained within parameters, weighted by the values w_p found within weights. More...
 
virtual void adjoint_qoi_parameter_sensitivity (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &sensitivities) override
 Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j]. More...
 
virtual void forward_qoi_parameter_sensitivity (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &sensitivities) override
 Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j]. More...
 
virtual void qoi_parameter_hessian (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &hessian) override
 For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) This Hessian is the output of this method, where for each q_i, H_jk is stored in hessian.second_derivative(i,j,k). More...
 
virtual void qoi_parameter_hessian_vector_product (const QoISet &qoi_indices, const ParameterVector &parameters, const ParameterVector &vector, SensitivityData &product) override
 For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) The Hessian-vector product, for a vector v_k in parameter space, is S_j = H_jk v_k This product is the output of this method, where for each q_i, S_j is stored in sensitivities[i][j]. More...
 
SparseMatrix< Number > & add_matrix (const std::string &mat_name)
 Adds the additional matrix mat_name to this system. More...
 
void remove_matrix (const std::string &mat_name)
 Removes the additional matrix mat_name from this system. More...
 
bool have_matrix (const std::string &mat_name) const
 
const SparseMatrix< Number > * request_matrix (const std::string &mat_name) const
 
SparseMatrix< Number > * request_matrix (const std::string &mat_name)
 
const SparseMatrix< Number > & get_matrix (const std::string &mat_name) const
 
SparseMatrix< Number > & get_matrix (const std::string &mat_name)
 
virtual unsigned int n_matrices () const override
 
void init ()
 Initializes degrees of freedom on the current mesh. More...
 
virtual void reinit_constraints ()
 Reinitializes the constraints for this system. More...
 
bool is_initialized ()
 
virtual void update ()
 Update the local values to reflect the solution on neighboring processors. More...
 
virtual void restrict_solve_to (const SystemSubset *subset, const SubsetSolveMode subset_solve_mode=SUBSET_ZERO)
 After calling this method, any solve will be restricted to the given subdomain. More...
 
bool is_adjoint_already_solved () const
 Accessor for the adjoint_already_solved boolean. More...
 
void set_adjoint_already_solved (bool setting)
 Setter for the adjoint_already_solved boolean. More...
 
virtual void qoi_parameter_sensitivity (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &sensitivities)
 Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j]. More...
 
virtual bool compare (const System &other_system, const Real threshold, const bool verbose) const
 
const std::string & name () const
 
void project_solution (FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
 Projects arbitrary functions onto the current solution. More...
 
void project_solution (FEMFunctionBase< Number > *f, FEMFunctionBase< Gradient > *g=nullptr) const
 Projects arbitrary functions onto the current solution. More...
 
void project_solution (ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters) const
 
void project_vector (NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
 Projects arbitrary functions onto a vector of degree of freedom values for the current system. More...
 
void project_vector (NumericVector< Number > &new_vector, FEMFunctionBase< Number > *f, FEMFunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
 Projects arbitrary functions onto a vector of degree of freedom values for the current system. More...
 
void project_vector (ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters, NumericVector< Number > &new_vector, int is_adjoint=-1) const
 Projects arbitrary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_solution (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr)
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_solution (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters)
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_vector (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_vector (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters, NumericVector< Number > &new_vector, int is_adjoint=-1) const
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
unsigned int number () const
 
void update_global_solution (std::vector< Number > &global_soln) const
 Fill the input vector global_soln so that it contains the global solution on all processors. More...
 
void update_global_solution (std::vector< Number > &global_soln, const processor_id_type dest_proc) const
 Fill the input vector global_soln so that it contains the global solution on processor dest_proc. More...
 
const MeshBase & get_mesh () const
 
MeshBase & get_mesh ()
 
const DofMap & get_dof_map () const
 
DofMap & get_dof_map ()
 
const EquationSystems & get_equation_systems () const
 
EquationSystems & get_equation_systems ()
 
bool active () const
 
void activate ()
 Activates the system. More...
 
void deactivate ()
 Deactivates the system. More...
 
void set_basic_system_only ()
 Sets the system to be "basic only": i.e. More...
 
vectors_iterator vectors_begin ()
 Beginning of vectors container. More...
 
const_vectors_iterator vectors_begin () const
 Beginning of vectors container. More...
 
vectors_iterator vectors_end ()
 End of vectors container. More...
 
const_vectors_iterator vectors_end () const
 End of vectors container. More...
 
NumericVector< Number > & add_vector (const std::string &vec_name, const bool projections=true, const ParallelType type=PARALLEL)
 Adds the additional vector vec_name to this system. More...
 
void remove_vector (const std::string &vec_name)
 Removes the additional vector vec_name from this system. More...
 
bool & project_solution_on_reinit (void)
 Tells the System whether or not to project the solution vector onto new grids when the system is reinitialized. More...
 
bool have_vector (const std::string &vec_name) const
 
const NumericVector< Number > * request_vector (const std::string &vec_name) const
 
NumericVector< Number > * request_vector (const std::string &vec_name)
 
const NumericVector< Number > * request_vector (const unsigned int vec_num) const
 
NumericVector< Number > * request_vector (const unsigned int vec_num)
 
const NumericVector< Number > & get_vector (const std::string &vec_name) const
 
NumericVector< Number > & get_vector (const std::string &vec_name)
 
const NumericVector< Number > & get_vector (const unsigned int vec_num) const
 
NumericVector< Number > & get_vector (const unsigned int vec_num)
 
const std::string & vector_name (const unsigned int vec_num) const
 
const std::string & vector_name (const NumericVector< Number > &vec_reference) const
 
void set_vector_as_adjoint (const std::string &vec_name, int qoi_num)
 Allows one to set the QoI index controlling whether the vector identified by vec_name represents a solution from the adjoint (qoi_num >= 0) or primal (qoi_num == -1) space. More...
 
int vector_is_adjoint (const std::string &vec_name) const
 
void set_vector_preservation (const std::string &vec_name, bool preserve)
 Allows one to set the boolean controlling whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc. More...
 
bool vector_preservation (const std::string &vec_name) const
 
NumericVector< Number > & add_adjoint_solution (unsigned int i=0)
 
NumericVector< Number > & get_adjoint_solution (unsigned int i=0)
 
const NumericVector< Number > & get_adjoint_solution (unsigned int i=0) const
 
NumericVector< Number > & add_sensitivity_solution (unsigned int i=0)
 
NumericVector< Number > & get_sensitivity_solution (unsigned int i=0)
 
const NumericVector< Number > & get_sensitivity_solution (unsigned int i=0) const
 
NumericVector< Number > & add_weighted_sensitivity_adjoint_solution (unsigned int i=0)
 
NumericVector< Number > & get_weighted_sensitivity_adjoint_solution (unsigned int i=0)
 
const NumericVector< Number > & get_weighted_sensitivity_adjoint_solution (unsigned int i=0) const
 
NumericVector< Number > & add_weighted_sensitivity_solution ()
 
NumericVector< Number > & get_weighted_sensitivity_solution ()
 
const NumericVector< Number > & get_weighted_sensitivity_solution () const
 
NumericVector< Number > & add_adjoint_rhs (unsigned int i=0)
 
NumericVector< Number > & get_adjoint_rhs (unsigned int i=0)
 
const NumericVector< Number > & get_adjoint_rhs (unsigned int i=0) const
 
NumericVector< Number > & add_sensitivity_rhs (unsigned int i=0)
 
NumericVector< Number > & get_sensitivity_rhs (unsigned int i=0)
 
const NumericVector< Number > & get_sensitivity_rhs (unsigned int i=0) const
 
unsigned int n_vectors () const
 
unsigned int n_vars () const
 
unsigned int n_variable_groups () const
 
unsigned int n_components () const
 
dof_id_type n_dofs () const
 
dof_id_type n_active_dofs () const
 
dof_id_type n_constrained_dofs () const
 
dof_id_type n_local_constrained_dofs () const
 
dof_id_type n_local_dofs () const
 
unsigned int add_variable (const std::string &var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
unsigned int add_variable (const std::string &var, const Order order=FIRST, const FEFamily=LAGRANGE, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
unsigned int add_variables (const std::vector< std::string > &vars, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
unsigned int add_variables (const std::vector< std::string > &vars, const Order order=FIRST, const FEFamily=LAGRANGE, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
const Variable & variable (unsigned int var) const
 Return a constant reference to Variable var. More...
 
const VariableGroup & variable_group (unsigned int vg) const
 Return a constant reference to VariableGroup vg. More...
 
bool has_variable (const std::string &var) const
 
const std::string & variable_name (const unsigned int i) const
 
unsigned short int variable_number (const std::string &var) const
 
void get_all_variable_numbers (std::vector< unsigned int > &all_variable_numbers) const
 Fills all_variable_numbers with all the variable numbers for the variables that have been added to this system. More...
 
unsigned int variable_scalar_number (const std::string &var, unsigned int component) const
 
unsigned int variable_scalar_number (unsigned int var_num, unsigned int component) const
 
const FEType & variable_type (const unsigned int i) const
 
const FEType & variable_type (const std::string &var) const
 
bool identify_variable_groups () const
 
void identify_variable_groups (const bool)
 Toggle automatic VariableGroup identification. More...
 
Real calculate_norm (const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type, std::set< unsigned int > *skip_dimensions=nullptr) const
 
Real calculate_norm (const NumericVector< Number > &v, const SystemNorm &norm, std::set< unsigned int > *skip_dimensions=nullptr) const
 
void read_header (Xdr &io, const std::string &version, const bool read_header=true, const bool read_additional_data=true, const bool read_legacy_format=false)
 Reads the basic data header for this System. More...
 
void read_legacy_data (Xdr &io, const bool read_additional_data=true)
 Reads additional data, namely vectors, for this System. More...
 
template<typename ValType >
void read_serialized_data (Xdr &io, const bool read_additional_data=true)
 Reads additional data, namely vectors, for this System. More...
 
void read_serialized_data (Xdr &io, const bool read_additional_data=true)
 Non-templated version for backward compatibility. More...
 
template<typename InValType >
std::size_t read_serialized_vectors (Xdr &io, const std::vector< NumericVector< Number > *> &vectors) const
 Read a number of identically distributed vectors. More...
 
std::size_t read_serialized_vectors (Xdr &io, const std::vector< NumericVector< Number > *> &vectors) const
 Non-templated version for backward compatibility. More...
 
template<typename InValType >
void read_parallel_data (Xdr &io, const bool read_additional_data)
 Reads additional data, namely vectors, for this System. More...
 
void read_parallel_data (Xdr &io, const bool read_additional_data)
 Non-templated version for backward compatibility. More...
 
void write_header (Xdr &io, const std::string &version, const bool write_additional_data) const
 Writes the basic data header for this System. More...
 
void write_serialized_data (Xdr &io, const bool write_additional_data=true) const
 Writes additional data, namely vectors, for this System. More...
 
std::size_t write_serialized_vectors (Xdr &io, const std::vector< const NumericVector< Number > *> &vectors) const
 Serialize & write a number of identically distributed vectors. More...
 
void write_parallel_data (Xdr &io, const bool write_additional_data) const
 Writes additional data, namely vectors, for this System. More...
 
std::string get_info () const
 
void attach_init_function (void fptr(EquationSystems &es, const std::string &name))
 Register a user function to use in initializing the system. More...
 
void attach_init_object (Initialization &init)
 Register a user class to use to initialize the system. More...
 
void attach_assemble_function (void fptr(EquationSystems &es, const std::string &name))
 Register a user function to use in assembling the system matrix and RHS. More...
 
void attach_assemble_object (Assembly &assemble)
 Register a user object to use in assembling the system matrix and RHS. More...
 
void attach_constraint_function (void fptr(EquationSystems &es, const std::string &name))
 Register a user function for imposing constraints. More...
 
void attach_constraint_object (Constraint &constrain)
 Register a user object for imposing constraints. More...
 
void attach_QOI_function (void fptr(EquationSystems &es, const std::string &name, const QoISet &qoi_indices))
 Register a user function for evaluating the quantities of interest, whose values should be placed in System::qoi. More...
 
void attach_QOI_object (QOI &qoi)
 Register a user object for evaluating the quantities of interest, whose values should be placed in System::qoi. More...
 
void attach_QOI_derivative (void fptr(EquationSystems &es, const std::string &name, const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints))
 Register a user function for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs. More...
 
void attach_QOI_derivative_object (QOIDerivative &qoi_derivative)
 Register a user object for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs. More...
 
virtual void user_initialization ()
 Calls user's attached initialization function, or is overridden by the user in derived classes. More...
 
virtual void user_assembly ()
 Calls user's attached assembly function, or is overridden by the user in derived classes. More...
 
virtual void user_constrain ()
 Calls user's attached constraint function, or is overridden by the user in derived classes. More...
 
virtual void user_QOI (const QoISet &qoi_indices)
 Calls user's attached quantity of interest function, or is overridden by the user in derived classes. More...
 
virtual void user_QOI_derivative (const QoISet &qoi_indices=QoISet(), bool include_liftfunc=true, bool apply_constraints=true)
 Calls user's attached quantity of interest derivative function, or is overridden by the user in derived classes. More...
 
virtual void re_update ()
 Re-update the local values when the mesh has changed. More...
 
virtual void restrict_vectors ()
 Restrict vectors after the mesh has coarsened. More...
 
virtual void prolong_vectors ()
 Prolong vectors after the mesh has refined. More...
 
Number current_solution (const dof_id_type global_dof_number) const
 
unsigned int n_qois () const
 Number of currently active quantities of interest. More...
 
Number point_value (unsigned int var, const Point &p, const bool insist_on_success=true) const
 
Number point_value (unsigned int var, const Point &p, const Elem &e) const
 
Number point_value (unsigned int var, const Point &p, const Elem *e) const
 Calls the version of point_value() which takes a reference. More...
 
Gradient point_gradient (unsigned int var, const Point &p, const bool insist_on_success=true) const
 
Gradient point_gradient (unsigned int var, const Point &p, const Elem &e) const
 
Gradient point_gradient (unsigned int var, const Point &p, const Elem *e) const
 Calls the version of point_gradient() which takes a reference. More...
 
Tensor point_hessian (unsigned int var, const Point &p, const bool insist_on_success=true) const
 
Tensor point_hessian (unsigned int var, const Point &p, const Elem &e) const
 
Tensor point_hessian (unsigned int var, const Point &p, const Elem *e) const
 Calls the version of point_hessian() which takes a reference. More...
 
void local_dof_indices (const unsigned int var, std::set< dof_id_type > &var_indices) const
 Fills the std::set with the degrees of freedom on the local processor corresponding the the variable number passed in. More...
 
void zero_variable (NumericVector< Number > &v, unsigned int var_num) const
 Zeroes all dofs in v that correspond to variable number var_num. More...
 
bool & hide_output ()
 
void projection_matrix (SparseMatrix< Number > &proj_mat) const
 This method creates a projection matrix which corresponds to the operation of project_vector between old and new solution spaces. More...
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
virtual void clear_physics ()
 Clear any data structures associated with the physics. More...
 
virtual void init_physics (const System &sys)
 Initialize any data structures associated with the physics. More...
 
virtual bool element_constraint (bool request_jacobian, DiffContext &)
 Adds the constraint contribution on elem to elem_residual. More...
 
virtual bool side_time_derivative (bool request_jacobian, DiffContext &)
 Adds the time derivative contribution on side of elem to elem_residual. More...
 
virtual bool side_constraint (bool request_jacobian, DiffContext &)
 Adds the constraint contribution on side of elem to elem_residual. More...
 
virtual bool nonlocal_time_derivative (bool request_jacobian, DiffContext &)
 Adds any nonlocal time derivative contributions (e.g. More...
 
virtual bool nonlocal_constraint (bool request_jacobian, DiffContext &)
 Adds any nonlocal constraint contributions (e.g. More...
 
virtual void time_evolving (unsigned int var)
 Tells the DiffSystem that variable var is evolving with respect to time. More...
 
virtual void time_evolving (unsigned int var, unsigned int order)
 Tells the DiffSystem that variable var is evolving with respect to time. More...
 
bool is_time_evolving (unsigned int var) const
 
virtual bool eulerian_residual (bool request_jacobian, DiffContext &)
 Adds a pseudo-convection contribution on elem to elem_residual, if the nodes of elem are being translated by a moving mesh. More...
 
virtual bool eulerian_residual (bool request_jacobian, DiffContext &context) override
 Adds a pseudo-convection contribution on elem to elem_residual, if the nodes of elem are being translated by a moving mesh. More...
 
virtual bool mass_residual (bool request_jacobian, DiffContext &)
 Subtracts a mass vector contribution on elem from elem_residual. More...
 
virtual bool mass_residual (bool request_jacobian, DiffContext &) override
 Subtracts a mass vector contribution on elem from elem_residual. More...
 
virtual bool side_mass_residual (bool request_jacobian, DiffContext &)
 Subtracts a mass vector contribution on side of elem from elem_residual. More...
 
virtual bool nonlocal_mass_residual (bool request_jacobian, DiffContext &c)
 Subtracts any nonlocal mass vector contributions (e.g. More...
 
virtual bool damping_residual (bool request_jacobian, DiffContext &)
 Subtracts a damping vector contribution on elem from elem_residual. More...
 
virtual bool side_damping_residual (bool request_jacobian, DiffContext &)
 Subtracts a damping vector contribution on side of elem from elem_residual. More...
 
virtual bool nonlocal_damping_residual (bool request_jacobian, DiffContext &)
 Subtracts any nonlocal damping vector contributions (e.g. More...
 
virtual void set_mesh_system (System *sys)
 Tells the DifferentiablePhysics that system sys contains the isoparametric Lagrangian variables which correspond to the coordinates of mesh nodes, in problems where the mesh itself is expected to move in time. More...
 
const Systemget_mesh_system () const
 
Systemget_mesh_system ()
 
virtual void set_mesh_x_var (unsigned int var)
 Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the x coordinate of mesh nodes, in problems where the mesh itself is expected to move in time. More...
 
unsigned int get_mesh_x_var () const
 
virtual void set_mesh_y_var (unsigned int var)
 Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the y coordinate of mesh nodes. More...
 
unsigned int get_mesh_y_var () const
 
virtual void set_mesh_z_var (unsigned int var)
 Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the z coordinate of mesh nodes. More...
 
unsigned int get_mesh_z_var () const
 
bool _eulerian_time_deriv (bool request_jacobian, DiffContext &)
 This method simply combines element_time_derivative() and eulerian_residual(), which makes its address useful as a pointer-to-member-function when refactoring. More...
 
bool have_first_order_vars () const
 
const std::set< unsigned int > & get_first_order_vars () const
 
bool is_first_order_var (unsigned int var) const
 
bool have_second_order_vars () const
 
const std::set< unsigned int > & get_second_order_vars () const
 
bool is_second_order_var (unsigned int var) const
 
virtual void init_qoi (std::vector< Number > &)
 Initialize system qoi. More...
 
virtual void clear_qoi ()
 Clear all the data structures associated with the QoI. More...
 
virtual void element_qoi (DiffContext &, const QoISet &)
 Does any work that needs to be done on elem in a quantity of interest assembly loop, outputting to elem_qoi. More...
 
virtual void element_qoi_derivative (DiffContext &, const QoISet &)
 Does any work that needs to be done on elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative. More...
 
virtual void side_qoi (DiffContext &, const QoISet &)
 Does any work that needs to be done on side of elem in a quantity of interest assembly loop, outputting to elem_qoi. More...
 
virtual void side_qoi_derivative (DiffContext &, const QoISet &)
 Does any work that needs to be done on side of elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative. More...
 
virtual void thread_join (std::vector< Number > &qoi, const std::vector< Number > &other_qoi, const QoISet &qoi_indices)
 Method to combine thread-local qois. More...
 
virtual void parallel_op (const Parallel::Communicator &communicator, std::vector< Number > &sys_qoi, std::vector< Number > &local_qoi, const QoISet &qoi_indices)
 Method to populate system qoi data structure with process-local qoi. More...
 
virtual void finalize_derivative (NumericVector< Number > &derivatives, std::size_t qoi_index)
 Method to finalize qoi derivatives which require more than just a simple sum of element contributions. More...
 

Static Public Member Functions

static std::string get_info ()
 Gets a string containing the reference information. More...
 
static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void disable_print_counter_info ()
 

Public Attributes

std::unique_ptr< libMesh::FEMFunctionBase< libMesh::Number > > goal_func
 
libMesh::Systeminput_system
 
std::map< libMesh::FEMContext *, libMesh::FEMContext * > input_contexts
 
bool fe_reinit_during_postprocess
 If fe_reinit_during_postprocess is true (it is true by default), FE objects will be reinit()ed with their default quadrature rules. More...
 
Real numerical_jacobian_h
 If calculating numeric jacobians is required, the FEMSystem will perturb each solution vector entry by numerical_jacobian_h when calculating finite differences. More...
 
Real verify_analytic_jacobians
 If verify_analytic_jacobian is equal to zero (as it is by default), no numeric jacobians will be calculated unless an overridden element_time_derivative(), element_constraint(), side_time_derivative(), or side_constraint() function cannot provide an analytic jacobian upon request. More...
 
std::unique_ptr< TimeSolver > time_solver
 A pointer to the solver object we're going to use. More...
 
Real deltat
 For time-dependent problems, this is the amount delta t to advance the solution in time. More...
 
bool postprocess_sides
 If postprocess_sides is true (it is false by default), the postprocessing loop will loop over all sides as well as all elements. More...
 
bool print_solution_norms
 Set print_residual_norms to true to print |U| whenever it is used in an assembly() call. More...
 
bool print_solutions
 Set print_solutions to true to print U whenever it is used in an assembly() call. More...
 
bool print_residual_norms
 Set print_residual_norms to true to print |F| whenever it is assembled. More...
 
bool print_residuals
 Set print_residuals to true to print F whenever it is assembled. More...
 
bool print_jacobian_norms
 Set print_jacobian_norms to true to print |J| whenever it is assembled. More...
 
bool print_jacobians
 Set print_jacobians to true to print J whenever it is assembled. More...
 
bool print_element_solutions
 Set print_element_solutions to true to print each U_elem input. More...
 
bool print_element_residuals
 Set print_element_residuals to true to print each R_elem contribution. More...
 
bool print_element_jacobians
 Set print_element_jacobians to true to print each J_elem contribution. More...
 
SparseMatrix< Number > * matrix
 The system matrix. More...
 
bool zero_out_matrix_and_rhs
 By default, the system will zero out the matrix and the right hand side. More...
 
NumericVector< Number > * rhs
 The system matrix. More...
 
bool assemble_before_solve
 Flag which tells the system to whether or not to call the user assembly function during each call to solve(). More...
 
bool use_fixed_solution
 A boolean to be set to true by systems using elem_fixed_solution, for optional use by e.g. More...
 
int extra_quadrature_order
 A member int that can be employed to indicate increased or reduced quadrature order. More...
 
std::unique_ptr< NumericVector< Number > > solution
 Data structure to hold solution values. More...
 
std::unique_ptr< NumericVector< Number > > current_local_solution
 All the values I need to compute my contribution to the simulation at hand. More...
 
Real time
 For time-dependent problems, this is the time t at the beginning of the current timestep. More...
 
std::vector< Number > qoi
 Values of the quantities of interest. More...
 
bool compute_internal_sides
 compute_internal_sides is false by default, indicating that side_* computations will only be done on boundary sides. More...
 
bool assemble_qoi_sides
 If assemble_qoi_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over domain boundary sides. More...
 
bool assemble_qoi_internal_sides
 If assemble_qoi_internal_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over element sides which do not fall on domain boundaries. More...
 
bool assemble_qoi_elements
 If assemble_qoi_elements is false (it is true by default), the assembly loop for a quantity of interest or its derivatives will skip computing on mesh elements, and will only compute on mesh sides. More...
 

Protected Types

typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 Data structure to log the information. More...
 

Protected Member Functions

virtual void init_data ()
 Initializes the member data fields associated with the system, so that, e.g., assemble() may be used. More...
 
virtual void init_context (libMesh::DiffContext &context)
 
virtual bool element_time_derivative (bool request_jacobian, libMesh::DiffContext &context)
 Adds the time derivative contribution on elem to elem_residual. More...
 
void add_second_order_dot_vars ()
 Helper function to add "velocity" variables that are cousins to second order-in-time variables in the DifferentiableSystem. More...
 
void add_dot_var_dirichlet_bcs (unsigned int var_idx, unsigned int dot_var_idx)
 Helper function to and Dirichlet boundary conditions to "dot" variable cousins of second order variables in the system. More...
 
virtual void init_matrices ()
 Initializes the matrices associated with this system. More...
 
void project_vector (NumericVector< Number > &, int is_adjoint=-1) const
 Projects the vector defined on the old mesh onto the new mesh. More...
 
void project_vector (const NumericVector< Number > &, NumericVector< Number > &, int is_adjoint=-1) const
 Projects the vector defined on the old mesh onto the new mesh. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 

Protected Attributes

std::string _fe_family
 
unsigned int _fe_order
 
DifferentiablePhysics_diff_physics
 Pointer to object to use for physics assembly evaluations. More...
 
DifferentiableQoIdiff_qoi
 Pointer to object to use for quantity of interest assembly evaluations. More...
 
const Parallel::Communicator & _communicator
 
System_mesh_sys
 System from which to acquire moving mesh information. More...
 
unsigned int _mesh_x_var
 Variables from which to acquire moving mesh information. More...
 
unsigned int _mesh_y_var
 
unsigned int _mesh_z_var
 
std::vector< unsigned int > _time_evolving
 Stores unsigned int to tell us which variables are evolving as first order in time (1), second order in time (2), or are not time evolving (0). More...
 
std::set< unsigned int > _first_order_vars
 Variable indices for those variables that are first order in time. More...
 
std::set< unsigned int > _second_order_vars
 Variable indices for those variables that are second order in time. More...
 
std::map< unsigned int, unsigned int > _second_order_dot_vars
 If the user adds any second order variables, then we need to also cache the map to their corresponding dot variable that will be added by this TimeSolver class. More...
 

Static Protected Attributes

static Counts _counts
 Actually holds the data. More...
 
static Threads::atomic< unsigned int > _n_objects
 The number of objects. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static bool _enable_print_counter
 Flag to control whether reference count information is printed when print_info is called. More...
 

Detailed Description

Definition at line 26 of file L2system.h.

Member Typedef Documentation

◆ const_matrices_iterator

typedef std::map<std::string, SparseMatrix<Number> *>::const_iterator libMesh::ImplicitSystem::const_matrices_iterator
inherited

Definition at line 290 of file implicit_system.h.

◆ const_vectors_iterator

typedef std::map<std::string, NumericVector<Number> *>::const_iterator libMesh::System::const_vectors_iterator
inherited

Definition at line 742 of file system.h.

◆ Counts

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ GradientFunctionPointer

typedef Gradient(* libMesh::System::GradientFunctionPointer) (const Point &p, const Parameters &parameters, const std::string &sys_name, const std::string &unknown_name)
inherited

Definition at line 517 of file system.h.

◆ matrices_iterator

typedef std::map<std::string, SparseMatrix<Number> *>::iterator libMesh::ImplicitSystem::matrices_iterator
inherited

Matrix iterator typedefs.

Definition at line 289 of file implicit_system.h.

◆ Parent

The type of the parent.

Definition at line 79 of file fem_system.h.

◆ sys_type

The type of system.

Definition at line 74 of file fem_system.h.

◆ TimeSolverResPtr

typedef bool(TimeSolver::* libMesh::FEMSystem::TimeSolverResPtr) (bool, DiffContext &)
inherited

Syntax sugar to make numerical_jacobian() declaration easier.

Definition at line 214 of file fem_system.h.

◆ ValueFunctionPointer

typedef Number(* libMesh::System::ValueFunctionPointer) (const Point &p, const Parameters &Parameters, const std::string &sys_name, const std::string &unknown_name)
inherited

Projects arbitrary functions onto the current solution.

The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

Definition at line 513 of file system.h.

◆ vectors_iterator

typedef std::map<std::string, NumericVector<Number> *>::iterator libMesh::System::vectors_iterator
inherited

Vector iterator typedefs.

Definition at line 741 of file system.h.

Constructor & Destructor Documentation

◆ L2System()

L2System::L2System ( libMesh::EquationSystems es,
const std::string &  name,
const unsigned int  number 
)

Definition at line 30 of file L2system.h.

34  input_system(nullptr),
35  _fe_family("LAGRANGE"),
36  _fe_order(1) {}
libMesh::System * input_system
Definition: L2system.h:51
This class provides a specific system class.
Definition: fem_system.h:53
unsigned int number() const
Definition: system.h:2018
unsigned int _fe_order
Definition: L2system.h:70
std::string _fe_family
Definition: L2system.h:69
const std::string & name() const
Definition: system.h:2010

◆ ~L2System()

L2System::~L2System ( )

Member Function Documentation

◆ _eulerian_time_deriv()

bool libMesh::DifferentiablePhysics::_eulerian_time_deriv ( bool  request_jacobian,
DiffContext  
)
inherited

This method simply combines element_time_derivative() and eulerian_residual(), which makes its address useful as a pointer-to-member-function when refactoring.

◆ activate()

void libMesh::System::activate ( )
inherited

Activates the system.

Only active systems are solved.

Definition at line 2066 of file system.h.

References libMesh::System::_active.

2067 {
2068  _active = true;
2069 }
bool _active
Flag stating if the system is active or not.
Definition: system.h:1920

◆ active()

bool libMesh::System::active ( ) const
inherited
Returns
true if the system is active, false otherwise. An active system will be solved.

Definition at line 2058 of file system.h.

References libMesh::System::_active.

2059 {
2060  return _active;
2061 }
bool _active
Flag stating if the system is active or not.
Definition: system.h:1920

◆ add_adjoint_rhs()

NumericVector<Number>& libMesh::System::add_adjoint_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint rhs vectors, by default the one corresponding to the first qoi. Creates the vector if it doesn't already exist.

◆ add_adjoint_solution()

NumericVector<Number>& libMesh::System::add_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint solution vectors, by default the one corresponding to the first qoi. Creates the vector if it doesn't already exist.

◆ add_dot_var_dirichlet_bcs()

void libMesh::DifferentiableSystem::add_dot_var_dirichlet_bcs ( unsigned int  var_idx,
unsigned int  dot_var_idx 
)
protectedinherited

Helper function to and Dirichlet boundary conditions to "dot" variable cousins of second order variables in the system.

The function takes the second order variable index, it's corresponding "dot" variable index and then searches for DirichletBoundary objects for var_idx and then adds a DirichletBoundary object for dot_var_idx using the same boundary ids and functors for the var_idx DirichletBoundary.

◆ add_matrix()

SparseMatrix<Number>& libMesh::ImplicitSystem::add_matrix ( const std::string &  mat_name)
inherited

Adds the additional matrix mat_name to this system.

Only allowed prior to assemble(). All additional matrices have the same sparsity pattern as the matrix used during solution. When not System but the user wants to initialize the mayor matrix, then all the additional matrices, if existent, have to be initialized by the user, too.

◆ add_second_order_dot_vars()

void libMesh::DifferentiableSystem::add_second_order_dot_vars ( )
protectedinherited

Helper function to add "velocity" variables that are cousins to second order-in-time variables in the DifferentiableSystem.

This function is only called if the TimeSolver is a FirstOrderUnsteadySolver.

◆ add_sensitivity_rhs()

NumericVector<Number>& libMesh::System::add_sensitivity_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's sensitivity rhs vectors, by default the one corresponding to the first parameter. Creates the vector if it doesn't already exist.

◆ add_sensitivity_solution()

NumericVector<Number>& libMesh::System::add_sensitivity_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's solution sensitivity vectors, by default the one corresponding to the first parameter. Creates the vector if it doesn't already exist.

◆ add_variable() [1/2]

unsigned int libMesh::System::add_variable ( const std::string &  var,
const FEType type,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Returns
The index number for the new variable.

Referenced by SimpleRBConstruction::init_data(), and FETest< order, family, elem_type >::setUp().

◆ add_variable() [2/2]

unsigned int libMesh::System::add_variable ( const std::string &  var,
const Order  order = FIRST,
const FEFamily  = LAGRANGE,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Same as before, but assumes LAGRANGE as default value for FEType.family.

◆ add_variables() [1/2]

unsigned int libMesh::System::add_variables ( const std::vector< std::string > &  vars,
const FEType type,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Returns
The index number for the new variable.

◆ add_variables() [2/2]

unsigned int libMesh::System::add_variables ( const std::vector< std::string > &  vars,
const Order  order = FIRST,
const FEFamily  = LAGRANGE,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Same as before, but assumes LAGRANGE as default value for FEType.family.

◆ add_vector()

NumericVector<Number>& libMesh::System::add_vector ( const std::string &  vec_name,
const bool  projections = true,
const ParallelType  type = PARALLEL 
)
inherited

Adds the additional vector vec_name to this system.

All the additional vectors are similarly distributed, like the solution, and initialized to zero.

By default vectors added by add_vector are projected to changed grids by reinit(). To zero them instead (more efficient), pass "false" as the second argument

◆ add_weighted_sensitivity_adjoint_solution()

NumericVector<Number>& libMesh::System::add_weighted_sensitivity_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's weighted sensitivity adjoint solution vectors, by default the one corresponding to the first qoi. Creates the vector if it doesn't already exist.

◆ add_weighted_sensitivity_solution()

NumericVector<Number>& libMesh::System::add_weighted_sensitivity_solution ( )
inherited
Returns
A reference to the solution of the last weighted sensitivity solve Creates the vector if it doesn't already exist.

◆ adjoint_qoi_parameter_sensitivity()

virtual void libMesh::ImplicitSystem::adjoint_qoi_parameter_sensitivity ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData sensitivities 
)
overridevirtualinherited

Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j].

Uses adjoint_solve() and the adjoint sensitivity method.

Currently uses finite differenced derivatives (partial q / partial p) and (partial R / partial p).

Reimplemented from libMesh::System.

◆ adjoint_solve()

virtual std::pair<unsigned int, Real> libMesh::DifferentiableSystem::adjoint_solve ( const QoISet qoi_indices = QoISet())
overridevirtualinherited

This function sets the _is_adjoint boolean member of TimeSolver to true and then calls the adjoint_solve in implicit system.

Reimplemented from libMesh::ImplicitSystem.

◆ assemble()

virtual void libMesh::DifferentiableSystem::assemble ( )
overridevirtualinherited

Prepares matrix and rhs for matrix assembly.

Users should not reimplement this. Note that in some cases only current_local_solution is used during assembly, and, therefore, if solution has been altered without update() being called, then the user must call update() before calling this function.

Reimplemented from libMesh::ImplicitSystem.

◆ assemble_qoi()

virtual void libMesh::FEMSystem::assemble_qoi ( const QoISet indices = QoISet())
overridevirtualinherited

Runs a qoi assembly loop over all elements, and if assemble_qoi_sides is true over all sides.

Users may have to override this function if they have any quantities of interest that are not expressible as a sum of element qois.

Reimplemented from libMesh::ExplicitSystem.

◆ assemble_qoi_derivative()

virtual void libMesh::FEMSystem::assemble_qoi_derivative ( const QoISet qoi_indices = QoISet(),
bool  include_liftfunc = true,
bool  apply_constraints = true 
)
overridevirtualinherited

Runs a qoi derivative assembly loop over all elements, and if assemble_qoi_sides is true over all sides.

Users may have to override this function for quantities of interest that are not expressible as a sum of element qois.

Reimplemented from libMesh::ExplicitSystem.

◆ assemble_residual_derivatives()

virtual void libMesh::ImplicitSystem::assemble_residual_derivatives ( const ParameterVector parameters)
overridevirtualinherited

Residual parameter derivative function.

Uses finite differences by default.

This will assemble the sensitivity rhs vectors to hold -(partial R / partial p_i), making them ready to solve the forward sensitivity equation.

Can be overridden in derived classes.

Reimplemented from libMesh::System.

◆ assembly()

virtual void libMesh::FEMSystem::assembly ( bool  get_residual,
bool  get_jacobian,
bool  apply_heterogeneous_constraints = false,
bool  apply_no_constraints = false 
)
overridevirtualinherited

Prepares matrix or rhs for matrix assembly.

Users may reimplement this to add pre- or post-assembly code before or after calling FEMSystem::assembly(). Note that in some cases only current_local_solution is used during assembly, and, therefore, if solution has been altered without update() being called, then the user must call update() before calling this function.

Implements libMesh::DifferentiableSystem.

◆ attach_assemble_function()

void libMesh::System::attach_assemble_function ( void   fptrEquationSystems &es, const std::string &name)
inherited

Register a user function to use in assembling the system matrix and RHS.

◆ attach_assemble_object()

void libMesh::System::attach_assemble_object ( Assembly assemble)
inherited

Register a user object to use in assembling the system matrix and RHS.

◆ attach_constraint_function()

void libMesh::System::attach_constraint_function ( void   fptrEquationSystems &es, const std::string &name)
inherited

Register a user function for imposing constraints.

◆ attach_constraint_object()

void libMesh::System::attach_constraint_object ( Constraint constrain)
inherited

Register a user object for imposing constraints.

◆ attach_init_function()

void libMesh::System::attach_init_function ( void   fptrEquationSystems &es, const std::string &name)
inherited

Register a user function to use in initializing the system.

◆ attach_init_object()

void libMesh::System::attach_init_object ( Initialization init)
inherited

Register a user class to use to initialize the system.

Note
This is exclusive with the attach_init_function.

◆ attach_physics()

void libMesh::DifferentiableSystem::attach_physics ( DifferentiablePhysics physics_in)
inherited

Attach external Physics object.

Definition at line 197 of file diff_system.h.

References libMesh::DifferentiableSystem::_diff_physics, libMesh::DifferentiablePhysics::clone_physics(), and libMesh::DifferentiablePhysics::init_physics().

198  { this->_diff_physics = (physics_in->clone_physics()).release();
199  this->_diff_physics->init_physics(*this);}
DifferentiablePhysics * _diff_physics
Pointer to object to use for physics assembly evaluations.
Definition: diff_system.h:371
virtual void init_physics(const System &sys)
Initialize any data structures associated with the physics.

◆ attach_qoi()

void libMesh::DifferentiableSystem::attach_qoi ( DifferentiableQoI qoi_in)
inherited

Attach external QoI object.

Definition at line 225 of file diff_system.h.

References libMesh::DifferentiableQoI::clone(), libMesh::DifferentiableSystem::diff_qoi, libMesh::DifferentiableQoI::init_qoi(), and libMesh::System::qoi.

226  { this->diff_qoi = (qoi_in->clone()).release();
227  // User needs to resize qoi system qoi accordingly
228  this->diff_qoi->init_qoi( this->qoi );}
DifferentiableQoI * diff_qoi
Pointer to object to use for quantity of interest assembly evaluations.
Definition: diff_system.h:378
std::vector< Number > qoi
Values of the quantities of interest.
Definition: system.h:1551
virtual void init_qoi(std::vector< Number > &)
Initialize system qoi.
Definition: diff_qoi.h:69

◆ attach_QOI_derivative()

void libMesh::System::attach_QOI_derivative ( void   fptrEquationSystems &es, const std::string &name, const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints)
inherited

Register a user function for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs.

◆ attach_QOI_derivative_object()

void libMesh::System::attach_QOI_derivative_object ( QOIDerivative qoi_derivative)
inherited

Register a user object for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs.

◆ attach_QOI_function()

void libMesh::System::attach_QOI_function ( void   fptrEquationSystems &es, const std::string &name, const QoISet &qoi_indices)
inherited

Register a user function for evaluating the quantities of interest, whose values should be placed in System::qoi.

◆ attach_QOI_object()

void libMesh::System::attach_QOI_object ( QOI qoi)
inherited

Register a user object for evaluating the quantities of interest, whose values should be placed in System::qoi.

◆ boundary_project_solution() [1/2]

void libMesh::System::boundary_project_solution ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr 
)
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

◆ boundary_project_solution() [2/2]

void libMesh::System::boundary_project_solution ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters 
)
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

◆ boundary_project_vector() [1/2]

void libMesh::System::boundary_project_vector ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
NumericVector< Number > &  new_vector,
FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ boundary_project_vector() [2/2]

void libMesh::System::boundary_project_vector ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters,
NumericVector< Number > &  new_vector,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ build_context()

virtual std::unique_ptr<DiffContext> libMesh::FEMSystem::build_context ( )
overridevirtualinherited

Builds a FEMContext object with enough information to do evaluations on each element.

For most problems, the default FEMSystem implementation is correct; users who subclass FEMContext will need to also reimplement this method to build it.

Reimplemented from libMesh::DifferentiableSystem.

◆ calculate_norm() [1/2]

Real libMesh::System::calculate_norm ( const NumericVector< Number > &  v,
unsigned int  var,
FEMNormType  norm_type,
std::set< unsigned int > *  skip_dimensions = nullptr 
) const
inherited
Returns
A norm of variable var in the vector v, in the specified norm (e.g. L2, L_INF, H1)

◆ calculate_norm() [2/2]

Real libMesh::System::calculate_norm ( const NumericVector< Number > &  v,
const SystemNorm norm,
std::set< unsigned int > *  skip_dimensions = nullptr 
) const
inherited
Returns
A norm of the vector v, using component_norm and component_scale to choose and weight the norms of each variable.

◆ clear()

virtual void libMesh::DifferentiableSystem::clear ( )
overridevirtualinherited

Clear all the data structures associated with the system.

Reimplemented from libMesh::ImplicitSystem.

Reimplemented in libMesh::ContinuationSystem.

◆ clear_physics()

virtual void libMesh::DifferentiablePhysics::clear_physics ( )
virtualinherited

Clear any data structures associated with the physics.

◆ clear_qoi()

virtual void libMesh::DifferentiableQoI::clear_qoi ( )
virtualinherited

Clear all the data structures associated with the QoI.

Definition at line 75 of file diff_qoi.h.

75 {}

◆ clone()

virtual std::unique_ptr<DifferentiableQoI> libMesh::DifferentiableSystem::clone ( )
overridevirtualinherited

We don't allow systems to be attached to each other.

Implements libMesh::DifferentiableQoI.

Definition at line 169 of file diff_system.h.

170  {
171  libmesh_not_implemented();
172  // dummy
173  return std::unique_ptr<DifferentiableQoI>(this);
174  }

◆ clone_physics()

virtual std::unique_ptr<DifferentiablePhysics> libMesh::DifferentiableSystem::clone_physics ( )
overridevirtualinherited

We don't allow systems to be attached to each other.

Implements libMesh::DifferentiablePhysics.

Definition at line 159 of file diff_system.h.

160  {
161  libmesh_not_implemented();
162  // dummy
163  return std::unique_ptr<DifferentiablePhysics>(this);
164  }

◆ comm()

const Parallel::Communicator& libMesh::ParallelObject::comm ( ) const
inherited
Returns
A reference to the Parallel::Communicator object used by this mesh.

Definition at line 87 of file parallel_object.h.

References libMesh::ParallelObject::_communicator.

Referenced by libMesh::EpetraVector< T >::EpetraVector(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Parallel::sync_node_data_by_element_id(), and libMesh::Parallel::sync_node_data_by_element_id_once().

88  { return _communicator; }
const Parallel::Communicator & _communicator

◆ compare()

virtual bool libMesh::System::compare ( const System other_system,
const Real  threshold,
const bool  verbose 
) const
virtualinherited
Returns
true when the other system contains identical data, up to the given threshold. Outputs some diagnostic info when verbose is set.

◆ current_solution()

Number libMesh::System::current_solution ( const dof_id_type  global_dof_number) const
inherited
Returns
The current solution for the specified global DOF.

◆ damping_residual()

virtual bool libMesh::DifferentiablePhysics::damping_residual ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Subtracts a damping vector contribution on elem from elem_residual.

This method is not used in first-order-in-time problems. For second-order-in-time problems, this is the $ C(u,\ddot{u})\ddot{u} $ term. This method is only called for UnsteadySolver-based TimeSolvers.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

If the problem has no damping, the default "do-nothing" is correct. Otherwise, this must be reimplemented.

Reimplemented in SecondOrderScalarSystemFirstOrderTimeSolverBase, and SecondOrderScalarSystemSecondOrderTimeSolverBase.

Definition at line 374 of file diff_physics.h.

375  {
376  return request_jacobian;
377  }

◆ deactivate()

void libMesh::System::deactivate ( )
inherited

Deactivates the system.

Only active systems are solved.

Definition at line 2074 of file system.h.

References libMesh::System::_active.

2075 {
2076  _active = false;
2077 }
bool _active
Flag stating if the system is active or not.
Definition: system.h:1920

◆ disable_cache()

virtual void libMesh::ImplicitSystem::disable_cache ( )
overridevirtualinherited

Avoids use of any cached data that might affect any solve result.

Should be overridden in derived systems.

Reimplemented from libMesh::System.

◆ disable_print_counter_info()

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ element_constraint()

virtual bool libMesh::DifferentiablePhysics::element_constraint ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Adds the constraint contribution on elem to elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

Users may need to reimplement this for their particular PDE.

To implement the constraint 0 = G(u), the user should examine u = elem_solution and add (G(u), phi_i) to elem_residual in elem_constraint().

Reimplemented in CoupledSystem, and NavierSystem.

Definition at line 142 of file diff_physics.h.

143  {
144  return request_jacobian;
145  }

◆ element_postprocess()

virtual void libMesh::DifferentiableSystem::element_postprocess ( DiffContext )
virtualinherited

Does any work that needs to be done on elem in a postprocessing loop.

Reimplemented in LaplaceSystem, LaplaceSystem, and PoissonSystem.

Definition at line 282 of file diff_system.h.

282 {}

◆ element_qoi()

virtual void libMesh::DifferentiableQoI::element_qoi ( DiffContext ,
const QoISet  
)
virtualinherited

Does any work that needs to be done on elem in a quantity of interest assembly loop, outputting to elem_qoi.

Only qois included in the supplied QoISet need to be assembled.

Reimplemented in LaplaceQoI.

Definition at line 108 of file diff_qoi.h.

110  {}

◆ element_qoi_derivative()

virtual void libMesh::DifferentiableQoI::element_qoi_derivative ( DiffContext ,
const QoISet  
)
virtualinherited

Does any work that needs to be done on elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative.

Only qois included in the supplied QoISet need their derivatives assembled.

Reimplemented in HeatSystem, LaplaceSystem, LaplaceSystem, and LaplaceQoI.

Definition at line 120 of file diff_qoi.h.

122  {}

◆ element_time_derivative()

virtual bool L2System::element_time_derivative ( bool  request_jacobian,
libMesh::DiffContext  
)
protectedvirtual

Adds the time derivative contribution on elem to elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

Users need to reimplement this for their particular PDE.

To implement the physics model du/dt = F(u), the user should examine u = elem_solution and add (F(u), phi_i) to elem_residual in elem_time_derivative().

Reimplemented from libMesh::DifferentiablePhysics.

◆ enable_print_counter_info()

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

◆ eulerian_residual() [1/2]

virtual bool libMesh::FEMPhysics::eulerian_residual ( bool  request_jacobian,
DiffContext context 
)
overridevirtualinherited

Adds a pseudo-convection contribution on elem to elem_residual, if the nodes of elem are being translated by a moving mesh.

This function assumes that the user's time derivative equations (except for any equations involving unknown mesh xyz coordinates themselves) are expressed in an Eulerian frame of reference, and that the user is satisfied with an unstabilized convection term. Lagrangian equations will probably require overriding eulerian_residual() with a blank function; ALE or stabilized formulations will require reimplementing eulerian_residual() entirely.

Reimplemented from libMesh::DifferentiablePhysics.

Reimplemented in SolidSystem.

◆ eulerian_residual() [2/2]

virtual bool libMesh::DifferentiablePhysics::eulerian_residual ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Adds a pseudo-convection contribution on elem to elem_residual, if the nodes of elem are being translated by a moving mesh.

The library provides a basic implementation in FEMPhysics::eulerian_residual()

Reimplemented in libMesh::FEMPhysics, and SolidSystem.

Definition at line 294 of file diff_physics.h.

295  {
296  return request_jacobian;
297  }

◆ fe_family()

std::string& L2System::fe_family ( )

Definition at line 41 of file L2system.h.

References _fe_family.

41 { return _fe_family; }
std::string _fe_family
Definition: L2system.h:69

◆ fe_order()

unsigned int& L2System::fe_order ( )

Definition at line 42 of file L2system.h.

References _fe_order.

42 { return _fe_order; }
unsigned int _fe_order
Definition: L2system.h:70

◆ finalize_derivative()

virtual void libMesh::DifferentiableQoI::finalize_derivative ( NumericVector< Number > &  derivatives,
std::size_t  qoi_index 
)
virtualinherited

Method to finalize qoi derivatives which require more than just a simple sum of element contributions.

◆ forward_qoi_parameter_sensitivity()

virtual void libMesh::ImplicitSystem::forward_qoi_parameter_sensitivity ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData sensitivities 
)
overridevirtualinherited

Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j].

Uses the forward sensitivity method.

Currently uses finite differenced derivatives (partial q / partial p) and (partial R / partial p).

Reimplemented from libMesh::System.

◆ get_adjoint_rhs() [1/2]

NumericVector<Number>& libMesh::System::get_adjoint_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint rhs vectors, by default the one corresponding to the first qoi. This what the user's QoI derivative code should assemble when setting up an adjoint problem

◆ get_adjoint_rhs() [2/2]

const NumericVector<Number>& libMesh::System::get_adjoint_rhs ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's adjoint rhs vectors, by default the one corresponding to the first qoi.

◆ get_adjoint_solution() [1/2]

NumericVector<Number>& libMesh::System::get_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_adjoint_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_adjoint_solution ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_all_variable_numbers()

void libMesh::System::get_all_variable_numbers ( std::vector< unsigned int > &  all_variable_numbers) const
inherited

Fills all_variable_numbers with all the variable numbers for the variables that have been added to this system.

◆ get_dof_map() [1/2]

const DofMap & libMesh::System::get_dof_map ( ) const
inherited
Returns
A constant reference to this system's _dof_map.

Definition at line 2042 of file system.h.

References libMesh::System::_dof_map.

Referenced by SimpleRBConstruction::init_data(), and FETest< order, family, elem_type >::setUp().

2043 {
2044  return *_dof_map;
2045 }
std::unique_ptr< DofMap > _dof_map
Data structure describing the relationship between nodes, variables, etc...
Definition: system.h:1877

◆ get_dof_map() [2/2]

DofMap & libMesh::System::get_dof_map ( )
inherited
Returns
A writable reference to this system's _dof_map.

Definition at line 2050 of file system.h.

References libMesh::System::_dof_map.

2051 {
2052  return *_dof_map;
2053 }
std::unique_ptr< DofMap > _dof_map
Data structure describing the relationship between nodes, variables, etc...
Definition: system.h:1877

◆ get_equation_systems() [1/2]

const EquationSystems& libMesh::System::get_equation_systems ( ) const
inherited
Returns
A constant reference to this system's parent EquationSystems object.

Definition at line 705 of file system.h.

References libMesh::System::_equation_systems.

Referenced by libMesh::WrappedFunction< Output >::WrappedFunction().

705 { return _equation_systems; }
EquationSystems & _equation_systems
Constant reference to the EquationSystems object used for the simulation.
Definition: system.h:1883

◆ get_equation_systems() [2/2]

EquationSystems& libMesh::System::get_equation_systems ( )
inherited
Returns
A reference to this system's parent EquationSystems object.

Definition at line 710 of file system.h.

References libMesh::System::_equation_systems.

710 { return _equation_systems; }
EquationSystems & _equation_systems
Constant reference to the EquationSystems object used for the simulation.
Definition: system.h:1883

◆ get_first_order_vars()

const std::set<unsigned int>& libMesh::DifferentiablePhysics::get_first_order_vars ( ) const
inherited
Returns
The set of first order in time variable indices. May be empty.

Definition at line 517 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_first_order_vars.

518  { return _first_order_vars; }
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
Definition: diff_physics.h:559

◆ get_info() [1/2]

static std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

◆ get_info() [2/2]

std::string libMesh::System::get_info ( ) const
inherited
Returns
A string containing information about the system.

◆ get_linear_solve_parameters()

virtual std::pair<unsigned int, Real> libMesh::DifferentiableSystem::get_linear_solve_parameters ( ) const
overridevirtualinherited
Returns
An integer corresponding to the upper iteration count limit and a Real corresponding to the convergence tolerance to be used in linear adjoint and/or sensitivity solves

Reimplemented from libMesh::ImplicitSystem.

◆ get_linear_solver()

virtual LinearSolver<Number>* libMesh::DifferentiableSystem::get_linear_solver ( ) const
overridevirtualinherited
Returns
A pointer to a linear solver appropriate for use in adjoint and/or sensitivity solves

Reimplemented from libMesh::ImplicitSystem.

◆ get_matrix() [1/2]

const SparseMatrix<Number>& libMesh::ImplicitSystem::get_matrix ( const std::string &  mat_name) const
inherited
Returns
A const reference to this system's additional matrix named mat_name.

None of these matrices is involved in the solution process. Access is only granted when the matrix is already properly initialized.

◆ get_matrix() [2/2]

SparseMatrix<Number>& libMesh::ImplicitSystem::get_matrix ( const std::string &  mat_name)
inherited
Returns
A writable reference to this system's additional matrix named mat_name.

None of these matrices is involved in the solution process. Access is only granted when the matrix is already properly initialized.

◆ get_mesh() [1/2]

const MeshBase & libMesh::System::get_mesh ( ) const
inherited
Returns
A constant reference to this systems's _mesh.

Definition at line 2026 of file system.h.

References libMesh::System::_mesh.

Referenced by AssemblyA0::boundary_assembly(), AssemblyA1::boundary_assembly(), and AssemblyA2::boundary_assembly().

2027 {
2028  return _mesh;
2029 }
MeshBase & _mesh
Constant reference to the mesh data structure used for the simulation.
Definition: system.h:1889

◆ get_mesh() [2/2]

MeshBase & libMesh::System::get_mesh ( )
inherited
Returns
A reference to this systems's _mesh.

Definition at line 2034 of file system.h.

References libMesh::System::_mesh.

2035 {
2036  return _mesh;
2037 }
MeshBase & _mesh
Constant reference to the mesh data structure used for the simulation.
Definition: system.h:1889

◆ get_mesh_system() [1/2]

const System * libMesh::DifferentiablePhysics::get_mesh_system ( ) const
inherited
Returns
A const reference to the system with variables corresponding to mesh nodal coordinates, or nullptr if the mesh is fixed. Useful for ALE calculations.

Definition at line 624 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_sys.

625 {
626  return _mesh_sys;
627 }
System * _mesh_sys
System from which to acquire moving mesh information.
Definition: diff_physics.h:542

◆ get_mesh_system() [2/2]

System * libMesh::DifferentiablePhysics::get_mesh_system ( )
inherited
Returns
A reference to the system with variables corresponding to mesh nodal coordinates, or nullptr if the mesh is fixed.

Definition at line 630 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_sys.

631 {
632  return _mesh_sys;
633 }
System * _mesh_sys
System from which to acquire moving mesh information.
Definition: diff_physics.h:542

◆ get_mesh_x_var()

unsigned int libMesh::DifferentiablePhysics::get_mesh_x_var ( ) const
inherited
Returns
The variable number corresponding to the mesh x coordinate. Useful for ALE calculations.

Definition at line 636 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_x_var.

637 {
638  return _mesh_x_var;
639 }
unsigned int _mesh_x_var
Variables from which to acquire moving mesh information.
Definition: diff_physics.h:547

◆ get_mesh_y_var()

unsigned int libMesh::DifferentiablePhysics::get_mesh_y_var ( ) const
inherited
Returns
The variable number corresponding to the mesh y coordinate. Useful for ALE calculations.

Definition at line 642 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_y_var.

643 {
644  return _mesh_y_var;
645 }

◆ get_mesh_z_var()

unsigned int libMesh::DifferentiablePhysics::get_mesh_z_var ( ) const
inherited
Returns
The variable number corresponding to the mesh z coordinate. Useful for ALE calculations.

Definition at line 648 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_z_var.

649 {
650  return _mesh_z_var;
651 }

◆ get_physics() [1/2]

const DifferentiablePhysics* libMesh::DifferentiableSystem::get_physics ( ) const
inherited
Returns
A const reference to a DifferentiablePhysics object.
Note
If no external Physics object is attached, the default is this.

Definition at line 182 of file diff_system.h.

References libMesh::DifferentiableSystem::_diff_physics.

183  { return this->_diff_physics; }
DifferentiablePhysics * _diff_physics
Pointer to object to use for physics assembly evaluations.
Definition: diff_system.h:371

◆ get_physics() [2/2]

DifferentiablePhysics* libMesh::DifferentiableSystem::get_physics ( )
inherited
Returns
A reference to a DifferentiablePhysics object.
Note
If no external Physics object is attached, the default is this.

Definition at line 191 of file diff_system.h.

References libMesh::DifferentiableSystem::_diff_physics.

192  { return this->_diff_physics; }
DifferentiablePhysics * _diff_physics
Pointer to object to use for physics assembly evaluations.
Definition: diff_system.h:371

◆ get_qoi() [1/2]

const DifferentiableQoI* libMesh::DifferentiableSystem::get_qoi ( ) const
inherited
Returns
A const reference to a DifferentiableQoI object.
Note
If no external QoI object is attached, the default is this.

Definition at line 211 of file diff_system.h.

References libMesh::DifferentiableSystem::diff_qoi.

212  { return this->diff_qoi; }
DifferentiableQoI * diff_qoi
Pointer to object to use for quantity of interest assembly evaluations.
Definition: diff_system.h:378

◆ get_qoi() [2/2]

DifferentiableQoI* libMesh::DifferentiableSystem::get_qoi ( )
inherited
Returns
A reference to a DifferentiableQoI object.
Note
If no external QoI object is attached, the default is this.

Definition at line 219 of file diff_system.h.

References libMesh::DifferentiableSystem::diff_qoi.

220  { return this->diff_qoi; }
DifferentiableQoI * diff_qoi
Pointer to object to use for quantity of interest assembly evaluations.
Definition: diff_system.h:378

◆ get_second_order_dot_var()

unsigned int libMesh::DifferentiableSystem::get_second_order_dot_var ( unsigned int  var) const
inherited

For a given second order (in time) variable var, this method will return the index to the corresponding "dot" variable.

For FirstOrderUnsteadySolver classes, the "dot" variable would automatically be added and the returned index will correspond to that variable. For SecondOrderUnsteadySolver classes, this method will return var as there this is no "dot" variable per se, but having this function allows one to use the interface to treat both FirstOrderUnsteadySolver and SecondOrderUnsteadySolver simultaneously.

◆ get_second_order_vars()

const std::set<unsigned int>& libMesh::DifferentiablePhysics::get_second_order_vars ( ) const
inherited
Returns
The set of second order in time variable indices. May be empty.

Definition at line 530 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_second_order_vars.

531  { return _second_order_vars; }
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second order in time.
Definition: diff_physics.h:564

◆ get_sensitivity_rhs() [1/2]

NumericVector<Number>& libMesh::System::get_sensitivity_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's sensitivity rhs vectors, by default the one corresponding to the first parameter. By default these vectors are built by the library, using finite differences, when assemble_residual_derivatives() is called.

When assembled, this vector should hold -(partial R / partial p_i)

◆ get_sensitivity_rhs() [2/2]

const NumericVector<Number>& libMesh::System::get_sensitivity_rhs ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's sensitivity rhs vectors, by default the one corresponding to the first parameter.

◆ get_sensitivity_solution() [1/2]

NumericVector<Number>& libMesh::System::get_sensitivity_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's solution sensitivity vectors, by default the one corresponding to the first parameter.

◆ get_sensitivity_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_sensitivity_solution ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's solution sensitivity vectors, by default the one corresponding to the first parameter.

◆ get_time_solver() [1/2]

TimeSolver & libMesh::DifferentiableSystem::get_time_solver ( )
inherited
Returns
A pointer to the time solver attached to the calling system

Definition at line 415 of file diff_system.h.

References libMesh::DifferentiableSystem::time_solver.

416 {
417  libmesh_assert(time_solver.get());
418  libmesh_assert_equal_to (&(time_solver->system()), this);
419  return *time_solver;
420 }
std::unique_ptr< TimeSolver > time_solver
A pointer to the solver object we&#39;re going to use.
Definition: diff_system.h:234

◆ get_time_solver() [2/2]

const TimeSolver & libMesh::DifferentiableSystem::get_time_solver ( ) const
inherited

Non-const version of the above.

Definition at line 423 of file diff_system.h.

References libMesh::DifferentiableSystem::time_solver.

424 {
425  libmesh_assert(time_solver.get());
426  libmesh_assert_equal_to (&(time_solver->system()), this);
427  return *time_solver;
428 }
std::unique_ptr< TimeSolver > time_solver
A pointer to the solver object we&#39;re going to use.
Definition: diff_system.h:234

◆ get_vector() [1/4]

const NumericVector<Number>& libMesh::System::get_vector ( const std::string &  vec_name) const
inherited
Returns
A const reference to this system's additional vector named vec_name. Access is only granted when the vector is already properly initialized.

◆ get_vector() [2/4]

NumericVector<Number>& libMesh::System::get_vector ( const std::string &  vec_name)
inherited
Returns
A writable reference to this system's additional vector named vec_name. Access is only granted when the vector is already properly initialized.

◆ get_vector() [3/4]

const NumericVector<Number>& libMesh::System::get_vector ( const unsigned int  vec_num) const
inherited
Returns
A const reference to this system's additional vector number vec_num (where the vectors are counted starting with 0).

◆ get_vector() [4/4]

NumericVector<Number>& libMesh::System::get_vector ( const unsigned int  vec_num)
inherited
Returns
A writable reference to this system's additional vector number vec_num (where the vectors are counted starting with 0).

◆ get_weighted_sensitivity_adjoint_solution() [1/2]

NumericVector<Number>& libMesh::System::get_weighted_sensitivity_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's weighted sensitivity adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_weighted_sensitivity_adjoint_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_weighted_sensitivity_adjoint_solution ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's weighted sensitivity adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_weighted_sensitivity_solution() [1/2]

NumericVector<Number>& libMesh::System::get_weighted_sensitivity_solution ( )
inherited
Returns
A reference to the solution of the last weighted sensitivity solve

◆ get_weighted_sensitivity_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_weighted_sensitivity_solution ( ) const
inherited
Returns
A reference to the solution of the last weighted sensitivity solve

◆ has_variable()

bool libMesh::System::has_variable ( const std::string &  var) const
inherited
Returns
true if a variable named var exists in this System

◆ have_first_order_scalar_vars()

bool libMesh::DifferentiableSystem::have_first_order_scalar_vars ( ) const
inherited

Check for any first order vars that are also belong to FEFamily::SCALAR.

◆ have_first_order_vars()

bool libMesh::DifferentiablePhysics::have_first_order_vars ( ) const
inherited

Definition at line 511 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_first_order_vars.

512  { return !_first_order_vars.empty(); }
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
Definition: diff_physics.h:559

◆ have_matrix()

bool libMesh::ImplicitSystem::have_matrix ( const std::string &  mat_name) const
inherited
Returns
true if this System has a matrix associated with the given name, false otherwise.

Definition at line 403 of file implicit_system.h.

References libMesh::ImplicitSystem::_matrices.

404 {
405  return (_matrices.count(mat_name));
406 }
std::map< std::string, SparseMatrix< Number > * > _matrices
Some systems need an arbitrary number of matrices.

◆ have_second_order_scalar_vars()

bool libMesh::DifferentiableSystem::have_second_order_scalar_vars ( ) const
inherited

Check for any second order vars that are also belong to FEFamily::SCALAR.

◆ have_second_order_vars()

bool libMesh::DifferentiablePhysics::have_second_order_vars ( ) const
inherited

Definition at line 524 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_second_order_vars.

525  { return !_second_order_vars.empty(); }
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second order in time.
Definition: diff_physics.h:564

◆ have_vector()

bool libMesh::System::have_vector ( const std::string &  vec_name) const
inherited
Returns
true if this System has a vector associated with the given name, false otherwise.

Definition at line 2218 of file system.h.

References libMesh::System::_vectors.

2219 {
2220  return (_vectors.count(vec_name));
2221 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ hide_output()

bool& libMesh::System::hide_output ( )
inherited
Returns
A writable reference to a boolean that determines if this system can be written to file or not. If set to true, then EquationSystems::write will ignore this system.

Definition at line 1655 of file system.h.

References libMesh::System::_hide_output.

1655 { return _hide_output; }
bool _hide_output
Are we allowed to write this system to file? If _hide_output is true, then EquationSystems::write wil...
Definition: system.h:2002

◆ identify_variable_groups() [1/2]

bool libMesh::System::identify_variable_groups ( ) const
inherited
Returns
true when VariableGroup structures should be automatically identified, false otherwise.

Definition at line 2194 of file system.h.

References libMesh::System::_identify_variable_groups.

2195 {
2197 }
bool _identify_variable_groups
true when VariableGroup structures should be automatically identified, false otherwise.
Definition: system.h:1970

◆ identify_variable_groups() [2/2]

void libMesh::System::identify_variable_groups ( const bool  ivg)
inherited

Toggle automatic VariableGroup identification.

Definition at line 2202 of file system.h.

References libMesh::System::_identify_variable_groups.

2203 {
2205 }
bool _identify_variable_groups
true when VariableGroup structures should be automatically identified, false otherwise.
Definition: system.h:1970

◆ increment_constructor_count()

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
protectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count()

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
protectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ init()

void libMesh::System::init ( )
inherited

Initializes degrees of freedom on the current mesh.

Sets the

◆ init_context()

virtual void L2System::init_context ( libMesh::DiffContext context)
protectedvirtual

Reimplemented from libMesh::FEMSystem.

◆ init_data()

virtual void L2System::init_data ( )
protectedvirtual

Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.

Reimplemented from libMesh::FEMSystem.

◆ init_matrices()

virtual void libMesh::ImplicitSystem::init_matrices ( )
protectedvirtualinherited

Initializes the matrices associated with this system.

◆ init_physics()

virtual void libMesh::DifferentiablePhysics::init_physics ( const System sys)
virtualinherited

Initialize any data structures associated with the physics.

Referenced by libMesh::DifferentiableSystem::attach_physics().

◆ init_qoi()

virtual void libMesh::DifferentiableQoI::init_qoi ( std::vector< Number > &  )
virtualinherited

Initialize system qoi.

By default, does nothing in order to maintain backward compatibility for FEMSystem applications that control qoi.

Definition at line 69 of file diff_qoi.h.

Referenced by libMesh::DifferentiableSystem::attach_qoi().

69 {}

◆ is_adjoint_already_solved()

bool libMesh::System::is_adjoint_already_solved ( ) const
inherited

Accessor for the adjoint_already_solved boolean.

Definition at line 381 of file system.h.

References libMesh::System::adjoint_already_solved.

382  { return adjoint_already_solved;}
bool adjoint_already_solved
Has the adjoint problem already been solved? If the user sets adjoint_already_solved to true...
Definition: system.h:1996

◆ is_first_order_var()

bool libMesh::DifferentiablePhysics::is_first_order_var ( unsigned int  var) const
inherited

Definition at line 520 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_first_order_vars.

521  { return _first_order_vars.find(var) != _first_order_vars.end(); }
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
Definition: diff_physics.h:559

◆ is_initialized()

bool libMesh::System::is_initialized ( )
inherited
Returns
true iff this system has been initialized.

Definition at line 2082 of file system.h.

References libMesh::System::_is_initialized.

2083 {
2084  return _is_initialized;
2085 }
bool _is_initialized
true when additional vectors and variables do not require immediate initialization, false otherwise.
Definition: system.h:1964

◆ is_second_order_var()

bool libMesh::DifferentiablePhysics::is_second_order_var ( unsigned int  var) const
inherited

Definition at line 533 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_second_order_vars.

534  { return _second_order_vars.find(var) != _second_order_vars.end(); }
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second order in time.
Definition: diff_physics.h:564

◆ is_time_evolving()

bool libMesh::DifferentiablePhysics::is_time_evolving ( unsigned int  var) const
inherited
Returns
true iff variable var is evolving with respect to time. In general, the user's init() function should have set time_evolving() for any variables which behave like du/dt = F(u), and should not call time_evolving() for any variables which behave like 0 = G(u).

Definition at line 277 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_time_evolving.

278  {
279  libmesh_assert_less(var,_time_evolving.size());
280  libmesh_assert( _time_evolving[var] == 0 ||
281  _time_evolving[var] == 1 ||
282  _time_evolving[var] == 2 );
283  return _time_evolving[var];
284  }
std::vector< unsigned int > _time_evolving
Stores unsigned int to tell us which variables are evolving as first order in time (1)...
Definition: diff_physics.h:554

◆ local_dof_indices()

void libMesh::System::local_dof_indices ( const unsigned int  var,
std::set< dof_id_type > &  var_indices 
) const
inherited

Fills the std::set with the degrees of freedom on the local processor corresponding the the variable number passed in.

◆ mass_residual() [1/2]

virtual bool libMesh::FEMPhysics::mass_residual ( bool  request_jacobian,
DiffContext  
)
overridevirtualinherited

Subtracts a mass vector contribution on elem from elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

Many problems can use the reimplementation in FEMPhysics::mass_residual which subtracts (du/dt,v) for each transient variable u; users with more complicated transient problems will need to reimplement this themselves.

Reimplemented from libMesh::DifferentiablePhysics.

Reimplemented in SecondOrderScalarSystemFirstOrderTimeSolverBase, SecondOrderScalarSystemSecondOrderTimeSolverBase, FirstOrderScalarSystemBase, ElasticitySystem, and NavierSystem.

◆ mass_residual() [2/2]

virtual bool libMesh::DifferentiablePhysics::mass_residual ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Subtracts a mass vector contribution on elem from elem_residual.

For first-order-in-time problems, this is the $ M(u,\dot{u})\dot{u} $ term. For second-order-in-time problems, this is the $ M(u,\ddot{u})\ddot{u} $ term. This method is only called for UnsteadySolver-based TimeSolvers.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

Many first-order-in-time problems can use the reimplementation in FEMPhysics::mass_residual which subtracts (du/dt,v) for each transient variable u; users with more complicated transient problems or second-order-in-time problems will need to reimplement this themselves.

Reimplemented in SecondOrderScalarSystemFirstOrderTimeSolverBase, SecondOrderScalarSystemSecondOrderTimeSolverBase, FirstOrderScalarSystemBase, libMesh::FEMPhysics, ElasticitySystem, and NavierSystem.

Definition at line 318 of file diff_physics.h.

319  {
320  return request_jacobian;
321  }

◆ mesh_position_get()

void libMesh::FEMSystem::mesh_position_get ( )
inherited

Tells the FEMSystem to set the degree of freedom coefficients which should correspond to mesh nodal coordinates.

◆ mesh_position_set()

void libMesh::FEMSystem::mesh_position_set ( )
inherited

Tells the FEMSystem to set the mesh nodal coordinates which should correspond to degree of freedom coefficients.

◆ n_active_dofs()

dof_id_type libMesh::System::n_active_dofs ( ) const
inherited
Returns
The number of active degrees of freedom for this System.

Definition at line 2210 of file system.h.

References libMesh::System::n_constrained_dofs(), and libMesh::System::n_dofs().

2211 {
2212  return this->n_dofs() - this->n_constrained_dofs();
2213 }
dof_id_type n_dofs() const
dof_id_type n_constrained_dofs() const

◆ n_components()

unsigned int libMesh::System::n_components ( ) const
inherited
Returns
The total number of scalar components in the system's variables. This will equal n_vars() in the case of all scalar-valued variables.

Definition at line 2114 of file system.h.

References libMesh::System::_variables, libMesh::Variable::first_scalar_number(), and libMesh::Variable::n_components().

2115 {
2116  if (_variables.empty())
2117  return 0;
2118 
2119  const Variable & last = _variables.back();
2120  return last.first_scalar_number() + last.n_components();
2121 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ n_constrained_dofs()

dof_id_type libMesh::System::n_constrained_dofs ( ) const
inherited
Returns
The total number of constrained degrees of freedom in the system.

Referenced by libMesh::System::n_active_dofs().

◆ n_dofs()

dof_id_type libMesh::System::n_dofs ( ) const
inherited
Returns
The number of degrees of freedom in the system

Referenced by libMesh::System::n_active_dofs().

◆ n_local_constrained_dofs()

dof_id_type libMesh::System::n_local_constrained_dofs ( ) const
inherited
Returns
The number of constrained degrees of freedom on this processor.

◆ n_local_dofs()

dof_id_type libMesh::System::n_local_dofs ( ) const
inherited
Returns
The number of degrees of freedom local to this processor

◆ n_matrices()

unsigned int libMesh::ImplicitSystem::n_matrices ( ) const
overridevirtualinherited
Returns
The number of matrices handled by this system

Reimplemented from libMesh::System.

Definition at line 410 of file implicit_system.h.

References libMesh::ImplicitSystem::_matrices.

411 {
412  return cast_int<unsigned int>(_matrices.size());
413 }
std::map< std::string, SparseMatrix< Number > * > _matrices
Some systems need an arbitrary number of matrices.

◆ n_objects()

static unsigned int libMesh::ReferenceCounter::n_objects ( )
staticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

84  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

◆ n_processors()

processor_id_type libMesh::ParallelObject::n_processors ( ) const
inherited
Returns
The number of processors in the group.

Definition at line 93 of file parallel_object.h.

References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::size().

Referenced by libMesh::MeshBase::partition().

94  { return cast_int<processor_id_type>(_communicator.size()); }
processor_id_type size() const
Definition: communicator.h:175
const Parallel::Communicator & _communicator

◆ n_qois()

unsigned int libMesh::System::n_qois ( ) const
inherited

Number of currently active quantities of interest.

Definition at line 2271 of file system.h.

References libMesh::System::qoi.

Referenced by libMesh::SensitivityData::allocate_data(), and libMesh::SensitivityData::allocate_hessian_data().

2272 {
2273  return cast_int<unsigned int>(this->qoi.size());
2274 }
std::vector< Number > qoi
Values of the quantities of interest.
Definition: system.h:1551

◆ n_variable_groups()

unsigned int libMesh::System::n_variable_groups ( ) const
inherited
Returns
The number of VariableGroup variable groups in the system

Definition at line 2106 of file system.h.

References libMesh::System::_variable_groups.

2107 {
2108  return cast_int<unsigned int>(_variable_groups.size());
2109 }
std::vector< VariableGroup > _variable_groups
The VariableGroup in this System.
Definition: system.h:1909

◆ n_vars()

unsigned int libMesh::System::n_vars ( ) const
inherited
Returns
The number of variables in the system

Definition at line 2098 of file system.h.

References libMesh::System::_variables.

2099 {
2100  return cast_int<unsigned int>(_variables.size());
2101 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ n_vectors()

unsigned int libMesh::System::n_vectors ( ) const
inherited
Returns
The number of vectors (in addition to the solution) handled by this system This is the size of the _vectors map

Definition at line 2226 of file system.h.

References libMesh::System::_vectors.

2227 {
2228  return cast_int<unsigned int>(_vectors.size());
2229 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ name()

const std::string & libMesh::System::name ( ) const
inherited
Returns
The system name.

Definition at line 2010 of file system.h.

References libMesh::System::_sys_name.

2011 {
2012  return _sys_name;
2013 }
const std::string _sys_name
A name associated with this system.
Definition: system.h:1894

◆ nonlocal_constraint()

virtual bool libMesh::DifferentiablePhysics::nonlocal_constraint ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Adds any nonlocal constraint contributions (e.g.

some components of constraints in scalar variable equations) to elem_residual

If this method receives request_jacobian = true, then it should also modify elem_jacobian and return true if possible. If the Jacobian changes have not been computed then the method should return false.

Users may need to reimplement this for PDEs on systems to which SCALAR variables with non-transient equations have been added.

Definition at line 227 of file diff_physics.h.

228  {
229  return request_jacobian;
230  }

◆ nonlocal_damping_residual()

virtual bool libMesh::DifferentiablePhysics::nonlocal_damping_residual ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Subtracts any nonlocal damping vector contributions (e.g.

any first time derivative coefficients in scalar variable equations) from elem_residual

If this method receives request_jacobian = true, then it should also modify elem_jacobian and return true if possible. If the Jacobian changes have not been computed then the method should return false.

Definition at line 406 of file diff_physics.h.

407  {
408  return request_jacobian;
409  }

◆ nonlocal_mass_residual()

virtual bool libMesh::DifferentiablePhysics::nonlocal_mass_residual ( bool  request_jacobian,
DiffContext c 
)
virtualinherited

Subtracts any nonlocal mass vector contributions (e.g.

any time derivative coefficients in scalar variable equations) from elem_residual

If this method receives request_jacobian = true, then it should also modify elem_jacobian and return true if possible. If the Jacobian changes have not been computed then the method should return false.

Many problems can use the reimplementation in FEMPhysics::mass_residual which subtracts (du/dt,v) for each transient scalar variable u; users with more complicated transient scalar variable equations will need to reimplement this themselves.

◆ nonlocal_time_derivative()

virtual bool libMesh::DifferentiablePhysics::nonlocal_time_derivative ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Adds any nonlocal time derivative contributions (e.g.

some components of time derivatives in scalar variable equations) to elem_residual

If this method receives request_jacobian = true, then it should also modify elem_jacobian and return true if possible. If the Jacobian changes have not been computed then the method should return false.

Users may need to reimplement this for PDEs on systems to which SCALAR variables have been added.

Definition at line 209 of file diff_physics.h.

210  {
211  return request_jacobian;
212  }

◆ number()

unsigned int libMesh::System::number ( ) const
inherited
Returns
The system number.

Definition at line 2018 of file system.h.

References libMesh::System::_sys_number.

2019 {
2020  return _sys_number;
2021 }
const unsigned int _sys_number
The number associated with this system.
Definition: system.h:1899

◆ numerical_elem_jacobian()

void libMesh::FEMSystem::numerical_elem_jacobian ( FEMContext context) const
inherited

Uses the results of multiple element_residual() calls to numerically differentiate the corresponding jacobian on an element.

◆ numerical_jacobian()

void libMesh::FEMSystem::numerical_jacobian ( TimeSolverResPtr  res,
FEMContext context 
) const
inherited

Uses the results of multiple res calls to numerically differentiate the corresponding jacobian.

◆ numerical_jacobian_h_for_var()

Real FEMSystem::numerical_jacobian_h_for_var ( unsigned int  var_num) const
inherited

If numerical_jacobian_h_for_var(var_num) is changed from its default value (numerical_jacobian_h), the FEMSystem will perturb solution vector entries for variable var_num by that amount when calculating finite differences with respect to that variable.

This is useful in multiphysics problems which have not been normalized.

Definition at line 259 of file fem_system.h.

References libMesh::FEMSystem::_numerical_jacobian_h_for_var, libMesh::FEMSystem::numerical_jacobian_h, and libMesh::Real.

260 {
261  if ((var_num >= _numerical_jacobian_h_for_var.size()) ||
262  _numerical_jacobian_h_for_var[var_num] == Real(0))
263  return numerical_jacobian_h;
264 
265  return _numerical_jacobian_h_for_var[var_num];
266 }
Real numerical_jacobian_h
If calculating numeric jacobians is required, the FEMSystem will perturb each solution vector entry b...
Definition: fem_system.h:181
std::vector< Real > _numerical_jacobian_h_for_var
Definition: fem_system.h:252
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ numerical_nonlocal_jacobian()

void libMesh::FEMSystem::numerical_nonlocal_jacobian ( FEMContext context) const
inherited

Uses the results of multiple side_residual() calls to numerically differentiate the corresponding jacobian on nonlocal DoFs.

◆ numerical_side_jacobian()

void libMesh::FEMSystem::numerical_side_jacobian ( FEMContext context) const
inherited

Uses the results of multiple side_residual() calls to numerically differentiate the corresponding jacobian on an element's side.

◆ parallel_op()

virtual void libMesh::DifferentiableQoI::parallel_op ( const Parallel::Communicator communicator,
std::vector< Number > &  sys_qoi,
std::vector< Number > &  local_qoi,
const QoISet qoi_indices 
)
virtualinherited

Method to populate system qoi data structure with process-local qoi.

By default, simply sums process qois into system qoi.

◆ point_gradient() [1/3]

Gradient libMesh::System::point_gradient ( unsigned int  var,
const Point p,
const bool  insist_on_success = true 
) const
inherited
Returns
The gradient of the solution variable var at the physical point p in the mesh, similarly to point_value.

◆ point_gradient() [2/3]

Gradient libMesh::System::point_gradient ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited
Returns
The gradient of the solution variable var at the physical point p in local Elem e in the mesh, similarly to point_value.

◆ point_gradient() [3/3]

Gradient libMesh::System::point_gradient ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited

Calls the version of point_gradient() which takes a reference.

This function exists only to prevent people from calling the version of point_gradient() that has a boolean third argument, which would result in unnecessary PointLocator calls.

◆ point_hessian() [1/3]

Tensor libMesh::System::point_hessian ( unsigned int  var,
const Point p,
const bool  insist_on_success = true 
) const
inherited
Returns
The second derivative tensor of the solution variable var at the physical point p in the mesh, similarly to point_value.

◆ point_hessian() [2/3]

Tensor libMesh::System::point_hessian ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited
Returns
The second derivative tensor of the solution variable var at the physical point p in local Elem e in the mesh, similarly to point_value.

◆ point_hessian() [3/3]

Tensor libMesh::System::point_hessian ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited

Calls the version of point_hessian() which takes a reference.

This function exists only to prevent people from calling the version of point_hessian() that has a boolean third argument, which would result in unnecessary PointLocator calls.

◆ point_value() [1/3]

Number libMesh::System::point_value ( unsigned int  var,
const Point p,
const bool  insist_on_success = true 
) const
inherited
Returns
The value of the solution variable var at the physical point p in the mesh, without knowing a priori which element contains p.
Note
This function uses MeshBase::sub_point_locator(); users may or may not want to call MeshBase::clear_point_locator() afterward. Also, point_locator() is expensive (N log N for initial construction, log N for evaluations). Avoid using this function in any context where you are already looping over elements.

Because the element containing p may lie on any processor, this function is parallel-only.

By default this method expects the point to reside inside the domain and will abort if no element can be found which contains p. The optional parameter insist_on_success can be set to false to allow the method to return 0 when the point is not located.

◆ point_value() [2/3]

Number libMesh::System::point_value ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited
Returns
The value of the solution variable var at the physical point p contained in local Elem e

This version of point_value can be run in serial, but assumes e is in the local mesh partition or is algebraically ghosted.

◆ point_value() [3/3]

Number libMesh::System::point_value ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited

Calls the version of point_value() which takes a reference.

This function exists only to prevent people from calling the version of point_value() that has a boolean third argument, which would result in unnecessary PointLocator calls.

◆ postprocess()

virtual void libMesh::FEMSystem::postprocess ( )
overridevirtualinherited

Runs a postprocessing loop over all elements, and if postprocess_sides is true over all sides.

Reimplemented from libMesh::DifferentiableSystem.

Reimplemented in CoupledSystem, NavierSystem, LaplaceSystem, LaplaceSystem, and PoissonSystem.

◆ print_info()

static void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

◆ processor_id()

processor_id_type libMesh::ParallelObject::processor_id ( ) const
inherited

◆ project_solution() [1/3]

void libMesh::System::project_solution ( FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr 
) const
inherited

Projects arbitrary functions onto the current solution.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Referenced by FETest< order, family, elem_type >::setUp().

◆ project_solution() [2/3]

void libMesh::System::project_solution ( FEMFunctionBase< Number > *  f,
FEMFunctionBase< Gradient > *  g = nullptr 
) const
inherited

Projects arbitrary functions onto the current solution.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

◆ project_solution() [3/3]

void libMesh::System::project_solution ( ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters 
) const
inherited

◆ project_solution_on_reinit()

bool& libMesh::System::project_solution_on_reinit ( void  )
inherited

Tells the System whether or not to project the solution vector onto new grids when the system is reinitialized.

The solution will be projected unless project_solution_on_reinit() = false is called.

Definition at line 787 of file system.h.

References libMesh::System::_solution_projection.

788  { return _solution_projection; }
bool _solution_projection
Holds true if the solution vector should be projected onto a changed grid, false if it should be zero...
Definition: system.h:1952

◆ project_vector() [1/5]

void libMesh::System::project_vector ( NumericVector< Number > &  new_vector,
FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary functions onto a vector of degree of freedom values for the current system.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [2/5]

void libMesh::System::project_vector ( NumericVector< Number > &  new_vector,
FEMFunctionBase< Number > *  f,
FEMFunctionBase< Gradient > *  g = nullptr,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary functions onto a vector of degree of freedom values for the current system.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [3/5]

void libMesh::System::project_vector ( ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters,
NumericVector< Number > &  new_vector,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary functions onto a vector of degree of freedom values for the current system.

The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [4/5]

void libMesh::System::project_vector ( NumericVector< Number > &  ,
int  is_adjoint = -1 
) const
protectedinherited

Projects the vector defined on the old mesh onto the new mesh.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [5/5]

void libMesh::System::project_vector ( const NumericVector< Number > &  ,
NumericVector< Number > &  ,
int  is_adjoint = -1 
) const
protectedinherited

Projects the vector defined on the old mesh onto the new mesh.

The original vector is unchanged and the new vector is passed through the second argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ projection_matrix()

void libMesh::System::projection_matrix ( SparseMatrix< Number > &  proj_mat) const
inherited

This method creates a projection matrix which corresponds to the operation of project_vector between old and new solution spaces.

Heterogeneous Dirichlet boundary conditions are not taken into account here; if this matrix is used for prolongation (mesh refinement) on a side with a heterogeneous BC, the newly created degrees of freedom on that side will still match the coarse grid approximation of the BC, not the fine grid approximation.

◆ prolong_vectors()

virtual void libMesh::System::prolong_vectors ( )
virtualinherited

Prolong vectors after the mesh has refined.

◆ qoi_parameter_hessian()

virtual void libMesh::ImplicitSystem::qoi_parameter_hessian ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData hessian 
)
overridevirtualinherited

For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) This Hessian is the output of this method, where for each q_i, H_jk is stored in hessian.second_derivative(i,j,k).

Note that in some cases only current_local_solution is used during assembly, and, therefore, if solution has been altered without update() being called, then the user must call update() before calling this function.

Reimplemented from libMesh::System.

◆ qoi_parameter_hessian_vector_product()

virtual void libMesh::ImplicitSystem::qoi_parameter_hessian_vector_product ( const QoISet qoi_indices,
const ParameterVector parameters,
const ParameterVector vector,
SensitivityData product 
)
overridevirtualinherited

For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) The Hessian-vector product, for a vector v_k in parameter space, is S_j = H_jk v_k This product is the output of this method, where for each q_i, S_j is stored in sensitivities[i][j].

Reimplemented from libMesh::System.

◆ qoi_parameter_sensitivity()

virtual void libMesh::System::qoi_parameter_sensitivity ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData sensitivities 
)
virtualinherited

Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j].

Note
parameters is a const vector, not a vector-of-const; parameter values in this vector need to be mutable for finite differencing to work.

Automatically chooses the forward method for problems with more quantities of interest than parameters, or the adjoint method otherwise.

This method is only usable in derived classes which override an implementation.

◆ re_update()

virtual void libMesh::System::re_update ( )
virtualinherited

Re-update the local values when the mesh has changed.

This method takes the data updated by update() and makes it up-to-date on the current mesh.

Reimplemented in libMesh::TransientSystem< RBConstruction >.

◆ read_header()

void libMesh::System::read_header ( Xdr io,
const std::string &  version,
const bool  read_header = true,
const bool  read_additional_data = true,
const bool  read_legacy_format = false 
)
inherited

Reads the basic data header for this System.

◆ read_legacy_data()

void libMesh::System::read_legacy_data ( Xdr io,
const bool  read_additional_data = true 
)
inherited

Reads additional data, namely vectors, for this System.

Deprecated:
The ability to read XDR data files in the old (aka "legacy") XDR format has been deprecated for many years, this capability may soon disappear altogether.

◆ read_parallel_data() [1/2]

template<typename InValType >
void libMesh::System::read_parallel_data ( Xdr io,
const bool  read_additional_data 
)
inherited

Reads additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh. This method will read an individual file for each processor in the simulation where the local solution components for that processor are stored.

◆ read_parallel_data() [2/2]

void libMesh::System::read_parallel_data ( Xdr io,
const bool  read_additional_data 
)
inherited

Non-templated version for backward compatibility.

Reads additional data, namely vectors, for this System. This method may safely be called on a distributed-memory mesh. This method will read an individual file for each processor in the simulation where the local solution components for that processor are stored.

Definition at line 1292 of file system.h.

1294  { read_parallel_data<Number>(io, read_additional_data); }

◆ read_serialized_data() [1/2]

template<typename ValType >
void libMesh::System::read_serialized_data ( Xdr io,
const bool  read_additional_data = true 
)
inherited

Reads additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh.

◆ read_serialized_data() [2/2]

void libMesh::System::read_serialized_data ( Xdr io,
const bool  read_additional_data = true 
)
inherited

Non-templated version for backward compatibility.

Reads additional data, namely vectors, for this System. This method may safely be called on a distributed-memory mesh.

Definition at line 1250 of file system.h.

1252  { read_serialized_data<Number>(io, read_additional_data); }

◆ read_serialized_vectors() [1/2]

template<typename InValType >
std::size_t libMesh::System::read_serialized_vectors ( Xdr io,
const std::vector< NumericVector< Number > *> &  vectors 
) const
inherited

Read a number of identically distributed vectors.

This method allows for optimization for the multiple vector case by only communicating the metadata once.

◆ read_serialized_vectors() [2/2]

std::size_t libMesh::System::read_serialized_vectors ( Xdr io,
const std::vector< NumericVector< Number > *> &  vectors 
) const
inherited

Non-templated version for backward compatibility.

Read a number of identically distributed vectors. This method allows for optimization for the multiple vector case by only communicating the metadata once.

Definition at line 1270 of file system.h.

1272  { return read_serialized_vectors<Number>(io, vectors); }

◆ reinit()

virtual void libMesh::DifferentiableSystem::reinit ( )
overridevirtualinherited

Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be used.

Reimplemented from libMesh::ImplicitSystem.

◆ reinit_constraints()

virtual void libMesh::System::reinit_constraints ( )
virtualinherited

Reinitializes the constraints for this system.

◆ release_linear_solver()

virtual void libMesh::DifferentiableSystem::release_linear_solver ( LinearSolver< Number > *  ) const
overridevirtualinherited

Releases a pointer to a linear solver acquired by this->get_linear_solver()

Reimplemented from libMesh::ImplicitSystem.

◆ remove_matrix()

void libMesh::ImplicitSystem::remove_matrix ( const std::string &  mat_name)
inherited

Removes the additional matrix mat_name from this system.

◆ remove_vector()

void libMesh::System::remove_vector ( const std::string &  vec_name)
inherited

Removes the additional vector vec_name from this system.

◆ request_matrix() [1/2]

const SparseMatrix<Number>* libMesh::ImplicitSystem::request_matrix ( const std::string &  mat_name) const
inherited
Returns
A const pointer to this system's additional matrix named mat_name, or nullptr if no matrix by that name exists.

◆ request_matrix() [2/2]

SparseMatrix<Number>* libMesh::ImplicitSystem::request_matrix ( const std::string &  mat_name)
inherited
Returns
A writable pointer to this system's additional matrix named mat_name, or nullptr if no matrix by that name exists.

◆ request_vector() [1/4]

const NumericVector<Number>* libMesh::System::request_vector ( const std::string &  vec_name) const
inherited
Returns
A const pointer to the vector if this System has a vector associated with the given name, nullptr otherwise.

◆ request_vector() [2/4]

NumericVector<Number>* libMesh::System::request_vector ( const std::string &  vec_name)
inherited
Returns
A pointer to the vector if this System has a vector associated with the given name, nullptr otherwise.

◆ request_vector() [3/4]

const NumericVector<Number>* libMesh::System::request_vector ( const unsigned int  vec_num) const
inherited
Returns
A const pointer to this system's additional vector number vec_num (where the vectors are counted starting with 0), or nullptr if the system has no such vector.

◆ request_vector() [4/4]

NumericVector<Number>* libMesh::System::request_vector ( const unsigned int  vec_num)
inherited
Returns
A writable pointer to this system's additional vector number vec_num (where the vectors are counted starting with 0), or nullptr if the system has no such vector.

◆ restrict_solve_to()

virtual void libMesh::System::restrict_solve_to ( const SystemSubset subset,
const SubsetSolveMode  subset_solve_mode = SUBSET_ZERO 
)
virtualinherited

After calling this method, any solve will be restricted to the given subdomain.

To disable this mode, call this method with subset being a nullptr.

Reimplemented in libMesh::LinearImplicitSystem.

◆ restrict_vectors()

virtual void libMesh::System::restrict_vectors ( )
virtualinherited

Restrict vectors after the mesh has coarsened.

◆ sensitivity_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::sensitivity_solve ( const ParameterVector parameters)
overridevirtualinherited

Assembles & solves the linear system(s) (dR/du)*u_p = -dR/dp, for those parameters contained within parameters.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

◆ set_adjoint_already_solved()

void libMesh::System::set_adjoint_already_solved ( bool  setting)
inherited

Setter for the adjoint_already_solved boolean.

Definition at line 387 of file system.h.

References libMesh::System::adjoint_already_solved.

388  { adjoint_already_solved = setting;}
bool adjoint_already_solved
Has the adjoint problem already been solved? If the user sets adjoint_already_solved to true...
Definition: system.h:1996

◆ set_basic_system_only()

void libMesh::System::set_basic_system_only ( )
inherited

Sets the system to be "basic only": i.e.

advanced system components such as ImplicitSystem matrices may not be initialized. This is useful for efficiency in certain utility programs that never use System::solve(). This method must be called after the System or derived class is created but before it is initialized; e.g. from within EquationSystems::read()

Definition at line 2090 of file system.h.

References libMesh::System::_basic_system_only.

2091 {
2092  _basic_system_only = true;
2093 }
bool _basic_system_only
Holds true if the components of more advanced system types (e.g.
Definition: system.h:1958

◆ set_mesh_system()

void libMesh::DifferentiablePhysics::set_mesh_system ( System sys)
virtualinherited

Tells the DifferentiablePhysics that system sys contains the isoparametric Lagrangian variables which correspond to the coordinates of mesh nodes, in problems where the mesh itself is expected to move in time.

The system with mesh coordinate data (which may be this system itself, for fully coupled moving mesh problems) is currently assumed to have new (end of time step) mesh coordinates stored in solution, old (beginning of time step) mesh coordinates stored in _old_nonlinear_solution, and constant velocity motion during each time step.

Activating this function ensures that local (but not neighbor!) element geometry is correctly repositioned when evaluating element residuals.

Currently sys must be *this for a tightly coupled moving mesh problem or nullptr to stop mesh movement; loosely coupled moving mesh problems are not implemented.

This code is experimental. "Trust but verify, and not in that order"

Definition at line 580 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_sys.

581 {
582  // For now we assume that we're doing fully coupled mesh motion
583  // if (sys && sys != this)
584  // libmesh_not_implemented();
585 
586  // For the foreseeable future we'll assume that we keep these
587  // Systems in the same EquationSystems
588  // libmesh_assert_equal_to (&this->get_equation_systems(),
589  // &sys->get_equation_systems());
590 
591  // And for the immediate future this code may not even work
592  libmesh_experimental();
593 
594  _mesh_sys = sys;
595 }
System * _mesh_sys
System from which to acquire moving mesh information.
Definition: diff_physics.h:542

◆ set_mesh_x_var()

void libMesh::DifferentiablePhysics::set_mesh_x_var ( unsigned int  var)
virtualinherited

Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the x coordinate of mesh nodes, in problems where the mesh itself is expected to move in time.

The system with mesh coordinate data (which may be this system itself, for fully coupled moving mesh problems) is currently assumed to have new (end of time step) mesh coordinates stored in solution, old (beginning of time step) mesh coordinates stored in _old_nonlinear_solution, and constant velocity motion during each time step.

Activating this function ensures that local (but not neighbor!) element geometry is correctly repositioned when evaluating element residuals.

Definition at line 600 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_x_var.

601 {
602  _mesh_x_var = var;
603 }
unsigned int _mesh_x_var
Variables from which to acquire moving mesh information.
Definition: diff_physics.h:547

◆ set_mesh_y_var()

void libMesh::DifferentiablePhysics::set_mesh_y_var ( unsigned int  var)
virtualinherited

Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the y coordinate of mesh nodes.

Definition at line 608 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_y_var.

609 {
610  _mesh_y_var = var;
611 }

◆ set_mesh_z_var()

void libMesh::DifferentiablePhysics::set_mesh_z_var ( unsigned int  var)
virtualinherited

Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the z coordinate of mesh nodes.

Definition at line 616 of file diff_physics.h.

References libMesh::DifferentiablePhysics::_mesh_z_var.

617 {
618  _mesh_z_var = var;
619 }

◆ set_numerical_jacobian_h_for_var()

void FEMSystem::set_numerical_jacobian_h_for_var ( unsigned int  var_num,
Real  new_h 
)
inherited

Definition at line 269 of file fem_system.h.

References libMesh::FEMSystem::_numerical_jacobian_h_for_var, and libMesh::Real.

271 {
272  if (_numerical_jacobian_h_for_var.size() <= var_num)
273  _numerical_jacobian_h_for_var.resize(var_num+1,Real(0));
274 
275  libmesh_assert_greater(new_h, 0);
276 
277  _numerical_jacobian_h_for_var[var_num] = new_h;
278 }
std::vector< Real > _numerical_jacobian_h_for_var
Definition: fem_system.h:252
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ set_time_solver()

void libMesh::DifferentiableSystem::set_time_solver ( std::unique_ptr< TimeSolver _time_solver)
inherited

Sets the time_solver FIXME: This code is a little dangerous as it transfers ownership from the TimeSolver creator to this class.

The user must no longer access his original TimeSolver object after calling this function.

Definition at line 242 of file diff_system.h.

References libMesh::DifferentiableSystem::time_solver.

243  {
244  time_solver.reset(_time_solver.release());
245  }
std::unique_ptr< TimeSolver > time_solver
A pointer to the solver object we&#39;re going to use.
Definition: diff_system.h:234

◆ set_vector_as_adjoint()

void libMesh::System::set_vector_as_adjoint ( const std::string &  vec_name,
int  qoi_num 
)
inherited

Allows one to set the QoI index controlling whether the vector identified by vec_name represents a solution from the adjoint (qoi_num >= 0) or primal (qoi_num == -1) space.

This becomes significant if those spaces have differing heterogeneous Dirichlet constraints.

qoi_num == -2 can be used to indicate a vector which should not be affected by constraints during projection operations.

◆ set_vector_preservation()

void libMesh::System::set_vector_preservation ( const std::string &  vec_name,
bool  preserve 
)
inherited

Allows one to set the boolean controlling whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc.

◆ side_constraint()

virtual bool libMesh::DifferentiablePhysics::side_constraint ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Adds the constraint contribution on side of elem to elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

Users may need to reimplement this for their particular PDE depending on the boundary conditions.

To implement a weak form of the constraint 0 = G(u), the user should examine u = elem_solution and add (G(u), phi_i) boundary integral contributions to elem_residual in side_constraint().

Reimplemented in LaplaceSystem, LaplaceSystem, LaplaceSystem, and NavierSystem.

Definition at line 191 of file diff_physics.h.

192  {
193  return request_jacobian;
194  }

◆ side_damping_residual()

virtual bool libMesh::DifferentiablePhysics::side_damping_residual ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Subtracts a damping vector contribution on side of elem from elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

For most problems, the default implementation of "do nothing" is correct; users with boundary conditions including first time derivatives may need to reimplement this themselves.

Definition at line 391 of file diff_physics.h.

392  {
393  return request_jacobian;
394  }

◆ side_mass_residual()

virtual bool libMesh::DifferentiablePhysics::side_mass_residual ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Subtracts a mass vector contribution on side of elem from elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

For most problems, the default implementation of "do nothing" is correct; users with boundary conditions including time derivatives may need to reimplement this themselves.

Definition at line 335 of file diff_physics.h.

336  {
337  return request_jacobian;
338  }

◆ side_postprocess()

virtual void libMesh::DifferentiableSystem::side_postprocess ( DiffContext )
virtualinherited

Does any work that needs to be done on side of elem in a postprocessing loop.

Reimplemented in LaplaceSystem, and LaplaceSystem.

Definition at line 288 of file diff_system.h.

288 {}

◆ side_qoi()

virtual void libMesh::DifferentiableQoI::side_qoi ( DiffContext ,
const QoISet  
)
virtualinherited

Does any work that needs to be done on side of elem in a quantity of interest assembly loop, outputting to elem_qoi.

Only qois included in the supplied QoISet need to be assembled.

Reimplemented in CoupledSystemQoI.

Definition at line 131 of file diff_qoi.h.

133  {}

◆ side_qoi_derivative()

virtual void libMesh::DifferentiableQoI::side_qoi_derivative ( DiffContext ,
const QoISet  
)
virtualinherited

Does any work that needs to be done on side of elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative.

Only qois included in the supplied QoISet need their derivatives assembled.

Reimplemented in LaplaceSystem, LaplaceSystem, and CoupledSystemQoI.

Definition at line 143 of file diff_qoi.h.

145  {}

◆ side_time_derivative()

virtual bool libMesh::DifferentiablePhysics::side_time_derivative ( bool  request_jacobian,
DiffContext  
)
virtualinherited

Adds the time derivative contribution on side of elem to elem_residual.

If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.

Users may need to reimplement this for their particular PDE depending on the boundary conditions.

To implement a weak form of the source term du/dt = F(u) on sides, such as might arise in a flux boundary condition, the user should examine u = elem_solution and add (F(u), phi_i) boundary integral contributions to elem_residual in side_constraint().

Reimplemented in ElasticitySystem, CurlCurlSystem, CurlCurlSystem, and SolidSystem.

Definition at line 171 of file diff_physics.h.

172  {
173  return request_jacobian;
174  }

◆ solve()

virtual void libMesh::FEMSystem::solve ( )
overridevirtualinherited

Invokes the solver associated with the system.

For steady state solvers, this will find a root x where F(x) = 0. For transient solvers, this will integrate dx/dt = F(x).

For moving mesh systems, this also translates the mesh to the solution position.

Reimplemented from libMesh::DifferentiableSystem.

Reimplemented in libMesh::ContinuationSystem.

◆ swap_physics()

void libMesh::DifferentiableSystem::swap_physics ( DifferentiablePhysics *&  swap_physics)
inherited

Swap current physics object with external object.

◆ system()

sys_type& libMesh::ImplicitSystem::system ( )
inherited
Returns
A reference to *this.

Definition at line 73 of file implicit_system.h.

73 { return *this; }

◆ system_type()

virtual std::string libMesh::ImplicitSystem::system_type ( ) const
overridevirtualinherited
Returns
"Implicit". Helps in identifying the system type in an equation system file.

Reimplemented from libMesh::ExplicitSystem.

Reimplemented in libMesh::OptimizationSystem, libMesh::NonlinearImplicitSystem, libMesh::LinearImplicitSystem, libMesh::RBConstruction, libMesh::FrequencySystem, libMesh::NewmarkSystem, libMesh::TransientSystem< RBConstruction >, and SolidSystem.

Definition at line 109 of file implicit_system.h.

109 { return "Implicit"; }

◆ thread_join()

virtual void libMesh::DifferentiableQoI::thread_join ( std::vector< Number > &  qoi,
const std::vector< Number > &  other_qoi,
const QoISet qoi_indices 
)
virtualinherited

Method to combine thread-local qois.

By default, simply sums thread qois.

◆ time_evolving() [1/2]

virtual void libMesh::DifferentiablePhysics::time_evolving ( unsigned int  var)
virtualinherited

Tells the DiffSystem that variable var is evolving with respect to time.

In general, the user's init() function should call time_evolving() for any variables which behave like du/dt = F(u), and should not call time_evolving() for any variables which behave like 0 = G(u).

Most derived systems will not have to reimplement this function; however any system which reimplements mass_residual() may have to reimplement time_evolving() to prepare data structures.

Deprecated:
Instead, use the time_evolving override and specify the order-in-time of the variable, either 1 or 2. This method assumes the variable is first order for backward compatibility.

Definition at line 249 of file diff_physics.h.

250  {
251  libmesh_deprecated();
252  this->time_evolving(var,1);
253  }
virtual void time_evolving(unsigned int var)
Tells the DiffSystem that variable var is evolving with respect to time.
Definition: diff_physics.h:249

◆ time_evolving() [2/2]

virtual void libMesh::DifferentiablePhysics::time_evolving ( unsigned int  var,
unsigned int  order 
)
virtualinherited

Tells the DiffSystem that variable var is evolving with respect to time.

In general, the user's init() function should call time_evolving() with order 1 for any variables which behave like du/dt = F(u), with order 2 for any variables that behave like d^2u/dt^2 = F(u), and should not call time_evolving() for any variables which behave like 0 = G(u).

Most derived systems will not have to reimplement this function; however any system which reimplements mass_residual() may have to reimplement time_evolving() to prepare data structures.

◆ update()

virtual void libMesh::System::update ( )
virtualinherited

Update the local values to reflect the solution on neighboring processors.

Reimplemented in SolidSystem.

◆ update_global_solution() [1/2]

void libMesh::System::update_global_solution ( std::vector< Number > &  global_soln) const
inherited

Fill the input vector global_soln so that it contains the global solution on all processors.

Requires communication with all other processors.

◆ update_global_solution() [2/2]

void libMesh::System::update_global_solution ( std::vector< Number > &  global_soln,
const processor_id_type  dest_proc 
) const
inherited

Fill the input vector global_soln so that it contains the global solution on processor dest_proc.

Requires communication with all other processors.

◆ user_assembly()

virtual void libMesh::System::user_assembly ( )
virtualinherited

Calls user's attached assembly function, or is overridden by the user in derived classes.

◆ user_constrain()

virtual void libMesh::System::user_constrain ( )
virtualinherited

Calls user's attached constraint function, or is overridden by the user in derived classes.

◆ user_initialization()

virtual void libMesh::System::user_initialization ( )
virtualinherited

Calls user's attached initialization function, or is overridden by the user in derived classes.

◆ user_QOI()

virtual void libMesh::System::user_QOI ( const QoISet qoi_indices)
virtualinherited

Calls user's attached quantity of interest function, or is overridden by the user in derived classes.

◆ user_QOI_derivative()

virtual void libMesh::System::user_QOI_derivative ( const QoISet qoi_indices = QoISet(),
bool  include_liftfunc = true,
bool  apply_constraints = true 
)
virtualinherited

Calls user's attached quantity of interest derivative function, or is overridden by the user in derived classes.

◆ variable()

const Variable & libMesh::System::variable ( unsigned int  var) const
inherited

Return a constant reference to Variable var.

Definition at line 2126 of file system.h.

References libMesh::System::_variables.

2127 {
2128  libmesh_assert_less (i, _variables.size());
2129 
2130  return _variables[i];
2131 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_group()

const VariableGroup & libMesh::System::variable_group ( unsigned int  vg) const
inherited

Return a constant reference to VariableGroup vg.

Definition at line 2136 of file system.h.

References libMesh::System::_variable_groups.

2137 {
2138  libmesh_assert_less (vg, _variable_groups.size());
2139 
2140  return _variable_groups[vg];
2141 }
std::vector< VariableGroup > _variable_groups
The VariableGroup in this System.
Definition: system.h:1909

◆ variable_name()

const std::string & libMesh::System::variable_name ( const unsigned int  i) const
inherited
Returns
The name of variable i.

Definition at line 2146 of file system.h.

References libMesh::System::_variables.

2147 {
2148  libmesh_assert_less (i, _variables.size());
2149 
2150  return _variables[i].name();
2151 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_number()

unsigned short int libMesh::System::variable_number ( const std::string &  var) const
inherited
Returns
The variable number associated with the user-specified variable named var.

Referenced by libMesh::System::variable_scalar_number(), and libMesh::System::variable_type().

◆ variable_scalar_number() [1/2]

unsigned int libMesh::System::variable_scalar_number ( const std::string &  var,
unsigned int  component 
) const
inherited
Returns
An index, starting from 0 for the first component of the first variable, and incrementing for each component of each (potentially vector-valued) variable in the system in order. For systems with only scalar-valued variables, this will be the same as variable_number(var)

Irony: currently our only non-scalar-valued variable type is SCALAR.

Definition at line 2157 of file system.h.

References libMesh::System::variable_number().

2159 {
2160  return variable_scalar_number(this->variable_number(var), component);
2161 }
unsigned int variable_scalar_number(const std::string &var, unsigned int component) const
Definition: system.h:2157
unsigned short int variable_number(const std::string &var) const

◆ variable_scalar_number() [2/2]

unsigned int libMesh::System::variable_scalar_number ( unsigned int  var_num,
unsigned int  component 
) const
inherited
Returns
An index, starting from 0 for the first component of the first variable, and incrementing for each component of each (potentially vector-valued) variable in the system in order. For systems with only scalar-valued variables, this will be the same as var_num

Irony: currently our only non-scalar-valued variable type is SCALAR.

Definition at line 2167 of file system.h.

References libMesh::System::_variables.

2169 {
2170  return _variables[var_num].first_scalar_number() + component;
2171 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_type() [1/2]

const FEType & libMesh::System::variable_type ( const unsigned int  i) const
inherited
Returns
The finite element type variable number i.

Definition at line 2176 of file system.h.

References libMesh::System::_variables.

Referenced by FETest< order, family, elem_type >::setUp().

2177 {
2178  libmesh_assert_less (i, _variables.size());
2179 
2180  return _variables[i].type();
2181 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_type() [2/2]

const FEType & libMesh::System::variable_type ( const std::string &  var) const
inherited
Returns
The finite element type for variable var.

Definition at line 2186 of file system.h.

References libMesh::System::_variables, and libMesh::System::variable_number().

2187 {
2188  return _variables[this->variable_number(var)].type();
2189 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904
unsigned short int variable_number(const std::string &var) const

◆ vector_is_adjoint()

int libMesh::System::vector_is_adjoint ( const std::string &  vec_name) const
inherited
Returns
The integer describing whether the vector identified by vec_name represents a solution from an adjoint (non-negative) or the primal (-1) space.

◆ vector_name() [1/2]

const std::string& libMesh::System::vector_name ( const unsigned int  vec_num) const
inherited
Returns
The name of this system's additional vector number vec_num (where the vectors are counted starting with 0).

◆ vector_name() [2/2]

const std::string& libMesh::System::vector_name ( const NumericVector< Number > &  vec_reference) const
inherited
Returns
The name of a system vector, given a reference to that vector

◆ vector_preservation()

bool libMesh::System::vector_preservation ( const std::string &  vec_name) const
inherited
Returns
The boolean describing whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc.

◆ vectors_begin() [1/2]

System::vectors_iterator libMesh::System::vectors_begin ( )
inherited

Beginning of vectors container.

Definition at line 2238 of file system.h.

References libMesh::System::_vectors.

2239 {
2240  return _vectors.begin();
2241 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ vectors_begin() [2/2]

System::const_vectors_iterator libMesh::System::vectors_begin ( ) const
inherited

Beginning of vectors container.

Definition at line 2244 of file system.h.

References libMesh::System::_vectors.

2245 {
2246  return _vectors.begin();
2247 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ vectors_end() [1/2]

System::vectors_iterator libMesh::System::vectors_end ( )
inherited

End of vectors container.

Definition at line 2250 of file system.h.

References libMesh::System::_vectors.

2251 {
2252  return _vectors.end();
2253 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ vectors_end() [2/2]

System::const_vectors_iterator libMesh::System::vectors_end ( ) const
inherited

End of vectors container.

Definition at line 2256 of file system.h.

References libMesh::System::_vectors.

2257 {
2258  return _vectors.end();
2259 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ weighted_sensitivity_adjoint_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::weighted_sensitivity_adjoint_solve ( const ParameterVector parameters,
const ParameterVector weights,
const QoISet qoi_indices = QoISet() 
)
overridevirtualinherited

Assembles & solves the linear system(s) (dR/du)^T*z_w = sum(w_p*(d^2q/dudp - d^2R/dudp*z)), for those parameters p contained within parameters, weighted by the values w_p found within weights.

Assumes that adjoint_solve has already calculated z for each qoi in qoi_indices.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

◆ weighted_sensitivity_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::weighted_sensitivity_solve ( const ParameterVector parameters,
const ParameterVector weights 
)
overridevirtualinherited

Assembles & solves the linear system(s) (dR/du)*u_w = sum(w_p*-dR/dp), for those parameters p contained within parameters weighted by the values w_p found within weights.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

◆ write_header()

void libMesh::System::write_header ( Xdr io,
const std::string &  version,
const bool  write_additional_data 
) const
inherited

Writes the basic data header for this System.

◆ write_parallel_data()

void libMesh::System::write_parallel_data ( Xdr io,
const bool  write_additional_data 
) const
inherited

Writes additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh. This method will create an individual file for each processor in the simulation where the local solution components for that processor will be stored.

◆ write_serialized_data()

void libMesh::System::write_serialized_data ( Xdr io,
const bool  write_additional_data = true 
) const
inherited

Writes additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh.

◆ write_serialized_vectors()

std::size_t libMesh::System::write_serialized_vectors ( Xdr io,
const std::vector< const NumericVector< Number > *> &  vectors 
) const
inherited

Serialize & write a number of identically distributed vectors.

This method allows for optimization for the multiple vector case by only communicating the metadata once.

◆ zero_variable()

void libMesh::System::zero_variable ( NumericVector< Number > &  v,
unsigned int  var_num 
) const
inherited

Zeroes all dofs in v that correspond to variable number var_num.

Member Data Documentation

◆ _communicator

const Parallel::Communicator& libMesh::ParallelObject::_communicator
protectedinherited

◆ _counts

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _diff_physics

DifferentiablePhysics* libMesh::DifferentiableSystem::_diff_physics
protectedinherited

Pointer to object to use for physics assembly evaluations.

Defaults to this for backwards compatibility; in the future users should create separate physics objects.

Definition at line 371 of file diff_system.h.

Referenced by libMesh::DifferentiableSystem::attach_physics(), and libMesh::DifferentiableSystem::get_physics().

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

◆ _fe_family

std::string L2System::_fe_family
protected

Definition at line 69 of file L2system.h.

Referenced by fe_family().

◆ _fe_order

unsigned int L2System::_fe_order
protected

Definition at line 70 of file L2system.h.

Referenced by fe_order().

◆ _first_order_vars

std::set<unsigned int> libMesh::DifferentiablePhysics::_first_order_vars
protectedinherited

Variable indices for those variables that are first order in time.

Definition at line 559 of file diff_physics.h.

Referenced by libMesh::DifferentiablePhysics::get_first_order_vars(), libMesh::DifferentiablePhysics::have_first_order_vars(), and libMesh::DifferentiablePhysics::is_first_order_var().

◆ _mesh_sys

System* libMesh::DifferentiablePhysics::_mesh_sys
protectedinherited

System from which to acquire moving mesh information.

Definition at line 542 of file diff_physics.h.

Referenced by libMesh::DifferentiablePhysics::get_mesh_system(), and libMesh::DifferentiablePhysics::set_mesh_system().

◆ _mesh_x_var

unsigned int libMesh::DifferentiablePhysics::_mesh_x_var
protectedinherited

Variables from which to acquire moving mesh information.

Definition at line 547 of file diff_physics.h.

Referenced by libMesh::DifferentiablePhysics::get_mesh_x_var(), and libMesh::DifferentiablePhysics::set_mesh_x_var().

◆ _mesh_y_var

unsigned int libMesh::DifferentiablePhysics::_mesh_y_var
protectedinherited

◆ _mesh_z_var

unsigned int libMesh::DifferentiablePhysics::_mesh_z_var
protectedinherited

◆ _mutex

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_objects

Threads::atomic<unsigned int> libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects.

Print the reference count information when the number returns to 0.

Definition at line 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _second_order_dot_vars

std::map<unsigned int,unsigned int> libMesh::DifferentiablePhysics::_second_order_dot_vars
protectedinherited

If the user adds any second order variables, then we need to also cache the map to their corresponding dot variable that will be added by this TimeSolver class.

Definition at line 571 of file diff_physics.h.

◆ _second_order_vars

std::set<unsigned int> libMesh::DifferentiablePhysics::_second_order_vars
protectedinherited

Variable indices for those variables that are second order in time.

Definition at line 564 of file diff_physics.h.

Referenced by libMesh::DifferentiablePhysics::get_second_order_vars(), libMesh::DifferentiablePhysics::have_second_order_vars(), and libMesh::DifferentiablePhysics::is_second_order_var().

◆ _time_evolving

std::vector<unsigned int> libMesh::DifferentiablePhysics::_time_evolving
protectedinherited

Stores unsigned int to tell us which variables are evolving as first order in time (1), second order in time (2), or are not time evolving (0).

Definition at line 554 of file diff_physics.h.

Referenced by libMesh::DifferentiablePhysics::is_time_evolving().

◆ assemble_before_solve

bool libMesh::System::assemble_before_solve
inherited

Flag which tells the system to whether or not to call the user assembly function during each call to solve().

By default, every call to solve() begins with a call to the user assemble, so this flag is true. (For explicit systems, "solving" the system occurs during the assembly step, so this flag is always true for explicit systems.)

You will only want to set this to false if you need direct control over when the system is assembled, and are willing to track the state of its assembly yourself. An example of such a case is an implicit system with multiple right hand sides. In this instance, a single assembly would likely be followed with multiple calls to solve.

The frequency system and Newmark system have their own versions of this flag, called _finished_assemble, which might be able to be replaced with this more general concept.

Definition at line 1470 of file system.h.

Referenced by libMesh::System::disable_cache().

◆ assemble_qoi_elements

bool libMesh::DifferentiableQoI::assemble_qoi_elements
inherited

If assemble_qoi_elements is false (it is true by default), the assembly loop for a quantity of interest or its derivatives will skip computing on mesh elements, and will only compute on mesh sides.

Definition at line 99 of file diff_qoi.h.

◆ assemble_qoi_internal_sides

bool libMesh::DifferentiableQoI::assemble_qoi_internal_sides
inherited

If assemble_qoi_internal_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over element sides which do not fall on domain boundaries.

Definition at line 91 of file diff_qoi.h.

◆ assemble_qoi_sides

bool libMesh::DifferentiableQoI::assemble_qoi_sides
inherited

If assemble_qoi_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over domain boundary sides.

To add domain interior sides, also set assemble_qoi_internal_sides to true.

Definition at line 83 of file diff_qoi.h.

◆ compute_internal_sides

bool libMesh::DifferentiablePhysics::compute_internal_sides
inherited

compute_internal_sides is false by default, indicating that side_* computations will only be done on boundary sides.

If compute_internal_sides is true, computations will be done on sides between elements as well.

Definition at line 153 of file diff_physics.h.

◆ current_local_solution

std::unique_ptr<NumericVector<Number> > libMesh::System::current_local_solution
inherited

All the values I need to compute my contribution to the simulation at hand.

Think of this as the current solution with any ghost values needed from other processors. This vector is necessarily larger than the solution vector in the case of a parallel simulation. The update() member is used to synchronize the contents of the solution and current_local_solution vectors.

Definition at line 1528 of file system.h.

Referenced by FETest< order, family, elem_type >::testGradU(), FETest< order, family, elem_type >::testGradUComp(), and FETest< order, family, elem_type >::testU().

◆ deltat

Real libMesh::DifferentiableSystem::deltat
inherited

For time-dependent problems, this is the amount delta t to advance the solution in time.

Definition at line 261 of file diff_system.h.

◆ diff_qoi

DifferentiableQoI* libMesh::DifferentiableSystem::diff_qoi
protectedinherited

Pointer to object to use for quantity of interest assembly evaluations.

Defaults to this for backwards compatibility; in the future users should create separate physics objects.

Definition at line 378 of file diff_system.h.

Referenced by libMesh::DifferentiableSystem::attach_qoi(), and libMesh::DifferentiableSystem::get_qoi().

◆ extra_quadrature_order

int libMesh::System::extra_quadrature_order
inherited

A member int that can be employed to indicate increased or reduced quadrature order.

Note
For FEMSystem users, by default, when calling the user-defined residual functions, the FEMSystem will first set up an appropriate FEType::default_quadrature_rule() object for performing the integration. This rule will integrate elements of order up to 2*p+1 exactly (where p is the sum of the base FEType and local p refinement levels), but if additional (or reduced) quadrature accuracy is desired then this extra_quadrature_order (default 0) will be added.

Definition at line 1501 of file system.h.

◆ fe_reinit_during_postprocess

bool libMesh::FEMSystem::fe_reinit_during_postprocess
inherited

If fe_reinit_during_postprocess is true (it is true by default), FE objects will be reinit()ed with their default quadrature rules.

If false, FE objects will need to be reinit()ed by the user or will be in an undefined state.

Definition at line 170 of file fem_system.h.

◆ goal_func

std::unique_ptr<libMesh::FEMFunctionBase<libMesh::Number> > L2System::goal_func

Definition at line 49 of file L2system.h.

◆ input_contexts

std::map<libMesh::FEMContext *, libMesh::FEMContext *> L2System::input_contexts

Definition at line 54 of file L2system.h.

◆ input_system

libMesh::System* L2System::input_system

Definition at line 51 of file L2system.h.

◆ matrix

SparseMatrix<Number>* libMesh::ImplicitSystem::matrix
inherited

The system matrix.

Implicit systems are characterized by the need to solve the linear system Ax=b. This is the system matrix A.

Definition at line 357 of file implicit_system.h.

◆ numerical_jacobian_h

Real libMesh::FEMSystem::numerical_jacobian_h
inherited

If calculating numeric jacobians is required, the FEMSystem will perturb each solution vector entry by numerical_jacobian_h when calculating finite differences.

This defaults to the libMesh TOLERANCE but can be set manually.

For ALE terms, the FEMSystem will perturb each mesh point in an element by numerical_jacobian_h * Elem::hmin()

Definition at line 181 of file fem_system.h.

Referenced by libMesh::FEMSystem::numerical_jacobian_h_for_var().

◆ postprocess_sides

bool libMesh::DifferentiableSystem::postprocess_sides
inherited

If postprocess_sides is true (it is false by default), the postprocessing loop will loop over all sides as well as all elements.

Definition at line 315 of file diff_system.h.

◆ print_element_jacobians

bool libMesh::DifferentiableSystem::print_element_jacobians
inherited

Set print_element_jacobians to true to print each J_elem contribution.

Definition at line 362 of file diff_system.h.

◆ print_element_residuals

bool libMesh::DifferentiableSystem::print_element_residuals
inherited

Set print_element_residuals to true to print each R_elem contribution.

Definition at line 357 of file diff_system.h.

◆ print_element_solutions

bool libMesh::DifferentiableSystem::print_element_solutions
inherited

Set print_element_solutions to true to print each U_elem input.

Definition at line 352 of file diff_system.h.

◆ print_jacobian_norms

bool libMesh::DifferentiableSystem::print_jacobian_norms
inherited

Set print_jacobian_norms to true to print |J| whenever it is assembled.

Definition at line 342 of file diff_system.h.

◆ print_jacobians

bool libMesh::DifferentiableSystem::print_jacobians
inherited

Set print_jacobians to true to print J whenever it is assembled.

Definition at line 347 of file diff_system.h.

◆ print_residual_norms

bool libMesh::DifferentiableSystem::print_residual_norms
inherited

Set print_residual_norms to true to print |F| whenever it is assembled.

Definition at line 332 of file diff_system.h.

◆ print_residuals

bool libMesh::DifferentiableSystem::print_residuals
inherited

Set print_residuals to true to print F whenever it is assembled.

Definition at line 337 of file diff_system.h.

◆ print_solution_norms

bool libMesh::DifferentiableSystem::print_solution_norms
inherited

Set print_residual_norms to true to print |U| whenever it is used in an assembly() call.

Definition at line 321 of file diff_system.h.

◆ print_solutions

bool libMesh::DifferentiableSystem::print_solutions
inherited

Set print_solutions to true to print U whenever it is used in an assembly() call.

Definition at line 327 of file diff_system.h.

◆ qoi

std::vector<Number> libMesh::System::qoi
inherited

Values of the quantities of interest.

This vector needs to be both resized and filled by the user before any quantity of interest assembly is done and before any sensitivities are calculated.

Definition at line 1551 of file system.h.

Referenced by libMesh::DifferentiableSystem::attach_qoi(), and libMesh::System::n_qois().

◆ rhs

NumericVector<Number>* libMesh::ExplicitSystem::rhs
inherited

The system matrix.

Implicit systems are characterized by the need to solve the linear system Ax=b. This is the right-hand-side vector b.

Definition at line 105 of file explicit_system.h.

◆ solution

std::unique_ptr<NumericVector<Number> > libMesh::System::solution
inherited

Data structure to hold solution values.

Definition at line 1516 of file system.h.

◆ time

Real libMesh::System::time
inherited

For time-dependent problems, this is the time t at the beginning of the current timestep.

Note
For DifferentiableSystem users: do not access this time during an assembly! Use the DiffContext::time value instead to get correct results.

Definition at line 1538 of file system.h.

◆ time_solver

std::unique_ptr<TimeSolver> libMesh::DifferentiableSystem::time_solver
inherited

A pointer to the solver object we're going to use.

This must be instantiated by the user before solving!

Definition at line 234 of file diff_system.h.

Referenced by libMesh::DifferentiableSystem::get_time_solver(), and libMesh::DifferentiableSystem::set_time_solver().

◆ use_fixed_solution

bool libMesh::System::use_fixed_solution
inherited

A boolean to be set to true by systems using elem_fixed_solution, for optional use by e.g.

stabilized methods. False by default.

Note
For FEMSystem users, if this variable is set to true, it must be before init_data() is called.

Definition at line 1486 of file system.h.

◆ verify_analytic_jacobians

Real libMesh::FEMSystem::verify_analytic_jacobians
inherited

If verify_analytic_jacobian is equal to zero (as it is by default), no numeric jacobians will be calculated unless an overridden element_time_derivative(), element_constraint(), side_time_derivative(), or side_constraint() function cannot provide an analytic jacobian upon request.

If verify_analytic_jacobian is equal to the positive value tol, then any time a full analytic element jacobian can be calculated it will be tested against a numerical jacobian on the same element, and the program will abort if the relative error (in matrix l1 norms) exceeds tol.

Definition at line 209 of file fem_system.h.

◆ zero_out_matrix_and_rhs

bool libMesh::ImplicitSystem::zero_out_matrix_and_rhs
inherited

By default, the system will zero out the matrix and the right hand side.

If this flag is false, it is the responsibility of the client code to take care of setting these to zero before assembly begins

Definition at line 364 of file implicit_system.h.


The documentation for this class was generated from the following file: