12#ifndef MFEM_TMOP_TOOLS_HPP
13#define MFEM_TMOP_TOOLS_HPP
34 void ComputeAtNewPositionScalar(
const Vector &new_nodes,
Vector &new_field);
37 real_t timestep_scale = 0.5)
39 ode_solver(), nodes0(), field0(), dt_scale(timestep_scale), al(al) { }
271 else { MFEM_ABORT(
"Invalid type"); }
284 else { MFEM_ABORT(
"Invalid type"); }
290 const TargetConstructor &tc, Mesh &pmesh,
291 char *title,
int position);
294 const TargetConstructor &tc, ParMesh &pmesh,
295 char *title,
int position);
virtual void ComputeAtNewPosition(const Vector &new_nodes, Vector &new_field, int new_nodes_ordering=Ordering::byNODES)
AdvectorCG(AssemblyLevel al=AssemblyLevel::LEGACY, real_t timestep_scale=0.5)
virtual void SetInitialField(const Vector &init_nodes, const Vector &init_field)
void SetMemoryType(MemoryType mt)
FindPointsGSLIB can robustly evaluate a GridFunction on an arbitrary collection of points....
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Abstract class for all finite elements.
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
Class for grid function - Vector with associated FE space.
Class for an integration rule - an Array of IntegrationPoint.
Container class for integration rules.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
virtual void ComputeAtNewPosition(const Vector &new_nodes, Vector &new_field, int new_nodes_ordering=Ordering::byNODES)
virtual void SetInitialField(const Vector &init_nodes, const Vector &init_field)
const FindPointsGSLIB * GetFindPointsGSLIB() const
virtual void SetSolver(Solver &solver)
Set the linear solver for inverting the Jacobian.
virtual void Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
virtual void SetSolver(Solver &solver)
Set the linear solver for inverting the Jacobian.
virtual void Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
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
virtual void Mult(const Vector &ind, Vector &di_dt) const
Perform the action of the operator: y = k = f(x, t), where k solves the algebraic equation F(x,...
Abstract parallel finite element space.
The classical explicit forth-order Runge-Kutta method, RK4.
Performs a single remap advection step in serial.
VectorGridFunctionCoefficient u_coeff
SerialAdvectorCGOper(const Vector &x_start, GridFunction &vel, FiniteElementSpace &fes, AssemblyLevel al=AssemblyLevel::LEGACY)
virtual void Mult(const Vector &ind, Vector &di_dt) const
Perform the action of the operator: y = k = f(x, t), where k solves the algebraic equation F(x,...
virtual void ProcessNewState(const Vector &x) const
void SetAdaptiveSurfaceFittingScalingFactor(real_t factor)
virtual real_t ComputeScalingFactor(const Vector &x, const Vector &b) const
void SetMinimumDeterminantThreshold(real_t threshold)
virtual void GetSurfaceFittingError(const Vector &x_loc, real_t &err_avg, real_t &err_max) const
real_t surf_fit_scale_factor
void SetTempMemoryType(MemoryType mt)
Set the memory type for temporary memory allocations.
real_t surf_fit_rel_change_threshold
void EnableAdaptiveSurfaceFitting()
real_t MinDetJpr_3D(const FiniteElementSpace *, const Vector &) const
const IntegrationRule & ir
virtual void SetSolver(Solver &solver)
Set the linear solver for inverting the Jacobian.
IntegrationRules * IntegRules
void SetIntegrationRules(IntegrationRules &irules, int order)
Prescribe a set of integration rules; relevant for mixed meshes.
real_t surf_fit_max_threshold
virtual void Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
const IntegrationRule & GetIntegrationRule(const FiniteElement &el) const
real_t surf_fit_err_avg_prvs
void UpdateSurfaceFittingWeight(real_t factor) const
Update surface fitting weight as surf_fit_weight *= factor.
bool update_surf_fit_coeff
real_t MinDetJpr_2D(const FiniteElementSpace *, const Vector &) const
void SetAdaptiveSurfaceFittingRelativeChangeThreshold(real_t threshold)
void SetMaxNumberofIncrementsForAdaptiveFitting(int count)
void SetMinDetPtr(real_t *md_ptr)
TMOPNewtonSolver(const IntegrationRule &irule, int type=0)
bool compute_metric_quantile_flag
real_t min_detJ_threshold
void SetTerminationWithMaxSurfaceFittingError(real_t max_error)
real_t ComputeMinDet(const Vector &x_loc, const FiniteElementSpace &fes) const
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
void GetSurfaceFittingWeight(Array< real_t > &weights) const
Get the surface fitting weight for all the TMOP integrators.
TMOPNewtonSolver(MPI_Comm comm, const IntegrationRule &irule, int type=0)
Base abstract class for first order time dependent operators.
Vector coefficient defined by a vector GridFunction.
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 vis_tmop_metric_p(int order, TMOP_QualityMetric &qm, const TargetConstructor &tc, ParMesh &pmesh, char *title, int position)
MemoryType
Memory types supported by MFEM.
void vel(const Vector &x, real_t t, Vector &u)