MFC: Pre-Process
High-fidelity multiphase flow simulation
Loading...
Searching...
No Matches
m_model Module Reference

Functions/Subroutines

impure subroutine s_read_stl_binary (filepath, model)
 This procedure reads a binary STL file.
 
impure subroutine s_read_stl_ascii (filepath, model)
 This procedure reads an ASCII STL file.
 
impure subroutine s_read_stl (filepath, model)
 This procedure reads an STL file.
 
impure subroutine s_read_obj (filepath, model)
 This procedure reads an OBJ file.
 
impure type(t_model) function, public f_model_read (filepath)
 This procedure reads a mesh from a file.
 
impure subroutine s_write_stl (filepath, model)
 This procedure writes a binary STL file.
 
impure subroutine s_write_obj (filepath, model)
 This procedure writes an OBJ file.
 
impure subroutine, public s_model_write (filepath, model)
 This procedure writes a binary STL file.
 
subroutine, public s_model_free (model)
 This procedure frees the memory allocated for an STL mesh.
 
impure logical function f_read_line (iunit, line)
 
impure subroutine s_skip_ignored_lines (iunit, buffered_line, is_buffered)
 
impure real(wp) function, public f_model_is_inside (model, point, spacing, spc)
 This procedure, recursively, finds whether a point is inside an octree.
 
elemental logical function f_intersects_triangle (ray, triangle)
 This procedure checks if a ray intersects a triangle.
 
subroutine, public f_check_boundary (model, boundary_v, boundary_vertex_count, boundary_edge_count)
 This procedure checks and labels edges shared by two or more triangles facets of the 2D STL model.
 
subroutine, public f_register_edge (temp_boundary_v, edge, edge_index, edge_count)
 This procedure appends the edge end vertices to a temporary buffer.
 
subroutine, public f_check_interpolation_2d (boundary_v, boundary_edge_count, spacing, interpolate)
 This procedure check if interpolates is needed for 2D models.
 
subroutine, public f_check_interpolation_3d (model, spacing, interpolate)
 This procedure check if interpolates is needed for 3D models.
 
subroutine, public f_interpolate_2d (boundary_v, boundary_edge_count, spacing, interpolated_boundary_v, total_vertices)
 This procedure interpolates 2D models.
 
impure subroutine, public f_interpolate_3d (model, spacing, interpolated_boundary_v, total_vertices)
 This procedure interpolates 3D models.
 
subroutine, public f_distance_normals_3d (model, point, normals, distance)
 This procedure determines the levelset distance and normals of the 3D models without interpolation.
 
real(wp) function, public f_distance (boundary_v, boundary_edge_count, point)
 This procedure determines the levelset distance of 2D models without interpolation.
 
subroutine, public f_normals (boundary_v, boundary_edge_count, point, normals)
 This procedure determines the levelset normals of 2D models without interpolation.
 
subroutine, public f_tri_area (tri, tri_area)
 This procedure calculates the barycentric facet area.
 
real(wp) function, public f_interpolated_distance (interpolated_boundary_v, total_vertices, point)
 This procedure determines the levelset of interpolated 2D models.
 

Function/Subroutine Documentation

◆ f_check_boundary()

subroutine, public m_model::f_check_boundary ( type(t_model), intent(in) model,
real(wp), dimension(:, :, :), intent(out), allocatable boundary_v,
integer, intent(out) boundary_vertex_count,
integer, intent(out) boundary_edge_count )

This procedure checks and labels edges shared by two or more triangles facets of the 2D STL model.

Parameters
modelModel to search in.
boundary_vOutput boundary vertices/normals.
boundary_vertex_countOutput total boundary vertex count
boundary_edge_countOutput total boundary edge counts
[out]boundary_vOutput boundary vertices/normals
[out]boundary_edge_countOutput boundary vertex/edge count
Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_check_interpolation_2d()

subroutine, public m_model::f_check_interpolation_2d ( real(wp), dimension(1:boundary_edge_count, 1:3, 1:2), intent(in) boundary_v,
integer, intent(in) boundary_edge_count,
real(wp), dimension(1:3), intent(in) spacing,
logical, intent(inout) interpolate )

This procedure check if interpolates is needed for 2D models.

Parameters
boundary_vTemporary edge end vertex buffer
boundary_edge_countOutput total number of boundary edges
spacingDimensions of the current levelset cell
interpolateLogical output
[in,out]interpolateLogical indicator of interpolation
[in]boundary_edge_countNumber of boundary edges
Here is the caller graph for this function:

◆ f_check_interpolation_3d()

subroutine, public m_model::f_check_interpolation_3d ( type(t_model), intent(in) model,
real(wp), dimension(1:3), intent(in) spacing,
logical, intent(inout) interpolate )

This procedure check if interpolates is needed for 3D models.

Parameters
modelModel to search in.
spacingDimensions of the current levelset cell
interpolateLogical output
Here is the caller graph for this function:

◆ f_distance()

real(wp) function, public m_model::f_distance ( real(wp), dimension(1:boundary_edge_count, 1:3, 1:2), intent(in) boundary_v,
integer, intent(in) boundary_edge_count,
real(wp), dimension(1:3), intent(in) point )

This procedure determines the levelset distance of 2D models without interpolation.

Parameters
boundary_vGroup of all the boundary vertices of the 2D model without interpolation
boundary_vertex_countOutput the total number of boundary vertices
boundary_edge_countOutput the total number of boundary edges
pointThe cell centers of the current levelset cell
spacingDimensions of the current levelset cell
Returns
Distance which the levelset distance without interpolation
Here is the caller graph for this function:

◆ f_distance_normals_3d()

subroutine, public m_model::f_distance_normals_3d ( type(t_model), intent(in) model,
real(wp), dimension(1:3), intent(in) point,
real(wp), dimension(1:3), intent(out) normals,
real(wp), intent(out) distance )

This procedure determines the levelset distance and normals of the 3D models without interpolation.

Parameters
modelModel to search in.
pointThe cell centers of the current level cell
normalsThe output levelset normals
distanceThe output levelset distance
Here is the caller graph for this function:

◆ f_interpolate_2d()

subroutine, public m_model::f_interpolate_2d ( real(wp), dimension(:, :, :), intent(in) boundary_v,
integer, intent(inout) boundary_edge_count,
real(wp), dimension(1:3), intent(in) spacing,
real(wp), dimension(:, :), intent(inout), allocatable interpolated_boundary_v,
integer, intent(inout) total_vertices )

This procedure interpolates 2D models.

Parameters
boundary_vGroup of all the boundary vertices of the 2D model without interpolation
boundary_edge_countOutput total number of boundary edges
spacingDimensions of the current levelset cell
interpolated_boundary_vOutput all the boundary vertices of the interpolated 2D model
total_verticesTotal number of vertices after interpolation
Here is the caller graph for this function:

◆ f_interpolate_3d()

impure subroutine, public m_model::f_interpolate_3d ( type(t_model), intent(in) model,
real(wp), dimension(1:3), intent(in) spacing,
real(wp), dimension(:, :), intent(inout), allocatable interpolated_boundary_v,
integer, intent(out) total_vertices )

This procedure interpolates 3D models.

Parameters
modelModel to search in.
spacingDimensions of the current levelset cell
interpolated_boundary_vOutput all the boundary vertices of the interpolated 3D model
total_verticesTotal number of vertices after interpolation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_interpolated_distance()

real(wp) function, public m_model::f_interpolated_distance ( real(wp), dimension(1:total_vertices, 1:3), intent(in) interpolated_boundary_v,
integer, intent(in) total_vertices,
real(wp), dimension(1:3), intent(in) point )

This procedure determines the levelset of interpolated 2D models.

Parameters
interpolated_boundary_vGroup of all the boundary vertices of the interpolated 2D model
total_verticesTotal number of vertices after interpolation
pointThe cell centers of the current levelset cell
Returns
Distance which the levelset distance without interpolation
Here is the caller graph for this function:

◆ f_intersects_triangle()

elemental logical function m_model::f_intersects_triangle ( type(t_ray), intent(in) ray,
type(t_triangle), intent(in) triangle )
private

This procedure checks if a ray intersects a triangle.

Parameters
rayRay.
triangleTriangle.
Returns
True if the ray intersects the triangle, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_model_is_inside()

impure real(wp) function, public m_model::f_model_is_inside ( type(t_model), intent(in) model,
real(wp), dimension(1:3), intent(in) point,
real(wp), dimension(1:3), intent(in) spacing,
integer, intent(in) spc )

This procedure, recursively, finds whether a point is inside an octree.

Parameters
modelModel to search in.
pointPoint to test.
spacingSpace around the point to search in (grid spacing).
spcNumber of samples per cell.
Returns
True if the point is inside the octree, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_model_read()

impure type(t_model) function, public m_model::f_model_read ( character(len=*), intent(in) filepath)

This procedure reads a mesh from a file.

Parameters
filepathPath to the file to read.
Returns
The model read from the file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_normals()

subroutine, public m_model::f_normals ( real(wp), dimension(1:boundary_edge_count, 1:3, 1:2), intent(in) boundary_v,
integer, intent(in) boundary_edge_count,
real(wp), dimension(1:3), intent(in) point,
real(wp), dimension(1:3), intent(out) normals )

This procedure determines the levelset normals of 2D models without interpolation.

Parameters
boundary_vGroup of all the boundary vertices of the 2D model without interpolation
boundary_edge_countOutput the total number of boundary edges
pointThe cell centers of the current levelset cell
normalsOutput levelset normals without interpolation
Here is the caller graph for this function:

◆ f_read_line()

impure logical function m_model::f_read_line ( integer, intent(in) iunit,
character(80), intent(out) line )
private
Here is the caller graph for this function:

◆ f_register_edge()

subroutine, public m_model::f_register_edge ( real(wp), dimension(1:edge_count, 1:2, 1:2), intent(inout) temp_boundary_v,
real(wp), dimension(1:2, 1:2), intent(in) edge,
integer, intent(inout) edge_index,
integer, intent(inout) edge_count )

This procedure appends the edge end vertices to a temporary buffer.

Parameters
temp_boundary_vTemporary edge end vertex buffer
edgeEdges end points to be registered
edge_indexEdge index iterator
edge_countTotal number of edges
[in,out]edge_indexEdge index iterator
[in,out]edge_countTotal number of edges
[in]edgeEdges end points to be registered
[in,out]temp_boundary_vTemporary edge end vertex buffer
Here is the caller graph for this function:

◆ f_tri_area()

subroutine, public m_model::f_tri_area ( real(wp), dimension(1:3, 1:3), intent(in) tri,
real(wp), intent(out) tri_area )

This procedure calculates the barycentric facet area.

Here is the caller graph for this function:

◆ s_model_free()

subroutine, public m_model::s_model_free ( type(t_model), intent(inout) model)

This procedure frees the memory allocated for an STL mesh.

◆ s_model_write()

impure subroutine, public m_model::s_model_write ( character(len=*), intent(in) filepath,
type(t_model), intent(in) model )

This procedure writes a binary STL file.

Parameters
filepathPath to the file to write.
modelModel to write.
Here is the call graph for this function:

◆ s_read_obj()

impure subroutine m_model::s_read_obj ( character(len=*), intent(in) filepath,
type(t_model), intent(out) model )
private

This procedure reads an OBJ file.

Parameters
filepathPath to the odj file.
modelThe obj file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_read_stl()

impure subroutine m_model::s_read_stl ( character(len=*), intent(in) filepath,
type(t_model), intent(out) model )
private

This procedure reads an STL file.

Parameters
filepathPath to the STL file.
modelthe STL file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_read_stl_ascii()

impure subroutine m_model::s_read_stl_ascii ( character(len=*), intent(in) filepath,
type(t_model), intent(out) model )
private

This procedure reads an ASCII STL file.

Parameters
filepathPath to the STL file.
modelthe STL file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_read_stl_binary()

impure subroutine m_model::s_read_stl_binary ( character(len=*), intent(in) filepath,
type(t_model), intent(out) model )
private

This procedure reads a binary STL file.

Parameters
filepathPath to the STL file.
modelThe binary of the STL file.
Here is the caller graph for this function:

◆ s_skip_ignored_lines()

impure subroutine m_model::s_skip_ignored_lines ( integer, intent(in) iunit,
character(80), intent(inout) buffered_line,
logical, intent(inout) is_buffered )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_obj()

impure subroutine m_model::s_write_obj ( character(len=*), intent(in) filepath,
type(t_model), intent(in) model )
private

This procedure writes an OBJ file.

Parameters
filepathPath to the obj file.
modelobj to write.
Here is the caller graph for this function:

◆ s_write_stl()

impure subroutine m_model::s_write_stl ( character(len=*), intent(in) filepath,
type(t_model), intent(in) model )
private

This procedure writes a binary STL file.

Parameters
filepathPath to the STL file.
modelSTL to write
Here is the caller graph for this function: