98 INTEGER(INTG),
INTENT(OUT) :: ERR
104 enters(
"BIOELECTRIC_CONTROL_LOOP_POST_LOOP",err,error,*999)
106 IF(
ASSOCIATED(control_loop))
THEN 107 problem=>control_loop%PROBLEM
108 IF(
ASSOCIATED(problem))
THEN 109 SELECT CASE(control_loop%LOOP_TYPE)
111 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 112 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
113 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<2)
THEN 114 CALL flagerror(
"Problem specification must have at least two entries for a bioelectric problem.",err,error,*999)
116 SELECT CASE(problem%SPECIFICATION(2))
120 CALL monodomain_control_loop_post_loop(control_loop,err,error,*999)
123 &
" is not valid for a bioelectric problem class." 124 CALL flagerror(local_error,err,error,*999)
130 CALL flagerror(
"Control loop problem is not associated.",err,error,*999)
133 CALL flagerror(
"Control loop is not associated.",err,error,*999)
136 exits(
"BIOELECTRIC_CONTROL_LOOP_POST_LOOP")
138 999 errorsexits(
"BIOELECTRIC_CONTROL_LOOP_POST_LOOP",err,error)
152 INTEGER(INTG),
INTENT(IN) :: specification(:)
153 INTEGER(INTG),
INTENT(OUT) :: err
158 enters(
"Bioelectric_EquationsSetSpecificationSet",err,error,*999)
160 IF(
ASSOCIATED(equationsset))
THEN 161 IF(
SIZE(specification,1)<2)
THEN 162 CALL flagerror(
"Equations set specification must have at least two entries for a bioelectric equations set.", &
165 SELECT CASE(specification(2))
171 localerror=
"The second equations set specification of "//
trim(
numbertovstring(specification(2),
"*",err,error))// &
172 &
" is not valid for a bioelectric equations set." 173 CALL flagerror(localerror,err,error,*999)
176 CALL flagerror(
"Equations set is not associated.",err,error,*999)
179 exits(
"Bioelectric_EquationsSetSpecificationSet")
181 999
errors(
"Bioelectric_EquationsSetSpecificationSet",err,error)
182 exits(
"Bioelectric_EquationsSetSpecificationSet")
196 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
197 INTEGER(INTG),
INTENT(OUT) :: ERR
202 enters(
"BIOELECTRIC_FINITE_ELEMENT_CALCULATE",err,error,*999)
204 IF(
ASSOCIATED(equations_set))
THEN 205 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 206 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
207 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<2)
THEN 208 CALL flagerror(
"Equations set specification must have at least two entries for a bioelectric type equations set.", &
211 SELECT CASE(equations_set%SPECIFICATION(2))
217 local_error=
"Equations set type "//
trim(
number_to_vstring(equations_set%SPECIFICATION(2),
"*",err,error))// &
218 &
" is not valid for a bioelectric equation set class." 219 CALL flagerror(local_error,err,error,*999)
222 CALL flagerror(
"Equations set is not associated",err,error,*999)
225 exits(
"BIOELECTRIC_FINITE_ELEMENT_CALCULATE")
227 999 errorsexits(
"BIOELECTRIC_FINITE_ELEMENT_CALCULATE",err,error)
241 INTEGER(INTG),
INTENT(OUT) :: ERR
246 enters(
"BIOELECTRIC_EQUATIONS_SET_SETUP",err,error,*999)
248 IF(
ASSOCIATED(equations_set))
THEN 249 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 250 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
251 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<2)
THEN 252 CALL flagerror(
"Equations set specification must have at least two entries for a bioelectric type equations set.", &
255 SELECT CASE(equations_set%SPECIFICATION(2))
261 local_error=
"Equation set type "//
trim(
number_to_vstring(equations_set%SPECIFICATION(2),
"*",err,error))// &
262 &
" is not valid for a bioelectric equation set class." 263 CALL flagerror(local_error,err,error,*999)
266 CALL flagerror(
"Equations set is not associated.",err,error,*999)
269 exits(
"BIOELECTRIC_EQUATIONS_SET_SETUP")
271 999 errorsexits(
"BIOELECTRIC_EQUATIONS_SET_SETUP",err,error)
284 INTEGER(INTG),
INTENT(IN) :: SOLUTION_METHOD
285 INTEGER(INTG),
INTENT(OUT) :: ERR
290 enters(
"Bioelectric_EquationsSetSolutionMethodSet",err,error,*999)
292 IF(
ASSOCIATED(equations_set))
THEN 293 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 294 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
295 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<2)
THEN 296 CALL flagerror(
"Equations set specification must have at least two entries for a bioelectric type equations set.", &
299 SELECT CASE(equations_set%SPECIFICATION(2))
305 local_error=
"Equations set equation type of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(2),
"*",err,error))// &
306 &
" is not valid for a bioelectric equations set class." 307 CALL flagerror(local_error,err,error,*999)
310 CALL flagerror(
"Equations set is not associated.",err,error,*999)
313 exits(
"Bioelectric_EquationsSetSolutionMethodSet")
315 999 errorsexits(
"Bioelectric_EquationsSetSolutionMethodSet",err,error)
329 INTEGER(INTG),
INTENT(OUT) :: ERR
337 enters(
"BIOELECTRIC_PRE_SOLVE",err,error,*999)
339 IF(
ASSOCIATED(solver))
THEN 340 solvers=>solver%SOLVERS
341 IF(
ASSOCIATED(solvers))
THEN 342 control_loop=>solvers%CONTROL_LOOP
343 IF(
ASSOCIATED(control_loop))
THEN 344 problem=>control_loop%PROBLEM
345 IF(
ASSOCIATED(problem))
THEN 346 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 347 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
348 ELSE IF(
SIZE(problem%SPECIFICATION,1)<2)
THEN 349 CALL flagerror(
"Problem specification must have at least two entries for a bioelectric problem.",err,error,*999)
351 SELECT CASE(problem%SPECIFICATION(2))
355 CALL monodomain_pre_solve(control_loop,solver,err,error,*999)
358 &
" is not valid for a bioelectrics problem class." 359 CALL flagerror(local_error,err,error,*999)
362 CALL flagerror(
"Control loop problem is not associated.",err,error,*999)
365 CALL flagerror(
"Solvers control loop is not associated.",err,error,*999)
368 CALL flagerror(
"Solver solvers is not associated.",err,error,*999)
371 CALL flagerror(
"Solver is not associated.",err,error,*999)
374 exits(
"BIOELECTRIC_PRE_SOLVE")
376 999 errorsexits(
"BIOELECTRIC_PRE_SOLVE",err,error)
389 INTEGER(INTG),
INTENT(OUT) :: ERR
397 enters(
"BIOELECTRIC_POST_SOLVE",err,error,*999)
399 IF(
ASSOCIATED(solver))
THEN 400 solvers=>solver%SOLVERS
401 IF(
ASSOCIATED(solvers))
THEN 402 control_loop=>solvers%CONTROL_LOOP
403 IF(
ASSOCIATED(control_loop))
THEN 404 problem=>control_loop%PROBLEM
405 IF(
ASSOCIATED(problem))
THEN 406 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 407 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
408 ELSE IF(
SIZE(problem%SPECIFICATION,1)<2)
THEN 409 CALL flagerror(
"Problem specification must have at least two entries for a bioelectric problem.",err,error,*999)
411 SELECT CASE(problem%SPECIFICATION(2))
415 CALL monodomain_post_solve(control_loop,solver,err,error,*999)
418 &
" is not valid for a bioelectrics problem class." 419 CALL flagerror(local_error,err,error,*999)
422 CALL flagerror(
"Control loop problem is not associated.",err,error,*999)
425 CALL flagerror(
"Solvers control loop is not associated.",err,error,*999)
428 CALL flagerror(
"Solver solvers is not associated.",err,error,*999)
431 CALL flagerror(
"Solver is not associated.",err,error,*999)
434 exits(
"BIOELECTRIC_POST_SOLVE")
436 999 errorsexits(
"BIOELECTRIC_POST_SOLVE",err,error)
450 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
451 INTEGER(INTG),
INTENT(OUT) :: err
455 INTEGER(INTG) :: problemType
457 enters(
"Bioelectric_ProblemSpecificationSet",err,error,*999)
459 IF(
ASSOCIATED(problem))
THEN 460 IF(
SIZE(problemspecification,1)>=2)
THEN 461 problemtype=problemspecification(2)
462 SELECT CASE(problemtype)
466 CALL monodomain_problemspecificationset(problem,problemspecification,err,error,*999)
468 localerror=
"The second problem specification of "//
trim(
numbertovstring(problemtype,
"*",err,error))// &
469 &
" is not valid for a bioelectric problem." 470 CALL flagerror(localerror,err,error,*999)
473 CALL flagerror(
"Bioelectric problem specification must have a type set.",err,error,*999)
476 CALL flagerror(
"Problem is not associated.",err,error,*999)
479 exits(
"Bioelectric_ProblemSpecificationSet")
481 999
errors(
"Bioelectric_ProblemSpecificationSet",err,error)
482 exits(
"Bioelectric_ProblemSpecificationSet")
497 INTEGER(INTG),
INTENT(OUT) :: ERR
502 enters(
"BIOELECTRIC_PROBLEM_SETUP",err,error,*999)
504 IF(
ASSOCIATED(problem))
THEN 505 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 506 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
507 ELSE IF(
SIZE(problem%SPECIFICATION,1)<2)
THEN 508 CALL flagerror(
"Problem specification must have at least two entries for a bioelectric problem.",err,error,*999)
510 SELECT CASE(problem%SPECIFICATION(2))
516 CALL monodomain_equation_problem_setup(problem,problem_setup,err,error,*999)
519 &
" is not valid for a bioelectric problem class." 520 CALL flagerror(local_error,err,error,*999)
523 CALL flagerror(
"Problem is not associated.",err,error,*999)
526 exits(
"BIOELECTRIC_PROBLEM_SETUP")
528 999 errorsexits(
"BIOELECTRIC_PROBLEM_SETUP",err,error)
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
subroutine, public bioelectric_pre_solve(SOLVER, ERR, ERROR,)
Perform pre-solve actions for the bioelectrics problem class.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
This module handles all problem wide constants.
Converts a number to its equivalent varying string representation.
subroutine, public biodomain_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a bioelectric domain equation type of an bioelectrics equations ...
Contains information on the type of solver to be used.
integer(intg), parameter problem_bioelectric_finite_elasticity_type
Contains information on an equations set.
subroutine, public bioelectric_control_loop_post_loop(CONTROL_LOOP, ERR, ERROR,)
Executes after each loop of a control loop for bioelectric problems, i.e., after each time step for a...
This module contains all string manipulation and transformation routines.
subroutine, public biodomain_equation_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the bioelectric domain problem.
integer(intg), parameter problem_monodomain_equation_type
Contains information on the solvers to be used in a control loop.
integer(intg), parameter problem_bidomain_equation_type
subroutine, public biodomain_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a bioelectric domain equation type of a bioelectric equations set...
Contains information on a control loop.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
subroutine, public biodomain_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a bioelectric domain problem class.
integer(intg), parameter problem_monodomain_strang_splitting_equation_type
subroutine, public biodomain_equationssetsetup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the bioelectric domain equation type of a bioelectric equations set class.
subroutine, public exits(NAME)
Records the exit out of the named procedure.
subroutine, public bioelectric_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the problem specification for a bioelectric equation set class.
This module contains all type definitions in order to avoid cyclic module references.
subroutine, public bioelectric_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a bioelectric equation set class.
subroutine, public bioelectric_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a bioelectric problem class.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
integer(intg), parameter equations_set_monodomain_equation_type
subroutine, public bioelectric_post_solve(SOLVER, ERR, ERROR,)
Performs post solve actions for a bioelectrics problem class.
Contains information for a problem.
subroutine, public biodomain_equation_finite_element_calculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matrices and RHS for a bioelectric domain equation finite element eq...
subroutine, public biodomain_pre_solve(SOLVER, ERR, ERROR,)
Performs pre-solve actions for mono- and bi-domain problems.
Contains information on the setup information for an equations set.
subroutine, public bioelectric_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the problem for a bioelectric problem class.
This module handles all bioelectric domain equation routines.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
This module defines all constants shared across equations set routines.
This module handles all bioelectric class routines.
subroutine, public bioelectric_finite_element_calculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matries and rhs vector for the given element number for a bioelectri...
Flags an error condition.
This module handles all Monodomain equations routines.
subroutine, public bioelectric_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the equations set for a bioelectric equations set class.
integer(intg), parameter equations_set_bidomain_equation_type
This module contains all kind definitions.
subroutine, public biodomain_control_loop_post_loop(CONTROL_LOOP, ERR, ERROR,)
Runs after each control loop iteration.