19 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
20 #endif // MFEM_USE_MPI
31 MPI_Abort(MPI_COMM_WORLD, 1);
34 #endif // MFEM_USE_MPI
59 const int n = x.
Size();
61 for (
int k = 0; k < n; ++k)
71 const double n = x.
Norml2();
81 int num_procs = 1, rank = 0;
84 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
85 MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
86 #endif // MFEM_USE_MPI
91 sol_sock <<
"parallel " << num_procs <<
" " << rank <<
"\n";
92 sol_sock.precision(8);
93 sol_sock <<
"solution\n" << mesh << x
94 <<
"window_title '"<< title <<
"'\n" << flush;
Class for grid function - Vector with associated FE space.
void SetSize(int s)
Resize the vector to size s.
double Norml2() const
Returns the l2 norm of the vector.
int Size() const
Returns the size of the vector.
void check_options(mfem::OptionsParser &args)
void PrintUsage(std::ostream &out) const
Print the usage message.
void plot(mfem::Mesh &mesh, mfem::GridFunction &x, std::string title)
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
double example_fun(const mfem::Vector &x)
void vector_fun(const mfem::Vector &x, mfem::Vector &f)
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
void PrintOptions(std::ostream &out) const
Print the options.
virtual void ProjectCoefficient(Coefficient &coeff)
Project coeff Coefficient to this GridFunction. The projection computation depends on the choice of t...
virtual void SetSpace(FiniteElementSpace *f)
Associate a new FiniteElementSpace with the GridFunction.
void make_fun(mfem::FiniteElementSpace &fe, mfem::Coefficient &c, mfem::GridFunction &f)
double f(const Vector &p)
bool Good() const
Return true if the command line options were parsed successfully.