To adapt mesh in function of given solution. More...
#include <MeshAdapt.h>
Public Member Functions | |
| MeshAdapt () | |
| Default constructor. | |
| MeshAdapt (Mesh &ms) | |
| Constructor using initial mesh. | |
| MeshAdapt (Domain &dom) | |
| Constructor using a reference to class Domain. | |
| ~MeshAdapt () | |
| Destructor. | |
| Domain & | getDomain () const |
| Get reference to Domain instance. | |
| Mesh & | getMesh () const |
| Get reference to current mesh. | |
| void | set (Domain &dom) |
| Set reference to Domain instance. | |
| void | set (Mesh &ms) |
| Set reference to Mesh instance. | |
| void | setSolution (const Vect< real_t > &u) |
| Define label of node. | |
| void | setJacobi (int n) |
| Set number of Jacobi iterations for smoothing. | |
| void | setSmooth (int n) |
| Set number of smoothing iterations. | |
| void | AbsoluteError () |
| Metric is constructed with absolute error. | |
| void | RelativeError () |
| Metric is constructed with relative error. | |
| void | setError (real_t err) |
| Set error threshold for adaption. | |
| void | setHMin (real_t h) |
| Set minimal mesh size. | |
| void | setHMax (real_t h) |
| Set maximal mesh size. | |
| void | setHMinAnisotropy (real_t h) |
| Set minimal mesh size and set anisotropy. | |
| void | setRelaxation (real_t omega) |
| Set relaxation parameter for smoothing. | |
| void | setAnisotropic () |
| Set that adapted mesh construction is anisotropic. | |
| void | MaxAnisotropy (real_t a) |
| Set maximum ratio of anisotropy. | |
| void | setMaxSubdiv (real_t s) |
| Change the metric such that the maximal subdivision of a background's edge is bounded by the given number (always limited by 10) | |
| void | setMaxNbVertices (size_t n) |
| Set maximum number of vertices. | |
| void | setRatio (real_t r) |
| Set ratio for a smoothing of the metric. | |
| void | setNoScaling () |
| Do not scale solution before metric computation. | |
| void | setNoKeep () |
| Do not keep old vertices. | |
| void | setHessian () |
| set computation of the Hessian | |
| void | setOutputMesh (string file) |
| Create mesh output file. | |
| void | setGeoFile (string file) |
| Set Geometry file. | |
| void | setGeoError (real_t e) |
| Set error on geometry. | |
| void | setBackgroundMesh (string bgm) |
| Set background mesh. | |
| void | SplitBoundaryEdges () |
| Split edges with two vertices on boundary. | |
| void | CreateMetricFile (string mf) |
| Create a metric file. | |
| void | setMetricFile (string mf) |
| Set Metric file. | |
| void | getSolutionMbb (string mbb) |
| Set solution defined on background mesh for metric construction. | |
| void | getSolutionMBB (string mBB) |
| Set solution defined on background mesh for metric construction. | |
| void | getSolutionbb (string rbb) |
Read solution defined on the background mesh in bb file. | |
| void | getSolutionBB (string rBB) |
Read solution defined on the background mesh in BB file. | |
| void | getSolution (Vect< real_t > &u, int is=1) |
| Get the interpolated solution on the new mesh. | |
| void | getInterpolatedSolutionbb () |
Write the file of interpolation of the solutions in bb file. | |
| void | getInterpolatedSolutionBB () |
Write the file of interpolation of the solutions in BB file. | |
| void | setTheta (real_t theta) |
| Set angular limit for a corner (in degrees) | |
| void | Split () |
| Split triangles into 4 triangles. | |
| void | saveMbb (string file, const Vect< real_t > &u) |
| Save a solution in metric file. | |
| int | run () |
| Run adaptation process. | |
| int | run (const Vect< real_t > &u) |
| Run adaptation process using a solution vector. | |
| int | run (const Vect< real_t > &u, Vect< real_t > &v) |
| Run adaptation process using a solution vector and interpolates solution on the adapted mesh. | |
To adapt mesh in function of given solution.
Class MeshAdapt enables modifying mesh according to a solution vector defining at nodes. It concerns 2-D triangular meshes only.
| void getSolution | ( | Vect< real_t > & | u, |
| int | is = 1 ) |
Get the interpolated solution on the new mesh.
The solution must have been saved on an output bb file
| [out] | u | Vector that contains on output the obtained solutions. This vector is resized before being initialized |
| [in] | is | [Default: 1] |
| void getSolutionBB | ( | string | rBB | ) |
Read solution defined on the background mesh in BB file.
Solution is interpolated on created mesh
| void getSolutionbb | ( | string | rbb | ) |
Read solution defined on the background mesh in bb file.
Solution is interpolated on created mesh
| int run | ( | ) |
Run adaptation process.
| int run | ( | const Vect< real_t > & | u | ) |
Run adaptation process using a solution vector.
| [in] | u | Solution vector defined on the input mesh |
Run adaptation process using a solution vector and interpolates solution on the adapted mesh.
| [in] | u | Solution vector defined on the input mesh |
| [in] | v | Solution vector defined on the (adapted) output mesh |
| void saveMbb | ( | string | file, |
| const Vect< real_t > & | u ) |
Save a solution in metric file.
| [in] | file | File name where the metric is stored |
| [in] | u | Solution vector to store |
| void setMaxNbVertices | ( | size_t | n | ) |
Set maximum number of vertices.
Default value is 500000
| void setNoKeep | ( | ) |
Do not keep old vertices.
By default, old vertices are kept
| void setNoScaling | ( | ) |
Do not scale solution before metric computation.
By default, solution is scaled (between 0 and 1)
| void setRatio | ( | real_t | r | ) |
Set ratio for a smoothing of the metric.
| [in] | r | Ratio value. |
r is 0 then no smoothing is performed, if r lies in [1.1,10] then the smoothing changes the metric such that the largest geometrical progression (speed of mesh size variation in mesh is bounded by r) (by default no smoothing) | void setRelaxation | ( | real_t | omega | ) |
Set relaxation parameter for smoothing.
Default value for relaxation parameter is 1.8
| void setTheta | ( | real_t | theta | ) |
Set angular limit for a corner (in degrees)
The angle is defined from 2 normals of 2 consecutive edges