hexed 0.4.0
 
Loading...
Searching...
No Matches
hexed::Deformed_element Class Reference

Represents an Element which is not a perfect axis-aligned square/cube. More...

#include <Deformed_element.hpp>

Inheritance diagram for hexed::Deformed_element:
hexed::Element hexed::Kernel_element hexed::Mortal hexed::mutual::Multiple< void, void > hexed::mutual::Base< void, void >

Public Member Functions

 Deformed_element (Storage_params, Tree &, int aniso_ref_level=0)
 
virtual bool get_is_deformed ()
 for determining whether a pointer is deformed
 
virtual void set_jacobian (const Basis &basis)
 sets the Jacobian based on the current vertex and face node locations
 
double * reference_level_normals () override
 
double * jacobian_determinant () override
 Jacobian determinant of reference -> physical coordinate transform.
 
double jacobian (int i_dim, int j_dim, int i_qpoint) const override
 Compute the Jacobian matrix.
 
double jacobian_determinant (int i_qpoint) const override
 determinant of jacobian
 
bool deformed () const override
 whether this element is deformed
 
- Public Member Functions inherited from hexed::Element
 Element (Storage_params, Tree &tree, int aniso_ref_level=0)
 
 Element (const Element &)=delete
 
Elementoperator= (const Element &)=delete
 
bool is_extruded ()
 
Storage_params storage_params () const
 
Array< double > position (const Basis &) const
 
Array< double > face_position (const Basis &) const
 
double nominal_size () const
 
double nominal_shape (int i_dim) const override
 nominal edge length of the element along the i_dimth dimension before any vertex motion
 
double nominal_volume () const
 
int refinement_level ()
 
int aniso_ref_level ()
 
int & desired_refinement (int i_dim)
 
int desired_refinement (int i_dim) const
 
Array< int > refinement_floor ()
 
Array< Intnominal_position ()
 
double wall_distance () const
 The distance from the farthest vertex to the wall.
 
int wall_dimension ()
 
int boundary_face ()
 
bool has_wall ()
 
bool is_sharp (int i_dim)
 
double * stage (int i_stage)
 Pointer to state data for i_stageth time integration stage.
 
Array< double > flow_state ()
 layout: [i_var][i_qpoint]
 
Array< double > numeric_state ()
 layout: [i_var][i_qpoint]
 
double * advection_state ()
 
double * time_step_scale () override
 pointer to scaling factor for local time step.
 
double * bulk_av_coef ()
 layout: [i_qpoint]
 
double * laplacian_av_coef ()
 layout: [i_qpoint]
 
double * art_visc_forcing ()
 
int mask () const override
 returns whether the element is included in the masked mesh.
 
Array< double > spectral_uncert ()
 layout: [i_dim]
 
Array< double > mean_shape (const Basis &) const
 Effective element dimensions accounting for deformation.
 
double & vertex_time_step_scale (int i_vertex) override
 Time step scale at the vertices. TSS in the interior is set by interpolating this.
 
double & vertex_elwise_av (int i_vertex)
 
double & vertex_fix_admis_coef (int i_vertex)
 
void set_face (int i_face, double *data)
 
bool is_connected (int i_face)
 
Faceface (int i_face)
 
void create_shape (next::Mesh_blocks &, int boundary_face=next::Mesh_blocks::no_face)
 
void create_fake (next::Mesh_blocks &)
 
bool shared_fake () const
 
void split_shape (Element &split_from, double at, int from_face)
 
void glue_shape (std::shared_ptr< next::Element_shape >, std::array< std::vector< double >, 2 > corners)
 
void glue_shape (Element &glue_to, std::array< std::vector< double >, 2 > corners)
 
void destroy_shape ()
 
void destroy_fake ()
 
next::Element_shapeshape ()
 
const next::Element_shapeshape () const
 
next::Element_shapefake_shape ()
 
bool has_shape () const
 
next::Element_shapeactive_shape ()
 
void remember_pos ()
 
double * state () override
 pointer to the data where the state variables are stored
 
double * residual_cache () override
 
double * face (int i_face, bool is_ldg) override
 where the extrapolated face data is stored
 
bool deformed () const override
 whether this element is deformed
 
double * reference_level_normals () override
 
double * jacobian_determinant () override
 Jacobian determinant of reference -> physical coordinate transform.
 
double * kernel_face_normal (int i_face) override
 where the extrapolated face area-weighted normal vectors are stored
 
double * debug_variables () override
 Pointer to any debug variables that can be populated by the kernels to visualize arbitrary quantities.
 
double & uncert () override
 place to store some uncertainty metric
 
- Public Member Functions inherited from hexed::mutual::Multiple< void, void >
 Multiple (const Multiple &)=delete
 
 Multiple (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
Multipleoperator= (const Multiple &)=delete
 
Multipleoperator= (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
next::Sequence< Base< void, void > & > partners ()
 provides access to the list of partners
 
next::Sequence< const Base< void, void > & > partners () const
 provides access to the list of partners
 
- Public Member Functions inherited from hexed::mutual::Base< void, void >
virtual void * _mine ()
 
virtual const void * _mine () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Public Attributes

bool degenerate = 0
 
- Public Attributes inherited from hexed::Element
std::array< int, 6 > face_record
 for algorithms to book-keep information related to faces
 
double uncertainty = 0
 Pointer to state data at faces. Must be populated by user.
 
Reciprocal_ptr< Element, Treetree
 Tree this element was created from
 
bool unrefinement_locked = false
 if this is set to true, Mesh_interface::update() won't unrefine it
 
bool snapping_problem = false
 if true, this element has a face on the surface which was not properly snapped
 
bool needs_snapping = true
 once any faces of this element have been snapped to the surface, set this to false
 
const Mat origin
 origin which integer coordinates are relative to
 
double residual
 
double flux_uncert
 
Lock lock
 for any tasks where multiple threads might access an element simultaneously
 
bool has_shock
 
bool spread_shock
 
- Public Attributes inherited from hexed::Kernel_element
int record = 0
 for algorithms to book-keep general information
 
double ts_ratio_diffusion = 0
 
double ts_ratio_decay = 0
 

Static Public Attributes

static constexpr bool is_deformed = true
 
- Static Public Attributes inherited from hexed::Element
static constexpr bool is_deformed = false
 is this Element subclass deformed?
 

Additional Inherited Members

- Protected Member Functions inherited from hexed::Element
 Element (Storage_params, Tree &, bool mobile_vertices, int aniso_r_level, bool is_def)
 
Mat< 3 > _compute_pos () const
 
- Protected Member Functions inherited from hexed::mutual::Base< void, void >
void _connect (Base< void, void > &that)
 may be overridden by derived classes to provide partners to data of some arbitrary type T
 
void _disconnect (Base< void, void > &that)
 mutually disconnects this and that by calling both of their _unset() member functions
 
- Static Protected Member Functions inherited from hexed::mutual::Base< void, void >
static void * _yours (Base< void, void > &that)
 Accesses the _mine() of that
 
static const void * _yours (const Base< void, void > &that)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
- Protected Attributes inherited from hexed::Element
Storage_params params
 
int n_dim
 
int _aniso_r_level
 
std::unique_ptr< next::Element_shape_shape
 
- Protected Attributes inherited from hexed::mutual::Base< void, void >
Lock _lock
 

Detailed Description

Represents an Element which is not a perfect axis-aligned square/cube.

Note
Jacobian matrix is nontrivial.

Member Function Documentation

◆ deformed()

bool hexed::Deformed_element::deformed ( ) const
overridevirtual

whether this element is deformed

Implements hexed::Kernel_element.

◆ get_is_deformed()

virtual bool hexed::Deformed_element::get_is_deformed ( )
inlinevirtual

for determining whether a pointer is deformed

Reimplemented from hexed::Element.

◆ jacobian()

double hexed::Deformed_element::jacobian ( int i_dim,
int j_dim,
int i_qpoint ) const
overridevirtual

Compute the Jacobian matrix.

I.e., derivative of i_dimth physical coordinate wrt j_dimth reference coordinate. Trivial for this class, may be non-trivial for derived (see Deformed_element). For convenience, not performance. For high-performance, use double* Deformed_element::jacobian()

Reimplemented from hexed::Element.

◆ jacobian_determinant() [1/2]

double * hexed::Deformed_element::jacobian_determinant ( )
overridevirtual

Jacobian determinant of reference -> physical coordinate transform.

for Cartesian elements, returns nullptr

Implements hexed::Kernel_element.

◆ jacobian_determinant() [2/2]

double hexed::Deformed_element::jacobian_determinant ( int i_qpoint) const
overridevirtual

determinant of jacobian

Reimplemented from hexed::Element.

◆ reference_level_normals()

double * hexed::Deformed_element::reference_level_normals ( )
overridevirtual

the j_dimth component (in physical space) of the normal vector of the level surface of the i_dimth reference coordinate which passes through the i_qpointth quadrature point. the magnitude of the normal vector is weighted by the surface area in physical space. equivalent definition (note i_dim, j_dim transposed):

\[ J^{-1}_{j_{dim}, i_{dim}} |J| \]

where is jacobian of transformation from reference to physical coordinates at i_qpointth quadrature point. For Cartesian elements, returns nullptr.

layout: [i_dim][j_dim][i_qpoint]

Implements hexed::Kernel_element.

◆ set_jacobian()

void hexed::Deformed_element::set_jacobian ( const Basis & basis)
virtual

sets the Jacobian based on the current vertex and face node locations

Reimplemented from hexed::Element.


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