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