Skip to content

Commit

Permalink
Remove old commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
kaipartmann committed Oct 16, 2024
1 parent 831666e commit 082b336
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 234 deletions.
58 changes: 0 additions & 58 deletions src/physics/bond_based.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,68 +107,10 @@ struct BBStorage <: AbstractStorage
n_active_bonds::Vector{Int}
end

# function BBVerletStorage(::BBMaterial, ::VelocityVerlet, system::BondSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# acceleration = zeros(3, n_loc_points)
# b_int = zeros(3, n_loc_points)
# b_ext = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# bond_active = ones(Bool, length(system.bonds))
# n_active_bonds = copy(system.n_neighbors)
# s = BBVerletStorage(position, displacement, velocity, velocity_half, acceleration,
# b_int, b_ext, damage, bond_active, n_active_bonds)
# return s
# end

@storage BBMaterial BBStorage

@loc_to_halo_fields BBStorage :position

# struct BBRelaxationStorage <: AbstractStorage
# position::Matrix{Float64}
# displacement::Matrix{Float64}
# velocity::Matrix{Float64}
# velocity_half::Matrix{Float64}
# velocity_half_old::Matrix{Float64}
# b_int::Matrix{Float64}
# b_int_old::Matrix{Float64}
# b_ext::Matrix{Float64}
# density_matrix::Matrix{Float64}
# damage::Vector{Float64}
# bond_active::Vector{Bool}
# n_active_bonds::Vector{Int}
# end

# function BBRelaxationStorage(::BBMaterial, ::DynamicRelaxation, system::BondSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# velocity_half_old = zeros(3, n_loc_points)
# b_int = zeros(3, n_loc_points)
# b_int_old = zeros(3, n_loc_points)
# b_ext = zeros(3, n_loc_points)
# density_matrix = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# bond_active = ones(Bool, length(system.bonds))
# n_active_bonds = copy(system.n_neighbors)
# s = BBRelaxationStorage(position, displacement, velocity, velocity_half,
# velocity_half_old, b_int, b_int_old, b_ext, density_matrix,
# damage, bond_active, n_active_bonds)
# return s
# end

# @storage BBMaterial DynamicRelaxation BBRelaxationStorage

# @loc_to_halo_fields BBRelaxationStorage :position

# const BBStorage = Union{BBVerletStorage,BBRelaxationStorage}

function force_density_point!(storage::BBStorage, system::BondSystem, ::BBMaterial,
params::BBPointParameters, i::Int)
for bond_id in each_bond_idx(system, i)
Expand Down
58 changes: 0 additions & 58 deletions src/physics/continuum_kinematics_inspired.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,68 +96,10 @@ struct CKIStorage <: AbstractStorage
n_active_one_nis::Vector{Int}
end

# function CKIVerletStorage(::CKIMaterial, ::VelocityVerlet, system::InteractionSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# acceleration = zeros(3, n_loc_points)
# b_int = zeros(3, n_loc_points)
# b_ext = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# one_ni_active = ones(Bool, length(system.one_nis))
# n_active_one_nis = copy(system.n_one_nis)
# s = CKIVerletStorage(position, displacement, velocity, velocity_half, acceleration,
# b_int, b_ext, damage, one_ni_active, n_active_one_nis)
# return s
# end

@storage CKIMaterial CKIStorage

@loc_to_halo_fields CKIStorage :position

# struct CKIRelaxationStorage <: AbstractStorage
# position::Matrix{Float64}
# displacement::Matrix{Float64}
# velocity::Matrix{Float64}
# velocity_half::Matrix{Float64}
# velocity_half_old::Matrix{Float64}
# b_int::Matrix{Float64}
# b_int_old::Matrix{Float64}
# b_ext::Matrix{Float64}
# density_matrix::Matrix{Float64}
# damage::Vector{Float64}
# one_ni_active::Vector{Bool}
# n_active_one_nis::Vector{Int}
# end

# function CKIRelaxationStorage(::CKIMaterial, ::DynamicRelaxation, system::InteractionSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# velocity_half_old = zeros(3, n_loc_points)
# b_int = zeros(3, n_loc_points)
# b_int_old = zeros(3, n_loc_points)
# b_ext = zeros(3, n_loc_points)
# density_matrix = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# one_ni_active = ones(Bool, length(system.one_nis))
# n_active_one_nis = copy(system.n_one_nis)
# s = CKIRelaxationStorage(position, displacement, velocity, velocity_half,
# velocity_half_old, b_int, b_int_old, b_ext, density_matrix,
# damage, one_ni_active, n_active_one_nis)
# return s
# end

# @storage CKIMaterial DynamicRelaxation CKIRelaxationStorage

# @loc_to_halo_fields CKIRelaxationStorage :position

# const CKIStorage = Union{CKIVerletStorage,CKIRelaxationStorage}

function force_density_point!(storage::CKIStorage, system::InteractionSystem,
mat::CKIMaterial, params::AbstractParameterSetup, i::Int)
force_density_point_one_ni!(storage, system, mat, params, i)
Expand Down
59 changes: 0 additions & 59 deletions src/physics/correspondence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,6 @@ struct NOSBStorage <: AbstractStorage
n_active_bonds::Vector{Int}
end

# function NOSBVerletStorage(::NOSBMaterial, ::VelocityVerlet, system::BondSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# acceleration = zeros(3, n_loc_points)
# b_int = zeros(3, get_n_points(system))
# b_ext = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# bond_active = ones(Bool, length(system.bonds))
# n_active_bonds = copy(system.n_neighbors)
# s = NOSBVerletStorage(position, displacement, velocity, velocity_half, acceleration,
# b_int, b_ext, damage, bond_active, n_active_bonds)
# return s
# end

function init_field(::NOSBMaterial, ::AbstractTimeSolver, system::BondSystem, ::Val{:b_int})
return zeros(3, get_n_points(system))
end
Expand All @@ -145,48 +128,6 @@ end
@loc_to_halo_fields NOSBStorage :position
@halo_to_loc_fields NOSBStorage :b_int

# struct NOSBRelaxationStorage <: AbstractStorage
# position::Matrix{Float64}
# displacement::Matrix{Float64}
# velocity::Matrix{Float64}
# velocity_half::Matrix{Float64}
# velocity_half_old::Matrix{Float64}
# b_int::Matrix{Float64}
# b_int_old::Matrix{Float64}
# b_ext::Matrix{Float64}
# density_matrix::Matrix{Float64}
# damage::Vector{Float64}
# bond_active::Vector{Bool}
# n_active_bonds::Vector{Int}
# end

# function NOSBRelaxationStorage(::NOSBMaterial, ::DynamicRelaxation, system::BondSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# velocity_half_old = zeros(3, n_loc_points)
# b_int = zeros(3, get_n_points(system))
# b_int_old = zeros(3, n_loc_points)
# b_ext = zeros(3, n_loc_points)
# density_matrix = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# bond_active = ones(Bool, length(system.bonds))
# n_active_bonds = copy(system.n_neighbors)
# s = NOSBRelaxationStorage(position, displacement, velocity, velocity_half,
# velocity_half_old, b_int, b_int_old, b_ext, density_matrix,
# damage, bond_active, n_active_bonds)
# return s
# end

# @storage NOSBMaterial DynamicRelaxation NOSBRelaxationStorage

# @loc_to_halo_fields NOSBRelaxationStorage :position
# @halo_to_loc_fields NOSBRelaxationStorage :b_int

# const NOSBStorage = Union{NOSBVerletStorage,NOSBRelaxationStorage}

function force_density_point!(storage::NOSBStorage, system::BondSystem, mat::NOSBMaterial,
paramhandler::AbstractParameterHandler, i::Int)
params = get_params(paramhandler, i)
Expand Down
59 changes: 0 additions & 59 deletions src/physics/ordinary_state_based.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,6 @@ struct OSBStorage <: AbstractStorage
n_active_bonds::Vector{Int}
end

# function OSBVerletStorage(::OSBMaterial, ::VelocityVerlet, system::BondSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# acceleration = zeros(3, n_loc_points)
# b_int = zeros(3, get_n_points(system))
# b_ext = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# bond_active = ones(Bool, length(system.bonds))
# n_active_bonds = copy(system.n_neighbors)
# s = OSBVerletStorage(position, displacement, velocity, velocity_half, acceleration,
# b_int, b_ext, damage, bond_active, n_active_bonds)
# return s
# end

@storage OSBMaterial OSBStorage

function init_field(::OSBMaterial, ::AbstractTimeSolver, system::BondSystem, ::Val{:b_int})
Expand All @@ -123,48 +106,6 @@ end
@loc_to_halo_fields OSBStorage :position
@halo_to_loc_fields OSBStorage :b_int

# struct OSBRelaxationStorage <: AbstractStorage
# position::Matrix{Float64}
# displacement::Matrix{Float64}
# velocity::Matrix{Float64}
# velocity_half::Matrix{Float64}
# velocity_half_old::Matrix{Float64}
# b_int::Matrix{Float64}
# b_int_old::Matrix{Float64}
# b_ext::Matrix{Float64}
# density_matrix::Matrix{Float64}
# damage::Vector{Float64}
# bond_active::Vector{Bool}
# n_active_bonds::Vector{Int}
# end

# function OSBRelaxationStorage(::OSBMaterial, ::DynamicRelaxation, system::BondSystem)
# n_loc_points = get_n_loc_points(system)
# position = copy(system.position)
# displacement = zeros(3, n_loc_points)
# velocity = zeros(3, n_loc_points)
# velocity_half = zeros(3, n_loc_points)
# velocity_half_old = zeros(3, n_loc_points)
# b_int = zeros(3, get_n_points(system))
# b_int_old = zeros(3, n_loc_points)
# b_ext = zeros(3, n_loc_points)
# density_matrix = zeros(3, n_loc_points)
# damage = zeros(n_loc_points)
# bond_active = ones(Bool, length(system.bonds))
# n_active_bonds = copy(system.n_neighbors)
# s = OSBRelaxationStorage(position, displacement, velocity, velocity_half,
# velocity_half_old, b_int, b_int_old, b_ext, density_matrix,
# damage, bond_active, n_active_bonds)
# return s
# end

# @storage OSBMaterial DynamicRelaxation OSBRelaxationStorage

# @loc_to_halo_fields OSBRelaxationStorage :position
# @halo_to_loc_fields OSBRelaxationStorage :b_int

# const OSBStorage = Union{OSBVerletStorage,OSBRelaxationStorage}

function force_density_point!(storage::OSBStorage, system::BondSystem, mat::OSBMaterial,
params::OSBPointParameters, i::Int)
wvol = calc_weighted_volume(storage, system, mat, params, i)
Expand Down

0 comments on commit 082b336

Please sign in to comment.