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) { }
234 else { MFEM_ABORT(
"Invalid type"); }
247 else { MFEM_ABORT(
"Invalid type"); }
253 const TargetConstructor &tc, Mesh &pmesh,
254 char *title,
int position);
257 const TargetConstructor &tc, ParMesh &pmesh,
258 char *title,
int position);
Abstract class for all finite elements.
VectorGridFunctionCoefficient u_coeff
void vis_tmop_metric_p(int order, TMOP_QualityMetric &qm, const TargetConstructor &tc, ParMesh &pmesh, char *title, int position)
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.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
void UpdateDiscreteTC(const TMOP_Integrator &ti, const Vector &x_new) const
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
double surf_fit_max_threshold
double MinDetJpr_2D(const FiniteElementSpace *, const Vector &) const
Base abstract class for first order time dependent operators.
Container class for integration rules.
const IntegrationRule & GetIntegrationRule(const FiniteElement &el) 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)
virtual void ComputeAtNewPosition(const Vector &new_nodes, Vector &new_field)
void SetTerminationWithMaxSurfaceFittingError(double max_error)
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
void GetSurfaceFittingWeight(Array< double > &weights) const
Get the surface fitting weight for all the TMOP integrators.
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...
Performs a single remap advection step in serial.
void UpdateSurfaceFittingWeight(double factor) const
Update surface fitting weight as surf_fit_weight *= factor.
void EnableAdaptiveSurfaceFitting()
TMOPNewtonSolver(const IntegrationRule &irule, int type=0)
virtual void Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
IntegrationRules * IntegRules
virtual void ProcessNewState(const Vector &x) const
The classical explicit forth-order Runge-Kutta method, RK4.
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...
virtual void Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
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
virtual void SetSolver(Solver &solver)
Set the linear solver for inverting the Jacobian.
virtual void ComputeAtNewPosition(const Vector &new_nodes, Vector &new_field)
void SetMemoryType(MemoryType mt)
double MinDetJpr_3D(const FiniteElementSpace *, const Vector &) const
void vel(const Vector &x, double t, Vector &u)
virtual void SetInitialField(const Vector &init_nodes, const Vector &init_field)
VectorGridFunctionCoefficient u_coeff
virtual void GetSurfaceFittingError(double &err_avg, double &err_max) const
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.
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 Mult(const Vector &b, Vector &x) const
Solve the nonlinear system with right-hand side b.
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...
virtual double ComputeScalingFactor(const Vector &x, const Vector &b) const
Vector coefficient defined by a vector GridFunction.
double ComputeMinDet(const Vector &x_loc, const FiniteElementSpace &fes) const
virtual void SetSolver(Solver &solver)
Set the linear solver for inverting the Jacobian.
virtual void SetInitialField(const Vector &init_nodes, const Vector &init_field)
A TMOP integrator class based on any given TMOP_QualityMetric and TargetConstructor.