22 int main(
int argc,
char *argv[])
25 string mesh_file =
"../data/star.mesh";
29 args.
AddOption(&mesh_file,
"-m",
"--mesh",
"Mesh file to use.");
30 args.
AddOption(&order,
"-o",
"--order",
"Finite element polynomial degree");
41 cout <<
"Number of unknowns: " << fespace.GetTrueVSize() << endl;
46 fespace.GetBoundaryTrueDofs(boundary_dofs);
68 a.FormLinearSystem(boundary_dofs, x,
b, A, X, B);
72 PCG(A, M, B, X, 1, 200, 1e-12, 0.0);
76 a.RecoverFEMSolution(X,
b, x);
78 mesh.
Save(
"mesh.mesh");
Class for domain integration L(v) := (f, v)
Class for grid function - Vector with associated FE space.
A coefficient that is constant across space and time.
int Dimension() const
Dimension of the reference space used within the elements.
virtual void Save(const std::string &fname, int precision=16) const
Data type for Gauss-Seidel smoother of sparse matrix.
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
void PCG(const Operator &A, Solver &B, const Vector &b, Vector &x, int print_iter, int max_num_iter, double RTOLERANCE, double ATOLERANCE)
Preconditioned conjugate gradient method. (tolerances are squared)
int main(int argc, char *argv[])
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
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...
Arbitrary order H1-conforming (continuous) finite elements.
virtual void Save(std::ostream &out) const
Save the GridFunction to an output stream.
void ParseCheck(std::ostream &out=mfem::out)