44 #ifdef MFEM_USE_SIMMETRIX
51 #include <apfConvert.h>
58 int main(
int argc,
char *argv[])
62 MPI_Init(&argc, &argv);
63 MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
64 MPI_Comm_rank(MPI_COMM_WORLD, &myid);
67 const char *mesh_file =
"../../data/pumi/parallel/Kova/Kova100k_8.smb";
68 #ifdef MFEM_USE_SIMMETRIX
69 const char *model_file =
"../../data/pumi/geom/Kova.x_t";
71 const char *model_file =
"../../data/pumi/geom/Kova.dmg";
74 bool static_cond =
false;
75 bool visualization = 1;
79 args.
AddOption(&mesh_file,
"-m",
"--mesh",
82 "Finite element order (polynomial degree) or -1 for"
83 " isoparametric space.");
84 args.
AddOption(&static_cond,
"-sc",
"--static-condensation",
"-no-sc",
85 "--no-static-condensation",
"Enable static condensation.");
86 args.
AddOption(&visualization,
"-vis",
"--visualization",
"-no-vis",
88 "Enable or disable GLVis visualization.");
89 args.
AddOption(&model_file,
"-p",
"--parasolid",
90 "Parasolid model to use.");
91 args.
AddOption(&geom_order,
"-go",
"--geometry_order",
92 "Geometric order of the model");
110 #ifdef MFEM_USE_SIMMETRIX
111 Sim_readLicenseFile(0);
117 apf::Mesh2* pumi_mesh;
118 pumi_mesh = apf::loadMdsMesh(model_file, mesh_file);
123 int dim = pumi_mesh->getDimension();
124 int nEle = pumi_mesh->count(dim);
125 int ref_levels = (int)floor(log(10000./nEle)/log(2.)/
dim);
129 crv::BezierCurver bc(pumi_mesh, geom_order, 2);
136 ma::Input* uniInput = ma::configureUniformRefine(pumi_mesh, ref_levels);
140 crv::adapt(uniInput);
168 cout <<
"Using isoparametric FEs: " << fec->
Name() << endl;
179 cout <<
"Number of finite element unknowns: " << size << endl;
247 ostringstream mesh_name, sol_name;
248 mesh_name <<
"mesh." << setfill(
'0') << setw(6) << myid;
249 sol_name <<
"sol." << setfill(
'0') << setw(6) << myid;
251 ofstream mesh_ofs(mesh_name.str().c_str());
252 mesh_ofs.precision(8);
253 pmesh->
Print(mesh_ofs);
255 ofstream sol_ofs(sol_name.str().c_str());
256 sol_ofs.precision(8);
263 char vishost[] =
"localhost";
266 sol_sock <<
"parallel " << num_procs <<
" " << myid <<
"\n";
267 sol_sock.precision(8);
268 sol_sock <<
"solution\n" << *pmesh << x << flush;
277 if (order > 0) {
delete fec; }
280 pumi_mesh->destroyNative();
281 apf::destroyMesh(pumi_mesh);
284 #ifdef MFEM_USE_SIMMETRIX
286 Sim_unregisterAllKeys();
int Size() const
Logical size of the array.
Class for domain integration L(v) := (f, v)
virtual void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1)
Subclass constant coefficient.
virtual void Save(std::ostream &out) const
Abstract parallel finite element space.
int main(int argc, char *argv[])
void SetPrintLevel(int print_lvl)
Class for PUMI parallel meshes.
The BoomerAMG solver in hypre.
HYPRE_Int GetGlobalNumRows() const
Return the global number of rows.
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
HYPRE_Int GlobalTrueVSize() const
virtual void Print(std::ostream &out=mfem::out) const
void PrintUsage(std::ostream &out) const
void SetMaxIter(int max_iter)
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
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 SetPreconditioner(HypreSolver &precond)
Set the hypre solver to be used as a preconditioner.
void PrintOptions(std::ostream &out) const
Abstract class for hypre's solvers and preconditioners.
void GetNodes(Vector &node_coord) const
Arbitrary order H1-conforming (continuous) finite elements.
Class for parallel grid function.
Wrapper for hypre's ParCSR matrix class.
virtual void Mult(const HypreParVector &b, HypreParVector &x) const
Solve Ax=b with hypre's PCG.
Class for parallel meshes.