Solver - Functions

Index

Solver

PeriLab.Solver_control.find_and_set_core_value_avgMethod
find_and_set_core_value_avg(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value avg

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.find_and_set_core_value_maxMethod
find_and_set_core_value_max(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value max

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.find_and_set_core_value_minMethod
find_and_set_core_value_min(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value min

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.find_and_set_core_value_sumMethod
find_and_set_core_value_sum(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value sum

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.gather_valuesMethod
gather_values(comm::MPI.Comm, value::Any)

Gather values

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Any: The value

Returns

  • recv_msg::Any: The received message
source
PeriLab.Solver_control.get_block_nodesMethod
get_block_nodes(block_ids, nnodes)

Returns a dictionary mapping block IDs to collections of nodes.

Arguments

  • block_ids::Vector{Int64}: A vector of block IDs
  • nnodes::Int64: The number of nodes

Returns

  • block_nodes::Dict{Int64,Vector{Int64}}: A dictionary mapping block IDs to collections of nodes
source
PeriLab.Solver_control.initMethod
init(params::Dict, datamanager::Module)

Initialize the solver

Arguments

  • params::Dict: The parameters
  • datamanager::Module: Datamanager
  • to::TimerOutputs.TimerOutput: A timer output

Returns

  • block_nodes::Dict{Int64,Vector{Int64}}: A dictionary mapping block IDs to collections of nodes.
  • bcs::Dict{Any,Any}: A dictionary containing boundary conditions.
  • datamanager::Module: The data manager module that provides access to data fields and properties.
  • solver_options::Dict{String,Any}: A dictionary containing solver options.
source
PeriLab.Solver_control.remove_modelsMethod
remove_models(datamanager::Module, solver_options::Vector{String})

Sets the active models to false if they are deactivated in the solver. They can be active, because they are defined as model and in the blocks.

Arguments

  • datamanager::Module: The MPI communicator
  • solver_options::Vector{String}: A dictionary of fields

Returns

  • datamanager
source
PeriLab.Solver_control.send_single_value_from_vectorMethod
send_single_value_from_vector(comm::MPI.Comm, controller::Int64, values::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}, type::Type)

Sends a single value from a vector to a controller

Arguments

  • comm::MPI.Comm: The MPI communicator
  • controller::Int64: The controller
  • values::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The values
  • type::Type: The type

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.send_valueMethod
send_value(comm::MPI.Comm, controller, send_msg)

Sends a value to a controller

Arguments

  • comm::MPI.Comm: The MPI communicator
  • controller::Int64: The controller
  • send_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The send message

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.send_vector_from_root_to_core_iMethod
send_vector_from_root_to_core_i(comm::MPI.Comm, send_msg, recv_msg, distribution)

Sends a vector from the root to the core i

Arguments

  • comm::MPI.Comm: The MPI communicator
  • send_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The send message
  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The receive message
  • distribution::Vector{Int64}: The distribution

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.set_densityMethod
set_density(params::Dict, block_nodes::Dict, density::Vector{Float64})

Sets the density of the nodes in the dictionary.

Arguments

  • params::Dict: The parameters
  • block_nodes::Dict: A dictionary mapping block IDs to collections of nodes
  • density::Vector{Float64}: The density

Returns

  • density::Vector{Float64}: The density
source
PeriLab.Solver_control.set_fem_blockMethod
set_fem_block(params::Dict, block_nodes::Dict, fem_block::Vector{Bool})

Sets the fem_block of the nodes in the dictionary.

Arguments

  • params::Dict: The parameters
  • block_nodes::Dict: A dictionary mapping block IDs to collections of nodes
  • fem_block::Vector{Bool}: The fem_block

Returns

  • fem_block::Vector{Bool}: The fem_block
source
PeriLab.Solver_control.set_horizonMethod
set_horizon(params::Dict, block_nodes::Dict, horizon::Vector{Float64})

Sets the horizon of the nodes in the dictionary.

Arguments

  • params::Dict: The parameters
  • block_nodes::Dict: A dictionary mapping block IDs to collections of nodes
  • horizon::Vector{Float64}: The horizon

Returns

  • horizon::Vector{Float64}: The horizon
source
PeriLab.Solver_control.solverMethod
solver(solver_options::Dict{String,Any}, block_nodes::Dict{Int64,Vector{Int64}}, bcs::Dict{Any,Any}, datamanager::Module, outputs::Dict{Int64,Dict{}}, result_files::Vector{Any}, write_results, to, silent::Bool)

Runs the solver.

Arguments

  • solver_options::Dict{String,Any}: The solver options
  • block_nodes::Dict{Int64,Vector{Int64}}: A dictionary mapping block IDs to collections of nodes
  • bcs::Dict{Any,Any}: The boundary conditions
  • datamanager::Module: The data manager module
  • outputs::Dict{Int64,Dict{}}: A dictionary for output settings
  • result_files::Vector{Any}: A vector of result files
  • write_results: A function to write simulation results
  • to::TimerOutputs.TimerOutput: A timer output
  • silent::Bool: A boolean flag to suppress progress bars

Returns

  • result_files: A vector of updated result files
source
PeriLab.Solver_control.split_vectorMethod
split_vector(input, row_nums, dof)

Split a vector into a vector of matrices

Arguments

  • input::Vector: The input vector
  • row_nums::Vector: The row numbers
  • dof::Int: The degree of freedom

Returns

  • result::Vector: The result vector
source
PeriLab.Solver_control.synch_controller_bonds_to_responderMethod
synch_controller_bonds_to_responder(comm::MPI.Comm, overlapnodes, array, dof)

Synch the controller bonds to the responder

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • array::Array: The array
  • dof::Int: The degree of freedom

Returns

  • array::Array: The array
source
PeriLab.Solver_control.synch_controller_bonds_to_responder_flattenedMethod
synch_controller_bonds_to_responder_flattened(comm::MPI.Comm, overlapnodes, array, dof)

Synch the controller bonds to the responder

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • array::Array: The array
  • dof::Int: The degree of freedom

Returns

  • array::Array: The array
source
PeriLab.Solver_control.synch_controller_to_responderMethod
synch_controller_to_responder(comm::MPI.Comm, overlapnodes, vector, dof)

Synch the controller to the responder

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • vector::Vector: The vector
  • dof::Int: The degree of freedom

Returns

  • vector::Vector: The vector
source
PeriLab.Solver_control.synch_responder_to_controllerMethod
synch_responder_to_controller(comm::MPI.Comm, overlapnodes, vector, dof)

Synch the responder to the controller

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • vector::Vector: The vector
  • dof::Int: The degree of freedom

Returns

  • vector::Vector: The vector
source
PeriLab.Solver_control.synchronise_fieldMethod
synchronise_field(comm, synch_fields::Dict, overlap_map, get_field, synch_field::String, direction::String)

Synchronises field.

Arguments

  • comm: The MPI communicator
  • synch_fields::Dict: A dictionary of fields
  • overlap_map: The overlap map
  • get_field: The function to get the field
  • synch_field::String: The field
  • direction::String: The direction

Returns

  • nothing
source

Verlet

PeriLab.Solver_control.Verlet.calculate_strainMethod
calculate_strain(datamanager::Module, nodes::Union{SubArray,Vector{Int64}}, hooke_matrix::Matrix{Float64})

Calculate the von Mises stress.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: The nodes.
  • hooke_matrix::Matrix{Float64}: The hooke matrix.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver_control.Verlet.calculate_stressesMethod
calculate_stresses(datamanager::Module, block_nodes::Dict{Int64,Vector{Int64}}, options::Dict{String, Any})

Computes the stresses.

Arguments

  • datamanager::Data_manager: Datamanager.
  • block_nodes::Dict{Int64,Vector{Int64}}: List of block nodes.
  • options::Dict{String, Any}: List of options.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver_control.Verlet.calculate_von_mises_stressMethod
calculate_von_mises_stress(datamanager::Module, nodes::Union{SubArray,Vector{Int64}})

Calculate the von Mises stress.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: The nodes.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver_control.Verlet.compute_crititical_time_stepMethod
compute_crititical_time_step(datamanager::Module, block_nodes::Dict{Int64,Vector{Int64}}, mechanical::Bool, thermo::Bool)

Calculate the critical time step for a simulation considering both mechanical and thermodynamic aspects.

This function computes the critical time step by considering mechanical and thermodynamic properties of different blocks. The resulting critical time step is based on the smallest critical time step found among the blocks.

Arguments

  • datamanager::Module: The data manager module that provides access to required data fields and properties.
  • block_nodes::Dict{Int64, Vector{Int64}}: A dictionary mapping block IDs to collections of nodes.
  • mechanical::Bool: If true, mechanical properties are considered in the calculation.
  • thermo::Bool: If true, thermodynamic properties are considered in the calculation.

Returns

  • Float64: The calculated critical time step based on the smallest critical time step found among the blocks.

Dependencies

This function may depend on the following functions:

  • compute_thermodynamic_critical_time_step: Used if thermo is true to calculate thermodynamic critical time steps.
  • compute_mechanical_critical_time_step: Used if mechanical is true to calculate mechanical critical time steps.
  • The availability of specific properties from the data manager module.

Errors

  • If required properties are not available in the data manager, it may raise an error message.
source
PeriLab.Solver_control.Verlet.compute_mechanical_critical_time_stepMethod
compute_mechanical_critical_time_step(nodes::Union{SubArray,Vector{Int64}}, datamanager::Module, bulk_modulus::Float64)

Calculate the critical time step for a mechanical simulation using a bond-based approximation [12].

This function iterates over a collection of nodes and computes the critical time step for each node based on the given input data and parameters.

Arguments

  • nodes::Union{SubArray, Vector{Int64}}: The collection of nodes to calculate the critical time step for.
  • datamanager::Module: The data manager module that provides access to required data fields.
  • bulk_modulus::Float64: The bulk modulus used in the calculations.

Returns

  • Float64: The calculated critical time step for the mechanical simulation.

Dependencies

This function depends on the following data fields from the datamanager module:

  • get_nlist(): Returns the neighbor list.
  • get_field("Density"): Returns the density field.
  • get_field("Bond Length"): Returns the bond distance field.
  • get_field("Volume"): Returns the volume field.
  • get_field("Horizon"): Returns the horizon field.
source
PeriLab.Solver_control.Verlet.compute_thermodynamic_critical_time_stepMethod
compute_thermodynamic_critical_time_step(nodes::Union{SubArray,Vector{Int64}}, datamanager::Module, lambda::Float64, Cv::Float64)

Calculate the critical time step for a thermodynamic simulation based on [11].

This function iterates over a collection of nodes and computes the critical time step for each node using provided input data and parameters.

Arguments

  • nodes::Union{SubArray, Vector{Int64}}: The collection of nodes to calculate the critical time step for.
  • datamanager::Module: The data manager module that provides access to required data fields.
  • lambda::Float64: The material parameter used in the calculations.
  • Cv::Float64: The heat capacity at constant volume used in the calculations.

Returns

  • Float64: The calculated critical time step for the thermodynamic simulation.

Dependencies

This function depends on the following data fields from the datamanager module:

  • get_nlist(): Returns the neighbor list.
  • get_field("Density"): Returns the density field.
  • get_field("Bond Length"): Returns the bond distance field.
  • get_field("Volume"): Returns the volume field.
  • get_field("Number of Neighbors"): Returns the number of neighbors field.
source
PeriLab.Solver_control.Verlet.find_and_set_core_value_avgMethod
find_and_set_core_value_avg(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value avg

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.find_and_set_core_value_maxMethod
find_and_set_core_value_max(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value max

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.find_and_set_core_value_minMethod
find_and_set_core_value_min(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value min

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.find_and_set_core_value_sumMethod
find_and_set_core_value_sum(comm::MPI.Comm, value::Union{Float64,Int64})

Find and set core value sum

Arguments

  • comm::MPI.Comm: The MPI communicator
  • value::Union{Float64,Int64}: The value

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.get_cs_denominatorMethod
get_cs_denominator(volume::Union{SubArray,Vector{Float64},Vector{Int64}}, undeformed_bond::Union{SubArray,Vector{Float64},Vector{Int64}})

Calculate the denominator for the critical time step calculation.

Arguments

  • volume::Union{SubArray,Vector{Float64},Vector{Int64}}: The volume field.
  • undeformed_bond::Union{SubArray,Vector{Float64},Vector{Int64}}: The undeformed bond field.

Returns

  • Float64: The denominator for the critical time step calculation.
source
PeriLab.Solver_control.Verlet.get_integration_stepsMethod
get_integration_steps(initial_time::Float64, end_time::Float64, dt::Float64)

Calculate the number of integration steps and the adjusted time step for a numerical integration process.

Arguments

  • initial_time::Float64: The initial time for the integration.
  • end_time::Float64: The final time for the integration.
  • dt::Float64: The time step size.

Returns

A tuple (nsteps, dt) where:

  • nsteps::Int64: The number of integration steps required to cover the specified time range.
  • dt::Float64: The adjusted time step size to evenly divide the time range.

Errors

  • Throws an error if the dt is less than or equal to zero.
source
PeriLab.Solver_control.Verlet.get_partial_stressesMethod
get_partial_stresses(datamanager::Module, nodes::Vector{Int64})

Computes the partial stresses.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Vector{Int64}: List of block nodes.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver_control.Verlet.init_solverMethod
init_solver(params::Dict, datamanager::Module, block_nodes::Dict{Int64,Vector{Int64}}, mechanical::Bool, thermo::Bool)

Initialize the Verlet solver for a simulation.

This function sets up the Verlet solver for a simulation by initializing various parameters and calculating the time step based on provided parameters or critical time step calculations.

Arguments

  • params::Dict: A dictionary containing simulation parameters.
  • datamanager::Module: The data manager module that provides access to required data fields and properties.
  • block_nodes::Dict{Int64,Vector{Int64}}: A dictionary mapping block IDs to collections of nodes.
  • mechanical::Bool: If true, mechanical properties are considered in the calculation.
  • thermo::Bool: If true, thermodynamic properties are considered in the calculation.

Returns

A tuple (initial_time, dt, nsteps, numerical_damping) where:

  • initial_time::Float64: The initial time for the simulation.
  • dt::Float64: The time step for the simulation.
  • nsteps::Int64: The number of time integration steps.
  • numerical_damping::Float64: The numerical damping factor.
  • max_damage::Float64: The maximum damage in the simulation.

Dependencies

This function may depend on the following functions:

  • get_initial_time, get_final_time, get_safety_factor, get_fixed_dt: Used to retrieve simulation parameters.
  • compute_crititical_time_step: Used to calculate the critical time step if dt is not fixed.
  • get_integration_steps: Used to determine the number of integration steps and adjust the time step.
  • find_and_set_core_value_min and find_and_set_core_value_max: Used to set core values in a distributed computing environment.
source
PeriLab.Solver_control.Verlet.run_solverMethod
run_solver(
    solver_options::Dict{Any,Any},
    block_nodes::Dict{Int64,Vector{Int64}},
    bcs::Dict{Any,Any},
    datamanager::Module,
    outputs::Dict{Int64,Dict{}},
    result_files::Vector{Any},
    synchronise_field,
    write_results,
    to::TimerOutputs.TimerOutput,
    silent::Bool
)

Run the Verlet solver for a simulation based on the strategy provided in [1] and [2].

This function performs the Verlet solver simulation, updating various data fields and properties over a specified number of time steps.

Arguments

  • solver_options::Dict{String,Any}: A dictionary containing solver options and parameters.
  • block_nodes::Dict{Int64,Vector{Int64}}: A dictionary mapping block IDs to collections of nodes.
  • bcs::Dict{Any,Any}: A dictionary containing boundary conditions.
  • datamanager::Module: The data manager module that provides access to data fields and properties.
  • outputs::Dict{Int64,Dict{}}: A dictionary for output settings.
  • result_files::Vector{Any}: A vector of result files.
  • synchronise_field: A function for synchronization.
  • write_results: A function to write simulation results.
  • to::TimerOutputs.TimerOutput: A timer output.
  • silent::Bool: A boolean flag to suppress progress bars.

Returns

  • result_files: A vector of updated result files.

Dependencies

This function depends on various data fields and properties from the datamanager module, as well as several helper functions. It also relies on solver options and boundary conditions provided in the input parameters.

Function Workflow

  1. Initialize simulation parameters and data fields.
  2. Perform Verlet integration over a specified number of time steps.
  3. Update data fields and properties based on the solver options.
  4. Write simulation results using the write_results function.
source
PeriLab.Solver_control.Verlet.send_single_value_from_vectorMethod
send_single_value_from_vector(comm::MPI.Comm, controller::Int64, values::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}, type::Type)

Sends a single value from a vector to a controller

Arguments

  • comm::MPI.Comm: The MPI communicator
  • controller::Int64: The controller
  • values::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The values
  • type::Type: The type

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.send_valueMethod
send_value(comm::MPI.Comm, controller, send_msg)

Sends a value to a controller

Arguments

  • comm::MPI.Comm: The MPI communicator
  • controller::Int64: The controller
  • send_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The send message

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.send_vector_from_root_to_core_iMethod
send_vector_from_root_to_core_i(comm::MPI.Comm, send_msg, recv_msg, distribution)

Sends a vector from the root to the core i

Arguments

  • comm::MPI.Comm: The MPI communicator
  • send_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The send message
  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The receive message
  • distribution::Vector{Int64}: The distribution

Returns

  • recv_msg::Union{Int64,Vector{Float64},Vector{Int64},Vector{Bool}}: The received message
source
PeriLab.Solver_control.Verlet.split_vectorMethod
split_vector(input, row_nums, dof)

Split a vector into a vector of matrices

Arguments

  • input::Vector: The input vector
  • row_nums::Vector: The row numbers
  • dof::Int: The degree of freedom

Returns

  • result::Vector: The result vector
source
PeriLab.Solver_control.Verlet.synch_controller_bonds_to_responderMethod
synch_controller_bonds_to_responder(comm::MPI.Comm, overlapnodes, array, dof)

Synch the controller bonds to the responder

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • array::Array: The array
  • dof::Int: The degree of freedom

Returns

  • array::Array: The array
source
PeriLab.Solver_control.Verlet.synch_controller_to_responderMethod
synch_controller_to_responder(comm::MPI.Comm, overlapnodes, vector, dof)

Synch the controller to the responder

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • vector::Vector: The vector
  • dof::Int: The degree of freedom

Returns

  • vector::Vector: The vector
source
PeriLab.Solver_control.Verlet.synch_responder_to_controllerMethod
synch_responder_to_controller(comm::MPI.Comm, overlapnodes, vector, dof)

Synch the responder to the controller

Arguments

  • comm::MPI.Comm: The MPI communicator
  • overlapnodes::Dict: The overlap nodes
  • vector::Vector: The vector
  • dof::Int: The degree of freedom

Returns

  • vector::Vector: The vector
source
PeriLab.Solver_control.Verlet.test_timestepMethod
test_timestep(t::Float64, critical_time_step::Float64)

Compare a time step t with a critical time step critical_time_step and update critical_time_step if t is smaller.

Arguments

  • t::Float64: The time step to compare with critical_time_step.
  • critical_time_step::Float64: The current critical time step.

Returns

  • critical_time_step::Float64: The updated critical time step, which is either the original critical_time_step or t, whichever is smaller.
source

Boundary_conditions

PeriLab.Solver_control.Boundary_conditions.check_valid_bcsMethod
check_valid_bcs(bcs::Dict{String,Any}, datamanager::Module

Check if the boundary conditions are valid

Arguments

  • bcs::Dict{String,Any}: The boundary conditions
  • datamanager::Module: The data manager module

Returns

  • working_bcs::Dict{String,Any}: The valid boundary conditions
source
PeriLab.Solver_control.Boundary_conditions.eval_bc!Function
eval_bc!(field_values::Union{Vector{Float64},Vector{Int64}}, bc::Union{Float64,Float64,Int64,String}, coordinates::Matrix{Float64}, time::Float64, dof::Int64)

Working with if-statements "if t>2 0 else 20 end" works for scalars. If you want to evaluate a vector, please use the Julia notation as input "ifelse.(x .> y, 10, 20)"

source