libMesh
|
Go to the source code of this file.
Functions | |
void | assemble_poisson (EquationSystems &es, const std::string &system_name) |
Real | exact_solution (const int component, const Real x, const Real y, const Real z=0.) |
This is the exact solution that we are trying to obtain. More... | |
int | main (int argc, char **argv) |
void | assemble_poisson (EquationSystems &es, const std::string &libmesh_dbg_var(system_name)) |
void assemble_poisson | ( | EquationSystems & | es, |
const std::string & | system_name | ||
) |
Definition at line 261 of file miscellaneous_ex16.C.
References libMesh::SparseMatrix< T >::add_matrix(), libMesh::NumericVector< T >::add_vector(), libMesh::FEGenericBase< OutputType >::build(), libMesh::SparseMatrix< T >::close(), libMesh::DofMap::constrain_element_matrix_and_vector(), dim, libMesh::DofMap::dof_indices(), exact_solution(), libMesh::FIFTH, libMesh::System::get_dof_map(), libMesh::EquationSystems::get_mesh(), libMesh::ImplicitSystem::get_static_condensation(), libMesh::EquationSystems::get_system(), libMesh::ImplicitSystem::get_system_matrix(), libMesh::System::has_static_condensation(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::QBase::n_points(), libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::ExplicitSystem::rhs, value, and libMesh::DofMap::variable_type().
Referenced by main().
void assemble_poisson | ( | EquationSystems & | es, |
const std::string & | libmesh_dbg_varsystem_name | ||
) |
Definition at line 236 of file vector_fe_ex1.C.
References libMesh::SparseMatrix< T >::add_matrix(), libMesh::NumericVector< T >::add_vector(), libMesh::FEGenericBase< OutputType >::build(), libMesh::FEType::default_quadrature_order(), dim, exact_solution(), libMesh::System::get_dof_map(), libMesh::EquationSystems::get_mesh(), libMesh::EquationSystems::get_system(), libMesh::ImplicitSystem::get_system_matrix(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), and libMesh::ExplicitSystem::rhs.
Real exact_solution | ( | const int | component, |
const Real | x, | ||
const Real | y, | ||
const Real | z = 0. |
||
) |
This is the exact solution that we are trying to obtain.
We will solve
and take a finite difference approximation using this function to get f. This is the well-known "method of manufactured solutions".
Definition at line 39 of file exact_solution.C.
Referenced by assemble_poisson().
Definition at line 87 of file vector_fe_ex1.C.
References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), assemble_poisson(), libMesh::System::attach_assemble_function(), libMesh::MeshTools::Generation::build_square(), libMesh::System::calculate_norm(), libMesh::command_line_next(), libMesh::default_solver_package(), libMesh::EIGEN_SOLVERS, libMesh::FEInterface::field_type(), libMesh::LinearImplicitSystem::get_linear_solver(), libMesh::GMRES, libMesh::TriangleWrapper::init(), libMesh::EquationSystems::init(), libMesh::INVALID_SOLVER_PACKAGE, libMesh::L2, libMesh::libmesh_isnan(), mesh, libMesh::out, libMesh::Utility::pow(), libMesh::EquationSystems::print_info(), libMesh::MeshBase::print_info(), libMesh::QUAD9, libMesh::Real, libMesh::LinearSolver< T >::set_solver_type(), libMesh::System::solution, libMesh::LinearImplicitSystem::solve(), libMesh::TYPE_VECTOR, libMesh::MeshOutput< MT >::write_equation_systems(), and libMesh::ExodusII_IO::write_equation_systems().