33 MFEM_VERIFY(nodes0.
Size() == new_mesh_nodes.
Size(),
34 "AdvectorCG assumes fixed mesh topology!");
41 ncomp =
space->GetVDim();
43 const int dof_cnt = field0.
Size() / ncomp;
47 for (
int i = 0; i < ncomp; i++)
51 new_field_temp.
MakeRef(new_field, i*dof_cnt, dof_cnt);
55 new_field_temp.
SetSize(dof_cnt);
56 for (
int j = 0; j < dof_cnt; j++)
58 new_field_temp(j) = new_field(i + j*ncomp);
61 ComputeAtNewPositionScalar(new_mesh_nodes, new_field_temp);
64 for (
int j = 0; j < dof_cnt; j++)
66 new_field(i + j*ncomp) = new_field_temp(j);
75 nodes0 = new_mesh_nodes;
78void AdvectorCG::ComputeAtNewPositionScalar(
const Vector &new_mesh_nodes,
86 MFEM_VERIFY(m != NULL,
"No mesh has been given to the AdaptivityEvaluator.");
115 MFEM_VERIFY(oper != NULL,
116 "No FE space has been given to the AdaptivityEvaluator.");
117 ode_solver.
Init(*oper);
120 real_t h_min = std::numeric_limits<real_t>::infinity();
121 for (
int i = 0; i < m->
GetNE(); i++)
129 for (
int i = 0; i < s; i++)
134 vel +=
u(i+j*s)*
u(i+j*s);
136 v_max = std::max(v_max,
vel);
142 real_t v_loc = v_max, h_loc = h_min;
160 v_max = std::sqrt(v_max);
161 real_t dt = dt_scale * h_min / v_max;
164 bool last_step =
false;
172 ode_solver.
Step(new_field, t, dt);
189 for (
int i = 0; i < new_field.
Size(); i++)
191 if (new_field(i) < glob_minv) { new_field(i) = glob_minv; }
192 if (new_field(i) > glob_maxv) { new_field(i) = glob_maxv; }
207 x0(x_start), x_now(*fes.
GetMesh()->GetNodes()),
208 u(
vel), u_coeff(&
u), M(&fes), K(&fes), al(al)
231 K.BilinearForm::operator=(0.0);
235 M.BilinearForm::operator=(0.0);
238#ifdef MFEM_USE_SINGLE
241 const real_t rtol = 1e-12;
254 PCG(*A, S, B, X, 0, 100, rtol, 0.0);
261 PCG(
M.
SpMat(), S, rhs, di_dt, 0, 100, rtol, 0.0);
272 x0(x_start), x_now(*pfes.
GetMesh()->GetNodes()),
273 u(
vel), u_coeff(&
u), M(&pfes), K(&pfes), al(al)
304 K.BilinearForm::operator=(0.0);
308 M.BilinearForm::operator=(0.0);
339#ifdef MFEM_USE_SINGLE
347 lin_solver.
Mult(RHS, X);
366 if (m->
GetNodes()->FESpace()->IsDGSpace())
368 MFEM_ABORT(
"InterpolatorFP is not supported for periodic meshes yet.");
371 const real_t rel_bbox_el = 0.1;
372 const real_t newton_tol = 1.0e-12;
373 const int npts_at_once = 256;
387 finder->
Setup(*m, rel_bbox_el, newton_tol, npts_at_once);
390 field0_gf = init_field;
394 Vector &new_field,
int nodes_ordering)
399 if (fes_new_field ==
nullptr && new_mesh_nodes.
Size() != nodes0.
Size())
401 MFEM_WARNING(
"Deprecated -- use ComputeAtGivenPositions() instead!");
407 (fes_new_field) ? fes_new_field : field0_gf.
FESpace();
415 finder->
Interpolate(mapped_nodes, field0_gf, new_field);
419 finder->
Interpolate(new_mesh_nodes, field0_gf, new_field, nodes_ordering);
424 Vector &values,
int p_ordering)
426 finder->
Interpolate(positions, field0_gf, values, p_ordering);
438 MFEM_VERIFY(!(
parallel && p_nlf == NULL),
"Invalid Operator subclass.");
447 MFEM_VERIFY(!(serial && nlf == NULL),
"Invalid Operator subclass.");
460 if (!cP) { d_loc = d_in; }
461 else { cP->
Mult(d_in, d_loc); }
472 real_t init_fit_avg_err, init_fit_max_err = 0.0;
481 mfem::out <<
"TMOPNewtonSolver converged "
482 "based on the surface fitting error.\n";
493 mfem::out <<
"TMOPNewtonSolver terminated "
494 "based on max number of times surface fitting weight can"
503 const real_t min_detT_in =
507 const bool untangling = (min_detT_in <= 0.0) ?
true :
false;
508 const real_t untangle_factor = 1.5;
513 MFEM_VERIFY(
min_det_ptr != NULL,
" Initial mesh was valid, but"
514 " intermediate mesh is invalid. Contact TMOP Developers.");
516 "This setup is not supported. Contact TMOP Developers.");
520 const bool have_b = (
b.Size() ==
Height());
523 bool x_out_ok =
false;
524 real_t energy_out = 0.0, min_detT_out;
526 real_t avg_fit_err, max_fit_err = 0.0;
535 for (
int i = 0; i < 12; i++)
545 add(d_in, -scale,
c, d_out);
549 if (!cP) { d_loc = d_out; }
550 else { cP->
Mult(d_out, d_loc); }
566 mfem::out <<
"Scale = " << scale <<
" Neg det(J) found.\n";
568 scale *= detJ_factor;
continue;
570 if (untangling ==
true && min_detT_out < *
min_det_ptr)
575 mfem::out <<
"Scale = " << scale <<
" Neg det(J) decreased.\n";
577 scale *= detJ_factor;
continue;
583 if (untangling) { x_out_ok =
true;
break; }
593 if (max_fit_err >= 1.2*init_fit_max_err)
597 mfem::out <<
"Scale = " << scale <<
" Surf fit err increased.\n";
599 scale *= 0.5;
continue;
614 if (energy_out > energy_in + 0.2*fabs(energy_in) ||
615 std::isnan(energy_out) != 0)
619 mfem::out <<
"Scale = " << scale <<
" Increasing energy: "
620 << energy_in <<
" --> " << energy_out <<
'\n';
622 scale *= 0.5;
continue;
627 if (have_b) {
r -=
b; }
630 if (norm_out > 1.2*norm_in)
634 mfem::out <<
"Scale = " << scale <<
" Norm increased: "
635 << norm_in <<
" --> " << norm_out <<
'\n';
637 scale *= 0.5;
continue;
639 else { x_out_ok =
true;
break; }
645 if (min_detT_out > 0.0)
650 {
mfem::out <<
"The mesh has been untangled at the used points!\n"; }
652 else { *
min_det_ptr = untangle_factor * min_detT_out; }
661 << min_detT_in <<
" -> " << min_detT_out
662 <<
" with " << scale <<
" scaling.\n";
667 << energy_in <<
" --> " << energy_out <<
" or "
668 << (energy_in - energy_out) / energy_in * 100.0
669 <<
"% with " << scale <<
" scaling.\n";
673 if (x_out_ok ==
false) { scale = 0.0; }
686 const Operator *P = fes_mesh_nodes->GetProlongationMatrix();
688 periodic = fes_mesh_nodes->IsDGSpace();
692 "The input's size must be the tdof size of the mesh nodes.");
698 "The input's size must match the size of the mesh nodes.");
704 for (
int i = 0; i < integs.
Size(); i++)
716 else { MFEM_ABORT(
"Invalid solver_type"); }
723 if (Pd) { Pd->
Mult(dx, dx_loc); }
724 else { dx_loc = dx; }
731 for (
int i = 0; i < integs.
Size(); i++)
746 for (
int i = 0; i < integs.
Size(); i++)
757 for (
int j = 0; j < ati.
Size(); j++)
759 ati[j]->UpdateSurfaceFittingWeight(factor);
774 for (
int i = 0; i < integs.
Size(); i++)
786 for (
int j = 0; j < ati.
Size(); j++)
790 weight = ati[j]->GetSurfaceFittingWeight();
809 real_t err_avg_loc, err_max_loc;
810 for (
int i = 0; i < integs.
Size(); i++)
818 err_avg = std::max(err_avg_loc, err_avg);
819 err_max = std::max(err_max_loc, err_max);
826 for (
int j = 0; j < ati.
Size(); j++)
830 ati[j]->GetSurfaceFittingErrors(d_loc, err_avg_loc, err_max_loc);
831 err_avg = std::max(err_avg_loc, err_avg);
832 err_max = std::max(err_max_loc, err_max);
846 for (
int i = 0; i < integs.
Size(); i++)
860 for (
int j = 0; j < ati.
Size(); j++)
882 for (
int i = 0; i < integs.
Size(); i++)
894 for (
int j = 0; j < ati.
Size(); j++)
896 dtc = ati[j]->GetDiscreteAdaptTC();
909 else { dx_loc = dx; }
912 for (
int i = 0; i < integs.
Size(); i++)
927 for (
int j = 0; j < ati.
Size(); j++)
929 ati[j]->UpdateAfterMeshPositionChange(dx_loc, *dx_fes);
932 ati[j]->ComputeUntangleMetricQuantiles(dx_loc, *dx_fes);
952 mfem::out <<
"Avg/Max surface fitting error: " <<
955 mfem::out <<
"Min/Max surface fitting weight: " <<
956 fitweights.
Min() <<
" " << fitweights.
Max() <<
"\n";
986 Mesh &mesh,
int ref_factor,
int max_recursion_depth)
991 det_gf = pmesh->GetJacobianDeterminantGF();
1001 int max_order =
det_gf->FESpace()->GetMaxElementOrder();
1003 ref_factor*(max_order+1));
1012 det_gf->FESpace()->Update();
1024 if (
dim == 1 || mixed_mesh ||
1027 for (
int i = 0; i < NE; i++)
1047 for (
int j = 0; j < nsp; j++)
1051 min_detJ = std::min(min_detJ, Jpr.
Det());
1065 MPI_MIN, p_nlf->ParFESpace()->GetComm());
1070 min_detJ /= Wideal.
Det();
1079 "Determinant bounding has not been setup.");
1082 "Determinant lower bounds require a fixed-order tensor-product "
1083 "determinant space.");
1086 Vector d_loc_el, detvals;
1088 for (
int e = 0; e < fes.
GetNE(); e++)
1112 for (
int q = 0; q < nsp; q++)
1116 detvals(q) = Jpr.
Det();
1118 det_gf->SetSubVector(dofs, detvals);
1121 auto minbounds =
det_gf->EstimateFunctionMinimum(0, *
det_plb,
1126 return minbounds.first/Wideal.
Det();
1134 char *title,
int position)
1143 sock.
open(
"localhost", 19916);
1144 sock <<
"solution\n";
1150 sock <<
"window_title '"<< title <<
"'\n"
1151 <<
"window_geometry "
1152 << position <<
" " << 0 <<
" " << 600 <<
" " << 600 <<
"\n"
1162 char *title,
int position)
1169 sock <<
"solution\n";
1173 sock <<
"window_title '"<< title <<
"'\n"
1174 <<
"window_geometry "
1175 << position <<
" " << 0 <<
" " << 600 <<
" " << 600 <<
"\n"
1188 R_H1->
Mult(dx, dx_r);
1189 R_L2->AddMultTranspose(dx_r, x);
ParFiniteElementSpace * pfes
void SetInitialField(const Vector &init_nodes, const Vector &init_field) override
void ComputeAtNewPosition(const Vector &new_mesh_nodes, Vector &new_field, int nodes_ordering=Ordering::byNODES) override
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
T Min() const
Find the minimal element in the array, using the comparison operator < for class T.
int Size() const
Return the logical size of the array.
int Append(const T &el)
Append element 'el' to array, resize if necessary.
@ GaussLobatto
Closed type.
Conjugate gradient method.
void Mult(const Vector &b, Vector &x) const override
Iterative solution of the linear system using the Conjugate Gradient method.
void SetOperator(const Operator &op) override
Set/update the solver for the given operator.
Jacobi-type diagonal smoother of a sparse matrix.
Data type dense matrix using column-major storage.
real_t * Data() const
Returns the matrix data array. Warning: this method casts away constness.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
static MemoryType GetDeviceMemoryType()
Get the current Device MemoryType. This is the MemoryType used by most MFEM classes when allocating m...
void ResetUpdateFlags()
Used in combination with the Update methods to avoid extra computations.
FindPointsGSLIB can robustly evaluate a GridFunction on an arbitrary collection of points....
void Setup(Mesh &m, const double bbox_rel_size_inc=0.1, const double newt_tol=1.0e-12, const int npt_max=256)
Preprocess the internal mesh in gslib.
virtual void Interpolate(const GridFunction &field_in, Vector &field_out)
Interpolation of field values at prescribed reference space positions.
virtual void FreeData()
Cleans up memory allocated internally by gslib.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
bool IsVariableOrder() const
Returns true if the space contains elements of varying polynomial orders.
DofTransformation * GetElementDofs(int elem, Array< int > &dofs) const
Returns indices of degrees of freedom of element 'elem'. The returned indices are offsets into an ldo...
int GetNDofs() const
Returns number of degrees of freedom. This is the number of Local Degrees of Freedom.
virtual const Operator * GetProlongationMatrix() const
void GetNodePositions(const Vector &mesh_nodes, Vector &fes_node_pos, int fes_nodes_ordering=Ordering::byNODES) const
Compute the space's node positions w.r.t. given mesh positions. The function uses FiniteElement::GetN...
DofTransformation * GetElementVDofs(int i, Array< int > &vdofs) const
Returns indices of degrees of freedom for the i'th element. The returned indices are offsets into an ...
virtual const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in t...
Ordering::Type GetOrdering() const
Return the ordering method.
int GetNE() const
Returns number of elements in the mesh.
const ElementRestrictionOperator * GetElementRestriction(ElementDofOrdering e_ordering) const
Return an Operator that converts L-vectors to E-vectors.
const SparseMatrix * GetConformingProlongation() const
const FiniteElementCollection * FEColl() const
Mesh * GetMesh() const
Returns the mesh.
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
Abstract class for all finite elements.
int GetDim() const
Returns the reference space dimension for the finite element.
const IntegrationRule & GetNodes() const
Get a const reference to the nodes of the element.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const =0
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
int GetDof() const
Returns the number of degrees of freedom in the finite element.
const DenseMatrix & GetGeomToPerfGeomJac(int GeomType) const
Class for grid function - Vector with associated FE space.
virtual void Save(std::ostream &out) const
Save the GridFunction to an output stream.
virtual void GetElementDofValues(int el, Vector &dof_vals) const
FiniteElementSpace * FESpace()
virtual void SetSpace(FiniteElementSpace *f)
Associate a new FiniteElementSpace with the GridFunction.
Parallel smoothers in hypre.
Class for an integration rule - an Array of IntegrationPoint.
int GetNPoints() const
Returns the number of the points in the integration rule.
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
void ComputeAtGivenPositions(const Vector &positions, Vector &values, int p_ordering=Ordering::byNODES) override
Direct interpolation of field0_gf at the given positions.
void SetInitialField(const Vector &init_nodes, const Vector &init_field) override
void ComputeAtNewPosition(const Vector &new_mesh_nodes, Vector &new_field, int nodes_ordering=Ordering::byNODES) override
PrintLevel print_options
Output behavior for the iterative solver.
void SetRelTol(real_t rtol)
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 SetMaxIter(int max_it)
void SetAbsTol(real_t atol)
real_t Norm(const Vector &x) const
Return the inner product norm of x, using the inner product defined by Dot()
Arbitrary order "L2-conforming" discontinuous finite elements.
void Mult(const Vector &b, Vector &x) const override
Solve the nonlinear system with right-hand side b.
void NodesUpdated()
This function should be called after the mesh node coordinates have been updated externally,...
Geometry::Type GetTypicalElementGeometry() const
If the local mesh is not empty, return GetElementGeometry(0); otherwise, return a typical Geometry pr...
std::unique_ptr< GridFunction > GetJacobianDeterminantGF() const
Create a GridFunction representing the Jacobian determinant.
virtual void Print(std::ostream &os=mfem::out, const std::string &comments="") const
Print the mesh to the given stream using the default MFEM mesh format.
int GetNE() const
Returns number of elements.
int Dimension() const
Dimension of the reference space used within the elements.
real_t GetElementSize(int i, int type=0)
Get the size of the i-th element relative to the perfect reference element.
void GetNodes(Vector &node_coord) const
void SetNodes(const Vector &node_coord)
Updates the vertex/node locations. Invokes NodesUpdated().
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
void Mult(const Vector &b, Vector &x) const override
Solve the nonlinear system with right-hand side b.
Class for standard nodal finite elements.
void ReorderLexToNative(int ncomp, Vector &dofs) const
Pointer to an Operator of a specified type.
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.
Jacobi smoothing for a given bilinear form (no matrix necessary).
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
int height
Dimension of the output / number of rows in the matrix.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
Performs a single remap advection step in parallel.
ParAdvectorCGOper(const Vector &x_start, GridFunction &vel, ParFiniteElementSpace &pfes, AssemblyLevel al=AssemblyLevel::LEGACY, MemoryType mt=MemoryType::DEFAULT)
VectorGridFunctionCoefficient u_coeff
void Mult(const Vector &ind, Vector &di_dt) const override
Operator application: y=A(x).
Abstract parallel finite element space.
int GetTrueVSize() const override
Return the number of local vector true dofs.
const Operator * GetProlongationMatrix() const override
ParMesh * GetParMesh() const
Class for parallel grid function.
void ParallelAssemble(Vector &tv) const
Returns the vector assembled on the true dofs.
void SaveAsOne(const char *fname, int precision=16) const
Class for parallel meshes.
void PrintAsOne(std::ostream &out=mfem::out, const std::string &comments="") const
Write the mesh to the stream 'out' on Process 0 in a form suitable for visualization.
void Init(TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver.
void Step(Vector &x, real_t &t, real_t &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in].
Performs a single remap advection step in serial.
VectorGridFunctionCoefficient u_coeff
SerialAdvectorCGOper(const Vector &x_start, GridFunction &vel, FiniteElementSpace &fes, AssemblyLevel al=AssemblyLevel::LEGACY)
void Mult(const Vector &ind, Vector &di_dt) const override
Operator application: y=A(x).
void Mult(const Vector &x, Vector &y) const override
Matrix vector multiplication.
void SetInitialMeshPos(const GridFunction *x0)
const Array< TMOP_Integrator * > & GetTMOPIntegrators() const
real_t surf_fit_max_err_limit
real_t ComputeScalingFactor(const Vector &d, const Vector &b) const override
virtual void GetSurfaceFittingError(const Vector &d_loc, real_t &err_avg, real_t &err_max) const
std::unique_ptr< GridFunction > det_gf
void Mult(const Vector &b, Vector &x) const override
Optimizes the mesh positions given by x.
real_t surf_fit_scale_factor
bool IsSurfaceFittingEnabled() const
Check if surface fitting is enabled.
real_t surf_fit_err_rel_change_limit
void EnsurePositiveDeterminantBound(Mesh &mesh, int ref_factor, int max_recursion_depth=0)
Ensure a positive lower bound for the Jacobian determinant in tensor-product elements during line-sea...
real_t MinDetJpr_3D(const FiniteElementSpace *, const Vector &) const
real_t surf_fit_weight_limit
std::unique_ptr< PLBound > det_plb
int surf_fit_adapt_count_limit
const IntegrationRule & GetIntegrationRule(const FiniteElement &el) const
void UpdateDeterminantBoundGridFunction()
Update internal determinant GridFunction after a mesh topology change.
bool surf_fit_coeff_update
void UpdateSurfaceFittingWeight(real_t factor) const
Update surface fitting weight as surf_fit_weight *= factor.
real_t surf_fit_avg_err_prvs
real_t MinDetJpr_2D(const FiniteElementSpace *, const Vector &) const
void ProcessNewState(const Vector &dx) const override
bool compute_metric_quantile_flag
real_t ComputeMinDet(const Vector &d_loc, const FiniteElementSpace &fes) const
bool surf_fit_converge_error
real_t ComputeDetJptLowerBound(const Vector &d_loc, const FiniteElementSpace &fes) const
void GetSurfaceFittingWeight(Array< real_t > &weights) const
Get the surface fitting weight for all the TMOP integrators.
A TMOP integrator class based on any given TMOP_QualityMetric and TargetConstructor.
void UpdateAfterMeshPositionChange(const Vector &d, const FiniteElementSpace &d_fes)
void GetSurfaceFittingErrors(const Vector &d_loc, real_t &err_avg, real_t &err_max)
void ComputeUntangleMetricQuantiles(const Vector &d, const FiniteElementSpace &fes)
real_t GetSurfaceFittingWeight()
Get the surface fitting weight.
void SetInitialMeshPos(const GridFunction *x0)
bool IsSurfaceFittingEnabled()
DiscreteAdaptTC * GetDiscreteAdaptTC() const
void UpdateSurfaceFittingWeight(real_t factor)
Update the surface fitting weight as surf_fit_coeff *= factor;.
Abstract class for local mesh quality metrics in the target-matrix optimization paradigm (TMOP) by P....
Base class representing target-matrix construction algorithms for mesh optimization via the target-ma...
Base abstract class for first order time dependent operators.
virtual real_t GetTime() const
Read the currently set time.
real_t Max() const
Returns the maximal element of the vector.
int Size() const
Returns the size of the vector.
virtual void UseDevice(bool use_dev) const
Enable execution of Vector operations using the mfem::Device.
void SetSize(int s)
Resize the vector to size s.
virtual real_t * HostReadWrite()
Shortcut for mfem::ReadWrite(vec.GetMemory(), vec.Size(), false).
real_t Min() const
Returns the minimal element of the vector.
void GetSubVector(const Array< int > &dofs, Vector &elemvect) const
Extract entries listed in dofs to the output Vector elemvect.
void MakeRef(Vector &base, int offset, int size)
Reset the Vector to be a reference to a sub-vector of base.
int open(const char hostname[], int port)
Open the socket stream on 'port' at 'hostname'.
const int * ess_tdof_list
real_t weight(const Vector &x)
real_t u(const Vector &xvec)
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
void add(const Vector &v1, const Vector &v2, Vector &v)
AssemblyLevel
Enumeration defining the assembly level for bilinear and nonlinear form classes derived from Operator...
void vis_tmop_metric_s(int order, TMOP_QualityMetric &qm, const TargetConstructor &tc, Mesh &mesh, char *title, int position)
void InterpolateTMOP_QualityMetric(TMOP_QualityMetric &metric, const TargetConstructor &tc, const Mesh &mesh, GridFunction &metric_gf)
Interpolates the metric's values at the nodes of metric_gf.
void PCG(const Operator &A, Solver &B, const Vector &b, Vector &x, int print_iter, int max_num_iter, real_t RTOLERANCE, real_t ATOLERANCE)
Preconditioned conjugate gradient method. (tolerances are squared)
void vis_tmop_metric_p(int order, TMOP_QualityMetric &qm, const TargetConstructor &tc, ParMesh &pmesh, char *title, int position)
void GetPeriodicPositions(const Vector &x_0, const Vector &dx, const FiniteElementSpace &fesL2, const FiniteElementSpace &fesH1, Vector &x)
bool UsesTensorBasis(const FiniteElementSpace &fes)
Return true if the mesh contains only one topology and the elements are tensor elements.
void subtract(const Vector &x, const Vector &y, Vector &z)
ComplexDenseMatrix * MultAtB(const ComplexDenseMatrix &A, const ComplexDenseMatrix &B)
Multiply the complex conjugate transpose of a matrix A with a matrix B. A^H*B.
MemoryType
Memory types supported by MFEM.
ElementDofOrdering
Constants describing the possible orderings of the DOFs in one element.
std::function< real_t(const Vector &)> f(real_t mass_coeff)
constexpr real_t infinity()
Define a shortcut for std::numeric_limits<double>::infinity()
void vel(const Vector &x, real_t t, Vector &u)
bool iterations
Detailed information about each iteration will be reported to mfem::out.
bool warnings
If a non-fatal problem has been detected some context-specific information will be reported to mfem::...
bool first_and_last
Information about the first and last iteration will be printed to mfem::out.
bool summary
A summary of the solver process will be reported after the last iteration to mfem::out.
Helper struct to convert a C++ type to an MPI type.