DataTransferKit - Multiphysics Solution Transfer Services  2.0
Public Member Functions | List of all members
DataTransferKit::EntityLocalMap Class Referenceabstract

Entity forward and reverse local map interface definition. More...

#include <DTK_EntityLocalMap.hpp>

Inheritance diagram for DataTransferKit::EntityLocalMap:
DataTransferKit::BasicGeometryLocalMap DataTransferKit::STKMeshEntityLocalMap

Public Member Functions

 EntityLocalMap ()
 Constructor. More...
 
virtual ~EntityLocalMap ()
 Destructor. More...
 
virtual double measure (const Entity &entity) const =0
 Return the entity measure in the physical frame with respect to the parameteric dimension (volume for a 3D entity, area for 2D, length for 1D, 0 for 0D). More...
 
virtual void centroid (const Entity &entity, const Teuchos::ArrayView< double > &centroid) const =0
 Return the centroid of the entity in the physical frame. More...
 
virtual bool isSafeToMapToReferenceFrame (const Entity &entity, const Teuchos::ArrayView< const double > &physical_point) const
 (Safeguard the reverse map) Perform a safeguard check for mapping a point to the reference space of an entity using the given tolerance. More...
 
virtual bool mapToReferenceFrame (const Entity &entity, const Teuchos::ArrayView< const double > &physical_point, const Teuchos::ArrayView< double > &reference_point) const =0
 (Reverse Map) Map a point to the reference space of an entity. Return the parameterized point. More...
 
virtual bool checkPointInclusion (const Entity &entity, const Teuchos::ArrayView< const double > &reference_point) const =0
 Determine if a reference point is in the parameterized space of an entity. More...
 
virtual void mapToPhysicalFrame (const Entity &entity, const Teuchos::ArrayView< const double > &reference_point, const Teuchos::ArrayView< double > &physical_point) const =0
 (Forward Map) Map a reference point to the physical space of an entity. More...
 
virtual void normalAtReferencePoint (const Entity &entity, const Entity &parent_entity, const Teuchos::ArrayView< const double > &reference_point, const Teuchos::ArrayView< double > &normal) const
 Compute the normal on a face (3D) or edge (2D) at a given reference point. A default implementation is provided using a finite difference scheme. More...
 

Detailed Description

Entity forward and reverse local map interface definition.

An EntityLocalMap provides an interface for accessing forward and reverse maps for an entity's local coordinates as well as related convenience functions.

Definition at line 63 of file DTK_EntityLocalMap.hpp.

Constructor & Destructor Documentation

DataTransferKit::EntityLocalMap::EntityLocalMap ( )

Constructor.

Definition at line 51 of file DTK_EntityLocalMap.cpp.

DataTransferKit::EntityLocalMap::~EntityLocalMap ( )
virtual

Destructor.

Definition at line 55 of file DTK_EntityLocalMap.cpp.

Member Function Documentation

virtual double DataTransferKit::EntityLocalMap::measure ( const Entity entity) const
pure virtual

Return the entity measure in the physical frame with respect to the parameteric dimension (volume for a 3D entity, area for 2D, length for 1D, 0 for 0D).

Parameters
entityCompute the measure for this entity.
Returns
The measure of the entity.

Implemented in DataTransferKit::STKMeshEntityLocalMap, and DataTransferKit::BasicGeometryLocalMap.

virtual void DataTransferKit::EntityLocalMap::centroid ( const Entity entity,
const Teuchos::ArrayView< double > &  centroid 
) const
pure virtual

Return the centroid of the entity in the physical frame.

Parameters
centroidA view of the centroid coordinates. This view will be allocated. Assign a view of your centroid to this view.

Implemented in DataTransferKit::STKMeshEntityLocalMap, and DataTransferKit::BasicGeometryLocalMap.

bool DataTransferKit::EntityLocalMap::isSafeToMapToReferenceFrame ( const Entity entity,
const Teuchos::ArrayView< const double > &  physical_point 
) const
virtual

(Safeguard the reverse map) Perform a safeguard check for mapping a point to the reference space of an entity using the given tolerance.

Mapping from physical domain to a reference one requires solving a nonlinear problem. It has been observed (see [1], sections VI.2.1-VI.2.3) that this nonlinear method may not converge for some points that should not have been considered in the first place as they are too far. The method tries to address the issue by providing a way to ignore those points early in the process. The default implementation checks if the physical point is in the bounding box of the entity.

It is recommended that a user calls isSafeToMapToReferenceFrame() before calling mapToReferenceFrame(). The tolerance is provided by a specific implementation of the interface.

[1] Lebrun-Grandie, Damien Thomas (2014). Contact Detection and Constraints Enforcement for the Simulation of Pellet/Clad Thermo-Mechanical Contact in Nuclear Fuel Rods. Doctoral dissertation, Texas A & M University

Parameters
entityPerfrom the mapping for this entity.
parametersParameters to be used for the safeguard check.
physical_pointA view into an array of size physicalDimension() containing the coordinates of the point to map.
Returns
Return true if it is safe to map to the reference frame.

Reimplemented in DataTransferKit::STKMeshEntityLocalMap.

Definition at line 61 of file DTK_EntityLocalMap.cpp.

virtual bool DataTransferKit::EntityLocalMap::mapToReferenceFrame ( const Entity entity,
const Teuchos::ArrayView< const double > &  physical_point,
const Teuchos::ArrayView< double > &  reference_point 
) const
pure virtual

(Reverse Map) Map a point to the reference space of an entity. Return the parameterized point.

Parameters
entityPerfrom the mapping for this entity.
parametersParameters to be used for the mapping procedure.
physical_pointA view into an array of size physicalDimension() containing the coordinates of the point to map.
reference_pointA view into an array of size physicalDimension() to write the reference coordinates of the mapped point.
Returns
Return true if the map to reference frame succeeded.

Implemented in DataTransferKit::STKMeshEntityLocalMap, and DataTransferKit::BasicGeometryLocalMap.

virtual bool DataTransferKit::EntityLocalMap::checkPointInclusion ( const Entity entity,
const Teuchos::ArrayView< const double > &  reference_point 
) const
pure virtual

Determine if a reference point is in the parameterized space of an entity.

Parameters
entityPerfrom the mapping for this entity.
parametersParameters to be used for the point inclusion check.
reference_pointA view into an array of size physicalDimension() containing the reference coordinates of the mapped point.
Returns
True if the point is in the reference space, false if not.

Implemented in DataTransferKit::STKMeshEntityLocalMap, and DataTransferKit::BasicGeometryLocalMap.

virtual void DataTransferKit::EntityLocalMap::mapToPhysicalFrame ( const Entity entity,
const Teuchos::ArrayView< const double > &  reference_point,
const Teuchos::ArrayView< double > &  physical_point 
) const
pure virtual

(Forward Map) Map a reference point to the physical space of an entity.

Parameters
entityPerfrom the mapping for this entity.
reference_pointA view into an array of size physicalDimension() containing the reference coordinates of the mapped point.
physical_pointA view into an array of size physicalDimension() to write the coordinates of physical point.

Implemented in DataTransferKit::STKMeshEntityLocalMap, and DataTransferKit::BasicGeometryLocalMap.

void DataTransferKit::EntityLocalMap::normalAtReferencePoint ( const Entity entity,
const Entity parent_entity,
const Teuchos::ArrayView< const double > &  reference_point,
const Teuchos::ArrayView< double > &  normal 
) const
virtual

Compute the normal on a face (3D) or edge (2D) at a given reference point. A default implementation is provided using a finite difference scheme.

Parameters
entityCompute the normal for this entity.
parent_entityThe adjacent parent entity used to determine which direction is outward. The parent entity should be of a higher topological dimension than the entity and be adjacent to the entity.
reference_pointCompute the normal at this reference point.
normalA view into an array of size physicalDimension() to write the normal.
Exceptions
DataTransferKitExceptionThe function throws if a normal cannot be calculated

Reimplemented in DataTransferKit::STKMeshEntityLocalMap.

Definition at line 97 of file DTK_EntityLocalMap.cpp.


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