22int 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;
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");
A coefficient that is constant across space and time.
Class for domain integration .
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
virtual int GetTrueVSize() const
Return the number of vector true (conforming) dofs.
void GetBoundaryTrueDofs(Array< int > &boundary_dofs, int component=-1)
Get a list of all boundary true dofs, boundary_dofs. For spaces with 'vdim' > 1, the 'component' para...
Data type for Gauss-Seidel smoother of sparse matrix.
Class for grid function - Vector with associated FE space.
virtual void Save(std::ostream &out) const
Save the GridFunction to an output stream.
Arbitrary order H1-conforming (continuous) finite elements.
virtual void Save(const std::string &fname, int precision=16) const
int Dimension() const
Dimension of the reference space used within the elements.
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
void ParseCheck(std::ostream &out=mfem::out)
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...
void PCG(const Operator &A, Solver &B, const Vector &b, Vector &x, int print_iter, int max_num_iter, real_t RTOLERANCE, real_t ATOLERANCE)
Preconditioned conjugate gradient method. (tolerances are squared)