52#ifdef MFEM_USE_SIMMETRIX 
   59#include <apfConvert.h> 
   64#error This example requires that MFEM is built with MFEM_USE_PUMI=YES 
   70int main(
int argc, 
char *argv[])
 
   79   const char *mesh_file = 
"../../data/pumi/parallel/Kova/Kova100k_8.smb";
 
   80#ifdef MFEM_USE_SIMMETRIX 
   81   const char *model_file = 
"../../data/pumi/geom/Kova.x_t";
 
   83   const char *model_file = 
"../../data/pumi/geom/Kova.dmg";
 
   86   bool static_cond = 
false;
 
   87   bool visualization = 1;
 
   91   args.
AddOption(&mesh_file, 
"-m", 
"--mesh",
 
   94                  "Finite element order (polynomial degree) or -1 for" 
   95                  " isoparametric space.");
 
   96   args.
AddOption(&static_cond, 
"-sc", 
"--static-condensation", 
"-no-sc",
 
   97                  "--no-static-condensation", 
"Enable static condensation.");
 
   98   args.
AddOption(&visualization, 
"-vis", 
"--visualization", 
"-no-vis",
 
  100                  "Enable or disable GLVis visualization.");
 
  101   args.
AddOption(&model_file, 
"-p", 
"--parasolid",
 
  102                  "Parasolid model to use.");
 
  103   args.
AddOption(&geom_order, 
"-go", 
"--geometry_order",
 
  104                  "Geometric order of the model");
 
  121#ifdef MFEM_USE_SIMMETRIX 
  122   Sim_readLicenseFile(0);
 
  128   apf::Mesh2* pumi_mesh;
 
  129   pumi_mesh = apf::loadMdsMesh(model_file, mesh_file);
 
  134   int dim = pumi_mesh->getDimension();
 
  135   int nEle = pumi_mesh->count(
dim);
 
  136   int ref_levels = (int)floor(log(10000./nEle)/log(2.)/
dim);
 
  140      crv::BezierCurver bc(pumi_mesh, geom_order, 2);
 
  147      auto uniInput = ma::configureUniformRefine(pumi_mesh, ref_levels);
 
  151         crv::adapt(uniInput);
 
  179         cout << 
"Using isoparametric FEs: " << fec->
Name() << endl;
 
  190      cout << 
"Number of finite element unknowns: " << size << endl;
 
  229   if (static_cond) { 
a->EnableStaticCondensation(); }
 
  234   a->FormLinearSystem(ess_tdof_list, x, *
b, A, X, B);
 
  253   a->RecoverFEMSolution(X, *
b, x);
 
  258      ostringstream mesh_name, sol_name;
 
  259      mesh_name << 
"mesh." << setfill(
'0') << setw(6) << myid;
 
  260      sol_name << 
"sol." << setfill(
'0') << setw(6) << myid;
 
  262      ofstream mesh_ofs(mesh_name.str().c_str());
 
  263      mesh_ofs.precision(8);
 
  264      pmesh->
Print(mesh_ofs);
 
  266      ofstream sol_ofs(sol_name.str().c_str());
 
  267      sol_ofs.precision(8);
 
  277      sol_sock << 
"parallel " << num_procs << 
" " << myid << 
"\n";
 
  278      sol_sock.precision(8);
 
  279      sol_sock << 
"solution\n" << *pmesh << x << flush;
 
  288   if (order > 0) { 
delete fec; }
 
  291   pumi_mesh->destroyNative();
 
  292   apf::destroyMesh(pumi_mesh);
 
  295#ifdef MFEM_USE_SIMMETRIX 
  297   Sim_unregisterAllKeys();
 
 
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
 
int Size() const
Return the logical size of the array.
 
A coefficient that is constant across space and time.
 
Class for domain integration .
 
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
 
virtual const char * Name() const
 
Arbitrary order H1-conforming (continuous) finite elements.
 
The BoomerAMG solver in hypre.
 
void Mult(const HypreParVector &b, HypreParVector &x) const override
Solve Ax=b with hypre's PCG.
 
void SetPrintLevel(int print_lvl)
 
void SetPreconditioner(HypreSolver &precond)
Set the hypre solver to be used as a preconditioner.
 
void SetMaxIter(int max_iter)
 
Wrapper for hypre's ParCSR matrix class.
 
HYPRE_BigInt GetGlobalNumRows() const
Return the global number of rows.
 
Abstract class for hypre's solvers and preconditioners.
 
static void Init()
Initialize hypre by calling HYPRE_Init() and set default options. After calling Hypre::Init(),...
 
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
 
void GetNodes(Vector &node_coord) const
 
static int WorldRank()
Return the MPI rank in MPI_COMM_WORLD.
 
static int WorldSize()
Return the size of MPI_COMM_WORLD.
 
static void Init(int &argc, char **&argv, int required=default_thread_required, int *provided=nullptr)
Singleton creation with Mpi::Init(argc, argv).
 
void Parse()
Parse the command-line options. Note that this function expects all the options provided through the ...
 
void PrintUsage(std::ostream &out) const
Print the usage message.
 
void PrintOptions(std::ostream &out) const
Print the options.
 
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...
 
bool Good() const
Return true if the command line options were parsed successfully.
 
Abstract parallel finite element space.
 
void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1) const override
 
HYPRE_BigInt GlobalTrueVSize() const
 
Class for parallel grid function.
 
void Save(std::ostream &out) const override
 
Class for parallel meshes.
 
void Print(std::ostream &out=mfem::out, const std::string &comments="") const override
 
Class for PUMI parallel meshes.