Skip to content

Commit acd784b

Browse files
committed
Enhance pre-processing flexibility to both read inp files and generate point clouds.
1 parent b4ce022 commit acd784b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/IBM/post_2d.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ mutable struct Post2D <: AbstractPDGeometry
7777

7878
new(bc_nodes, pos, area_vec, in_bc_nodes, bc_edge, nodes, pd_id_to_surface, surface_elements, element_type, bc_counter)
7979
end
80+
81+
function Post2D() # default constructor without file input
82+
new(
83+
Int[], # bc_nodes
84+
Matrix{Float64}(undef, 0, 0), # pos
85+
Float64[], # area
86+
Int[], # in_bc_nodes
87+
Dict{Int, Vector{Vector{Vector{Float64}}}}(), # bc_edge
88+
Dict{Int, Vector{Float64}}(), # mesh_nodes
89+
Dict{Int, Int}(), # pd_id_to_surface
90+
Dict{Int, Vector{Int}}(), # surface_elements
91+
Dict{Int, String}(), # element_type
92+
BoundaryCounter() # bc_counter
93+
)
94+
end
8095
end
8196

8297
# Helper function to access the main components

src/IBM/post_3d.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ mutable struct Post3D <: AbstractPDGeometry
7777

7878
new(bc_nodes, pos, vol_vec, in_bc_nodes, bc_surface, nodes, pd_id_to_volume, volume_elements, element_type, bc_counter)
7979
end
80+
81+
function Post3D() # default constructor without file input
82+
new(
83+
Int[], # bc_nodes
84+
Matrix{Float64}(undef, 0, 0), # pos
85+
Float64[], # volume
86+
Int[], # in_bc_nodes
87+
Dict{Int, Vector{Vector{Vector{Float64}}}}(), # bc_surface
88+
Dict{Int, Vector{Float64}}(), # mesh_nodes
89+
Dict{Int, Int}(), # pd_id_to_volume
90+
Dict{Int, Vector{Int}}(), # volume_elements
91+
Dict{Int, String}(), # element_type
92+
BoundaryCounter() # bc_counter
93+
)
94+
end
8095
end
8196

8297
# Helper function to access the main components

0 commit comments

Comments
 (0)