[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
PHiLiP::GridRefinement::ElementAnisotropic< dim, real > Class Template Reference

Anisotropic element class. More...

#include <field.h>

Inheritance diagram for PHiLiP::GridRefinement::ElementAnisotropic< dim, real >:
Collaboration diagram for PHiLiP::GridRefinement::ElementAnisotropic< dim, real >:

Public Member Functions

 ElementAnisotropic ()
 Constructor, sets default element definition. More...
 
real & scale () override
 Reference for element size. More...
 
void set_scale (const real val) override
 Set the scale for the element.
 
real get_scale () const override
 Get the scale for the element.
 
void set_anisotropic_ratio (const std::array< real, dim > &ratio) override
 Set the anisotropic ratio for each reference axis. More...
 
std::array< real, dim > get_anisotropic_ratio () override
 Get the anisotropic ratio of each reference axis as an array. More...
 
real get_anisotropic_ratio (const unsigned int j) override
 Get the anisotropic ratio corresponding to the \(j^{th}\) reference axis. More...
 
void set_unit_axis (const std::array< dealii::Tensor< 1, dim, real >, dim > &unit_axis) override
 setting the (unit) axis direction
 
std::array< dealii::Tensor< 1, dim, real >, dim > get_unit_axis () override
 getting the (unit) axis direction (array)
 
dealii::Tensor< 1, dim, real > get_unit_axis (const unsigned int j) override
 getting the (unit) axis direction
 
void set_axis (const std::array< dealii::Tensor< 1, dim, real >, dim > &axis) override
 setting frame axis j (scaled) at index
 
std::array< dealii::Tensor< 1, dim, real >, dim > get_axis () override
 getting frame axis j (scaled) at index (array)
 
dealii::Tensor< 1, dim, real > get_axis (const unsigned int j) override
 getting frame axis j (scaled) at index
 
dealii::Tensor< 2, dim, real > get_metric () override
 get metric value at index
 
dealii::Tensor< 2, dim, real > get_inverse_metric () override
 get inverse metric value
 
void set_anisotropy (const std::array< real, dim > &derivative_value, const std::array< dealii::Tensor< 1, dim, real >, dim > &derivative_direction, const unsigned int order) override
 Set anisotropy from reconstructed directional derivatives. More...
 
void apply_anisotropic_limit (const real anisotropic_ratio_min, const real anisotropic_ratio_max)
 Limits the anisotropic ratios to a given bandwidth. More...
 
- Public Member Functions inherited from PHiLiP::GridRefinement::Element< dim, real >
virtual ~Element ()=default
 Destructor.
 
template<typename DoFCellAccessorType >
void set_cell (const DoFCellAccessorType &cell)
 Set the Element based on the input cell (from current mesh) More...
 

Protected Member Functions

void set_cell_internal (const typename Element< dim, real >::VertexList &vertices) override
 Set element to match geometry of input vertex set. More...
 
- Protected Member Functions inherited from PHiLiP::GridRefinement::Element< dim, real >
ChordList get_chord_list (const VertexList &vertices)
 Get the chord list from an input set of vertices.
 
virtual void set_cell_internal (const VertexList &vertices)=0
 Set element to match geometry of input vertex set. More...
 

Private Member Functions

void clear ()
 resets the element
 
void correct_element ()
 Corrects internal values to ensure consistent treatement. More...
 
void correct_unit_axis ()
 renormalize the unit_axis More...
 
void correct_anisotropic_ratio ()
 Correct the anisotropic ratio values. More...
 
void sort_anisotropic_ratio ()
 Sorts the anisotropic ratio values (and corresponding unit axis) in ascending order.
 

Private Attributes

real m_scale
 element size based on \((Volume)^{1/dim}\)
 
std::array< real, dim > m_anisotropic_ratio
 Anisotropic axis ratios (relative to element scale)
 
std::array< dealii::Tensor< 1, dim, real >, dim > m_unit_axis
 axis unit vector directions
 

Friends

std::ostream & operator<< (std::ostream &os, const ElementAnisotropic< dim, real > &element)
 Write properties of element to ostream. More...
 

Additional Inherited Members

- Public Types inherited from PHiLiP::GridRefinement::Element< dim, real >
using VertexList = std::array< dealii::Tensor< 1, dim, real >, dealii::GeometryInfo< dim >::vertices_per_cell >
 Type alias for array of vertex coordinates for element.
 
using ChordList = std::array< dealii::Tensor< 1, dim, real >, dim >
 Type alias for array of chord veectors (face center to face center) in Deal.II ordering.
 

Detailed Description

template<int dim, typename real>
class PHiLiP::GridRefinement::ElementAnisotropic< dim, real >

Anisotropic element class.

Specialization of the element type for the anisotropic remeshing case. Stores decomposed frame field axes (size, orientation and anisotropy). A collection of elements is contained in the corresponding Field class.

Definition at line 287 of file field.h.

Constructor & Destructor Documentation

◆ ElementAnisotropic()

template<int dim, typename real >
PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::ElementAnisotropic ( )

Constructor, sets default element definition.

Sets the scale to 0 (non-existant) and axes to the unit reference coordinate axes.

Definition at line 239 of file field.cpp.

Member Function Documentation

◆ apply_anisotropic_limit()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::apply_anisotropic_limit ( const real  anisotropic_ratio_min,
const real  anisotropic_ratio_max 
)
virtual

Limits the anisotropic ratios to a given bandwidth.

First finds ratio above max, redistributes length change to maintain constant volume and scale. Then the process is repeated with a lower bound. Note: does nothing in the isotropic case.

Implements PHiLiP::GridRefinement::Element< dim, real >.

Definition at line 533 of file field.cpp.

◆ correct_anisotropic_ratio()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::correct_anisotropic_ratio ( )
private

Correct the anisotropic ratio values.

Guarantees that their product is equal to 1

Definition at line 411 of file field.cpp.

◆ correct_element()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::correct_element ( )
private

Corrects internal values to ensure consistent treatement.

Element size, direction unit vectors and anisotropic ratios are renormalized based on expected definitions.

Definition at line 391 of file field.cpp.

◆ correct_unit_axis()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::correct_unit_axis ( )
private

renormalize the unit_axis

Uses factoring and rescaling non-unit length into anisotropic ratio. correct_anisotropic_ratio() should be called immediately afterward.

Definition at line 398 of file field.cpp.

◆ get_anisotropic_ratio() [1/2]

template<int dim, typename real >
std::array< real, dim > PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::get_anisotropic_ratio ( )
overridevirtual

Get the anisotropic ratio of each reference axis as an array.

Note: equals 1 for each axis in isotropic case.

Implements PHiLiP::GridRefinement::Element< dim, real >.

Definition at line 281 of file field.cpp.

◆ get_anisotropic_ratio() [2/2]

template<int dim, typename real >
real PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::get_anisotropic_ratio ( const unsigned int  j)
overridevirtual

Get the anisotropic ratio corresponding to the \(j^{th}\) reference axis.

Note: equals 1 for each axis in isotropic case.

Implements PHiLiP::GridRefinement::Element< dim, real >.

Definition at line 274 of file field.cpp.

◆ scale()

template<int dim, typename real >
real & PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::scale ( )
overridevirtual

Reference for element size.

Allows direct read/write of scale of mean element axis. Measure of element (length, area, volume) will be \(scale^{dim}\)

Implements PHiLiP::GridRefinement::Element< dim, real >.

Definition at line 246 of file field.cpp.

◆ set_anisotropic_ratio()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::set_anisotropic_ratio ( const std::array< real, dim > &  ratio)
overridevirtual

Set the anisotropic ratio for each reference axis.

Requires array of order matching axis definition. Each reference axis will have length \(l = \alpha * scale\). Note: does nothing in the isotropic case.

Implements PHiLiP::GridRefinement::Element< dim, real >.

Definition at line 265 of file field.cpp.

◆ set_anisotropy()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::set_anisotropy ( const std::array< real, dim > &  derivative_value,
const std::array< dealii::Tensor< 1, dim, real >, dim > &  derivative_direction,
const unsigned int  order 
)
overridevirtual

Set anisotropy from reconstructed directional derivatives.

Based on Dolejsi's method for simplices, uses values obtained from reconstructed polynomial on neighbouring cell patch.

Implements PHiLiP::GridRefinement::Element< dim, real >.

Definition at line 481 of file field.cpp.

◆ set_cell_internal()

template<int dim, typename real >
void PHiLiP::GridRefinement::ElementAnisotropic< dim, real >::set_cell_internal ( const typename Element< dim, real >::VertexList vertices)
overrideprotected

Set element to match geometry of input vertex set.

Vertices describe the tensor product element in Deal.II ordering. Internal function used in handling of set_cell().

Definition at line 463 of file field.cpp.

Friends And Related Function Documentation

◆ operator<<

template<int dim, typename real>
std::ostream& operator<< ( std::ostream &  os,
const ElementAnisotropic< dim, real > &  element 
)
friend

Write properties of element to ostream.

Used in Field.serialize(os) to provide summary of field.

Definition at line 386 of file field.h.


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