Meshes in 3D
Loading meshes
BoundaryIntegralEquations.load_mesh_file
— Functionload_mesh_file(file)
Loads 3D mesh files.
BoundaryIntegralEquations.read_comsol_mesh
— Functionread_comsol_mesh(mesh_file)
Loads the coordinates, topology and entites from a ".mphtxt" file.
BoundaryIntegralEquations.load3dTriangularMesh
— Functionload3dTriangularMesh(mesh_file;m=3,n=3,geometry_order=:linear,physics_order=:geometry,
beta_type=:legendre,entites=false,removed_entites=[-1])
Returns a Mesh3d
from the geoemtry described in mesh_file
.
Supports .obj, .ply, .stl, .off, .2DM files using MeshIO.jl
and FileIO.jl
.
BoundaryIntegralEquations.load3dTriangularComsolMesh
— Functionload3dTriangularComsolMesh(mesh_file;m=3,n=3, geometry_order=:quadratic,
physics_order=:geometry,beta_type=:legendre,entites=false,removed_entites=[-1])
BoundaryIntegralEquations.load3dQuadComsolMesh
— Functionload3dQuadComsolMesh(mesh_file;m=4,n=4,geometry_order=:quadratic,
physics_order=:geometry,beta_type=:legendre,entites=false,removed_entites=[-1])
Mesh manipulation
BoundaryIntegralEquations.Mesh3d
— TypeMesh3d
Contains relevant information for
BoundaryIntegralEquations.remove_unused_nodes
— Functionremove_unused_nodes(topology)
Reindexing topology so that the indexing has no gaps.
BoundaryIntegralEquations.normalize_vector!
— Functionnormalize_vector!(normals)
Normalizes the columns of normals
.
BoundaryIntegralEquations.tangents!
— Functiontangents!(normals, tangent1, tangent2)
Inplace computation of two tagents of the columns of normals
. Results are saved in tangent1
and tangent2
respectively.
BoundaryIntegralEquations.get_element_normals
— Functionget_element_normals(shape_function::Triangular,coordinates, topology)
Compute the normal as the average normal of all normals from the different elements that a coordinate
is connected to via topology
.
BoundaryIntegralEquations.compute_sources
— Functioncompute_sources(shape_function,physics_function,topology,coordinates)
Computes the nodal position for discontinuous elements.
BoundaryIntegralEquations.set_physics_element
— Functionset_physics_element(physics_order,shape_function,beta_type)
Returns element of type physics_order
with the same interpolation as shape_function
. For discontinuous elements beta_type
defines the position of the internal nodes.
BoundaryIntegralEquations.cross!
— Functioncross!(normal::AbstractVector,a::AbstractVector,b::AbstractVector)
Inplace computation of the cross product a × b
. Result saved in normal.
BoundaryIntegralEquations.cross_product!
— Functioncross_product!(normals,tangent,sangent)
Inplace computation of the cross product between every column of tangent
and sangent
. Results are saved in the corresponding column of normals
.
BoundaryIntegralEquations.column_norms!
— Functioncolumn_norms!(jacobian,normals)
Computing norms of columns in normals
. Saved in jacobian
. Everything assumed to be 3d.
BoundaryIntegralEquations.normalize!
— Functionnormalize!(normals,jacobian)
Dividing each column of normals
with jacobian
.
BoundaryIntegralEquations.jacobian!
— Methodjacobian!(basisElement::SurfaceFunction,coordinates,normals,tangent,sangent,jacobian)
Inplace computations of the jacobian of the basisElement::SurfaceFunction
at the coordinates. The results are saved in
tangent,
sangent,
normalsand
jacobian`.