Manages multiples systems of equations. More...
#include <equation_systems.h>
Public Types | |
enum | ReadFlags { READ_HEADER = 1, READ_DATA = 2, READ_ADDITIONAL_DATA = 4, READ_LEGACY_FORMAT = 8, TRY_READ_IFEMS = 16, READ_BASIC_ONLY = 32 } |
enum | WriteFlags { WRITE_DATA = 1, WRITE_ADDITIONAL_DATA = 2, WRITE_PARALLEL_FILES = 4, WRITE_SERIAL_FILES = 8 } |
Public Member Functions | |
EquationSystems (MeshBase &mesh) | |
virtual | ~EquationSystems () |
virtual void | clear () |
virtual void | init () |
virtual void | reinit () |
virtual void | enable_default_ghosting (bool enable) |
void | update () |
unsigned int | n_systems () const |
bool | has_system (const std::string &name) const |
template<typename T_sys > | |
const T_sys & | get_system (const std::string &name) const |
template<typename T_sys > | |
T_sys & | get_system (const std::string &name) |
template<typename T_sys > | |
const T_sys & | get_system (const unsigned int num) const |
template<typename T_sys > | |
T_sys & | get_system (const unsigned int num) |
const System & | get_system (const std::string &name) const |
System & | get_system (const std::string &name) |
const System & | get_system (const unsigned int num) const |
System & | get_system (const unsigned int num) |
virtual System & | add_system (const std::string &system_type, const std::string &name) |
template<typename T_sys > | |
T_sys & | add_system (const std::string &name) |
void | delete_system (const std::string &name) |
unsigned int | n_vars () const |
std::size_t | n_dofs () const |
std::size_t | n_active_dofs () const |
virtual void | solve () |
virtual void | adjoint_solve (const QoISet &qoi_indices=QoISet()) |
virtual void | sensitivity_solve (const ParameterVector ¶meters) |
void | build_variable_names (std::vector< std::string > &var_names, const FEType *type=nullptr, const std::set< std::string > *system_names=nullptr) const |
void | build_solution_vector (std::vector< Number > &soln, const std::string &system_name, const std::string &variable_name="all_vars") const |
void | build_solution_vector (std::vector< Number > &soln, const std::set< std::string > *system_names=nullptr) const |
std::unique_ptr< NumericVector< Number > > | build_parallel_solution_vector (const std::set< std::string > *system_names=nullptr) const |
void | get_vars_active_subdomains (const std::vector< std::string > &names, std::vector< std::set< subdomain_id_type >> &vars_active_subdomains) const |
void | get_solution (std::vector< Number > &soln, std::vector< std::string > &names) const |
void | build_elemental_solution_vector (std::vector< Number > &soln, std::vector< std::string > &names) const |
std::unique_ptr< NumericVector< Number > > | build_parallel_elemental_solution_vector (std::vector< std::string > &names) const |
void | build_discontinuous_solution_vector (std::vector< Number > &soln, const std::set< std::string > *system_names=nullptr) const |
template<typename InValType > | |
void | read (const std::string &name, const XdrMODE, const unsigned int read_flags=(READ_HEADER|READ_DATA), bool partition_agnostic=true) |
void | read (const std::string &name, const XdrMODE mode, const unsigned int read_flags=(READ_HEADER|READ_DATA), bool partition_agnostic=true) |
template<typename InValType > | |
void | read (const std::string &name, const unsigned int read_flags=(READ_HEADER|READ_DATA), bool partition_agnostic=true) |
void | read (const std::string &name, const unsigned int read_flags=(READ_HEADER|READ_DATA), bool partition_agnostic=true) |
void | write (const std::string &name, const XdrMODE, const unsigned int write_flags=(WRITE_DATA), bool partition_agnostic=true) const |
void | write (const std::string &name, const unsigned int write_flags=(WRITE_DATA), bool partition_agnostic=true) const |
virtual bool | compare (const EquationSystems &other_es, const Real threshold, const bool verbose) const |
virtual std::string | get_info () const |
void | print_info (std::ostream &os=libMesh::out) const |
const MeshBase & | get_mesh () const |
MeshBase & | get_mesh () |
void | allgather () |
void | enable_refine_in_reinit () |
void | disable_refine_in_reinit () |
bool | refine_in_reinit_flag () |
bool | reinit_solutions () |
virtual void | reinit_systems () |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Static Public Member Functions | |
static std::string | get_info () |
static void | print_info (std::ostream &out=libMesh::out) |
static unsigned int | n_objects () |
static void | enable_print_counter_info () |
static void | disable_print_counter_info () |
Public Attributes | |
Parameters | parameters |
Protected Types | |
typedef std::map< std::string, System * >::iterator | system_iterator |
typedef std::map< std::string, System * >::const_iterator | const_system_iterator |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Protected Member Functions | |
void | increment_constructor_count (const std::string &name) |
void | increment_destructor_count (const std::string &name) |
Protected Attributes | |
MeshBase & | _mesh |
std::map< std::string, System * > | _systems |
bool | _refine_in_reinit |
bool | _enable_default_ghosting |
const Parallel::Communicator & | _communicator |
Static Protected Attributes | |
static Counts | _counts |
static Threads::atomic< unsigned int > | _n_objects |
static Threads::spin_mutex | _mutex |
static bool | _enable_print_counter = true |
Private Member Functions | |
template<typename InValType > | |
void | _read_impl (const std::string &name, const XdrMODE, const unsigned int read_flags, bool partition_agnostic=true) |
void | _add_system_to_nodes_and_elems () |
void | _remove_default_ghosting (unsigned int sys_num) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const EquationSystems &es) |
Manages multiples systems of equations.
This is the EquationSystems
class. It is in charge of handling all the various equation systems defined for a MeshBase
. It may have multiple systems, which may be active or inactive, so that at different solution stages only a sub-set may be solved for. Also, through the templated access, different types of systems may be handled. Also other features, like flags, parameters, I/O etc are provided.
Definition at line 74 of file equation_systems.h.
|
protected |
Typedef for constant system iterators
Definition at line 566 of file equation_systems.h.
|
protectedinherited |
Data structure to log the information. The log is identified by the class name.
Definition at line 117 of file reference_counter.h.
|
protected |
Typedef for system iterators
Definition at line 561 of file equation_systems.h.
Define enumeration to set properties in EquationSystems::read()
Enumerator | |
---|---|
READ_HEADER | |
READ_DATA | |
READ_ADDITIONAL_DATA | |
READ_LEGACY_FORMAT | |
TRY_READ_IFEMS | |
READ_BASIC_ONLY |
Definition at line 83 of file equation_systems.h.
Define enumeration to set properties in EquationSystems::write()
Enumerator | |
---|---|
WRITE_DATA | |
WRITE_ADDITIONAL_DATA | |
WRITE_PARALLEL_FILES | |
WRITE_SERIAL_FILES |
Definition at line 93 of file equation_systems.h.
libMesh::EquationSystems::EquationSystems | ( | MeshBase & | mesh | ) |
Constructor.
Definition at line 55 of file equation_systems.C.
References parameters, libMesh::Real, libMesh::Parameters::set(), and libMesh::TOLERANCE.
|
virtual |
Destructor. Should be virtual, since the user may want to derive subclasses of EquationSystems.
Definition at line 68 of file equation_systems.C.
References clear().
|
private |
This function is used in the implementation of add_system, it loops over the nodes and elements of the Mesh, adding the system to each one. The main reason to separate this part is to avoid coupling this header file to mesh.h, and elem.h.
Definition at line 1341 of file equation_systems.C.
References _mesh, libMesh::MeshBase::element_ptr_range(), and libMesh::MeshBase::node_ptr_range().
Referenced by add_system().
|
private |
Actual read implementation. This can be called repeatedly inside a try-catch block in an attempt to read broken files.
name | Name of the file to be read. |
read_flags | Single flag created by bitwise-OR'ing several flags together. |
partition_agnostic | If true then the mesh and degrees of freedom will be temporarily renumbered in a partition agnostic way so that files written using "n" mpi processes can be re-read on "m" mpi processes. |
This program implements the output of an EquationSystems object. This warrants some documentation. The output file essentially consists of 11 sections:
1.) A version header (for non-'legacy' formats, libMesh-0.7.0 and greater). 2.) The number of individual equation systems (unsigned int) for each system 3.) The name of the system (string) 4.) The type of the system (string) handled through System::read(): +-------------------------------------------------------------+ | 5.) The number of variables in the system (unsigned int) | | | | for each variable in the system | | | | 6.) The name of the variable (string) | | | | 7.) Combined in an FEType: | | - The approximation order(s) of the variable (Order | | Enum, cast to int/s) | | - The finite element family/ies of the variable | | (FEFamily Enum, cast to int/s) | | | | end variable loop | | | | 8.) The number of additional vectors (unsigned int), | | | | for each additional vector in the equation system object | | | | 9.) the name of the additional vector (string) | +-------------------------------------------------------------+ end system loop for each system, handled through System::read_{serialized,parallel}_data(): +--------------------------------------------------------------+ | 10.) The global solution vector, re-ordered to be node-major | | (More on this later.) | | | | for each additional vector in the equation system object | | | | 11.) The global additional vector, re-ordered to be | | node-major (More on this later.) | +--------------------------------------------------------------+ end system loop
Note that the actual IO is handled through the Xdr class (to be renamed later?) which provides a uniform interface to both the XDR (eXternal Data Representation) interface and standard ASCII output. Thus this one section of code will read XDR or ASCII files with no changes.
Definition at line 143 of file equation_systems_io.C.
References _mesh, add_system(), libMesh::Parallel::Communicator::broadcast(), libMesh::Xdr::close(), libMesh::ParallelObject::comm(), libMesh::Xdr::data(), libMesh::MeshBase::fix_broken_node_and_element_numbering(), get_mesh(), get_system(), libMesh::MeshTools::Private::globally_renumber_nodes_and_elements(), init(), mesh, libMesh::ParallelObject::processor_id(), read(), READ_ADDITIONAL_DATA, READ_BASIC_ONLY, READ_DATA, READ_HEADER, libMesh::System::read_header(), READ_LEGACY_FORMAT, libMesh::Xdr::reading(), libMesh::System::set_basic_system_only(), libMesh::Xdr::set_version(), TRY_READ_IFEMS, and update().
|
private |
This just calls DofMap::remove_default_ghosting() but using a shim lets us forward-declare DofMap.
Definition at line 1352 of file equation_systems.C.
References get_system().
Referenced by add_system().
|
virtual |
Add the system of type system_type
named name
to the systems array.
Definition at line 355 of file equation_systems.C.
References _systems, get_system(), and libMesh::Quality::name().
Referenced by _read_impl(), and libMesh::ErrorVector::plot_error().
|
inline |
Add the system named name
to the systems array.
Definition at line 647 of file equation_systems.h.
References _add_system_to_nodes_and_elems(), _enable_default_ghosting, _remove_default_ghosting(), _systems, n_systems(), and libMesh::Quality::name().
Call adjoint_solve
on all the individual equation systems.
By default this function solves each system's adjoint once, in the reverse order from that in which they were added. For more sophisticated decoupled problems the user may with to override this behavior in a derived class.
Definition at line 476 of file equation_systems.C.
References get_system(), and n_systems().
Referenced by libMesh::UniformRefinementEstimator::_estimate_error().
void libMesh::EquationSystems::allgather | ( | ) |
Serializes a distributed mesh and its associated degree of freedom numbering for all systems
Definition at line 284 of file equation_systems.C.
References _mesh, libMesh::MeshBase::allgather(), libMesh::DofMap::distribute_dofs(), libMesh::MeshBase::element_ptr_range(), libMesh::System::get_dof_map(), get_system(), libMesh::MeshBase::is_serial(), n_systems(), libMesh::MeshBase::node_ptr_range(), libMesh::DofMap::prepare_send_list(), and libMesh::System::reinit_constraints().
void libMesh::EquationSystems::build_discontinuous_solution_vector | ( | std::vector< Number > & | soln, |
const std::set< std::string > * | system_names = nullptr |
||
) | const |
Fill the input vector soln
with solution values. The entries will be in variable-major format (corresponding to the names from build_variable_names()
). If systems_names!=nullptr, only include data from the specified systems.
Definition at line 1055 of file equation_systems.C.
References _mesh, _systems, libMesh::MeshBase::active_element_ptr_range(), libMesh::Variable::active_on_subdomain(), libMesh::DofMap::dof_indices(), end, libMesh::System::get_dof_map(), libMesh::MeshBase::mesh_dimension(), n_systems(), libMesh::System::n_vars(), libMesh::FEInterface::nodal_soln(), libMesh::ParallelObject::processor_id(), libMesh::System::update_global_solution(), libMesh::System::variable(), and libMesh::System::variable_type().
Referenced by libMesh::MeshOutput< MeshBase >::write_discontinuous_equation_systems(), libMesh::ExodusII_IO::write_discontinuous_exodusII(), and libMesh::GMVIO::write_discontinuous_gmv().
void libMesh::EquationSystems::build_elemental_solution_vector | ( | std::vector< Number > & | soln, |
std::vector< std::string > & | names | ||
) | const |
Retrieve the solution data for CONSTANT MONOMIALs. If names
is populated, only the variables corresponding to those names will be retrieved. This can be used to filter which variables are retrieved.
This is the more appropriately-named replacement for the get_solution() function defined above.
Definition at line 893 of file equation_systems.C.
References build_parallel_elemental_solution_vector().
Referenced by get_solution(), and libMesh::ExodusII_IO::write_element_data().
std::unique_ptr< NumericVector< Number > > libMesh::EquationSystems::build_parallel_elemental_solution_vector | ( | std::vector< std::string > & | names | ) | const |
Builds a parallel vector of CONSTANT MONOMIAL solution values corresponding to the entries in the input 'names' vector. This vector is approximately uniformly distributed across all of the available processors.
The related function build_elemental_solution_vector() is implemented by calling this function and then calling localize_to_one() on the resulting vector.
Definition at line 913 of file equation_systems.C.
References libMesh::ParallelObject::_communicator, _mesh, _systems, libMesh::MeshBase::active_local_element_ptr_range(), libMesh::Variable::active_on_subdomain(), libMesh::NumericVector< T >::build(), libMesh::NumericVector< T >::close(), libMesh::ParallelObject::comm(), libMesh::CONSTANT, libMesh::System::current_local_solution, libMesh::DofMap::dof_indices(), end, libMesh::System::get_dof_map(), libMesh::NumericVector< T >::init(), libMesh::MeshBase::max_elem_id(), libMesh::MONOMIAL, libMesh::MeshBase::n_elem(), libMesh::ParallelObject::n_processors(), n_systems(), libMesh::System::n_vars(), libMesh::PARALLEL, libMesh::ParallelObject::processor_id(), libMesh::NumericVector< T >::set(), libMesh::System::solution, libMesh::System::update(), libMesh::System::variable(), libMesh::System::variable_name(), and libMesh::System::variable_type().
Referenced by build_elemental_solution_vector(), and libMesh::Nemesis_IO::write_element_data().
std::unique_ptr< NumericVector< Number > > libMesh::EquationSystems::build_parallel_solution_vector | ( | const std::set< std::string > * | system_names = nullptr | ) | const |
A version of build_solution_vector which is appropriate for "parallel" output formats like Nemesis.
Definition at line 600 of file equation_systems.C.
References libMesh::ParallelObject::_communicator, _mesh, _systems, std::abs(), libMesh::MeshBase::active_local_element_ptr_range(), libMesh::Variable::active_on_subdomain(), libMesh::NumericVector< T >::add(), libMesh::NumericVector< T >::build(), libMesh::NumericVector< T >::close(), libMesh::ParallelObject::comm(), libMesh::System::current_local_solution, libMesh::DofMap::dof_indices(), end, libMesh::FEInterface::field_type(), libMesh::NumericVector< T >::first_local_index(), libMesh::System::get_dof_map(), libMesh::NumericVector< T >::init(), libMesh::NumericVector< T >::last_local_index(), libMesh::MeshBase::local_nodes_begin(), libMesh::MeshBase::local_nodes_end(), libMesh::MeshBase::max_node_id(), libMesh::MeshBase::mesh_dimension(), libMesh::System::n_vars(), libMesh::FEInterface::n_vec_dim(), libMesh::FEInterface::nodal_soln(), libMesh::System::number(), libMesh::PARALLEL, libMesh::Parallel::Communicator::rank(), libMesh::NumericVector< T >::set(), libMesh::Parallel::Communicator::size(), libMesh::System::solution, libMesh::Parallel::Communicator::sum(), libMesh::TOLERANCE, libMesh::TYPE_VECTOR, libMesh::System::update(), libMesh::System::variable(), and libMesh::System::variable_type().
Referenced by build_solution_vector(), and libMesh::MeshOutput< MeshBase >::write_equation_systems().
void libMesh::EquationSystems::build_solution_vector | ( | std::vector< Number > & | soln, |
const std::string & | system_name, | ||
const std::string & | variable_name = "all_vars" |
||
) | const |
Fill the input vector soln
with the solution values for the system named name
.
soln
will only be assembled on processor 0, so this method is only applicable to outputting plot files from processor 0. Definition at line 588 of file equation_systems.C.
Referenced by libMesh::MeshOutput< MeshBase >::write_equation_systems().
void libMesh::EquationSystems::build_solution_vector | ( | std::vector< Number > & | soln, |
const std::set< std::string > * | system_names = nullptr |
||
) | const |
Fill the input vector soln
with solution values. The entries will be in variable-major format (corresponding to the names from build_variable_names()
). If systems_names!=nullptr, only include data from the specified systems.
Definition at line 836 of file equation_systems.C.
References build_parallel_solution_vector().
void libMesh::EquationSystems::build_variable_names | ( | std::vector< std::string > & | var_names, |
const FEType * | type = nullptr , |
||
const std::set< std::string > * | system_names = nullptr |
||
) | const |
Fill the input vector var_names
with the names of the variables for each system. If type
is passed, only variables of the specified type will be populated. If systems_names!=nullptr, only include names from the specified systems.
Definition at line 486 of file equation_systems.C.
References _systems, end, libMesh::FEInterface::field_type(), get_mesh(), libMesh::MeshBase::mesh_dimension(), n_vars(), libMesh::FEInterface::n_vec_dim(), and libMesh::TYPE_VECTOR.
Referenced by libMesh::MeshOutput< MeshBase >::write_discontinuous_equation_systems(), libMesh::ExodusII_IO::write_discontinuous_exodusII(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::Nemesis_IO::write_element_data(), libMesh::ExodusII_IO::write_element_data(), and libMesh::MeshOutput< MeshBase >::write_equation_systems().
|
virtual |
Restores the data structure to a pristine state.
Definition at line 75 of file equation_systems.C.
References _systems, libMesh::Parameters::clear(), and parameters.
Referenced by ~EquationSystems().
|
inlineinherited |
Parallel::Communicator
object used by this mesh. Definition at line 89 of file parallel_object.h.
References libMesh::ParallelObject::_communicator.
Referenced by libMesh::__libmesh_petsc_diff_solver_jacobian(), libMesh::__libmesh_petsc_diff_solver_monitor(), libMesh::__libmesh_petsc_diff_solver_residual(), libMesh::__libmesh_tao_equality_constraints(), libMesh::__libmesh_tao_equality_constraints_jacobian(), libMesh::__libmesh_tao_gradient(), libMesh::__libmesh_tao_hessian(), libMesh::__libmesh_tao_inequality_constraints(), libMesh::__libmesh_tao_inequality_constraints_jacobian(), libMesh::__libmesh_tao_objective(), libMesh::MeshRefinement::_coarsen_elements(), libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::SlepcEigenSolver< T >::_petsc_shell_matrix_get_diagonal(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_get_diagonal(), libMesh::SlepcEigenSolver< T >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_mult_add(), _read_impl(), libMesh::MeshRefinement::_refine_elements(), libMesh::MeshRefinement::_smooth_flags(), libMesh::PetscDMWrapper::add_dofs_helper(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::ImplicitSystem::add_matrix(), libMesh::System::add_vector(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::FEMSystem::assemble_qoi(), libMesh::MeshCommunication::assign_global_indices(), libMesh::DofMap::attach_matrix(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::BoundaryInfo::build_node_list_from_side_list(), build_parallel_elemental_solution_vector(), build_parallel_solution_vector(), libMesh::PetscDMWrapper::build_section(), libMesh::PetscDMWrapper::build_sf(), libMesh::MeshBase::cache_elem_dims(), libMesh::System::calculate_norm(), libMesh::DofMap::check_dirichlet_bcid_consistency(), libMesh::PetscDMWrapper::check_section_n_dofs(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::create_bounding_box(), libMesh::MeshTools::create_nodal_bounding_box(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::MeshTools::create_processor_bounding_box(), libMesh::MeshTools::create_subdomain_bounding_box(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DofMap::distribute_dofs(), DMlibMeshFunction(), DMlibMeshJacobian(), DMlibMeshSetSystem_libMesh(), DMVariableBounds_libMesh(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::WeightedPatchRecoveryErrorEstimator::estimate_error(), libMesh::PatchRecoveryErrorEstimator::estimate_error(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::CondensedEigenSystem::get_eigenpair(), libMesh::DofMap::get_info(), libMesh::ImplicitSystem::get_linear_solver(), libMesh::LocationMap< T >::init(), libMesh::TimeSolver::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::EigenSystem::init_data(), libMesh::EigenSystem::init_matrices(), libMesh::OptimizationSystem::initialize_equality_constraints_storage(), libMesh::OptimizationSystem::initialize_inequality_constraints_storage(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_flags(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_p_levels(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshTools::libmesh_assert_valid_unique_ids(), libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_jacobian(), libMesh::libmesh_petsc_snes_mffd_residual(), libMesh::libmesh_petsc_snes_postcheck(), libMesh::libmesh_petsc_snes_residual(), libMesh::libmesh_petsc_snes_residual_helper(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::limit_overrefined_boundary(), libMesh::MeshRefinement::limit_underrefined_boundary(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshCommunication::make_elems_parallel_consistent(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::MeshCommunication::make_new_node_proc_ids_parallel_consistent(), libMesh::MeshCommunication::make_new_nodes_parallel_consistent(), libMesh::MeshCommunication::make_node_ids_parallel_consistent(), libMesh::MeshCommunication::make_node_proc_ids_parallel_consistent(), libMesh::MeshCommunication::make_node_unique_ids_parallel_consistent(), libMesh::MeshCommunication::make_nodes_parallel_consistent(), libMesh::MeshCommunication::make_p_levels_parallel_consistent(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::FEMSystem::mesh_position_set(), libMesh::DistributedMesh::n_active_elem(), libMesh::MeshTools::n_active_levels(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::CondensedEigenSystem::n_global_non_condensed_dofs(), libMesh::MeshTools::n_levels(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::MeshTools::n_p_levels(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::DistributedMesh::parallel_max_elem_id(), libMesh::DistributedMesh::parallel_max_node_id(), libMesh::ReplicatedMesh::parallel_max_unique_id(), libMesh::DistributedMesh::parallel_max_unique_id(), libMesh::DistributedMesh::parallel_n_elem(), libMesh::DistributedMesh::parallel_n_nodes(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::MeshTools::paranoid_n_levels(), libMesh::petsc_auto_fieldsplit(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::System::read_legacy_data(), libMesh::System::read_SCALAR_dofs(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::System::read_serialized_vector(), libMesh::MeshBase::recalculate_n_partitions(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::CheckpointIO::select_split_config(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::PetscDiffSolver::setup_petsc_data(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::split_mesh(), libMesh::MeshBase::subdomain_ids(), libMesh::BoundaryInfo::sync(), libMesh::MeshRefinement::test_level_one(), libMesh::MeshRefinement::test_unflagged(), libMesh::MeshTools::total_weight(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), and libMesh::XdrIO::write_serialized_nodesets().
|
virtual |
true
when this equation system contains identical data, up to the given threshold. Delegates most of the comparisons to perform to the responsible systems Definition at line 1182 of file equation_systems.C.
References _systems, libMesh::System::compare(), end, get_system(), n_systems(), and libMesh::out.
void libMesh::EquationSystems::delete_system | ( | const std::string & | name | ) |
Remove the system named name
from the systems array.
Definition at line 441 of file equation_systems.C.
References _systems, and libMesh::Quality::name().
|
staticinherited |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
Referenced by libMesh::LibMeshInit::LibMeshInit().
|
inline |
Calls to reinit() will not try to coarsen or refine the mesh
Definition at line 519 of file equation_systems.h.
References _refine_in_reinit.
|
virtual |
Enable or disable default ghosting functors on the Mesh and on all Systems. Standard ghosting is enabled by default. If disabled, default ghosting will also be disabled on any later added systems.
Unless other equivalent ghosting functors have been added, removing the default coupling functor is only safe for explicit solves, and removing the default algebraic ghosting functor is only safe for codes where no evaluations on neighbor cells (e.g. no jump error estimators) are done.
Definition at line 322 of file equation_systems.C.
References _enable_default_ghosting, libMesh::DofMap::add_default_ghosting(), get_mesh(), get_system(), mesh, n_systems(), and libMesh::DofMap::remove_default_ghosting().
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
inline |
Calls to reinit() will also do two-step coarsen-then-refine
Definition at line 514 of file equation_systems.h.
References _refine_in_reinit.
|
staticinherited |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
|
virtual |
Definition at line 1243 of file equation_systems.C.
References _systems, end, and n_systems().
Referenced by print_info().
|
inline |
Definition at line 622 of file equation_systems.h.
References _mesh.
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), _read_impl(), build_variable_names(), enable_default_ghosting(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::MeshFunction::init(), reinit_solutions(), write(), libMesh::MeshOutput< MeshBase >::write_discontinuous_equation_systems(), and libMesh::MeshOutput< MeshBase >::write_equation_systems().
|
inline |
void libMesh::EquationSystems::get_solution | ( | std::vector< Number > & | soln, |
std::vector< std::string > & | names | ||
) | const |
Retrieve the solution data for CONSTANT MONOMIALs. If names
is populated, only the variables corresponding to those names will be retrieved. This can be used to filter which variables are retrieved.
Definition at line 883 of file equation_systems.C.
References build_elemental_solution_vector().
|
inline |
name
. The template argument defines the return type. For example, const SteadySystem & sys = eq.get_system<SteadySystem> ("sys"); is an example of how the method might be used Definition at line 742 of file equation_systems.h.
References _systems, and libMesh::Quality::name().
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), _read_impl(), _remove_default_ghosting(), libMesh::EnsightIO::add_scalar(), add_system(), libMesh::EnsightIO::add_vector(), adjoint_solve(), allgather(), libMesh::ExactSolution::attach_exact_deriv(), libMesh::ExactSolution::attach_exact_hessian(), libMesh::ExactSolution::attach_exact_value(), compare(), libMesh::ExactSolution::compute_error(), libMesh::GMVIO::copy_nodal_solution(), enable_default_ghosting(), libMesh::ExactSolution::error_norm(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::ErrorEstimator::estimate_errors(), libMesh::ExactSolution::ExactSolution(), init(), reinit_solutions(), reinit_systems(), sensitivity_solve(), solve(), update(), libMesh::EnsightIO::write_scalar_ascii(), and libMesh::EnsightIO::write_vector_ascii().
|
inline |
name
. The template argument defines the return type. For example, const SteadySystem & sys = eq.get_system<SteadySystem> ("sys"); is an example of how the method might be used Definition at line 761 of file equation_systems.h.
References _systems, and libMesh::Quality::name().
|
inline |
num
. The template argument defines the return type. For example, const SteadySystem & sys = eq.get_system<SteadySystem> (0); is an example of how the method might be used Definition at line 691 of file equation_systems.h.
References _systems, end, and n_systems().
|
inline |
num
. The template argument defines the return type. For example, const SteadySystem & sys = eq.get_system<SteadySystem> (0); is an example of how the method might be used Definition at line 716 of file equation_systems.h.
References _systems, end, and n_systems().
|
inline |
name
. Definition at line 780 of file equation_systems.h.
References libMesh::Quality::name().
|
inline |
name
. Definition at line 788 of file equation_systems.h.
References libMesh::Quality::name().
|
inline |
num
. Definition at line 796 of file equation_systems.h.
|
inline |
num
. Definition at line 804 of file equation_systems.h.
void libMesh::EquationSystems::get_vars_active_subdomains | ( | const std::vector< std::string > & | names, |
std::vector< std::set< subdomain_id_type >> & | vars_active_subdomains | ||
) | const |
Retrieve vars_active_subdomains
, which indicates the active subdomains for each variable in names
.
Definition at line 851 of file equation_systems.C.
References _systems, libMesh::Variable::active_subdomains(), and end.
Referenced by libMesh::Nemesis_IO::write_element_data(), and libMesh::ExodusII_IO::write_element_data().
|
inline |
true
if the system named name
exists within this EquationSystems object. Definition at line 679 of file equation_systems.h.
References _systems, and libMesh::Quality::name().
Referenced by libMesh::EnsightIO::add_scalar(), libMesh::EnsightIO::add_vector(), libMesh::ExactSolution::compute_error(), and libMesh::ExactSolution::error_norm().
|
inlineprotectedinherited |
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().
|
inlineprotectedinherited |
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().
|
virtual |
Initialize all the systems
Definition at line 96 of file equation_systems.C.
References _mesh, libMesh::MeshRefinement::clean_refinement_flags(), libMesh::MeshBase::element_ptr_range(), get_system(), n_systems(), and libMesh::MeshBase::node_ptr_range().
Referenced by _read_impl(), and libMesh::ErrorVector::plot_error().
std::size_t libMesh::EquationSystems::n_active_dofs | ( | ) | const |
Definition at line 1327 of file equation_systems.C.
std::size_t libMesh::EquationSystems::n_dofs | ( | ) | const |
Definition at line 1311 of file equation_systems.C.
|
inlinestaticinherited |
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.
|
inlineinherited |
Definition at line 95 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::size().
Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::DistributedMesh::add_node(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::FEMSystem::assembly(), libMesh::AztecLinearSolver< T >::AztecLinearSolver(), libMesh::BoundaryInfo::build_node_list_from_side_list(), build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::UnstructuredMesh::create_pid_mesh(), libMesh::MeshTools::create_processor_bounding_box(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::EnsightIO::EnsightIO(), libMesh::MeshBase::get_info(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::Nemesis_IO_Helper::initialize(), libMesh::DistributedMesh::insert_elem(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::DofMap::local_variable_indices(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshBase::n_active_elem_on_proc(), libMesh::MeshBase::n_elem_on_proc(), libMesh::MeshBase::n_nodes_on_proc(), libMesh::MeshBase::partition(), libMesh::PetscLinearSolver< T >::PetscLinearSolver(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::XdrIO::read_header(), libMesh::CheckpointIO::read_nodes(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::System::read_serialized_vector(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::System::write_parallel_data(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), and libMesh::XdrIO::write_serialized_nodesets().
|
inline |
Definition at line 637 of file equation_systems.h.
References _systems.
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), add_system(), adjoint_solve(), allgather(), libMesh::ExactSolution::attach_exact_deriv(), libMesh::ExactSolution::attach_exact_hessian(), libMesh::ExactSolution::attach_exact_value(), build_discontinuous_solution_vector(), build_parallel_elemental_solution_vector(), compare(), libMesh::GMVIO::copy_nodal_solution(), enable_default_ghosting(), libMesh::ErrorEstimator::estimate_errors(), libMesh::ExactSolution::ExactSolution(), get_info(), get_system(), init(), reinit_solutions(), reinit_systems(), sensitivity_solve(), solve(), and update().
unsigned int libMesh::EquationSystems::n_vars | ( | ) | const |
Definition at line 1296 of file equation_systems.C.
Referenced by build_variable_names().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 87 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
void libMesh::EquationSystems::print_info | ( | std::ostream & | os = libMesh::out | ) | const |
Prints information about the equation systems, by default to libMesh::out.
Definition at line 1279 of file equation_systems.C.
References get_info().
Referenced by libMesh::operator<<().
|
inlineinherited |
Definition at line 101 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::rank().
Referenced by libMesh::BoundaryInfo::_find_id_maps(), _read_impl(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::FEMSystem::assembly(), build_discontinuous_solution_vector(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::ExodusII_IO_Helper::close(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::compute_communication_map_parameters(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Nemesis_IO_Helper::compute_node_communication_maps(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::ExodusII_IO_Helper::create(), libMesh::DistributedMesh::delete_elem(), libMesh::DistributedMesh::delete_node(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DistributedMesh::DistributedMesh(), libMesh::DofMap::end_dof(), libMesh::DofMap::end_old_dof(), libMesh::EnsightIO::EnsightIO(), libMesh::MeshFunction::find_element(), libMesh::MeshFunction::find_elements(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::DofMap::first_dof(), libMesh::DofMap::first_old_dof(), libMesh::Nemesis_IO_Helper::get_cmap_params(), libMesh::Nemesis_IO_Helper::get_eb_info_global(), libMesh::Nemesis_IO_Helper::get_elem_cmap(), libMesh::Nemesis_IO_Helper::get_elem_map(), libMesh::MeshBase::get_info(), libMesh::DofMap::get_info(), libMesh::Nemesis_IO_Helper::get_init_global(), libMesh::Nemesis_IO_Helper::get_init_info(), libMesh::Nemesis_IO_Helper::get_loadbal_param(), libMesh::Nemesis_IO_Helper::get_node_cmap(), libMesh::Nemesis_IO_Helper::get_node_map(), libMesh::Nemesis_IO_Helper::get_ns_param_global(), libMesh::Nemesis_IO_Helper::get_ss_param_global(), libMesh::SparsityPattern::Build::handle_vi_vj(), libMesh::SystemSubsetBySubdomain::init(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::ExodusII_IO_Helper::initialize_element_variables(), libMesh::ExodusII_IO_Helper::initialize_global_variables(), libMesh::ExodusII_IO_Helper::initialize_nodal_variables(), libMesh::DistributedMesh::insert_elem(), libMesh::DofMap::is_evaluable(), libMesh::SparsityPattern::Build::join(), libMesh::DofMap::last_dof(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::DofMap::local_variable_indices(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshBase::n_active_local_elem(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::DofMap::n_local_dofs(), libMesh::System::n_local_dofs(), libMesh::MeshBase::n_local_elem(), libMesh::MeshBase::n_local_nodes(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::SparsityPattern::Build::operator()(), libMesh::DistributedMesh::own_node(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::Nemesis_IO_Helper::put_cmap_params(), libMesh::Nemesis_IO_Helper::put_elem_cmap(), libMesh::Nemesis_IO_Helper::put_elem_map(), libMesh::Nemesis_IO_Helper::put_loadbal_param(), libMesh::Nemesis_IO_Helper::put_node_cmap(), libMesh::Nemesis_IO_Helper::put_node_map(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read(), libMesh::ExodusII_IO_Helper::read_elem_num_map(), libMesh::ExodusII_IO_Helper::read_global_values(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::System::read_legacy_data(), libMesh::ExodusII_IO_Helper::read_node_num_map(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::System::read_serialized_data(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::System::read_serialized_vector(), libMesh::System::read_serialized_vectors(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::CheckpointIO::select_split_config(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::MeshTools::total_weight(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::Parallel::Packing< T >::unpack(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::CheckpointIO::write(), write(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::ExodusII_IO::write_element_data(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO::write_global_data(), libMesh::ExodusII_IO_Helper::write_global_values(), libMesh::System::write_header(), libMesh::ExodusII_IO::write_information_records(), libMesh::ExodusII_IO_Helper::write_information_records(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), libMesh::UCDIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::ExodusII_IO_Helper::write_nodal_values(), libMesh::Nemesis_IO_Helper::write_nodesets(), libMesh::ExodusII_IO_Helper::write_nodesets(), libMesh::System::write_parallel_data(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bc_names(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::System::write_serialized_data(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::XdrIO::write_serialized_subdomain_names(), libMesh::System::write_serialized_vector(), libMesh::System::write_serialized_vectors(), libMesh::Nemesis_IO_Helper::write_sidesets(), libMesh::ExodusII_IO_Helper::write_sidesets(), libMesh::ExodusII_IO::write_timestep(), libMesh::ExodusII_IO_Helper::write_timestep(), and libMesh::ExodusII_IO::write_timestep_discontinuous().
void libMesh::EquationSystems::read | ( | const std::string & | name, |
const XdrMODE | mode, | ||
const unsigned int | read_flags = (READ_HEADER | READ_DATA) , |
||
bool | partition_agnostic = true |
||
) |
Read & initialize the systems from disk using the XDR data format. This format allows for machine-independent binary output.
Set which sections of the file to read by bitwise OR'ing the EquationSystems::ReadFlags enumeration together. For example, to read all sections of the file, set read_flags to: (READ_HEADER | READ_DATA | READ_ADDITIONAL_DATA)
If XdrMODE is omitted, it will be inferred as READ for filenames containing .xda or as DECODE for filenames containing .xdr
name | Name of the file to be read. |
read_flags | Single flag created by bitwise-OR'ing several flags together. |
mode | Controls whether reading is done in binary or ascii mode. |
partition_agnostic | If true then the mesh and degrees of freedom will be temporarily renumbered in a partition agnostic way so that files written using "n" mpi processes can be re-read on "m" mpi processes. This renumbering is not compatible with meshes that have two nodes in exactly the same position! |
Definition at line 90 of file equation_systems_io.C.
References _mesh, libMesh::MeshRefinement::clean_refinement_flags(), libMesh::Quality::name(), libMesh::out, and TRY_READ_IFEMS.
Referenced by _read_impl(), and read().
|
inline |
void libMesh::EquationSystems::read | ( | const std::string & | name, |
const unsigned int | read_flags = (READ_HEADER | READ_DATA) , |
||
bool | partition_agnostic = true |
||
) |
Definition at line 72 of file equation_systems_io.C.
References _mesh, libMesh::MeshRefinement::clean_refinement_flags(), libMesh::DECODE, libMesh::Quality::name(), libMesh::READ, and read().
|
inline |
|
inline |
Definition at line 524 of file equation_systems.h.
References _refine_in_reinit.
|
virtual |
Handle any mesh changes and reinitialize all the systems on the updated mesh
Definition at line 121 of file equation_systems.C.
References reinit_solutions(), and reinit_systems().
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), and libMesh::AdjointRefinementEstimator::estimate_error().
bool libMesh::EquationSystems::reinit_solutions | ( | ) |
Handle any mesh changes and project any solutions onto the updated mesh.
Definition at line 133 of file equation_systems.C.
References _mesh, _refine_in_reinit, libMesh::MeshRefinement::coarsen_elements(), libMesh::MeshBase::contract(), libMesh::DofMap::distribute_dofs(), libMesh::MeshBase::element_ptr_range(), libMesh::MeshRefinement::face_level_mismatch_limit(), libMesh::System::get_dof_map(), get_mesh(), get_system(), n_systems(), libMesh::MeshBase::node_ptr_range(), libMesh::MeshRefinement::overrefined_boundary_limit(), libMesh::System::prolong_vectors(), libMesh::MeshRefinement::refine_elements(), libMesh::System::reinit_constraints(), libMesh::System::restrict_vectors(), and libMesh::MeshRefinement::underrefined_boundary_limit().
Referenced by reinit().
|
virtual |
Reinitialize all systems on the current mesh.
Definition at line 276 of file equation_systems.C.
References get_system(), and n_systems().
Referenced by reinit().
|
virtual |
Call sensitivity_solve
on all the individual equation systems.
By default this function solves each sensitivity system once, in the order in which in which they were added. For more sophisticated decoupled problems the user may with to override this behavior in a derived class.
Definition at line 466 of file equation_systems.C.
References get_system(), and n_systems().
|
virtual |
Call solve
on all the individual equation systems.
By default this function solves each equation system once, in the order they were added. For more sophisticated decoupled problems the user may with to override this behavior in a derived class.
Definition at line 456 of file equation_systems.C.
References get_system(), and n_systems().
Referenced by libMesh::UniformRefinementEstimator::_estimate_error().
void libMesh::EquationSystems::update | ( | ) |
Updates local values for all the systems
Definition at line 344 of file equation_systems.C.
References get_system(), and n_systems().
Referenced by _read_impl().
void libMesh::EquationSystems::write | ( | const std::string & | name, |
const XdrMODE | mode, | ||
const unsigned int | write_flags = (WRITE_DATA) , |
||
bool | partition_agnostic = true |
||
) | const |
Write the systems to disk using the XDR data format. This format allows for machine-independent binary output.
Set the writing properties using the EquationSystems::WriteFlags enumeration. Set which sections to write out by bitwise OR'ing the enumeration values. Write everything by setting write_flags to: (WRITE_DATA | WRITE_ADDITIONAL_DATA)
If XdrMODE is omitted, it will be inferred as WRITE for filenames containing .xda or as ENCODE for filenames containing .xdr
name | Name of the file to be read. |
write_flags | Single flag created by bitwise-OR'ing several flags together. |
mode | Controls whether reading is done in binary or ascii mode. |
partition_agnostic | If true then the mesh and degrees of freedom will be temporarily renumbered in a partition agnostic way so that files written using "n" mpi processes can be re-read on "m" mpi processes. This renumbering is not compatible with meshes that have two nodes in exactly the same position! |
This program implements the output of an EquationSystems object. This warrants some documentation. The output file essentially consists of 11 sections:
1.) The version header. 2.) The number of individual equation systems (unsigned int) for each system 3.) The name of the system (string) 4.) The type of the system (string) handled through System::read(): +-------------------------------------------------------------+ | 5.) The number of variables in the system (unsigned int) | | | | for each variable in the system | | | | 6.) The name of the variable (string) | | | | 7.) Combined in an FEType: | | - The approximation order(s) of the variable (Order | | Enum, cast to int/s) | | - The finite element family/ies of the variable | | (FEFamily Enum, cast to int/s) | | | | end variable loop | | | | 8.) The number of additional vectors (unsigned int), | | | | for each additional vector in the equation system object | | | | 9.) the name of the additional vector (string) | +-------------------------------------------------------------+ end system loop for each system, handled through System::write_{serialized,parallel}_data(): +--------------------------------------------------------------+ | 10.) The global solution vector, re-ordered to be node-major | | (More on this later.) | | | | for each additional vector in the equation system object | | | | 11.) The global additional vector, re-ordered to be | | node-major (More on this later.) | +--------------------------------------------------------------+ end system loop
Note that the actual IO is handled through the Xdr class (to be renamed later?) which provides a uniform interface to both the XDR (eXternal Data Representation) interface and standard ASCII output. Thus this one section of code will write XDR or ASCII files with no changes.
Definition at line 378 of file equation_systems_io.C.
References _mesh, _systems, libMesh::Xdr::data(), libMesh::get_io_compatibility_version(), get_mesh(), libMesh::MeshTools::Private::globally_renumber_nodes_and_elements(), mesh, libMesh::ParallelObject::processor_id(), libMesh::Xdr::set_version(), WRITE_ADDITIONAL_DATA, WRITE_DATA, WRITE_PARALLEL_FILES, and libMesh::Xdr::writing().
Referenced by libMesh::ErrorVector::plot_error(), write(), and libMesh::NameBasedIO::write_equation_systems().
void libMesh::EquationSystems::write | ( | const std::string & | name, |
const unsigned int | write_flags = (WRITE_DATA) , |
||
bool | partition_agnostic = true |
||
) | const |
Definition at line 366 of file equation_systems_io.C.
References libMesh::ENCODE, libMesh::Quality::name(), libMesh::WRITE, and write().
|
friend |
Same as above, but allows you to also use stream syntax.
Definition at line 1287 of file equation_systems.C.
|
protectedinherited |
|
staticprotectedinherited |
Actually holds the data.
Definition at line 122 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
|
protected |
Flag for whether to enable default ghosting on newly added Systems. Default value: true
Definition at line 578 of file equation_systems.h.
Referenced by add_system(), and enable_default_ghosting().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 141 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
|
protected |
The mesh data structure
Definition at line 551 of file equation_systems.h.
Referenced by _add_system_to_nodes_and_elems(), _read_impl(), allgather(), build_discontinuous_solution_vector(), build_parallel_elemental_solution_vector(), build_parallel_solution_vector(), get_mesh(), init(), read(), reinit_solutions(), and write().
|
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().
|
protected |
Flag for whether to call coarsen/refine in reinit(). Default value: true
Definition at line 572 of file equation_systems.h.
Referenced by disable_refine_in_reinit(), enable_refine_in_reinit(), refine_in_reinit_flag(), and reinit_solutions().
|
protected |
Data structure holding the systems.
Definition at line 556 of file equation_systems.h.
Referenced by add_system(), build_discontinuous_solution_vector(), build_parallel_elemental_solution_vector(), build_parallel_solution_vector(), build_variable_names(), clear(), compare(), delete_system(), get_info(), get_system(), get_vars_active_subdomains(), has_system(), n_active_dofs(), n_dofs(), n_systems(), n_vars(), and write().
Parameters libMesh::EquationSystems::parameters |
Data structure holding arbitrary parameters.
Definition at line 542 of file equation_systems.h.
Referenced by libMesh::ExactSolution::attach_exact_deriv(), libMesh::ExactSolution::attach_exact_hessian(), libMesh::ExactSolution::attach_exact_value(), libMesh::NewmarkSystem::clear(), clear(), libMesh::FrequencySystem::clear_all(), EquationSystems(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::ImplicitSystem::get_linear_solve_parameters(), libMesh::FEComputeData::init(), libMesh::FrequencySystem::init_data(), libMesh::FrequencySystem::n_frequencies(), libMesh::NewmarkSystem::NewmarkSystem(), libMesh::NonlinearImplicitSystem::NonlinearImplicitSystem(), libMesh::FrequencySystem::set_current_frequency(), libMesh::FrequencySystem::set_frequencies(), libMesh::FrequencySystem::set_frequencies_by_range(), libMesh::FrequencySystem::set_frequencies_by_steps(), libMesh::NewmarkSystem::set_newmark_parameters(), libMesh::NonlinearImplicitSystem::set_solver_parameters(), libMesh::CondensedEigenSystem::solve(), libMesh::EigenSystem::solve(), libMesh::FrequencySystem::solve(), libMesh::LinearImplicitSystem::solve(), and libMesh::WrappedFunction< Output >::WrappedFunction().