97 #include "../common/mfem-common.hpp"
102 using namespace mfem;
105 int main(
int argc,
char *argv[])
108 const char *mesh_file =
"icf.mesh";
109 int mesh_poly_deg = 1;
114 double lim_const = 0.0;
115 double adapt_lim_const = 0.0;
119 int solver_iter = 20;
120 double solver_rtol = 1e-10;
121 int solver_art_type = 0;
123 int max_lin_iter = 100;
124 bool move_bnd =
true;
126 bool normalization =
false;
127 bool visualization =
true;
128 int verbosity_level = 0;
129 bool fdscheme =
false;
131 bool exactaction =
false;
132 const char *devopt =
"cpu";
137 args.
AddOption(&mesh_file,
"-m",
"--mesh",
138 "Mesh file to use.");
139 args.
AddOption(&mesh_poly_deg,
"-o",
"--order",
140 "Polynomial degree of mesh finite element space.");
141 args.
AddOption(&rs_levels,
"-rs",
"--refine-serial",
142 "Number of times to refine the mesh uniformly in serial.");
143 args.
AddOption(&jitter,
"-ji",
"--jitter",
144 "Random perturbation scaling factor.");
145 args.
AddOption(&metric_id,
"-mid",
"--metric-id",
146 "Mesh optimization metric:\n\t"
148 "1 : |T|^2 -- 2D shape\n\t"
149 "2 : 0.5|T|^2/tau-1 -- 2D shape (condition number)\n\t"
150 "7 : |T-T^-t|^2 -- 2D shape+size\n\t"
151 "9 : tau*|T-T^-t|^2 -- 2D shape+size\n\t"
152 "14 : |T-I|^2 -- 2D shape+size+orientation\n\t"
153 "22 : 0.5(|T|^2-2*tau)/(tau-tau_0) -- 2D untangling\n\t"
154 "50 : 0.5|T^tT|^2/tau^2-1 -- 2D shape\n\t"
155 "55 : (tau-1)^2 -- 2D size\n\t"
156 "56 : 0.5(sqrt(tau)-1/sqrt(tau))^2 -- 2D size\n\t"
157 "58 : |T^tT|^2/(tau^2)-2*|T|^2/tau+2 -- 2D shape\n\t"
158 "77 : 0.5(tau-1/tau)^2 -- 2D size\n\t"
159 "80 : (1-gamma)mu_2 + gamma mu_77 -- 2D shape+size\n\t"
160 "85 : |T-|T|/sqrt(2)I|^2 -- 2D shape+orientation\n\t"
161 "98 : (1/tau)|T-I|^2 -- 2D shape+size+orientation\n\t"
164 "301: (|T||T^-1|)/3-1 -- 3D shape\n\t"
165 "302: (|T|^2|T^-1|^2)/9-1 -- 3D shape\n\t"
166 "303: (|T|^2)/3*tau^(2/3)-1 -- 3D shape\n\t"
168 "313: (|T|^2)(tau-tau0)^(-2/3)/3 -- 3D untangling\n\t"
169 "315: (tau-1)^2 -- 3D size\n\t"
170 "316: 0.5(sqrt(tau)-1/sqrt(tau))^2 -- 3D size\n\t"
171 "321: |T-T^-t|^2 -- 3D shape+size\n\t"
174 "11 : (1/4*alpha)|A-(adjA)^T(W^TW)/omega|^2 -- 2D shape\n\t"
175 "36 : (1/alpha)|A-W|^2 -- 2D shape+size+orientation\n\t"
176 "107: (1/2*alpha)|A-|A|/|W|W|^2 -- 2D shape+orientation\n\t"
177 "126: (1-gamma)nu_11 + gamma*nu_14a -- 2D shape+size\n\t"
179 args.
AddOption(&target_id,
"-tid",
"--target-id",
180 "Target (ideal element) type:\n\t"
181 "1: Ideal shape, unit size\n\t"
182 "2: Ideal shape, equal size\n\t"
183 "3: Ideal shape, initial size\n\t"
184 "4: Given full analytic Jacobian (in physical space)\n\t"
185 "5: Ideal shape, given size (in physical space)");
186 args.
AddOption(&lim_const,
"-lc",
"--limit-const",
"Limiting constant.");
187 args.
AddOption(&adapt_lim_const,
"-alc",
"--adapt-limit-const",
188 "Adaptive limiting coefficient constant.");
189 args.
AddOption(&quad_type,
"-qt",
"--quad-type",
190 "Quadrature rule type:\n\t"
191 "1: Gauss-Lobatto\n\t"
192 "2: Gauss-Legendre\n\t"
193 "3: Closed uniform points");
194 args.
AddOption(&quad_order,
"-qo",
"--quad_order",
195 "Order of the quadrature rule.");
196 args.
AddOption(&solver_type,
"-st",
"--solver-type",
197 " Type of solver: (default) 0: Newton, 1: LBFGS");
198 args.
AddOption(&solver_iter,
"-ni",
"--newton-iters",
199 "Maximum number of Newton iterations.");
200 args.
AddOption(&solver_rtol,
"-rtol",
"--newton-rel-tolerance",
201 "Relative tolerance for the Newton solver.");
202 args.
AddOption(&solver_art_type,
"-art",
"--adaptive-rel-tol",
203 "Type of adaptive relative linear solver tolerance:\n\t"
204 "0: None (default)\n\t"
205 "1: Eisenstat-Walker type 1\n\t"
206 "2: Eisenstat-Walker type 2");
207 args.
AddOption(&lin_solver,
"-ls",
"--lin-solver",
212 "3: MINRES + Jacobi preconditioner\n\t"
213 "4: MINRES + l1-Jacobi preconditioner");
214 args.
AddOption(&max_lin_iter,
"-li",
"--lin-iter",
215 "Maximum number of iterations in the linear solve.");
216 args.
AddOption(&move_bnd,
"-bnd",
"--move-boundary",
"-fix-bnd",
218 "Enable motion along horizontal and vertical boundaries.");
219 args.
AddOption(&combomet,
"-cmb",
"--combo-type",
220 "Combination of metrics options:\n\t"
221 "0: Use single metric\n\t"
222 "1: Shape + space-dependent size given analytically\n\t"
223 "2: Shape + adapted size given discretely; shared target");
224 args.
AddOption(&normalization,
"-nor",
"--normalization",
"-no-nor",
225 "--no-normalization",
226 "Make all terms in the optimization functional unitless.");
227 args.
AddOption(&fdscheme,
"-fd",
"--fd_approximation",
228 "-no-fd",
"--no-fd-approx",
229 "Enable finite difference based derivative computations.");
230 args.
AddOption(&exactaction,
"-ex",
"--exact_action",
231 "-no-ex",
"--no-exact-action",
232 "Enable exact action of TMOP_Integrator.");
233 args.
AddOption(&visualization,
"-vis",
"--visualization",
"-no-vis",
234 "--no-visualization",
235 "Enable or disable GLVis visualization.");
236 args.
AddOption(&verbosity_level,
"-vl",
"--verbosity-level",
237 "Set the verbosity level - 0, 1, or 2.");
238 args.
AddOption(&adapt_eval,
"-ae",
"--adaptivity-evaluator",
239 "0 - Advection based (DEFAULT), 1 - GSLIB.");
240 args.
AddOption(&devopt,
"-d",
"--device",
241 "Device configuration string, see Device::Configure().");
242 args.
AddOption(&pa,
"-pa",
"--partial-assembly",
"-no-pa",
243 "--no-partial-assembly",
"Enable Partial Assembly.");
256 Mesh *mesh =
new Mesh(mesh_file, 1, 1,
false);
259 cout <<
"Mesh curvature: ";
261 else { cout <<
"(NONE)"; }
269 if (mesh_poly_deg <= 0)
300 for (
int i = 0; i < mesh->
GetNE(); i++)
306 for (
int j = 0; j < dofs.
Size(); j++)
308 h0(dofs[j]) = min(h0(dofs[j]), hi);
312 const double small_phys_size = pow(volume, 1.0 / dim) / 100.0;
325 for (
int i = 0; i < fespace->
GetNDofs(); i++)
327 for (
int d = 0; d <
dim; d++)
333 for (
int i = 0; i < fespace->
GetNBE(); i++)
338 for (
int j = 0; j < vdofs.
Size(); j++) { rdm(vdofs[j]) = 0.0; }
347 ofstream mesh_ofs(
"perturbed.mesh");
348 mesh->
Print(mesh_ofs);
356 double tauval = -0.1;
392 cout <<
"Unknown metric_id: " << metric_id << endl;
431 #ifdef MFEM_USE_GSLIB
434 MFEM_ABORT(
"MFEM is not built with GSLIB.");
440 size.ProjectCoefficient(ind_coeff);
445 size.ProjectCoefficient(ind_coeff);
458 disc.ProjectCoefficient(ind_coeff);
465 #ifdef MFEM_USE_GSLIB
468 MFEM_ABORT(
"MFEM is not built with GSLIB.");
476 disc.GetDerivative(1,0,d_x);
477 disc.GetDerivative(1,1,d_y);
480 for (
int i = 0; i < size.Size(); i++)
482 size(i) = std::pow(d_x(i),2)+std::pow(d_y(i),2);
484 const double max = size.Max();
486 for (
int i = 0; i < d_x.Size(); i++)
488 d_x(i) = std::abs(d_x(i));
489 d_y(i) = std::abs(d_y(i));
491 const double eps = 0.01;
492 const double aspr_ratio = 20.0;
493 const double size_ratio = 40.0;
495 for (
int i = 0; i < size.Size(); i++)
497 size(i) = (size(i)/max);
498 aspr(i) = (d_x(i)+eps)/(d_y(i)+eps);
499 aspr(i) = 0.1 + 0.9*(1-size(i))*(1-size(i));
500 if (aspr(i) > aspr_ratio) {aspr(i) = aspr_ratio;}
501 if (aspr(i) < 1.0/aspr_ratio) {aspr(i) = 1.0/aspr_ratio;}
504 const int NE = mesh->
GetNE();
505 double volume = 0.0, volume_ind = 0.0;
507 for (
int i = 0; i < NE; i++)
512 size.GetValues(i, ir, vals);
522 const double avg_zone_size = volume / NE;
524 const double small_avg_ratio = (volume_ind + (volume - volume_ind) /
528 const double small_zone_size = small_avg_ratio * avg_zone_size;
529 const double big_zone_size = size_ratio * small_zone_size;
531 for (
int i = 0; i < size.Size(); i++)
533 const double val = size(i);
534 const double a = (big_zone_size - small_zone_size) / small_zone_size;
535 size(i) = big_zone_size / (1.0+a*val);
556 #ifdef MFEM_USE_GSLIB
559 MFEM_ABORT(
"MFEM is not built with GSLIB.");
579 #ifdef MFEM_USE_GSLIB
582 MFEM_ABORT(
"MFEM is not built with GSLIB.");
586 if (metric_id == 14 || metric_id == 36)
589 size.ProjectCoefficient(ind_coeff);
596 aspr.ProjectCoefficient(aspr_coeff);
607 default: cout <<
"Unknown target_id: " << target_id << endl;
return 3;
609 if (target_c == NULL)
619 MFEM_VERIFY(pa ==
false,
"PA for finite differences is not implemented.");
631 default: cout <<
"Unknown quad_type: " << quad_type << endl;
return 3;
636 cout <<
"Triangle quadrature points: "
638 <<
"\nQuadrilateral quadrature points: "
643 cout <<
"Tetrahedron quadrature points: "
645 <<
"\nHexahedron quadrature points: "
647 <<
"\nPrism quadrature points: "
659 if (normalization) { dist = small_phys_size; }
661 if (lim_const != 0.0) { he_nlf_integ->
EnableLimiting(x0, dist, lim_coeff); }
667 if (adapt_lim_const > 0.0)
669 MFEM_VERIFY(pa ==
false,
"PA is not implemented for adaptive limiting");
674 if (adapt_eval == 0) { adapt_evaluator =
new AdvectorCG(al); }
675 else if (adapt_eval == 1)
677 #ifdef MFEM_USE_GSLIB
680 MFEM_ABORT(
"MFEM is not built with GSLIB support!");
683 else { MFEM_ABORT(
"Bad interpolation option."); }
736 if (lim_const != 0.0) { combo->
EnableLimiting(x0, dist, lim_coeff); }
745 if (pa) { a.
Setup(); }
749 const int NE = mesh->
GetNE();
750 for (
int i = 0; i < NE; i++)
761 cout <<
"Minimum det(J) of the original mesh is " << tauval << endl;
763 if (tauval < 0.0 && metric_id != 22 && metric_id != 211 && metric_id != 252
764 && metric_id != 311 && metric_id != 313 && metric_id != 352)
766 MFEM_ABORT(
"The input mesh is inverted! Try an untangling metric.");
771 "Untangling is supported only for ideal targets.");
775 tauval /= Wideal.
Det();
778 tauval -= 0.01 * h0.Min();
787 char title[] =
"Initial metric values";
796 if (move_bnd ==
false)
805 for (
int i = 0; i < mesh->
GetNBE(); i++)
809 MFEM_VERIFY(!(dim == 2 && attr == 3),
810 "Boundary attribute 3 must be used only for 3D meshes. "
811 "Adjust the attributes (1/2/3/4 for fixed x/y/z/all "
812 "components, rest for free nodes), or use -fix-bnd.");
813 if (attr == 1 || attr == 2 || attr == 3) { n += nd; }
814 if (attr == 4) { n += nd *
dim; }
818 for (
int i = 0; i < mesh->
GetNBE(); i++)
825 for (
int j = 0; j < nd; j++)
826 { ess_vdofs[n++] = vdofs[j]; }
830 for (
int j = 0; j < nd; j++)
831 { ess_vdofs[n++] = vdofs[j+nd]; }
835 for (
int j = 0; j < nd; j++)
836 { ess_vdofs[n++] = vdofs[j+2*nd]; }
840 for (
int j = 0; j < vdofs.
Size(); j++)
841 { ess_vdofs[n++] = vdofs[j]; }
849 Solver *S = NULL, *S_prec = NULL;
850 const double linsol_rtol = 1e-12;
855 else if (lin_solver == 1)
872 if (lin_solver == 3 || lin_solver == 4)
876 MFEM_VERIFY(lin_solver != 4,
"PA l1-Jacobi is not implemented");
881 S_prec =
new DSmoother((lin_solver == 3) ? 0 : 1, 1.0, 1);
894 if (solver_type == 0)
904 if (solver_art_type > 0)
914 cout <<
"Nonlinear solver: rtol = " << solver_rtol <<
" not achieved.\n";
920 ofstream mesh_ofs(
"optimized.mesh");
921 mesh_ofs.precision(14);
922 mesh->
Print(mesh_ofs);
927 double metric_part = fin_energy;
928 if (lim_const > 0.0 || adapt_lim_const > 0.0)
934 coef_zeta.
constant = adapt_lim_const;
936 cout <<
"Initial strain energy: " << init_energy
937 <<
" = metrics: " << init_energy
938 <<
" + limiting term: " << 0.0 << endl;
939 cout <<
" Final strain energy: " << fin_energy
940 <<
" = metrics: " << metric_part
941 <<
" + limiting term: " << fin_energy - metric_part << endl;
942 cout <<
"The strain energy decreased by: " << setprecision(12)
943 << (init_energy - fin_energy) * 100.0 / init_energy <<
" %." << endl;
948 char title[] =
"Final metric values";
952 if (adapt_lim_const > 0.0 && visualization)
964 sock <<
"solution\n";
968 sock <<
"window_title 'Displacements'\n"
969 <<
"window_geometry "
970 << 1200 <<
" " << 0 <<
" " << 600 <<
" " << 600 <<
"\n"
971 <<
"keys jRmclA" << endl;
980 delete adapt_evaluator;
int GetNPoints() const
Returns the number of the points in the integration rule.
void discrete_aspr_3d(const Vector &x, Vector &v)
int Size() const
Return the logical size of the array.
virtual void Print(std::ostream &out=mfem::out) const
Conjugate gradient method.
int GetNDofs() const
Returns number of degrees of freedom.
AssemblyLevel
Enumeration defining the assembly level for bilinear and nonlinear form classes derived from Operator...
Class for an integration rule - an Array of IntegrationPoint.
void EnableFiniteDifferences(const GridFunction &x)
Enables FD-based approximation and computes dx.
Class for grid function - Vector with associated FE space.
int DofToVDof(int dof, int vd, int ndofs=-1) const
double discrete_size_2d(const Vector &x)
3D barrier Shape+Size (VS) metric.
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 SetIntegrationRules(IntegrationRules &irules, int order)
Prescribe a set of integration rules; relevant for mixed meshes.
void SetFromTrueVector()
Shortcut for calling SetFromTrueDofs() with GetTrueVector() as argument.
A coefficient that is constant across space and time.
virtual void SetSerialDiscreteTargetOrientation(const GridFunction &tspec_)
void EnableNormalization(const GridFunction &x)
Computes the normalization factors of the metric and limiting integrals using the mesh position given...
int GetNBE() const
Returns number of boundary elements.
3D barrier Shape (S) metric.
void SetAdaptivityEvaluator(AdaptivityEvaluator *ae)
2D barrier Shape+Size (VS) metric (polyconvex).
Container class for integration rules.
Data type dense matrix using column-major storage.
3D barrier Shape (S) metric.
void SetVolumeScale(double vol_scale)
Used by target type IDEAL_SHAPE_EQUAL_SIZE. The default volume scale is 1.
2D barrier shape (S) metric (polyconvex).
void EnableAdaptiveLimiting(const GridFunction &z0, Coefficient &coeff, AdaptivityEvaluator &ae)
Restriction of the node positions to certain regions.
3D non-barrier Size (V) metric.
2D barrier size (V) metric (polyconvex).
void SetIntegrationRules(IntegrationRules &irules, int order)
Prescribe a set of integration rules; relevant for mixed meshes.
int GetNE() const
Returns number of elements.
void EnableNormalization(const GridFunction &x)
Normalization factor that considers all integrators in the combination.
2D barrier Shape+Size (VS) metric (polyconvex).
void Print(std::ostream &out=mfem::out)
Print the configuration of the MFEM virtual device object.
void vis_tmop_metric_s(int order, TMOP_QualityMetric &qm, const TargetConstructor &tc, Mesh &mesh, char *title, int position)
void SetExactActionFlag(bool flag_)
Flag to control if exact action of Integration is effected.
virtual void GetElementDofs(int elem, Array< int > &dofs) const
Returns indices of degrees of freedom of element 'elem'.
void Randomize(int seed=0)
Set random values in the vector.
void SetMinDetPtr(double *md_ptr)
2D barrier Shape+Size (VS) metric (not polyconvex).
Geometry::Type GetElementBaseGeometry(int i) const
void EnableLimiting(const GridFunction &n0, const GridFunction &dist, Coefficient &w0, TMOP_LimiterFunction *lfunc=NULL)
Adds the limiting term to the first integrator. Disables it for the rest.
2D Shifted barrier form of shape metric (mu_2).
virtual void SetSerialDiscreteTargetAspectRatio(const GridFunction &tspec_)
const DenseMatrix & GetGeomToPerfGeomJac(int GeomType) const
2D barrier shape (S) metric (not polyconvex).
virtual void Save(std::ostream &out) const
Save the GridFunction to an output stream.
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
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.
void SetTrueVector()
Shortcut for calling GetTrueDofs() with GetTrueVector() as argument.
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
void SetPrintLevel(int print_lvl)
double GetElementSize(ElementTransformation *T, int type=0)
void EnableLimiting(const GridFunction &n0, const GridFunction &dist, Coefficient &w0, TMOP_LimiterFunction *lfunc=NULL)
Limiting of the mesh displacements (general version).
int GetNBE() const
Returns number of boundary elements in the mesh.
void Parse()
Parse the command-line options. Note that this function expects all the options provided through the ...
void SetCoefficient(Coefficient &w1)
Sets a scaling Coefficient for the quality metric term of the integrator.
2D non-barrier size (V) metric (not polyconvex).
3D barrier Size (V) metric.
Jacobi smoothing for a given bilinear form (no matrix necessary).
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.
void SetMaxIter(int max_it)
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
Version of QuadraticFECollection with positive basis functions.
int GetAttribute() const
Return element's attribute.
double discrete_ori_2d(const Vector &x)
2D barrier Shape+Size+Orientation (VOS) metric (polyconvex).
void SetNodalFESpace(FiniteElementSpace *nfes)
void PrintUsage(std::ostream &out) const
Print the usage message.
void DiffuseField(ParGridFunction &field, int smooth_steps)
2D barrier Shape+Orientation (OS) metric (polyconvex).
const Vector & GetTrueVector() const
Read only access to the (optional) internal true-dof Vector.
A general vector function coefficient.
void SetAbsTol(double atol)
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
void SetRelTol(double rtol)
2D barrier (not a shape) metric (polyconvex).
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
int GetDof() const
Returns the number of degrees of freedom in the finite element.
double weight_fun(const Vector &x)
2D barrier size (V) metric (polyconvex).
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
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...
void SetAdaptiveLinRtol(const int type=2, const double rtol0=0.5, const double rtol_max=0.9, const double alpha=0.5 *(1.0+sqrt(5.0)), const double gamma=1.0)
Enable adaptive linear solver relative tolerance algorithm.
double adapt_lim_fun(const Vector &x)
void AddTMOPIntegrator(TMOP_Integrator *ti)
Adds a new TMOP_Integrator to the combination.
double material_indicator_2d(const Vector &x)
2D barrier Shape+Size (VS) metric (not polyconvex).
double discrete_size_3d(const Vector &x)
double discrete_aspr_2d(const Vector &x)
Class for integration point with weight.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
2D barrier Shape+Size+Orientation (VOS) metric (polyconvex).
3D Shape (S) metric, untangling version of 303.
IntegrationRules IntRulesCU(0, Quadrature1D::ClosedUniform)
virtual const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in t...
void PrintOptions(std::ostream &out) const
Print the options.
double infinity()
Define a shortcut for std::numeric_limits<double>::infinity()
virtual void ProjectCoefficient(Coefficient &coeff)
Project coeff Coefficient to this GridFunction. The projection computation depends on the choice of t...
A general function coefficient.
virtual void Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
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 GetNodes(Vector &node_coord) const
Arbitrary order H1-conforming (continuous) finite elements.
TargetType
Target-matrix construction algorithms supported by this class.
const FiniteElement * GetBE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th boundary fac...
void GetBdrElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th boundary element.
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 ...
virtual void SetAnalyticTargetSpec(Coefficient *sspec, VectorCoefficient *vspec, TMOPMatrixCoefficient *mspec)
virtual void SetSerialDiscreteTargetSize(const GridFunction &tspec_)
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
2D barrier Shape+Orientation (OS) metric (polyconvex).
virtual double * HostReadWrite()
Shortcut for mfem::ReadWrite(vec.GetMemory(), vec.Size(), false).
double GetElementVolume(int i)
const Element * GetBdrElement(int i) const
3D barrier Shape (S) metric.
2D non-barrier metric without a type.
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
bool Good() const
Return true if the command line options were parsed successfully.
A TMOP integrator class based on any given TMOP_QualityMetric and TargetConstructor.
2D non-barrier Shape+Size+Orientation (VOS) metric (polyconvex).