libMesh
|
#include <elasticity_system.h>
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 ¶meters, 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 | |
ElasticitySystem (EquationSystems &es, const std::string &name_in, const unsigned int number_in) | |
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 (DiffContext &context) |
virtual bool | element_time_derivative (bool request_jacobian, DiffContext &context) |
Adds the time derivative contribution on elem to elem_residual. More... | |
virtual bool | side_time_derivative (bool request_jacobian, DiffContext &context) |
Adds the time derivative contribution on side of elem to elem_residual. More... | |
virtual bool | mass_residual (bool request_jacobian, DiffContext &context) |
Subtracts a mass vector contribution on elem from elem_residual. More... | |
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< DifferentiablePhysics > | clone_physics () override |
We don't allow systems to be attached to each other. More... | |
virtual std::unique_ptr< DifferentiableQoI > | clone () override |
We don't allow systems to be attached to each other. More... | |
const DifferentiablePhysics * | get_physics () const |
DifferentiablePhysics * | get_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 DifferentiableQoI * | get_qoi () const |
DifferentiableQoI * | get_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_type & | system () |
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 ¶meters) override |
Residual parameter derivative function. More... | |
virtual std::pair< unsigned int, Real > | sensitivity_solve (const ParameterVector ¶meters) 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 ¶meters, 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 ¶meters, 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 ¶meters, 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 ¶meters, 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 ¶meters, 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 ¶meters, 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 ¶meters, 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 ¶meters) 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 ¶meters, 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 ¶meters) |
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 ¶meters, 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_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 | 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 System * | get_mesh_system () const |
System * | get_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 | |
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 | |
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 | |
DifferentiablePhysics * | _diff_physics |
Pointer to object to use for physics assembly evaluations. More... | |
DifferentiableQoI * | diff_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... | |
Private Member Functions | |
Real | kronecker_delta (unsigned int i, unsigned int j) |
Real | elasticity_tensor (unsigned int i, unsigned int j, unsigned int k, unsigned int l) |
Private Attributes | |
unsigned int | _u_var |
unsigned int | _v_var |
unsigned int | _w_var |
Real | _rho |
Definition at line 36 of file elasticity_system.h.
|
inherited |
Definition at line 306 of file implicit_system.h.
|
inherited |
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
Definition at line 117 of file reference_counter.h.
|
inherited |
|
inherited |
Matrix iterator typedefs.
Definition at line 305 of file implicit_system.h.
|
inherited |
The type of the parent.
Definition at line 79 of file fem_system.h.
|
inherited |
The type of system.
Definition at line 74 of file fem_system.h.
|
inherited |
Syntax sugar to make numerical_jacobian() declaration easier.
Definition at line 214 of file fem_system.h.
|
inherited |
|
inherited |
ElasticitySystem::ElasticitySystem | ( | EquationSystems & | es, |
const std::string & | name_in, | ||
const unsigned int | number_in | ||
) |
Definition at line 40 of file elasticity_system.h.
|
inherited |
This method simply combines element_time_derivative() and eulerian_residual(), which makes its address useful as a pointer-to-member-function when refactoring.
|
inherited |
Activates the system.
Only active systems are solved.
Definition at line 2073 of file system.h.
References libMesh::System::_active.
|
inherited |
true
if the system is active, false
otherwise. An active system will be solved. Definition at line 2065 of file system.h.
References libMesh::System::_active.
|
inherited |
|
inherited |
|
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.
|
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.
|
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.
|
inherited |
|
inherited |
|
inherited |
Adds the variable var
to the list of variables for this system.
Referenced by SimpleRBConstruction::init_data(), and FETest< order, family, elem_type >::setUp().
|
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
.
|
inherited |
Adds the variable var
to the list of variables for this system.
|
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
.
|
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
|
inherited |
|
inherited |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
inherited |
Register a user function to use in assembling the system matrix and RHS.
|
inherited |
Register a user object to use in assembling the system matrix and RHS.
|
inherited |
Register a user function for imposing constraints.
|
inherited |
Register a user object for imposing constraints.
|
inherited |
Register a user function to use in initializing the system.
|
inherited |
Register a user class to use to initialize the system.
attach_init_function
.
|
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().
|
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.
|
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
.
|
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
.
|
inherited |
Register a user function for evaluating the quantities of interest, whose values should be placed in System::qoi
.
|
inherited |
Register a user object for evaluating the quantities of interest, whose values should be placed in System::qoi
.
|
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.
|
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.
|
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.
|
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.
|
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.
|
inherited |
var
in the vector v
, in the specified norm (e.g. L2, L_INF, H1)
|
inherited |
v
, using component_norm
and component_scale
to choose and weight the norms of each variable.
|
overridevirtualinherited |
Clear all the data structures associated with the system.
Reimplemented from libMesh::ImplicitSystem.
Reimplemented in libMesh::ContinuationSystem.
|
virtualinherited |
Clear any data structures associated with the physics.
|
virtualinherited |
Clear all the data structures associated with the QoI.
Definition at line 75 of file diff_qoi.h.
|
overridevirtualinherited |
We don't allow systems to be attached to each other.
Implements libMesh::DifferentiableQoI.
Definition at line 169 of file diff_system.h.
|
overridevirtualinherited |
We don't allow systems to be attached to each other.
Implements libMesh::DifferentiablePhysics.
Definition at line 159 of file diff_system.h.
|
inherited |
Parallel::Communicator
object used by this mesh. Definition at line 89 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().
|
virtualinherited |
true
when the other system contains identical data, up to the given threshold. Outputs some diagnostic info when verbose
is set.
|
inherited |
|
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 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.
|
inherited |
Deactivates the system.
Only active systems are solved.
Definition at line 2081 of file system.h.
References libMesh::System::_active.
|
overridevirtualinherited |
Avoids use of any cached data that might affect any solve result.
Should be overridden in derived systems.
Reimplemented from libMesh::System.
|
staticinherited |
|
private |
|
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.
|
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.
|
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.
|
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.
|
virtual |
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.
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
|
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.
|
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.
|
virtualinherited |
Method to finalize qoi derivatives which require more than just a simple sum of element contributions.
|
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.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Fills all_variable_numbers
with all the variable numbers for the variables that have been added to this system.
|
inherited |
_dof_map
. Definition at line 2049 of file system.h.
References libMesh::System::_dof_map.
Referenced by SimpleRBConstruction::init_data(), and FETest< order, family, elem_type >::setUp().
|
inherited |
_dof_map
. Definition at line 2057 of file system.h.
References libMesh::System::_dof_map.
|
inherited |
Definition at line 712 of file system.h.
References libMesh::System::_equation_systems.
Referenced by libMesh::WrappedFunction< Output >::WrappedFunction().
|
inherited |
Definition at line 717 of file system.h.
References libMesh::System::_equation_systems.
|
inherited |
Definition at line 517 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_first_order_vars.
|
staticinherited |
Gets a string containing the reference information.
|
inherited |
|
overridevirtualinherited |
Reimplemented from libMesh::ImplicitSystem.
|
overridevirtualinherited |
Reimplemented from libMesh::ImplicitSystem.
|
inherited |
mat_name
.None of these matrices is involved in the solution process. Access is only granted when the matrix is already properly initialized.
|
inherited |
mat_name
.None of these matrices is involved in the solution process. Access is only granted when the matrix is already properly initialized.
|
inherited |
_mesh
. Definition at line 2033 of file system.h.
References libMesh::System::_mesh.
Referenced by AssemblyA0::boundary_assembly(), AssemblyA1::boundary_assembly(), and AssemblyA2::boundary_assembly().
|
inherited |
_mesh
. Definition at line 2041 of file system.h.
References libMesh::System::_mesh.
|
inherited |
Definition at line 624 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_sys.
|
inherited |
Definition at line 630 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_sys.
|
inherited |
Definition at line 636 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_x_var.
|
inherited |
Definition at line 642 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_y_var.
|
inherited |
Definition at line 648 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_z_var.
|
inherited |
this
. Definition at line 182 of file diff_system.h.
References libMesh::DifferentiableSystem::_diff_physics.
|
inherited |
this
. Definition at line 191 of file diff_system.h.
References libMesh::DifferentiableSystem::_diff_physics.
|
inherited |
this
. Definition at line 211 of file diff_system.h.
References libMesh::DifferentiableSystem::diff_qoi.
|
inherited |
Definition at line 219 of file diff_system.h.
References libMesh::DifferentiableSystem::diff_qoi.
|
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.
|
inherited |
Definition at line 530 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_second_order_vars.
|
inherited |
assemble_residual_derivatives()
is called.When assembled, this vector should hold -(partial R / partial p_i)
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 415 of file diff_system.h.
References libMesh::DifferentiableSystem::time_solver.
|
inherited |
Non-const version of the above.
Definition at line 423 of file diff_system.h.
References libMesh::DifferentiableSystem::time_solver.
|
inherited |
vec_name
. Access is only granted when the vector is already properly initialized.
|
inherited |
vec_name
. Access is only granted when the vector is already properly initialized.
|
inherited |
vec_num
(where the vectors are counted starting with 0).
|
inherited |
vec_num
(where the vectors are counted starting with 0).
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
true
if a variable named var
exists in this System
|
inherited |
Check for any first order vars that are also belong to FEFamily::SCALAR.
|
inherited |
Definition at line 511 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_first_order_vars.
|
inherited |
true
if this System
has a matrix associated with the given name, false
otherwise. Definition at line 419 of file implicit_system.h.
References libMesh::ImplicitSystem::_matrices.
|
inherited |
Check for any second order vars that are also belong to FEFamily::SCALAR.
|
inherited |
Definition at line 524 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_second_order_vars.
|
inherited |
true
if this System
has a vector associated with the given name, false
otherwise. Definition at line 2225 of file system.h.
References libMesh::System::_vectors.
|
inherited |
true
, then EquationSystems::write
will ignore this system. Definition at line 1662 of file system.h.
References libMesh::System::_hide_output.
|
inherited |
true
when VariableGroup
structures should be automatically identified, false
otherwise. Definition at line 2201 of file system.h.
References libMesh::System::_identify_variable_groups.
|
inherited |
Toggle automatic VariableGroup
identification.
Definition at line 2209 of file system.h.
References libMesh::System::_identify_variable_groups.
|
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().
|
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().
|
inherited |
Initializes degrees of freedom on the current mesh.
Sets the
|
virtual |
Reimplemented from libMesh::FEMSystem.
|
virtual |
Initializes the member data fields associated with the system, so that, e.g., assemble()
may be used.
Reimplemented from libMesh::FEMSystem.
|
protectedvirtualinherited |
Initializes the matrices associated with this system.
|
virtualinherited |
Initialize any data structures associated with the physics.
Referenced by libMesh::DifferentiableSystem::attach_physics().
|
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().
|
inherited |
Accessor for the adjoint_already_solved boolean.
Definition at line 388 of file system.h.
References libMesh::System::adjoint_already_solved.
|
inherited |
Definition at line 520 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_first_order_vars.
|
inherited |
true
iff this system has been initialized. Definition at line 2089 of file system.h.
References libMesh::System::_is_initialized.
|
inherited |
Definition at line 533 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_second_order_vars.
|
inherited |
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.
|
private |
Definition at line 72 of file elasticity_system.h.
|
inherited |
Fills the std::set with the degrees of freedom on the local processor corresponding the the variable number passed in.
|
virtual |
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::FEMPhysics.
|
inherited |
Tells the FEMSystem to set the degree of freedom coefficients which should correspond to mesh nodal coordinates.
|
inherited |
Tells the FEMSystem to set the mesh nodal coordinates which should correspond to degree of freedom coefficients.
|
inherited |
Definition at line 2217 of file system.h.
References libMesh::System::n_constrained_dofs(), and libMesh::System::n_dofs().
|
inherited |
n_vars()
in the case of all scalar-valued variables. Definition at line 2121 of file system.h.
References libMesh::System::_variables, libMesh::Variable::first_scalar_number(), and libMesh::Variable::n_components().
|
inherited |
Referenced by libMesh::System::n_active_dofs().
|
inherited |
Referenced by libMesh::System::n_active_dofs().
|
inherited |
|
inherited |
|
overridevirtualinherited |
Reimplemented from libMesh::System.
Definition at line 426 of file implicit_system.h.
References libMesh::ImplicitSystem::_matrices.
|
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.
|
inherited |
Definition at line 95 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::size().
Referenced by libMesh::MeshBase::partition().
|
inherited |
Number of currently active quantities of interest.
Definition at line 2278 of file system.h.
References libMesh::System::qoi.
Referenced by libMesh::SensitivityData::allocate_data(), and libMesh::SensitivityData::allocate_hessian_data().
|
inherited |
VariableGroup
variable groups in the system Definition at line 2113 of file system.h.
References libMesh::System::_variable_groups.
|
inherited |
Definition at line 2105 of file system.h.
References libMesh::System::_variables.
|
inherited |
_vectors
map Definition at line 2233 of file system.h.
References libMesh::System::_vectors.
|
inherited |
Definition at line 2017 of file system.h.
References libMesh::System::_sys_name.
|
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.
|
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.
|
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.
|
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.
|
inherited |
Definition at line 2025 of file system.h.
References libMesh::System::_sys_number.
|
inherited |
Uses the results of multiple element_residual() calls to numerically differentiate the corresponding jacobian on an element.
|
inherited |
Uses the results of multiple res
calls to numerically differentiate the corresponding jacobian.
|
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.
|
inherited |
Uses the results of multiple side_residual() calls to numerically differentiate the corresponding jacobian on nonlocal DoFs.
|
inherited |
Uses the results of multiple side_residual() calls to numerically differentiate the corresponding jacobian on an element's side.
|
virtualinherited |
Method to populate system qoi data structure with process-local qoi.
By default, simply sums process qois into system qoi.
|
inherited |
var
at the physical point p
in the mesh, similarly to point_value.
|
inherited |
var
at the physical point p
in local Elem e
in the mesh, similarly to point_value.
|
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.
|
inherited |
var
at the physical point p
in the mesh, similarly to point_value.
|
inherited |
var
at the physical point p
in local Elem e
in the mesh, similarly to point_value.
|
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.
|
inherited |
var
at the physical point p
in the mesh, without knowing a priori which element contains p
.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.
|
inherited |
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.
|
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.
|
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.
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
|
inherited |
Definition at line 101 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::rank().
Referenced by libMesh::DofMap::end_dof(), libMesh::DofMap::end_old_dof(), libMesh::DofMap::first_dof(), libMesh::DofMap::first_old_dof(), libMesh::DofMap::last_dof(), libMesh::MeshBase::n_active_local_elem(), libMesh::DofMap::n_local_dofs(), libMesh::MeshBase::n_local_elem(), libMesh::MeshBase::n_local_nodes(), and libMesh::MeshTools::weight().
|
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().
|
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.
|
inherited |
|
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 794 of file system.h.
References libMesh::System::_solution_projection.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
virtualinherited |
Prolong vectors after the mesh has refined.
|
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.
|
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.
|
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].
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.
|
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 >.
|
inherited |
Reads the basic data header for this System.
|
inherited |
Reads additional data, namely vectors, for this System.
|
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.
|
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.
|
inherited |
Reads additional data, namely vectors, for this System.
This method may safely be called on a distributed-memory mesh.
|
inherited |
|
inherited |
Read a number of identically distributed vectors.
This method allows for optimization for the multiple vector case by only communicating the metadata once.
|
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.
|
overridevirtualinherited |
Reinitializes the member data fields associated with the system, so that, e.g., assemble()
may be used.
Reimplemented from libMesh::ImplicitSystem.
|
virtualinherited |
Reinitializes the constraints for this system.
|
overridevirtualinherited |
Releases a pointer to a linear solver acquired by this->get_linear_solver()
Reimplemented from libMesh::ImplicitSystem.
|
inherited |
Removes the additional matrix mat_name
from this system.
|
inherited |
Removes the additional vector vec_name
from this system.
|
inherited |
mat_name
, or nullptr
if no matrix by that name exists.
|
inherited |
mat_name
, or nullptr
if no matrix by that name exists.
|
inherited |
System
has a vector associated with the given name, nullptr
otherwise.
|
inherited |
System
has a vector associated with the given name, nullptr
otherwise.
|
inherited |
vec_num
(where the vectors are counted starting with 0), or nullptr
if the system has no such vector.
|
inherited |
vec_num
(where the vectors are counted starting with 0), or nullptr
if the system has no such vector.
|
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.
|
virtualinherited |
Restrict vectors after the mesh has coarsened.
|
overridevirtualinherited |
Assembles & solves the linear system(s) (dR/du)*u_p = -dR/dp, for those parameters contained within parameters
.
Reimplemented from libMesh::System.
|
inherited |
Setter for the adjoint_already_solved boolean.
Definition at line 394 of file system.h.
References libMesh::System::adjoint_already_solved.
|
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 2097 of file system.h.
References libMesh::System::_basic_system_only.
|
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.
|
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.
|
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.
|
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.
|
inherited |
Definition at line 269 of file fem_system.h.
References libMesh::FEMSystem::_numerical_jacobian_h_for_var, and libMesh::Real.
|
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.
|
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.
|
inherited |
Allows one to set the boolean controlling whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
virtual |
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 from libMesh::DifferentiablePhysics.
|
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.
|
inherited |
Swap current physics object with external object.
|
inherited |
|
overridevirtualinherited |
"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 117 of file implicit_system.h.
|
virtualinherited |
Method to combine thread-local qois.
By default, simply sums thread qois.
|
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.
Definition at line 249 of file diff_physics.h.
|
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.
|
virtualinherited |
Update the local values to reflect the solution on neighboring processors.
Reimplemented in SolidSystem.
|
inherited |
Fill the input vector global_soln
so that it contains the global solution on all processors.
Requires communication with all other processors.
|
inherited |
Fill the input vector global_soln
so that it contains the global solution on processor dest_proc
.
Requires communication with all other processors.
|
virtualinherited |
Calls user's attached assembly function, or is overridden by the user in derived classes.
|
virtualinherited |
Calls user's attached constraint function, or is overridden by the user in derived classes.
|
virtualinherited |
Calls user's attached initialization function, or is overridden by the user in derived classes.
|
virtualinherited |
Calls user's attached quantity of interest function, or is overridden by the user in derived classes.
|
virtualinherited |
Calls user's attached quantity of interest derivative function, or is overridden by the user in derived classes.
|
inherited |
Return a constant reference to Variable
var
.
Definition at line 2133 of file system.h.
References libMesh::System::_variables.
|
inherited |
Return a constant reference to VariableGroup
vg
.
Definition at line 2143 of file system.h.
References libMesh::System::_variable_groups.
|
inherited |
i
. Definition at line 2153 of file system.h.
References libMesh::System::_variables.
|
inherited |
var
. Referenced by libMesh::System::variable_scalar_number(), and libMesh::System::variable_type().
|
inherited |
variable_number(var)
Irony: currently our only non-scalar-valued variable type is SCALAR.
Definition at line 2164 of file system.h.
References libMesh::System::variable_number().
|
inherited |
var_num
Irony: currently our only non-scalar-valued variable type is SCALAR.
Definition at line 2174 of file system.h.
References libMesh::System::_variables.
|
inherited |
i
. Definition at line 2183 of file system.h.
References libMesh::System::_variables.
Referenced by FETest< order, family, elem_type >::setUp().
|
inherited |
var
. Definition at line 2193 of file system.h.
References libMesh::System::_variables, and libMesh::System::variable_number().
|
inherited |
|
inherited |
vec_num
(where the vectors are counted starting with 0).
|
inherited |
|
inherited |
|
inherited |
Beginning of vectors container.
Definition at line 2245 of file system.h.
References libMesh::System::_vectors.
|
inherited |
Beginning of vectors container.
Definition at line 2251 of file system.h.
References libMesh::System::_vectors.
|
inherited |
End of vectors container.
Definition at line 2257 of file system.h.
References libMesh::System::_vectors.
|
inherited |
End of vectors container.
Definition at line 2263 of file system.h.
References libMesh::System::_vectors.
|
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
.
Reimplemented from libMesh::System.
|
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
.
Reimplemented from libMesh::System.
|
inherited |
Writes the basic data header for this System.
|
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.
|
inherited |
Writes additional data, namely vectors, for this System.
This method may safely be called on a distributed-memory mesh.
|
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.
|
inherited |
Zeroes all dofs in v
that correspond to variable number var_num
.
|
protectedinherited |
Definition at line 107 of file parallel_object.h.
Referenced by libMesh::ParallelObject::comm(), libMesh::ParallelObject::n_processors(), libMesh::ParallelObject::operator=(), and libMesh::ParallelObject::processor_id().
|
staticprotectedinherited |
Actually holds the data.
Definition at line 122 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
|
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().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 141 of file reference_counter.h.
|
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().
|
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().
|
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().
|
protectedinherited |
Definition at line 547 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::get_mesh_y_var(), and libMesh::DifferentiablePhysics::set_mesh_y_var().
|
protectedinherited |
Definition at line 547 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::get_mesh_z_var(), and libMesh::DifferentiablePhysics::set_mesh_z_var().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 135 of file reference_counter.h.
|
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().
|
private |
Definition at line 70 of file elasticity_system.h.
|
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.
|
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().
|
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().
|
private |
Definition at line 68 of file elasticity_system.h.
|
private |
Definition at line 68 of file elasticity_system.h.
|
private |
Definition at line 68 of file elasticity_system.h.
|
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 1477 of file system.h.
Referenced by libMesh::System::disable_cache().
|
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.
|
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.
|
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.
|
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.
|
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 1535 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().
|
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.
|
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().
|
inherited |
A member int that can be employed to indicate increased or reduced quadrature order.
|
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.
|
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 373 of file implicit_system.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().
|
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.
|
inherited |
Set print_element_jacobians to true to print each J_elem contribution.
Definition at line 362 of file diff_system.h.
|
inherited |
Set print_element_residuals to true to print each R_elem contribution.
Definition at line 357 of file diff_system.h.
|
inherited |
Set print_element_solutions to true to print each U_elem input.
Definition at line 352 of file diff_system.h.
|
inherited |
Set print_jacobian_norms to true to print |J| whenever it is assembled.
Definition at line 342 of file diff_system.h.
|
inherited |
Set print_jacobians to true to print J whenever it is assembled.
Definition at line 347 of file diff_system.h.
|
inherited |
Set print_residual_norms to true to print |F| whenever it is assembled.
Definition at line 332 of file diff_system.h.
|
inherited |
Set print_residuals to true to print F whenever it is assembled.
Definition at line 337 of file diff_system.h.
|
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.
|
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.
|
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 1558 of file system.h.
Referenced by libMesh::DifferentiableSystem::attach_qoi(), and libMesh::System::n_qois().
|
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 114 of file explicit_system.h.
|
inherited |
|
inherited |
|
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().
|
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.
|
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.
|
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 380 of file implicit_system.h.