PRAgMaTIc  master
Public Member Functions | List of all members
MetricField< real_t, dim > Class Template Reference

Constructs metric tensor field which encodes anisotropic edge size information. More...

#include <MetricField.h>

Public Member Functions

 MetricField (Mesh< real_t > &mesh)
 
 ~MetricField ()
 
void generate_mesh_metric (double resolution_scaling_factor)
 
void fit_ellipsoid (int i, real_t *sm)
 
void generate_Steiner_ellipse (double resolution_scaling_factor)
 
void get_metric (real_t *metric)
 
void set_metric (const real_t *metric)
 
void set_metric_full (const real_t *metric)
 
void set_metric (const real_t *metric, int id)
 
void relax_mesh (double omega)
 Update the metric field on the mesh. More...
 
void update_mesh ()
 Update the metric field on the mesh. More...
 
void add_field (const real_t *psi, const real_t target_error, int p_norm=-1)
 
void apply_max_edge_length (real_t max_len)
 
void apply_min_edge_length (real_t min_len)
 
void apply_min_edge_length (const real_t *min_len)
 
void apply_max_aspect_ratio (real_t max_aspect_ratio)
 
void apply_max_nelements (real_t nelements)
 
void apply_min_nelements (real_t nelements)
 
void apply_nelements (real_t nelements)
 
real_t predict_nelements_part ()
 
real_t predict_nelements ()
 

Detailed Description

template<typename real_t, int dim>
class MetricField< real_t, dim >

Constructs metric tensor field which encodes anisotropic edge size information.

Use this class to create a metric tensor field using desired error tolerences and curvature of linear fields subject to a set of constraints. index_t should be set as int32_t for problems with less than 2 billion nodes. For larger meshes int64_t should be used.

Definition at line 73 of file MetricField.h.

Constructor & Destructor Documentation

template<typename real_t, int dim>
MetricField< real_t, dim >::MetricField ( Mesh< real_t > &  mesh)
inline

Default constructor.

Definition at line 77 of file MetricField.h.

template<typename real_t, int dim>
MetricField< real_t, dim >::~MetricField ( )
inline

Default destructor.

Definition at line 129 of file MetricField.h.

Member Function Documentation

template<typename real_t, int dim>
void MetricField< real_t, dim >::add_field ( const real_t *  psi,
const real_t  target_error,
int  p_norm = -1 
)
inline

Add the contribution from the metric field from a new field with a target linear interpolation error.

Parameters
psiis field while curvature is to be considered.
target_erroris the user target error for a given norm.
p_normSet this optional argument to a positive integer to apply the p-norm scaling to the metric, as in Chen, Sun and Xu, Mathematics of Computation, Volume 76, Number 257, January 2007, pp. 179-204.

Definition at line 454 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_max_aspect_ratio ( real_t  max_aspect_ratio)
inline

Apply maximum aspect ratio constraint.

Parameters
max_aspect_ratiomaximum aspect ratio for elements.

Definition at line 622 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_max_edge_length ( real_t  max_len)
inline

Apply maximum edge length constraint.

Parameters
max_lenspecifies the maximum allowed edge length.

Definition at line 537 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_max_nelements ( real_t  nelements)
inline

Apply maximum number of elements constraint.

Parameters
nelementsthe maximum number of elements desired.

Definition at line 634 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_min_edge_length ( real_t  min_len)
inline

Apply minimum edge length constraint.

Parameters
min_lenspecifies the minimum allowed edge length globally.

Definition at line 565 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_min_edge_length ( const real_t *  min_len)
inline

Apply minimum edge length constraint.

Parameters
min_lenspecifies the minimum allowed edge length locally at each vertex.

Definition at line 593 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_min_nelements ( real_t  nelements)
inline

Apply minimum number of elements constraint.

Parameters
nelementsthe minimum number of elements desired.

Definition at line 643 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::apply_nelements ( real_t  nelements)
inline

Apply required number of elements.

Parameters
nelementsis the required number of elements after adapting.

Definition at line 652 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::fit_ellipsoid ( int  i,
real_t *  sm 
)
inline

Definition at line 165 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::generate_mesh_metric ( double  resolution_scaling_factor)
inline

Definition at line 134 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::generate_Steiner_ellipse ( double  resolution_scaling_factor)
inline

Definition at line 231 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::get_metric ( real_t *  metric)
inline

Copy back the metric tensor field.

Parameters
metricis a pointer to the buffer where the metric field can be copied.

Definition at line 279 of file MetricField.h.

template<typename real_t, int dim>
real_t MetricField< real_t, dim >::predict_nelements ( )
inline

Predict the number of elements when mesh satisfies metric tensor field.

Definition at line 756 of file MetricField.h.

template<typename real_t, int dim>
real_t MetricField< real_t, dim >::predict_nelements_part ( )
inline

Predict the number of elements in this partition when mesh satisfies metric tensor field.

Definition at line 667 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::relax_mesh ( double  omega)
inline

Update the metric field on the mesh.

Definition at line 336 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::set_metric ( const real_t *  metric)
inline

Set the metric tensor field. It is assumed that only the top triangle of the tensors are stored.

Parameters
metricis a pointer to the buffer where the metric field is to be copied from.

Definition at line 293 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::set_metric ( const real_t *  metric,
int  id 
)
inline

Set the metric tensor field.

Parameters
metricis a pointer to the buffer where the metric field is to be copied from.
idis the node index of the metric field being set.

Definition at line 328 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::set_metric_full ( const real_t *  metric)
inline

Set the metric tensor field. It is assumed that the full form of the tensors are stored.

Parameters
metricis a pointer to the buffer where the metric field is to be copied from.

Definition at line 305 of file MetricField.h.

template<typename real_t, int dim>
void MetricField< real_t, dim >::update_mesh ( )
inline

Update the metric field on the mesh.

Definition at line 394 of file MetricField.h.


The documentation for this class was generated from the following file: