OGS
|
Class Mesh2MeshPropertyInterpolation transfers properties of mesh elements of a (source) mesh to mesh elements of another (destination) mesh deploying weighted interpolation. The two meshes must have the same dimension.
Definition at line 34 of file Mesh2MeshPropertyInterpolation.h.
#include <Mesh2MeshPropertyInterpolation.h>
Public Member Functions | |
Mesh2MeshPropertyInterpolation (MeshLib::Mesh const &src_mesh, std::string const &property_name) | |
bool | setPropertiesForMesh (MeshLib::Mesh &dest_mesh) const |
Private Member Functions | |
void | interpolatePropertiesForMesh (MeshLib::Mesh const &dest_mesh, MeshLib::PropertyVector< double > &dest_properties) const |
void | interpolateElementPropertiesToNodeProperties (std::vector< double > &interpolated_properties) const |
Private Attributes | |
MeshLib::Mesh const & | _src_mesh |
std::string const & | _property_name |
MeshToolsLib::Mesh2MeshPropertyInterpolation::Mesh2MeshPropertyInterpolation | ( | MeshLib::Mesh const & | src_mesh, |
std::string const & | property_name ) |
Constructor taking the source or input mesh and properties.
src_mesh | the mesh the given property information is assigned to. |
property_name | is the name of a PropertyVector in the source_mesh |
Definition at line 30 of file Mesh2MeshPropertyInterpolation.cpp.
|
private |
Method interpolates the element wise given properties to the nodes of the element
interpolated_properties | the vector must have the same number of entries as the source mesh has number of nodes, the content of the particular entries will be overwritten |
Definition at line 152 of file Mesh2MeshPropertyInterpolation.cpp.
References _property_name, _src_mesh, MeshLib::Properties::existsPropertyVector(), MeshLib::Mesh::getElementsConnectedToNode(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), and WARN().
Referenced by interpolatePropertiesForMesh().
|
private |
dest_mesh | |
dest_properties |
Definition at line 88 of file Mesh2MeshPropertyInterpolation.cpp.
References _src_mesh, GeoLib::AABB::containsPointXY(), MeshLib::Mesh::getElements(), MeshLib::Element::getGeomType(), GeoLib::AABB::getMaxPoint(), GeoLib::AABB::getMinPoint(), MeshLib::Element::getNodes(), MeshLib::Mesh::getNodes(), MeshLib::Element::getNumberOfBaseNodes(), MeshLib::Mesh::getNumberOfNodes(), GeoLib::Grid< POINT >::getPntVecsOfGridCellsIntersectingCuboid(), interpolateElementPropertiesToNodeProperties(), MeshLib::isPointInElementXY(), MeshLib::LINE, and OGS_FATAL.
Referenced by setPropertiesForMesh().
bool MeshToolsLib::Mesh2MeshPropertyInterpolation::setPropertiesForMesh | ( | MeshLib::Mesh & | dest_mesh | ) | const |
Calculates entries for the property vector and sets appropriate indices in the mesh elements.
dest_mesh | the mesh the property information will be calculated and set via weighted interpolation |
Definition at line 36 of file Mesh2MeshPropertyInterpolation.cpp.
References _property_name, _src_mesh, MeshLib::Cell, MeshLib::Properties::createNewPropertyVector(), ERR(), MeshLib::Properties::existsPropertyVector(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), INFO(), interpolatePropertiesForMesh(), MeshLib::PropertyVector< PROP_VAL_TYPE >::size(), and WARN().
Referenced by main().
|
private |
Definition at line 75 of file Mesh2MeshPropertyInterpolation.h.
Referenced by interpolateElementPropertiesToNodeProperties(), and setPropertiesForMesh().
|
private |
Definition at line 74 of file Mesh2MeshPropertyInterpolation.h.
Referenced by interpolateElementPropertiesToNodeProperties(), interpolatePropertiesForMesh(), and setPropertiesForMesh().