176 matrix->set(i*2, i, 1);
177 matrix->set(i*2+1, i, 0.5);
178 matrix->set(i*2+1, i+1, 0.5);
180 matrix->set(10, 5, 1);
225 auto serialized_solution2 =
228 sys2.
solution->localize(*serialized_solution2);
231 (es2, *serialized_solution2, sys2.
get_dof_map(), 0);
233 exact.attach_exact_value(0, &coarse_solution);
234 exact.compute_error(
"test",
"u");
235 Real err = exact.l2_error(
"test",
"u");
This class handles the computation of the L2 and/or H1 error for the Systems in the EquationSystems o...
This is the EquationSystems class.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
virtual void solve() override
For explicit systems, just assemble the system which should directly compute A*x. ...
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
libMesh::Parallel::Communicator * TestCommWorld
static constexpr Real TOLERANCE
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
processor_id_type rank() const
void copy_constraint_rows(const MeshBase &other_mesh)
Copy the constraints from the other mesh to this mesh.
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
const Parallel::Communicator & comm() const
void assemble_matrix_and_rhs(EquationSystems &es, const std::string &)
This class handles the numbering of degrees of freedom on a mesh.
uint8_t processor_id_type
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
unsigned int add_variable(std::string_view 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.
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
dof_id_type n_constrained_dofs() const
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
This class provides function-like objects for data distributed over a mesh.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
const DofMap & get_dof_map() const
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems...