49 int main (
int argc,
char *argv[])
57 const char *mesh_file =
"square01.mesh";
58 int mesh_poly_deg = 1;
63 double surface_fit_const = 100.0;
68 double solver_rtol = 1e-10;
69 int solver_art_type = 0;
71 int max_lin_iter = 100;
73 bool visualization =
true;
74 int verbosity_level = 0;
76 const char *devopt =
"cpu";
77 double surface_fit_adapt = 0.0;
78 double surface_fit_threshold = -10;
79 bool adapt_marking =
false;
80 bool surf_bg_mesh =
false;
81 bool comp_dist =
false;
84 bool mod_bndr_attr =
false;
86 int mesh_node_ordering = 0;
91 args.
AddOption(&mesh_file,
"-m",
"--mesh",
93 args.
AddOption(&mesh_poly_deg,
"-o",
"--order",
94 "Polynomial degree of mesh finite element space.");
95 args.
AddOption(&rs_levels,
"-rs",
"--refine-serial",
96 "Number of times to refine the mesh uniformly in serial.");
97 args.
AddOption(&rp_levels,
"-rp",
"--refine-parallel",
98 "Number of times to refine the mesh uniformly in parallel.");
99 args.
AddOption(&metric_id,
"-mid",
"--metric-id",
100 "Mesh optimization metric. See list in mesh-optimizer.");
101 args.
AddOption(&target_id,
"-tid",
"--target-id",
102 "Target (ideal element) type:\n\t" 103 "1: Ideal shape, unit size\n\t" 104 "2: Ideal shape, equal size\n\t" 105 "3: Ideal shape, initial size\n\t" 106 "4: Given full analytic Jacobian (in physical space)\n\t" 107 "5: Ideal shape, given size (in physical space)");
108 args.
AddOption(&surface_fit_const,
"-sfc",
"--surface-fit-const",
109 "Surface preservation constant.");
110 args.
AddOption(&quad_type,
"-qt",
"--quad-type",
111 "Quadrature rule type:\n\t" 112 "1: Gauss-Lobatto\n\t" 113 "2: Gauss-Legendre\n\t" 114 "3: Closed uniform points");
115 args.
AddOption(&quad_order,
"-qo",
"--quad_order",
116 "Order of the quadrature rule.");
117 args.
AddOption(&solver_type,
"-st",
"--solver-type",
118 " Type of solver: (default) 0: Newton, 1: LBFGS");
119 args.
AddOption(&solver_iter,
"-ni",
"--newton-iters",
120 "Maximum number of Newton iterations.");
121 args.
AddOption(&solver_rtol,
"-rtol",
"--newton-rel-tolerance",
122 "Relative tolerance for the Newton solver.");
123 args.
AddOption(&solver_art_type,
"-art",
"--adaptive-rel-tol",
124 "Type of adaptive relative linear solver tolerance:\n\t" 125 "0: None (default)\n\t" 126 "1: Eisenstat-Walker type 1\n\t" 127 "2: Eisenstat-Walker type 2");
128 args.
AddOption(&lin_solver,
"-ls",
"--lin-solver",
133 "3: MINRES + Jacobi preconditioner\n\t" 134 "4: MINRES + l1-Jacobi preconditioner");
135 args.
AddOption(&max_lin_iter,
"-li",
"--lin-iter",
136 "Maximum number of iterations in the linear solve.");
137 args.
AddOption(&move_bnd,
"-bnd",
"--move-boundary",
"-fix-bnd",
139 "Enable motion along horizontal and vertical boundaries.");
140 args.
AddOption(&visualization,
"-vis",
"--visualization",
"-no-vis",
141 "--no-visualization",
142 "Enable or disable GLVis visualization.");
143 args.
AddOption(&verbosity_level,
"-vl",
"--verbosity-level",
144 "Set the verbosity level - 0, 1, or 2.");
145 args.
AddOption(&adapt_eval,
"-ae",
"--adaptivity-evaluator",
146 "0 - Advection based (DEFAULT), 1 - GSLIB.");
147 args.
AddOption(&devopt,
"-d",
"--device",
148 "Device configuration string, see Device::Configure().");
149 args.
AddOption(&surface_fit_adapt,
"-sfa",
"--adaptive-surface-fit",
150 "Enable or disable adaptive surface fitting.");
151 args.
AddOption(&surface_fit_threshold,
"-sft",
"--surf-fit-threshold",
152 "Set threshold for surface fitting. TMOP solver will" 153 "terminate when max surface fitting error is below this limit");
154 args.
AddOption(&adapt_marking,
"-marking",
"--adaptive-marking",
"-no-amarking",
155 "--no-adaptive-marking",
156 "Enable or disable adaptive marking surface fitting.");
157 args.
AddOption(&surf_bg_mesh,
"-sbgmesh",
"--surf-bg-mesh",
158 "-no-sbgmesh",
"--no-surf-bg-mesh",
159 "Use background mesh for surface fitting.");
160 args.
AddOption(&comp_dist,
"-dist",
"--comp-dist",
161 "-no-dist",
"--no-comp-dist",
162 "Compute distance from 0 level set or not.");
163 args.
AddOption(&surf_ls_type,
"-slstype",
"--surf-ls-type",
164 "1 - Circle (DEFAULT), 2 - Squircle, 3 - Butterfly.");
165 args.
AddOption(&marking_type,
"-smtype",
"--surf-marking-type",
166 "1 - Interface (DEFAULT), 2 - Boundary attribute.");
167 args.
AddOption(&mod_bndr_attr,
"-mod-bndr-attr",
"--modify-boundary-attribute",
168 "-fix-bndr-attr",
"--fix-boundary-attribute",
169 "Change boundary attribute based on alignment with Cartesian axes.");
171 "-no-mat",
"--no-mat",
"Use default material attributes.");
172 args.
AddOption(&mesh_node_ordering,
"-mno",
"--mesh_node_ordering",
173 "Ordering of mesh nodes." 174 "0 (default): byNodes, 1: byVDIM");
175 args.
AddOption(&amr_iters,
"-amriter",
"--amr-iter",
176 "Number of amr iterations on background mesh");
186 if (myid == 0) { device.
Print();}
189 Mesh *mesh =
new Mesh(mesh_file, 1, 1,
false);
190 for (
int lev = 0; lev < rs_levels; lev++)
198 if (surf_ls_type == 1)
202 else if (surf_ls_type == 2)
206 else if (surf_ls_type == 6)
212 MFEM_ABORT(
"Surface fitting level set type not implemented yet.")
220 ParMesh *pmesh_surf_fit_bg = NULL;
223 Mesh *mesh_surf_fit_bg = NULL;
235 pmesh_surf_fit_bg =
new ParMesh(MPI_COMM_WORLD, *mesh_surf_fit_bg);
236 delete mesh_surf_fit_bg;
244 if (mesh_poly_deg <= 0)
269 ostringstream mesh_name;
270 mesh_name <<
"perturbed.mesh";
271 ofstream mesh_ofs(mesh_name.str().c_str());
272 mesh_ofs.precision(8);
291 if (myid == 0) { cout <<
"Unknown metric_id: " << metric_id << endl; }
297 MFEM_VERIFY(
dim == 2,
"Incompatible metric for 3D meshes");
299 if (metric_id >= 300)
301 MFEM_VERIFY(
dim == 3,
"Incompatible metric for 2D meshes");
313 if (myid == 0) { cout <<
"Unknown target_id: " << target_id << endl; }
317 if (target_c == NULL)
332 if (myid == 0) { cout <<
"Unknown quad_type: " << quad_type << endl; }
336 if (myid == 0 &&
dim == 2)
338 cout <<
"Triangle quadrature points: " 340 <<
"\nQuadrilateral quadrature points: " 343 if (myid == 0 &&
dim == 3)
345 cout <<
"Tetrahedron quadrature points: " 347 <<
"\nHexahedron quadrature points: " 349 <<
"\nPrism quadrature points: " 400 const int num_nodes = x_bg.
Size() /
dim;
401 for (
int i = 0; i < num_nodes; i++)
403 for (
int d = 0; d <
dim; d++)
405 double length_d = p_max(d) - p_min(d),
406 extra_d = 0.2 * length_d;
407 x_bg(i + d*num_nodes) = p_min(d) - extra_d +
408 x_bg(i + d*num_nodes) * (length_d + 2*extra_d);
417 if (surface_fit_const > 0.0)
423 amr_iters, *surf_fit_bg_gf0);
425 surf_fit_bg_fes->
Update();
426 surf_fit_bg_gf0->
Update();
436 surf_fit_bg_grad_fes =
444 surf_fit_bg_hess_fes =
453 const int size_bg = surf_fit_bg_gf0->
Size();
454 for (
int d = 0; d < pmesh_surf_fit_bg->
Dimension(); d++)
457 surf_fit_bg_fes, surf_fit_bg_grad->
GetData() + d * size_bg);
463 for (
int d = 0; d < pmesh_surf_fit_bg->
Dimension(); d++)
465 for (
int idir = 0; idir < pmesh_surf_fit_bg->
Dimension(); idir++)
468 surf_fit_bg_fes, surf_fit_bg_grad->
GetData() + d * size_bg);
470 surf_fit_bg_fes, surf_fit_bg_hess->
GetData()+
id * size_bg);
472 surf_fit_bg_hess_comp);
486 for (
int i = 0; i < pmesh->
GetNE(); i++)
515 if (marking_type == 0)
519 for (
int j = 0; j < surf_fit_marker.Size(); j++)
521 surf_fit_marker[j] =
false;
523 surf_fit_mat_gf = 0.0;
532 int mat1 = mat(tr->Elem1No);
533 int mat2 = mat(tr->Elem2No);
547 int mat1 = mat(tr->Elem1No);
548 int mat2 = FaceNbrData(tr->Elem2No-pmesh->
GetNE());
556 for (
int i = 0; i < dof_list.
Size(); i++)
558 surf_fit_marker[dof_list[i]] =
true;
559 surf_fit_mat_gf(dof_list[i]) = 1.0;
563 else if (marking_type > 0)
565 for (
int i = 0; i < pmesh->
GetNBE(); i++)
568 if (attr == marking_type)
571 for (
int j = 0; j < vdofs.
Size(); j++)
573 surf_fit_marker[vdofs[j]] =
true;
574 surf_fit_mat_gf(vdofs[j]) = 1.0;
585 MFEM_VERIFY(!surf_bg_mesh,
"Background meshes require GSLIB.");
587 else if (adapt_eval == 1)
589 #ifdef MFEM_USE_GSLIB 597 MFEM_ABORT(
"MFEM is not built with GSLIB support!");
600 else { MFEM_ABORT(
"Bad interpolation option."); }
605 surf_fit_coeff, *adapt_surface);
610 *surf_fit_bg_gf0, surf_fit_gf0,
611 surf_fit_marker, surf_fit_coeff, *adapt_surface,
612 *surf_fit_bg_grad, *surf_fit_grad, *adapt_grad_surface,
613 *surf_fit_bg_hess, *surf_fit_hess, *adapt_hess_surface);
620 "Level Set", 0, 0, 300, 300);
622 "Materials", 300, 0, 300, 300);
624 "Surface DOFs", 600, 0, 300, 300);
628 "Level Set - Background",
642 a.AddDomainIntegrator(tmop_integ);
646 const int NE = pmesh->
GetNE();
647 for (
int i = 0; i < NE; i++)
655 min_detJ = min(min_detJ, transf->
Jacobian().
Det());
658 MPI_Allreduce(MPI_IN_PLACE, &min_detJ, 1,
659 MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD);
661 { cout <<
"Minimum det(J) of the original mesh is " << min_detJ << endl; }
663 MFEM_VERIFY(min_detJ > 0,
"The input mesh is inverted, use mesh-optimizer.");
665 const double init_energy =
a.GetParGridFunctionEnergy(x);
666 double init_metric_energy = init_energy;
667 if (surface_fit_const > 0.0)
669 surf_fit_coeff.constant = 0.0;
670 init_metric_energy =
a.GetParGridFunctionEnergy(x);
671 surf_fit_coeff.constant = surface_fit_const;
678 if (move_bnd ==
false)
682 if (marking_type > 0)
684 ess_bdr[marking_type-1] = 0;
686 a.SetEssentialBC(ess_bdr);
691 for (
int i = 0; i < pmesh->
GetNBE(); i++)
695 MFEM_VERIFY(!(
dim == 2 && attr == 3),
696 "Boundary attribute 3 must be used only for 3D meshes. " 697 "Adjust the attributes (1/2/3/4 for fixed x/y/z/all " 698 "components, rest for free nodes), or use -fix-bnd.");
699 if (attr == 1 || attr == 2 || attr == 3) { n += nd; }
700 if (attr == 4) { n += nd *
dim; }
704 for (
int i = 0; i < pmesh->
GetNBE(); i++)
711 for (
int j = 0; j < nd; j++)
712 { ess_vdofs[n++] = vdofs[j]; }
716 for (
int j = 0; j < nd; j++)
717 { ess_vdofs[n++] = vdofs[j+nd]; }
721 for (
int j = 0; j < nd; j++)
722 { ess_vdofs[n++] = vdofs[j+2*nd]; }
726 for (
int j = 0; j < vdofs.
Size(); j++)
727 { ess_vdofs[n++] = vdofs[j]; }
730 a.SetEssentialVDofs(ess_vdofs);
735 Solver *S = NULL, *S_prec = NULL;
736 const double linsol_rtol = 1e-12;
741 else if (lin_solver == 1)
757 else { minres->
SetPrintLevel(verbosity_level == 2 ? 3 : -1); }
758 if (lin_solver == 3 || lin_solver == 4)
763 hs->SetPositiveDiagonal(
true);
774 if (surface_fit_adapt > 0.0)
778 if (surface_fit_threshold > 0)
780 solver.SetTerminationWithMaxSurfaceFittingError(surface_fit_threshold);
783 solver.SetIntegrationRules(*irules, quad_order);
784 if (solver_type == 0)
787 solver.SetPreconditioner(*S);
789 solver.SetMaxIter(solver_iter);
790 solver.SetRelTol(solver_rtol);
791 solver.SetAbsTol(0.0);
792 solver.SetMinimumDeterminantThreshold(0.001*min_detJ);
793 if (solver_art_type > 0)
795 solver.SetAdaptiveLinRtol(solver_art_type, 0.5, 0.9);
797 solver.SetPrintLevel(verbosity_level >= 1 ? 1 : -1);
798 solver.SetOperator(
a);
806 ostringstream mesh_name;
807 mesh_name <<
"optimized.mesh";
808 ofstream mesh_ofs(mesh_name.str().c_str());
809 mesh_ofs.precision(8);
814 const double fin_energy =
a.GetParGridFunctionEnergy(x);
815 double fin_metric_energy = fin_energy;
816 if (surface_fit_const > 0.0)
818 surf_fit_coeff.constant = 0.0;
819 fin_metric_energy =
a.GetParGridFunctionEnergy(x);
820 surf_fit_coeff.constant = surface_fit_const;
825 std::cout << std::scientific << std::setprecision(4);
826 cout <<
"Initial strain energy: " << init_energy
827 <<
" = metrics: " << init_metric_energy
828 <<
" + extra terms: " << init_energy - init_metric_energy << endl;
829 cout <<
" Final strain energy: " << fin_energy
830 <<
" = metrics: " << fin_metric_energy
831 <<
" + extra terms: " << fin_energy - fin_metric_energy << endl;
832 cout <<
"The strain energy decreased by: " 833 << (init_energy - fin_energy) * 100.0 / init_energy <<
" %." << endl;
836 if (surface_fit_const > 0.0)
842 "Materials", 300, 400, 300, 300);
844 "Surface DOFs", 600, 400, 300, 300);
846 double err_avg, err_max;
850 std::cout <<
"Avg fitting error: " << err_avg << std::endl
851 <<
"Max fitting error: " << err_max << std::endl;
861 "Displacements", 900, 400, 300, 300,
"jRmclA");
866 delete metric_coeff1;
867 delete adapt_surface;
868 delete adapt_grad_surface;
869 delete adapt_hess_surface;
871 delete surf_fit_hess;
872 delete surf_fit_hess_fes;
873 delete surf_fit_bg_hess;
874 delete surf_fit_bg_hess_fes;
875 delete surf_fit_grad;
876 delete surf_fit_grad_fes;
877 delete surf_fit_bg_grad;
878 delete surf_fit_bg_grad_fes;
879 delete surf_fit_bg_gf0;
880 delete surf_fit_bg_fes;
881 delete surf_fit_bg_fec;
886 delete pmesh_surf_fit_bg;
static void Init()
Initialize hypre by calling HYPRE_Init() and set default options. After calling Hypre::Init(), hypre will be finalized automatically at program exit.
Conjugate gradient method.
int GetNPoints() const
Returns the number of the points in the integration rule.
Class for an integration rule - an Array of IntegrationPoint.
Class for grid function - Vector with associated FE space.
void GetDerivative(int comp, int der_comp, ParGridFunction &der)
Parallel version of GridFunction::GetDerivative(); see its documentation.
void ExchangeFaceNbrData()
Data type for scaled Jacobi-type smoother of sparse matrix.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
IntegrationRules IntRulesLo(0, Quadrature1D::GaussLobatto)
void SetFromTrueVector()
Shortcut for calling SetFromTrueDofs() with GetTrueVector() as argument.
A coefficient that is constant across space and time.
void PrintOptions(std::ostream &out) const
Print the options.
int Dimension() const
Dimension of the reference space used within the elements.
int GetNumFaces() const
Return the number of faces (3D), edges (2D) or vertices (1D).
3D barrier Shape (S) metric, well-posed (polyconvex & invex).
void PrintUsage(std::ostream &out) const
Print the usage message.
void ModifyAttributeForMarkingDOFS(ParMesh *pmesh, ParGridFunction &mat, int attr_to_switch)
static Mesh MakeCartesian3D(int nx, int ny, int nz, Element::Type type, double sx=1.0, double sy=1.0, double sz=1.0, bool sfc_ordering=true)
virtual void Update(bool want_transform=true)
int GetAttribute() const
Return element's attribute.
void ExchangeFaceNbrData(Table *gr_sface, int *s2l_face)
int Size() const
Returns the size of the vector.
Coefficient defined by a GridFunction. This coefficient is mesh dependent.
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
Container class for integration rules.
void SetIntegrationRules(IntegrationRules &irules, int order)
Prescribe a set of integration rules; relevant for mixed meshes.
void Print(std::ostream &out=mfem::out)
Print the configuration of the MFEM virtual device object.
virtual void ProjectDiscCoefficient(VectorCoefficient &coeff)
Project a discontinuous vector coefficient as a grid function on a continuous finite element space...
bool Good() const
Return true if the command line options were parsed successfully.
Abstract parallel finite element space.
virtual void ProjectCoefficient(Coefficient &coeff)
Project coeff Coefficient to this GridFunction. The projection computation depends on the choice of t...
FaceElementTransformations * GetInteriorFaceTransformations(int FaceNo)
int GetNBE() const
Returns number of boundary elements.
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
2D barrier shape (S) metric (not polyconvex).
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
int GetAttribute(int i) const
Return the attribute of element i.
Abstract class for local mesh quality metrics in the target-matrix optimization paradigm (TMOP) by P...
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
int material(Vector &x, Vector &xmin, Vector &xmax)
void SetTrueVector()
Shortcut for calling GetTrueDofs() with GetTrueVector() as argument.
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
virtual void SetPrintLevel(int print_lvl)
Legacy method to set the level of verbosity of the solver output.
void GetBoundingBox(Vector &p_min, Vector &p_max, int ref=2)
double reactor(const Vector &x)
void Parse()
Parse the command-line options. Note that this function expects all the options provided through the ...
int Append(const T &el)
Append element 'el' to array, resize if necessary.
void EnsureNCMesh(bool simplices_nonconforming=false)
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
void OptimizeMeshWithAMRAroundZeroLevelSet(ParMesh &pmesh, FunctionCoefficient &ls_coeff, int amr_iter, ParGridFunction &distance_s, const int quad_order=5, Array< ParGridFunction *> *pgf_to_update=NULL)
void UniformRefinement(int i, const DSTable &, int *, int *, int *)
void SetNodes(const GridFunction &n)
Set the nodes to be used in the target-matrix construction.
FaceElementTransformations * GetSharedFaceTransformations(int sf, bool fill2=true)
void SetMaxIter(int max_it)
double csg_cubecylsph(const Vector &x)
Version of QuadraticFECollection with positive basis functions.
Parallel smoothers in hypre.
static void Init()
Singleton creation with Mpi::Init();.
int GetSharedFace(int sface) const
Return the local face index for the given shared face.
double * GetData() const
Return a pointer to the beginning of the Vector data.
3D compound barrier Shape+Size (VS) metric (polyconvex, balanced).
virtual int GetFaceDofs(int i, Array< int > &dofs, int variant=0) const
void SetAbsTol(double atol)
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
void SetRelTol(double rtol)
int GetNSharedFaces() const
Return the number of shared faces (3D), edges (2D), vertices (1D)
virtual const FiniteElement * GetFE(int i) const
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
ParFiniteElementSpace * ParFESpace() const
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...
static Mesh MakeCartesian2D(int nx, int ny, Element::Type type, bool generate_edges=false, double sx=1.0, double sy=1.0, bool sfc_ordering=true)
int GetDof() const
Returns the number of degrees of freedom in the finite element.
void SetAttributes() override
Determine the sets of unique attribute values in domain and boundary elements.
const Vector & GetTrueVector() const
Read only access to the (optional) internal true-dof Vector.
int GetNE() const
Returns number of elements.
void ModifyBoundaryAttributesForNodeMovement(ParMesh *pmesh, ParGridFunction &x)
double circle_level_set(const Vector &x)
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
DofTransformation * GetBdrElementVDofs(int i, Array< int > &vdofs) const
Returns indices of degrees of freedom for i'th boundary element. The returned indices are offsets int...
void EnableSurfaceFittingFromSource(const ParGridFunction &s_bg, ParGridFunction &s0, const Array< bool > &smarker, Coefficient &coeff, AdaptivityEvaluator &ae, const ParGridFunction &s_bg_grad, ParGridFunction &s0_grad, AdaptivityEvaluator &age, const ParGridFunction &s_bg_hess, ParGridFunction &s0_hess, AdaptivityEvaluator &ahe)
Fitting of certain DOFs in the current mesh to the zero level set of a function defined on another (f...
void PrintAsSerial(std::ostream &out=mfem::out) const
void SetCurvature(int order, bool discont=false, int space_dim=-1, int ordering=1) override
Set the curvature of the mesh nodes using the given polynomial degree.
int main(int argc, char *argv[])
IntegrationRules IntRulesCU(0, Quadrature1D::ClosedUniform)
void GetSurfaceFittingErrors(const Vector &pos, double &err_avg, double &err_max)
double infinity()
Define a shortcut for std::numeric_limits<double>::infinity()
static int WorldRank()
Return the MPI rank in MPI_COMM_WORLD.
int Size() const
Return the logical size of the array.
A general function coefficient.
void SetAttribute(int i, int attr)
Set the attribute of element i.
void VisualizeField(socketstream &sock, const char *vishost, int visport, GridFunction &gf, const char *title, int x, int y, int w, int h, const char *keys, bool vec)
void SetNodalFESpace(FiniteElementSpace *nfes) override
Arbitrary order H1-conforming (continuous) finite elements.
TargetType
Target-matrix construction algorithms supported by this class.
void GetNodes(Vector &node_coord) const
void EnableSurfaceFitting(const GridFunction &s0, const Array< bool > &smarker, Coefficient &coeff, AdaptivityEvaluator &ae)
Fitting of certain DOFs to the zero level set of a function.
void ComputeScalarDistanceFromLevelSet(ParMesh &pmesh, FunctionCoefficient &ls_coeff, ParGridFunction &distance_s, const int nDiffuse=2, const int pLapOrder=5, const int pLapNewton=50)
const Element * GetBdrElement(int i) const
Return pointer to the i'th boundary element object.
Class for parallel grid function.
void SetNodalGridFunction(GridFunction *nodes, bool make_owner=false)
Base class representing target-matrix construction algorithms for mesh optimization via the target-ma...
The MFEM Device class abstracts hardware devices such as GPUs, as well as programming models such as ...
void SetAdaptiveSurfaceFittingScalingFactor(double factor)
int material_id(int el_id, const GridFunction &g)
Class for parallel meshes.
const FiniteElement * GetBE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th boundary fac...
void SetType(HypreSmoother::Type type, int relax_times=1)
Set the relaxation type and number of sweeps.
Arbitrary order "L2-conforming" discontinuous finite elements.
A TMOP integrator class based on any given TMOP_QualityMetric and TargetConstructor.