22 int main(
int argc,
char *argv[])
25 Mpi::Init(argc, argv);
29 string mesh_file =
"../data/star.mesh";
33 args.
AddOption(&mesh_file,
"-m",
"--mesh",
"Mesh file to use.");
34 args.
AddOption(&order,
"-o",
"--order",
"Finite element polynomial degree");
38 Mesh serial_mesh(mesh_file);
42 ParMesh mesh(MPI_COMM_WORLD, serial_mesh);
53 cout <<
"Number of unknowns: " << total_num_dofs << endl;
59 fespace.GetBoundaryTrueDofs(boundary_dofs);
81 a.FormLinearSystem(boundary_dofs, x,
b, A, X, B);
95 a.RecoverFEMSolution(X,
b, x);
Class for domain integration L(v) := (f, v)
Conjugate gradient method.
A coefficient that is constant across space and time.
int main(int argc, char *argv[])
int Dimension() const
Dimension of the reference space used within the elements.
virtual void Mult(const Vector &b, Vector &x) const
Operator application: y=A(x).
Abstract parallel finite element space.
The BoomerAMG solver in hypre.
virtual void SetPrintLevel(int print_lvl)
Legacy method to set the level of verbosity of the solver output.
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
void SetMaxIter(int max_it)
void Save(const std::string &fname, int precision=16) const override
void SetRelTol(double rtol)
void AddOption(bool *var, const char *enable_short_name, const char *enable_long_name, const char *disable_short_name, const char *disable_long_name, const char *description, bool required=false)
Add a boolean option and set 'var' to receive the value. Enable/disable tags are used to set the bool...
virtual void Save(std::ostream &out) const
void Clear()
Clear the contents of the Mesh.
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
Arbitrary order H1-conforming (continuous) finite elements.
Class for parallel grid function.
Wrapper for hypre's ParCSR matrix class.
Class for parallel meshes.
void ParseCheck(std::ostream &out=mfem::out)