20 #ifndef LIBMESH_MESH_SMOOTHER_VSMOOTHER_H 21 #define LIBMESH_MESH_SMOOTHER_VSMOOTHER_H 24 #ifdef LIBMESH_ENABLE_VSMOOTHER 40 class UnstructuredMesh;
74 unsigned miniterBC=5);
80 std::vector<float> * adapt_data,
85 double percent_to_move=1);
93 std::vector<float> * adapt_data,
98 double percent_to_move=1);
132 double smooth(
unsigned int n_iterations);
225 template <
typename T>
244 template <
typename T>
247 Array3D(
unsigned nx,
unsigned ny,
unsigned nz)
264 std::vector<int> & mask,
266 std::vector<int> & mcells,
267 std::vector<int> & edges,
268 std::vector<int> & hnodes);
273 int read_adp(std::vector<double> & afun);
275 double jac3(
double x1,
double y1,
double z1,
276 double x2,
double y2,
double z2,
277 double x3,
double y3,
double z3);
279 double jac2(
double x1,
double y1,
280 double x2,
double y2);
284 const std::vector<double> & K,
290 std::vector<double> & afun,
294 const std::vector<int> & mask,
296 const std::vector<int> & mcells,
297 const std::vector<int> & edges,
298 const std::vector<int> & hnodes,
300 const std::vector<int> & iter,
308 const std::vector<int> & mcells,
314 std::vector<double> & Gamma,
319 const std::vector<int> & mcells,
326 const std::vector<int> & mask,
328 const std::vector<int> & mcells,
334 const std::vector<int> & edges,
335 const std::vector<int> & hnodes,
341 const std::vector<double> & afun);
344 const std::vector<int> & mask,
346 const std::vector<int> & mcells,
357 const std::vector<double> & afun,
363 const std::vector<int> & cell_in,
364 const std::vector<int> & mask,
375 const std::vector<double> & afun,
376 std::vector<double> & Gloc);
378 double avertex(
const std::vector<double> & afun,
379 std::vector<double> & G,
381 const std::vector<int> & cell_in,
388 const std::vector<int> & cell_in,
392 const std::vector<double> & K,
399 const std::vector<double> & g,
407 const std::vector<int> & ia,
408 const std::vector<int> & ja,
409 const std::vector<double> & a,
410 std::vector<double> & x,
411 const std::vector<double> & b,
417 const std::vector<int> & ia,
418 const std::vector<int> & ja,
419 const std::vector<double> & a,
420 const std::vector<double> & u,
421 std::vector<double> & x,
422 const std::vector<double> & b,
423 std::vector<double> & r,
424 std::vector<double> & p,
425 std::vector<double> & z,
431 const std::vector<int> & ia,
432 const std::vector<int> & ja,
433 const std::vector<double> & a,
438 void gener(
char grid[],
int n);
443 #endif // LIBMESH_ENABLE_VSMOOTHER 445 #endif // LIBMESH_MESH_SMOOTHER_VSMOOTHER_H std::string name(const ElemQuality q)
Array3D(unsigned nx, unsigned ny, unsigned nz)
std::vector< std::vector< T > > _data
Array2D(unsigned nx, unsigned ny)
const Array2D< T > & operator[](unsigned i) const
int solver(int n, const std::vector< int > &ia, const std::vector< int > &ja, const std::vector< double > &a, std::vector< double > &x, const std::vector< double > &b, double eps, int maxite, int msglev)
std::map< dof_id_type, std::vector< dof_id_type > > _hanging_nodes
int basisA(Array2D< double > &Q, int nvert, const std::vector< double > &K, const Array2D< double > &H, int me)
void full_smooth(Array2D< double > &R, const std::vector< int > &mask, const Array2D< int > &cells, const std::vector< int > &mcells, const std::vector< int > &edges, const std::vector< int > &hnodes, double w, const std::vector< int > &iter, int me, const Array3D< double > &H, int adp, int gr)
void adp_renew(const Array2D< double > &R, const Array2D< int > &cells, std::vector< double > &afun, int adp)
float adapt_minimum() const
double jac2(double x1, double y1, double x2, double y2)
dof_id_type _n_hanging_edges
double minJ(Array2D< double > &R, const std::vector< int > &mask, const Array2D< int > &cells, const std::vector< int > &mcells, double epsilon, double w, int me, const Array3D< double > &H, double vol, const std::vector< int > &edges, const std::vector< int > &hnodes, int msglev, double &Vmin, double &emax, double &qmin, int adp, const std::vector< double > &afun)
void set_generate_data(bool b)
double vertex(Array3D< double > &W, Array2D< double > &F, const Array2D< double > &R, const std::vector< int > &cell_in, double epsilon, double w, int nvert, const std::vector< double > &K, const Array2D< double > &H, int me, double vol, int f, double &Vmin, int adp, const std::vector< double > &g, double sigma)
std::vector< T > & operator[](unsigned i)
virtual ~VariationalMeshSmoother()
const double _percent_to_move
double minq(const Array2D< double > &R, const Array2D< int > &cells, const std::vector< int > &mcells, int me, const Array3D< double > &H, double &vol, double &Vmin)
const unsigned _miniterBC
int readgr(Array2D< double > &R, std::vector< int > &mask, Array2D< int > &cells, std::vector< int > &mcells, std::vector< int > &edges, std::vector< int > &hnodes)
double minJ_BC(Array2D< double > &R, const std::vector< int > &mask, const Array2D< int > &cells, const std::vector< int > &mcells, double epsilon, double w, int me, const Array3D< double > &H, double vol, int msglev, double &Vmin, double &emax, double &qmin, int adp, const std::vector< double > &afun, int NCN)
const std::vector< T > & operator[](unsigned i) const
double distance_moved() const
double localP(Array3D< double > &W, Array2D< double > &F, Array2D< double > &R, const std::vector< int > &cell_in, const std::vector< int > &mask, double epsilon, double w, int nvert, const Array2D< double > &H, int me, double vol, int f, double &Vmin, double &qmin, int adp, const std::vector< double > &afun, std::vector< double > &Gloc)
Base class for Replicated and Distributed meshes.
std::vector< float > * _adapt_data
int pcg_par_check(int n, const std::vector< int > &ia, const std::vector< int > &ja, const std::vector< double > &a, double eps, int maxite, int msglev)
double jac3(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
int readmetr(std::string name, Array3D< double > &H)
double maxE(Array2D< double > &R, const Array2D< int > &cells, const std::vector< int > &mcells, int me, const Array3D< double > &H, double v, double epsilon, double w, std::vector< double > &Gamma, double &qmin)
int read_adp(std::vector< double > &afun)
void gener(char grid[], int n)
VariationalMeshSmoother(UnstructuredMesh &mesh, double theta=0.5, unsigned miniter=2, unsigned maxiter=5, unsigned miniterBC=5)
int pcg_ic0(int n, const std::vector< int > &ia, const std::vector< int > &ja, const std::vector< double > &a, const std::vector< double > &u, std::vector< double > &x, const std::vector< double > &b, std::vector< double > &r, std::vector< double > &p, std::vector< double > &z, double eps, int maxite, int msglev)
Array2D< T > & operator[](unsigned i)
std::vector< Array2D< T > > _data
double avertex(const std::vector< double > &afun, std::vector< double > &G, const Array2D< double > &R, const std::vector< int > &cell_in, int nvert, int adp)
const UnstructuredMesh * _area_of_interest
int writegr(const Array2D< double > &R)
virtual void smooth() override
void metr_data_gen(std::string grid, std::string metr, int me)
void set_metric(MetricType t)