40 #ifdef MFEM_USE_SIMMETRIX
47 #include <apfConvert.h>
54 int main(
int argc,
char *argv[])
58 MPI_Init(&argc, &argv);
59 MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
60 MPI_Comm_rank(MPI_COMM_WORLD, &myid);
63 const char *mesh_file =
"../../data/pumi/serial/Kova.smb";
64 #ifdef MFEM_USE_SIMMETRIX
65 const char *model_file =
"../../data/pumi/geom/Kova.x_t";
67 const char *model_file =
"../../data/pumi/geom/Kova.dmg";
70 bool static_cond =
false;
71 bool visualization = 1;
75 args.
AddOption(&mesh_file,
"-m",
"--mesh",
78 "Finite element order (polynomial degree) or -1 for"
79 " isoparametric space.");
80 args.
AddOption(&static_cond,
"-sc",
"--static-condensation",
"-no-sc",
81 "--no-static-condensation",
"Enable static condensation.");
82 args.
AddOption(&visualization,
"-vis",
"--visualization",
"-no-vis",
84 "Enable or disable GLVis visualization.");
85 args.
AddOption(&model_file,
"-p",
"--parasolid",
86 "Parasolid model to use.");
87 args.
AddOption(&geom_order,
"-go",
"--geometry_order",
88 "Geometric order of the model");
106 #ifdef MFEM_USE_SIMMETRIX
107 Sim_readLicenseFile(0);
113 apf::Mesh2* pumi_mesh;
114 pumi_mesh = apf::loadMdsMesh(model_file, mesh_file);
119 crv::BezierCurver bc(pumi_mesh, geom_order, 2);
137 (int)floor(log(50000./mesh->
GetNE())/log(2.)/
dim);
138 for (
int l = 0; l < ref_levels; l++)
155 cout <<
"Using isoparametric FEs: " << fec->
Name() << endl;
162 cout <<
"Number of finite element unknowns: "
208 cout <<
"Size of linear system: " << A.
Height() << endl;
210 #ifndef MFEM_USE_SUITESPARSE
214 PCG(A, M, B, X, 1, 200, 1e-12, 0.0);
218 umf_solver.
Control[UMFPACK_ORDERING] = UMFPACK_ORDERING_METIS;
220 umf_solver.
Mult(B, X);
228 ofstream mesh_ofs(
"refined.mesh");
229 mesh_ofs.precision(8);
230 mesh->
Print(mesh_ofs);
231 ofstream sol_ofs(
"sol.gf");
232 sol_ofs.precision(8);
238 char vishost[] =
"localhost";
241 sol_sock.precision(8);
242 sol_sock <<
"solution\n" << *mesh << x << flush;
249 if (order > 0) {
delete fec; }
252 pumi_mesh->destroyNative();
253 apf::destroyMesh(pumi_mesh);
255 #ifdef MFEM_USE_SIMMETRIX
257 Sim_unregisterAllKeys();
int Size() const
Logical size of the array.
Class for domain integration L(v) := (f, v)
virtual void Print(std::ostream &out=mfem::out) const
Class for grid function - Vector with associated FE space.
Subclass constant coefficient.
virtual void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1)
int GetNE() const
Returns number of elements.
Base class for PUMI meshes.
int main(int argc, char *argv[])
Data type for Gauss-Seidel smoother of sparse matrix.
Direct sparse solver using UMFPACK.
virtual void Save(std::ostream &out) const
Save the GridFunction to an output stream.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
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)
virtual int GetTrueVSize() const
Return the number of vector true (conforming) dofs.
void PrintUsage(std::ostream &out) const
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
double Control[UMFPACK_CONTROL]
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)
virtual const char * Name() const
void PrintOptions(std::ostream &out) const
void GetNodes(Vector &node_coord) const
Arbitrary order H1-conforming (continuous) finite elements.
virtual void Mult(const Vector &b, Vector &x) const
Operator application: y=A(x).
virtual void SetOperator(const Operator &op)
Factorize the given Operator op which must be a SparseMatrix.