112 INTEGER(INTG),
INTENT(OUT) :: ERR
115 INTEGER(INTG) :: equations_set_idx
127 INTEGER(INTG) :: OUTPUT_ITERATION_NUMBER,CURRENT_LOOP_ITERATION
129 enters(
"BIODOMAIN_CONTROL_LOOP_POST_LOOP",err,error,*999)
131 IF(
ASSOCIATED(control_loop))
THEN 133 SELECT CASE(control_loop%LOOP_TYPE)
140 time_loop=>control_loop%TIME_LOOP
141 IF(
ASSOCIATED(time_loop))
THEN 142 problem=>control_loop%PROBLEM
143 IF(
ASSOCIATED(problem))
THEN 150 solver_equations=>solver%SOLVER_EQUATIONS
151 IF(
ASSOCIATED(solver_equations))
THEN 152 solver_mapping=>solver_equations%SOLVER_MAPPING
153 IF(
ASSOCIATED(solver_mapping))
THEN 154 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
155 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
156 IF(
ASSOCIATED(equations_set))
THEN 157 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
158 NULLIFY(dependent_region)
159 CALL field_region_get(dependent_field,dependent_region,err,error,*999)
161 parent_loop=>control_loop%PARENT_LOOP
162 IF(
ASSOCIATED(parent_loop))
THEN 164 NULLIFY(time_loop_parent)
165 time_loop_parent=>parent_loop%TIME_LOOP
166 IF(
ASSOCIATED(time_loop_parent))
THEN 167 output_iteration_number=time_loop_parent%OUTPUT_NUMBER
168 current_loop_iteration=time_loop_parent%GLOBAL_ITERATION_NUMBER
173 output_iteration_number=time_loop%OUTPUT_NUMBER
174 current_loop_iteration=time_loop%GLOBAL_ITERATION_NUMBER
179 output_iteration_number=time_loop%OUTPUT_NUMBER
180 current_loop_iteration=time_loop%GLOBAL_ITERATION_NUMBER
185 IF(output_iteration_number>0)
THEN 186 IF(mod(current_loop_iteration,output_iteration_number)==0)
THEN 191 local_error=
"Equations set is not associated for equations set index "// &
193 &
" in the solver mapping." 194 CALL flagerror(local_error,err,error,*999)
198 CALL flagerror(
"Solver equations solver mapping is not associated.",err,error,*999)
201 CALL flagerror(
"Solver solver equations are not associated.",err,error,*999)
204 CALL flagerror(
"Control loop problem is not associated.",err,error,*999)
207 CALL flagerror(
"Time loop is not associated.",err,error,*999)
214 local_error=
"The control loop type of "//
trim(
number_to_vstring(control_loop%LOOP_TYPE,
"*",err,error))// &
216 CALL flagerror(local_error,err,error,*999)
220 CALL flagerror(
"Control loop is not associated.",err,error,*999)
223 exits(
"BIODOMAIN_CONTROL_LOOP_POST_LOOP")
225 999 errorsexits(
"BIODOMAIN_CONTROL_LOOP_POST_LOOP",err,error)
240 INTEGER(INTG),
INTENT(OUT) :: ERR
243 INTEGER(INTG) :: component_idx,dimension_idx,DIMENSION_MULTIPLIER,GEOMETRIC_COMPONENT_NUMBER,GEOMETRIC_SCALING_TYPE, &
244 & NUMBER_OF_DIMENSIONS,NUMBER_OF_MATERIALS_COMPONENTS,GEOMETRIC_MESH_COMPONENT
251 INTEGER(INTG) :: EQUATIONS_SET_SPEC_TYPE,EQUATIONS_SET_SPEC_SUBTYPE
253 enters(
"Biodomain_EquationsSetSetup",err,error,*999)
256 NULLIFY(equations_mapping)
257 NULLIFY(equations_matrices)
258 NULLIFY(geometric_decomposition)
260 IF(
ASSOCIATED(equations_set))
THEN 261 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 262 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
263 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 264 CALL flagerror(
"Equations set specification must have three entries for a biodomain equation class.",err,error,*999)
266 equations_set_spec_type=equations_set%SPECIFICATION(2)
267 equations_set_spec_subtype=equations_set%SPECIFICATION(3)
268 SELECT CASE(equations_set_setup%SETUP_TYPE)
270 SELECT CASE(equations_set_setup%ACTION_TYPE)
277 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
279 &
" is invalid for a bioelectric domain equation." 280 CALL flagerror(local_error,err,error,*999)
285 SELECT CASE(equations_set_setup%ACTION_TYPE)
287 SELECT CASE(equations_set_spec_type)
289 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 291 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
292 & dependent_field,err,error,*999)
293 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
294 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
295 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
296 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
297 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
299 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
300 & geometric_field,err,error,*999)
301 SELECT CASE(equations_set_spec_subtype)
303 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,2,err,error,*999)
304 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
305 & field_deludeln_variable_type],err,error,*999)
308 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,3,err,error,*999)
309 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
310 & field_deludeln_variable_type,field_v_variable_type],err,error,*999)
311 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,
"GeometryM3D",err, &
313 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
314 & field_dp_type,err,error,*999)
315 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,3, &
318 local_error=
"The third equations set specification of "// &
320 &
" is not valid for a monodomain equation set." 321 CALL flagerror(local_error,err,error,*999)
323 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"Vm",err,error,*999)
324 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"dVm/dn", &
326 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
327 & field_scalar_dimension_type,err,error,*999)
328 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
329 & field_scalar_dimension_type,err,error,*999)
330 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
331 & field_dp_type,err,error,*999)
332 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
333 & field_dp_type,err,error,*999)
334 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
336 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
339 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
340 & geometric_mesh_component,err,error,*999)
341 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
342 & geometric_mesh_component,err,error,*999)
343 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
344 & geometric_mesh_component,err,error,*999)
345 SELECT CASE(equations_set%SOLUTION_METHOD)
347 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
348 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
349 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
350 & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
352 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
353 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
355 CALL flagerror(
"Not implemented.",err,error,*999)
357 CALL flagerror(
"Not implemented.",err,error,*999)
359 CALL flagerror(
"Not implemented.",err,error,*999)
361 CALL flagerror(
"Not implemented.",err,error,*999)
363 CALL flagerror(
"Not implemented.",err,error,*999)
365 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
367 CALL flagerror(local_error,err,error,*999)
371 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
372 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
373 SELECT CASE(equations_set_spec_subtype)
375 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
376 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type], &
380 CALL field_number_of_variables_check(equations_set_setup%FIELD,3,err,error,*999)
381 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
382 & field_v_variable_type],err,error,*999)
383 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
384 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,3,err,error,*999)
386 local_error=
"The third equations set specification of "// &
388 &
" is not valid for a monodomain equation set." 389 CALL flagerror(local_error,err,error,*999)
391 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
393 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
395 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
396 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
397 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
398 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,1,err,error,*999)
399 SELECT CASE(equations_set%SOLUTION_METHOD)
401 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
402 & field_node_based_interpolation,err,error,*999)
403 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
404 & field_node_based_interpolation,err,error,*999)
406 CALL flagerror(
"Not implemented.",err,error,*999)
408 CALL flagerror(
"Not implemented.",err,error,*999)
410 CALL flagerror(
"Not implemented.",err,error,*999)
412 CALL flagerror(
"Not implemented.",err,error,*999)
414 CALL flagerror(
"Not implemented.",err,error,*999)
416 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
418 CALL flagerror(local_error,err,error,*999)
422 SELECT CASE(equations_set_spec_subtype)
424 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 426 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
427 & dependent_field,err,error,*999)
428 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
429 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
430 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
431 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
432 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
434 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
435 & geometric_field,err,error,*999)
436 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,4,err,error,*999)
438 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
439 & field_deludeln_variable_type,field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
440 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"Vm",err,error,*999)
441 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"dVm/dn", &
443 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,
"Phie", &
445 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type,
"dPhie/dn", &
447 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
448 & field_scalar_dimension_type,err,error,*999)
449 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
450 & field_scalar_dimension_type,err,error,*999)
451 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
452 & field_scalar_dimension_type,err,error,*999)
453 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
454 & field_scalar_dimension_type,err,error,*999)
455 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
456 & field_dp_type,err,error,*999)
457 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
458 & field_dp_type,err,error,*999)
459 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
460 & field_dp_type,err,error,*999)
461 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
462 & field_dp_type,err,error,*999)
463 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
465 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
466 & field_deludeln_variable_type,1,err,error,*999)
467 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,1, &
469 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
470 & field_delvdeln_variable_type,1,err,error,*999)
472 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
473 & geometric_mesh_component,err,error,*999)
474 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
475 & geometric_mesh_component,err,error,*999)
476 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
477 & geometric_mesh_component,err,error,*999)
478 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,1, &
479 & geometric_mesh_component,err,error,*999)
480 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type,1, &
481 & geometric_mesh_component,err,error,*999)
482 SELECT CASE(equations_set%SOLUTION_METHOD)
484 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
485 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
486 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
487 & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
488 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
489 & field_v_variable_type,1,field_node_based_interpolation,err,error,*999)
490 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
491 & field_delvdeln_variable_type,1,field_node_based_interpolation,err,error,*999)
493 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
494 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
496 CALL flagerror(
"Not implemented.",err,error,*999)
498 CALL flagerror(
"Not implemented.",err,error,*999)
500 CALL flagerror(
"Not implemented.",err,error,*999)
502 CALL flagerror(
"Not implemented.",err,error,*999)
504 CALL flagerror(
"Not implemented.",err,error,*999)
506 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
508 CALL flagerror(local_error,err,error,*999)
512 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
513 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
515 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
516 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
517 & field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
518 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
520 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
522 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_scalar_dimension_type, &
524 CALL field_dimension_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_scalar_dimension_type, &
526 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
527 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
528 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
529 CALL field_data_type_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_dp_type,err,error,*999)
530 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
531 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,1,err,error,*999)
532 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,1,err,error,*999)
533 CALL field_number_of_components_check(equations_set_setup%FIELD,field_delvdeln_variable_type,1,err,error,*999)
534 SELECT CASE(equations_set%SOLUTION_METHOD)
536 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
537 & field_node_based_interpolation,err,error,*999)
538 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
539 & field_node_based_interpolation,err,error,*999)
540 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,1, &
541 & field_node_based_interpolation,err,error,*999)
542 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_delvdeln_variable_type,1, &
543 & field_node_based_interpolation,err,error,*999)
545 CALL flagerror(
"Not implemented.",err,error,*999)
547 CALL flagerror(
"Not implemented.",err,error,*999)
549 CALL flagerror(
"Not implemented.",err,error,*999)
551 CALL flagerror(
"Not implemented.",err,error,*999)
553 CALL flagerror(
"Not implemented.",err,error,*999)
555 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
557 CALL flagerror(local_error,err,error,*999)
561 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 562 CALL flagerror(
"The dependent field for the second bidomain equation cannot be auto-created. "// &
563 &
"You must pass in the field from the first bidomain equation.",err,error,*999)
565 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
566 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
568 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
569 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
570 & field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
571 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
573 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
575 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_scalar_dimension_type, &
577 CALL field_dimension_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_scalar_dimension_type, &
579 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
580 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
581 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
582 CALL field_data_type_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_dp_type,err,error,*999)
583 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
584 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,1,err,error,*999)
585 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,1,err,error,*999)
586 CALL field_number_of_components_check(equations_set_setup%FIELD,field_delvdeln_variable_type,1,err,error,*999)
587 SELECT CASE(equations_set%SOLUTION_METHOD)
589 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
590 & field_node_based_interpolation,err,error,*999)
591 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
592 & field_node_based_interpolation,err,error,*999)
593 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,1, &
594 & field_node_based_interpolation,err,error,*999)
595 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_delvdeln_variable_type,1, &
596 & field_node_based_interpolation,err,error,*999)
598 CALL flagerror(
"Not implemented.",err,error,*999)
600 CALL flagerror(
"Not implemented.",err,error,*999)
602 CALL flagerror(
"Not implemented.",err,error,*999)
604 CALL flagerror(
"Not implemented.",err,error,*999)
606 CALL flagerror(
"Not implemented.",err,error,*999)
608 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
610 CALL flagerror(local_error,err,error,*999)
614 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set_spec_subtype,
"*",err,error))// &
615 &
" is invalid for a bidomain equations set type." 616 CALL flagerror(local_error,err,error,*999)
619 local_error=
"The equation set type of "//
trim(
number_to_vstring(equations_set_spec_type,
"*",err,error))// &
620 &
" is invalid for a biodomain equations set class." 621 CALL flagerror(local_error,err,error,*999)
624 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 625 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
628 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
630 &
" is invalid for a bioelectric domain equation" 631 CALL flagerror(local_error,err,error,*999)
635 SELECT CASE(equations_set_setup%ACTION_TYPE)
637 SELECT CASE(equations_set_spec_type)
639 SELECT CASE(equations_set_spec_subtype)
642 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 644 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
645 & independent_field,err,error,*999)
646 CALL field_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,
"Independent Field",err,error,*999)
647 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
648 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
650 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
651 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
653 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
654 & geometric_field,err,error,*999)
655 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,4,err,error,*999)
656 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,[field_u_variable_type, &
657 & field_v_variable_type,field_u1_variable_type,field_u2_variable_type],err,error,*999)
659 CALL field_variable_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
660 &
"XB_state_variables",err,error,*999)
662 CALL field_variable_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
663 &
"Active_stress",err,error,*999)
665 CALL field_variable_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
666 &
"sarcomere half length",err,error,*999)
667 CALL field_variable_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type, &
668 &
"contraction velocity",err,error,*999)
670 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
671 & field_scalar_dimension_type,err,error,*999)
673 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
674 & field_dp_type,err,error,*999)
675 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
676 & field_dp_type,err,error,*999)
677 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type, &
678 & field_dp_type,err,error,*999)
679 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
680 & field_intg_type,err,error,*999)
682 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
685 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
688 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
691 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,5, &
694 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
697 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
700 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type, &
703 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
704 & geometric_mesh_component,err,error,*999)
705 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,1, &
706 & geometric_mesh_component,err,error,*999)
708 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,2, &
709 & geometric_mesh_component,err,error,*999)
710 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,3, &
711 & geometric_mesh_component,err,error,*999)
712 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,4, &
713 & geometric_mesh_component,err,error,*999)
714 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,5, &
715 & geometric_mesh_component,err,error,*999)
716 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,6, &
717 & geometric_mesh_component,err,error,*999)
719 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,1, &
720 & geometric_mesh_component,err,error,*999)
721 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,2, &
722 & geometric_mesh_component,err,error,*999)
723 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,3, &
724 & geometric_mesh_component,err,error,*999)
725 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,4, &
726 & geometric_mesh_component,err,error,*999)
727 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,5, &
728 & geometric_mesh_component,err,error,*999)
729 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type,1, &
730 & geometric_mesh_component,err,error,*999)
731 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type,2, &
732 & geometric_mesh_component,err,error,*999)
733 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type,3, &
734 & geometric_mesh_component,err,error,*999)
736 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
737 & 4,geometric_mesh_component,err,error,*999)
739 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type,1, &
740 & geometric_mesh_component,err,error,*999)
741 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type,2, &
742 & geometric_mesh_component,err,error,*999)
743 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type,3, &
744 & geometric_mesh_component,err,error,*999)
745 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type,4, &
746 & geometric_mesh_component,err,error,*999)
747 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type,5, &
748 & geometric_mesh_component,err,error,*999)
749 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u2_variable_type,6, &
750 & geometric_mesh_component,err,error,*999)
751 SELECT CASE(equations_set%SOLUTION_METHOD)
753 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
754 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
756 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
757 & field_u_variable_type,2,field_node_based_interpolation,err,error,*999)
758 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
759 & field_u_variable_type,3,field_node_based_interpolation,err,error,*999)
760 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
761 & field_u_variable_type,4,field_node_based_interpolation,err,error,*999)
762 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
763 & field_u_variable_type,5,field_node_based_interpolation,err,error,*999)
764 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
765 & field_u_variable_type,6,field_node_based_interpolation,err,error,*999)
767 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
768 & field_v_variable_type,1,field_node_based_interpolation,err,error,*999)
769 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
770 & field_v_variable_type,2,field_node_based_interpolation,err,error,*999)
771 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
772 & field_v_variable_type,3,field_node_based_interpolation,err,error,*999)
773 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
774 & field_v_variable_type,4,field_node_based_interpolation,err,error,*999)
775 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
776 & field_v_variable_type,5,field_node_based_interpolation,err,error,*999)
777 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
778 & field_u1_variable_type,1,field_node_based_interpolation,err,error,*999)
779 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
780 & field_u1_variable_type,2,field_constant_interpolation,err,error,*999)
781 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
782 & field_u1_variable_type,3,field_constant_interpolation,err,error,*999)
784 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
785 & field_u1_variable_type,4,field_node_based_interpolation,err,error,*999)
787 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
788 & field_u2_variable_type,1,field_node_based_interpolation,err,error,*999)
789 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
790 & field_u2_variable_type,2,field_constant_interpolation,err,error,*999)
791 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
792 & field_u2_variable_type,3,field_node_based_interpolation,err,error,*999)
793 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
794 & field_u2_variable_type,4,field_node_based_interpolation,err,error,*999)
795 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
796 & field_u2_variable_type,5,field_node_based_interpolation,err,error,*999)
797 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
798 & field_u2_variable_type,6,field_node_based_interpolation,err,error,*999)
800 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
801 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
803 CALL flagerror(
"Not implemented.",err,error,*999)
805 CALL flagerror(
"Not implemented.",err,error,*999)
807 CALL flagerror(
"Not implemented.",err,error,*999)
809 CALL flagerror(
"Not implemented.",err,error,*999)
811 CALL flagerror(
"Not implemented.",err,error,*999)
813 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
815 CALL flagerror(local_error,err,error,*999)
819 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
820 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
821 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
822 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_v_variable_type, &
823 & field_u1_variable_type,field_u2_variable_type],err,error,*999)
825 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
828 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
829 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_intg_type,err,error,*999)
830 CALL field_data_type_check(equations_set_setup%FIELD,field_u1_variable_type,field_dp_type,err,error,*999)
831 CALL field_data_type_check(equations_set_setup%FIELD,field_u2_variable_type,field_dp_type,err,error,*999)
833 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
835 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,6,err,error,*999)
837 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,4,err,error,*999)
839 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,5,err,error,*999)
841 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u1_variable_type,4,err,error,*999)
843 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u1_variable_type,3,err,error,*999)
845 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u2_variable_type,6,err,error,*999)
846 SELECT CASE(equations_set%SOLUTION_METHOD)
848 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
849 & field_node_based_interpolation,err,error,*999)
851 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,2, &
852 & field_node_based_interpolation,err,error,*999)
853 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,3, &
854 & field_node_based_interpolation,err,error,*999)
855 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,4, &
856 & field_node_based_interpolation,err,error,*999)
857 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,5, &
858 & field_node_based_interpolation,err,error,*999)
859 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,6, &
860 & field_node_based_interpolation,err,error,*999)
862 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,1, &
863 & field_node_based_interpolation,err,error,*999)
864 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,2, &
865 & field_node_based_interpolation,err,error,*999)
866 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,3, &
867 & field_node_based_interpolation,err,error,*999)
868 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,4, &
869 & field_node_based_interpolation,err,error,*999)
870 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,5, &
871 & field_node_based_interpolation,err,error,*999)
872 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u1_variable_type,1, &
873 & field_node_based_interpolation,err,error,*999)
874 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u1_variable_type,2, &
875 & field_constant_interpolation,err,error,*999)
876 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u1_variable_type,3, &
877 & field_constant_interpolation,err,error,*999)
879 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u1_variable_type,4, &
880 & field_node_based_interpolation,err,error,*999)
882 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,1, &
883 & field_node_based_interpolation,err,error,*999)
884 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,2, &
885 & field_constant_interpolation,err,error,*999)
886 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,3, &
887 & field_node_based_interpolation,err,error,*999)
888 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,4, &
889 & field_node_based_interpolation,err,error,*999)
890 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,5, &
891 & field_node_based_interpolation,err,error,*999)
892 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,6, &
893 & field_node_based_interpolation,err,error,*999)
895 CALL flagerror(
"Not implemented.",err,error,*999)
897 CALL flagerror(
"Not implemented.",err,error,*999)
899 CALL flagerror(
"Not implemented.",err,error,*999)
901 CALL flagerror(
"Not implemented.",err,error,*999)
903 CALL flagerror(
"Not implemented.",err,error,*999)
905 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
907 CALL flagerror(local_error,err,error,*999)
911 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 913 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
914 & independent_field,err,error,*999)
915 CALL field_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,
"Independent Field",err,error,*999)
916 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
917 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
919 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
920 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
922 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
923 & geometric_field,err,error,*999)
924 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,2,err,error,*999)
925 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,[field_u_variable_type, &
926 & field_v_variable_type],err,error,*999)
927 CALL field_variable_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
928 &
"Active_stress",err,error,*999)
929 CALL field_variable_label_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
930 &
"fibre_info",err,error,*999)
931 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
932 & field_dp_type,err,error,*999)
933 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
934 & field_intg_type,err,error,*999)
935 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
937 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,5, &
940 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
941 & geometric_mesh_component,err,error,*999)
942 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,1, &
943 & geometric_mesh_component,err,error,*999)
944 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,1, &
945 & geometric_mesh_component,err,error,*999)
946 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,2, &
947 & geometric_mesh_component,err,error,*999)
948 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,3, &
949 & geometric_mesh_component,err,error,*999)
950 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,4, &
951 & geometric_mesh_component,err,error,*999)
952 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type,5, &
953 & geometric_mesh_component,err,error,*999)
954 SELECT CASE(equations_set%SOLUTION_METHOD)
956 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
957 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
958 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
959 & field_v_variable_type,1,field_node_based_interpolation,err,error,*999)
960 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
961 & field_v_variable_type,2,field_node_based_interpolation,err,error,*999)
962 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
963 & field_v_variable_type,3,field_node_based_interpolation,err,error,*999)
964 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
965 & field_v_variable_type,4,field_node_based_interpolation,err,error,*999)
966 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
967 & field_v_variable_type,5,field_node_based_interpolation,err,error,*999)
969 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
970 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
972 CALL flagerror(
"Not implemented.",err,error,*999)
974 CALL flagerror(
"Not implemented.",err,error,*999)
976 CALL flagerror(
"Not implemented.",err,error,*999)
978 CALL flagerror(
"Not implemented.",err,error,*999)
980 CALL flagerror(
"Not implemented.",err,error,*999)
982 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
984 CALL flagerror(local_error,err,error,*999)
988 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
989 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
990 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
991 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_v_variable_type],err, &
993 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
994 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_intg_type,err,error,*999)
995 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
996 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,5,err,error,*999)
997 SELECT CASE(equations_set%SOLUTION_METHOD)
999 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
1000 & field_node_based_interpolation,err,error,*999)
1001 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,1, &
1002 & field_node_based_interpolation,err,error,*999)
1003 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,2, &
1004 & field_node_based_interpolation,err,error,*999)
1005 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,3, &
1006 & field_node_based_interpolation,err,error,*999)
1007 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,4, &
1008 & field_node_based_interpolation,err,error,*999)
1009 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,5, &
1010 & field_node_based_interpolation,err,error,*999)
1012 CALL flagerror(
"Not implemented.",err,error,*999)
1014 CALL flagerror(
"Not implemented.",err,error,*999)
1016 CALL flagerror(
"Not implemented.",err,error,*999)
1018 CALL flagerror(
"Not implemented.",err,error,*999)
1020 CALL flagerror(
"Not implemented.",err,error,*999)
1022 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1024 CALL flagerror(local_error,err,error,*999)
1028 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set_spec_subtype,
"*",err,error))// &
1029 " is not implemented for an equations set setup independent type." 1030 CALL flagerror(local_error,err,error,*999)
1033 local_error=
"Equations set setup independent type is not implemented for an equations set bidomain equation type" 1034 CALL flagerror(local_error,err,error,*999)
1036 local_error=
"The equation set type of "//
trim(
number_to_vstring(equations_set_spec_type,
"*",err,error))// &
1037 &
" is invalid for a biodomain equations set class." 1038 CALL flagerror(local_error,err,error,*999)
1041 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 1042 CALL field_create_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
1045 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1046 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1047 &
" is invalid for a bioelectric domain equation" 1048 CALL flagerror(local_error,err,error,*999)
1052 SELECT CASE(equations_set_setup%ACTION_TYPE)
1054 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 1055 equations_materials=>equations_set%MATERIALS
1056 IF(
ASSOCIATED(equations_materials))
THEN 1057 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 1059 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_materials% &
1060 & materials_field,err,error,*999)
1061 CALL field_label_set(equations_materials%MATERIALS_FIELD,
"Materials Field",err,error,*999)
1062 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
1063 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type,err,error,*999)
1064 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1065 CALL field_mesh_decomposition_set_and_lock(equations_materials%MATERIALS_FIELD,geometric_decomposition, &
1067 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
1068 & geometric_field,err,error,*999)
1069 CALL field_number_of_variables_set_and_lock(equations_materials%MATERIALS_FIELD,1,err,error,*999)
1070 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type], &
1072 CALL field_variable_label_set(equations_materials%MATERIALS_FIELD,field_u_variable_type,
"Materials",err,error,*999)
1073 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1074 & field_vector_dimension_type,err,error,*999)
1075 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1076 & field_dp_type,err,error,*999)
1077 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1078 & number_of_dimensions,err,error,*999)
1081 number_of_materials_components=number_of_dimensions+2
1082 dimension_multiplier=1
1085 number_of_materials_components=2*number_of_dimensions+2
1086 dimension_multiplier=2
1089 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1090 & number_of_materials_components,err,error,*999)
1092 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1093 & 1,geometric_component_number,err,error,*999)
1094 DO component_idx=1,2
1095 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1096 & component_idx,geometric_component_number,err,error,*999)
1097 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1098 & component_idx,field_constant_interpolation,err,error,*999)
1100 CALL field_component_label_set(equations_materials%MATERIALS_FIELD,field_u_variable_type,1,
"Am", &
1102 CALL field_component_label_set(equations_materials%MATERIALS_FIELD,field_u_variable_type,2,
"Cm", &
1105 DO component_idx=1,number_of_dimensions
1106 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1107 & component_idx,geometric_component_number,err,error,*999)
1108 DO dimension_idx=1,dimension_multiplier
1109 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1110 & 2+component_idx+(dimension_idx-1)*number_of_dimensions,geometric_component_number,err,error,*999)
1111 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1112 & 2+component_idx+(dimension_idx-1)*number_of_dimensions,field_constant_interpolation,err,error,*999)
1116 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1117 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
1120 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
1121 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1122 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
1123 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
1124 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1126 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1127 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1128 & number_of_dimensions,err,error,*999)
1129 SELECT CASE(equations_set_spec_type)
1132 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions+2, &
1136 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,2*number_of_dimensions+2, &
1139 local_error=
"The equations set type of "//
trim(
number_to_vstring(equations_set_spec_type,
"*",err,error))// &
1140 &
" is invalid for a bioelectrics class." 1141 CALL flagerror(local_error,err,error,*999)
1145 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1148 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
1151 equations_materials=>equations_set%MATERIALS
1152 IF(
ASSOCIATED(equations_materials))
THEN 1153 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 1155 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
1157 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1158 & number_of_dimensions,err,error,*999)
1161 number_of_materials_components=number_of_dimensions+2
1162 dimension_multiplier=1
1165 number_of_materials_components=2*number_of_dimensions+2
1166 dimension_multiplier=2
1169 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1170 & field_values_set_type,1,200.0_dp,err,error,*999)
1172 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1173 & field_values_set_type,2,0.0025_dp,err,error,*999)
1175 DO component_idx=1,number_of_dimensions
1176 DO dimension_idx=1,dimension_multiplier
1177 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1178 & field_values_set_type,2+component_idx+(dimension_idx-1)*number_of_dimensions,1.0_dp,err,error,*999)
1183 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1186 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1187 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1188 &
" is invalid for a bioelectric domain equation." 1189 CALL flagerror(local_error,err,error,*999)
1192 SELECT CASE(equations_set_setup%ACTION_TYPE)
1198 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1199 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1200 &
" is invalid for a bioelectric domain equation." 1201 CALL flagerror(local_error,err,error,*999)
1204 SELECT CASE(equations_set_setup%ACTION_TYPE)
1206 CALL flagerror(
"Not implemented.",err,error,*999)
1208 CALL flagerror(
"Not implemented.",err,error,*999)
1210 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1211 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1212 &
" is invalid for a bioelectric domain equation." 1213 CALL flagerror(local_error,err,error,*999)
1216 SELECT CASE(equations_set_setup%ACTION_TYPE)
1218 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 1219 IF(
ASSOCIATED(equations_set%MATERIALS))
THEN 1220 IF(equations_set%MATERIALS%MATERIALS_FINISHED)
THEN 1224 SELECT CASE(equations_set_spec_type)
1228 SELECT CASE(equations_set_spec_subtype)
1234 local_error=
"The third equations set specification of "// &
1236 &
" is invalid for a bidomain equation." 1237 CALL flagerror(local_error,err,error,*999)
1240 local_error=
"The second equations set specification of "// &
1242 &
" is invalid for a bioelectrics class." 1243 CALL flagerror(local_error,err,error,*999)
1246 CALL flagerror(
"Equations set materials field has not been finished.",err,error,*999)
1249 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1252 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
1255 SELECT CASE(equations_set%SOLUTION_METHOD)
1262 SELECT CASE(equations_set_spec_type)
1268 SELECT CASE(equations_set_spec_subtype)
1279 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set_spec_subtype,
"*",err,error))// &
1280 &
" is invalid for a bidomain equation type." 1281 CALL flagerror(local_error,err,error,*999)
1284 local_error=
"The equations set type of "//
trim(
number_to_vstring(equations_set_spec_type,
"*",err,error))// &
1285 &
" is invalid for a bioelectrics class." 1286 CALL flagerror(local_error,err,error,*999)
1291 SELECT CASE(equations_set_spec_type)
1304 SELECT CASE(equations%SPARSITY_TYPE)
1316 local_error=
"The equations matrices sparsity type of "// &
1318 CALL flagerror(local_error,err,error,*999)
1322 SELECT CASE(equations_set_spec_subtype)
1335 SELECT CASE(equations%SPARSITY_TYPE)
1347 local_error=
"The equations matrices sparsity type of "// &
1349 CALL flagerror(local_error,err,error,*999)
1353 SELECT CASE(equations%SPARSITY_TYPE)
1363 local_error=
"The equations matrices sparsity type of "// &
1365 CALL flagerror(local_error,err,error,*999)
1368 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set_spec_subtype,
"*",err,error))// &
1369 &
" is invalid for a bidomain equation type." 1370 CALL flagerror(local_error,err,error,*999)
1373 local_error=
"The equations set type of "//
trim(
number_to_vstring(equations_set_spec_type,
"*",err,error))// &
1374 &
" is invalid for a bioelectrics class." 1375 CALL flagerror(local_error,err,error,*999)
1379 CALL flagerror(
"Not implemented.",err,error,*999)
1381 CALL flagerror(
"Not implemented.",err,error,*999)
1383 CALL flagerror(
"Not implemented.",err,error,*999)
1385 CALL flagerror(
"Not implemented.",err,error,*999)
1387 CALL flagerror(
"Not implemented.",err,error,*999)
1389 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1391 CALL flagerror(local_error,err,error,*999)
1394 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1395 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1396 &
" is invalid for a bioelectric domain equation." 1397 CALL flagerror(local_error,err,error,*999)
1400 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1401 &
" is invalid for a bioelectric domain equation." 1402 CALL flagerror(local_error,err,error,*999)
1405 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1408 exits(
"Biodomain_EquationsSetSetup")
1410 999 errorsexits(
"Biodomain_EquationsSetSetup",err,error)
1424 INTEGER(INTG),
INTENT(IN) :: SOLUTION_METHOD
1425 INTEGER(INTG),
INTENT(OUT) :: ERR
1429 INTEGER(INTG) :: EQUATIONS_SET_SPEC_TYPE,EQUATIONS_SET_SPEC_SUBTYPE
1431 enters(
"Biodomain_EquationsSetSolutionMethodSet",err,error,*999)
1433 IF(
ASSOCIATED(equations_set))
THEN 1434 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 1435 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
1436 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 1437 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
1439 equations_set_spec_type=equations_set%SPECIFICATION(2)
1440 equations_set_spec_subtype=equations_set%SPECIFICATION(3)
1441 SELECT CASE(equations_set_spec_type)
1443 SELECT CASE(equations_set_spec_subtype)
1447 SELECT CASE(solution_method)
1451 CALL flagerror(
"Not implemented.",err,error,*999)
1453 CALL flagerror(
"Not implemented.",err,error,*999)
1455 CALL flagerror(
"Not implemented.",err,error,*999)
1457 CALL flagerror(
"Not implemented.",err,error,*999)
1459 CALL flagerror(
"Not implemented.",err,error,*999)
1461 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 1462 CALL flagerror(local_error,err,error,*999)
1465 local_error=
"Equations set subtype of "//
trim(
number_to_vstring(equations_set_spec_subtype,
"*",err,error))// &
1466 &
" is not valid for a bioelectric monodomain equation type of an bioelectrics equations set class." 1467 CALL flagerror(local_error,err,error,*999)
1470 SELECT CASE(equations_set_spec_subtype)
1472 SELECT CASE(solution_method)
1476 CALL flagerror(
"Not implemented.",err,error,*999)
1478 CALL flagerror(
"Not implemented.",err,error,*999)
1480 CALL flagerror(
"Not implemented.",err,error,*999)
1482 CALL flagerror(
"Not implemented.",err,error,*999)
1484 CALL flagerror(
"Not implemented.",err,error,*999)
1486 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 1487 CALL flagerror(local_error,err,error,*999)
1490 SELECT CASE(solution_method)
1494 CALL flagerror(
"Not implemented.",err,error,*999)
1496 CALL flagerror(
"Not implemented.",err,error,*999)
1498 CALL flagerror(
"Not implemented.",err,error,*999)
1500 CALL flagerror(
"Not implemented.",err,error,*999)
1502 CALL flagerror(
"Not implemented.",err,error,*999)
1504 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 1505 CALL flagerror(local_error,err,error,*999)
1508 local_error=
"Equations set subtype of "//
trim(
number_to_vstring(equations_set_spec_subtype,
"*",err,error))// &
1509 &
" is not valid for a bioelectric bidomain equation type of an bioelectrics equations set class." 1510 CALL flagerror(local_error,err,error,*999)
1513 local_error=
"Equations set type of "//
trim(
number_to_vstring(equations_set_spec_type,
"*",err,error))// &
1514 &
" is not valid for a bioelectrics equations set class." 1515 CALL flagerror(local_error,err,error,*999)
1518 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1521 exits(
"Biodomain_EquationsSetSolutionMethodSet")
1523 999
errors(
"Biodomain_EquationsSetSolutionMethodSet",err,error)
1524 exits(
"Biodomain_EquationsSetSolutionMethodSet")
1538 INTEGER(INTG),
INTENT(IN) :: specification(:)
1539 INTEGER(INTG),
INTENT(OUT) :: err
1543 INTEGER(INTG) :: equationsSetType,equationsSetSubtype
1545 enters(
"BiodomainEquation_EquationsSetSpecificationSet",err,error,*999)
1547 IF(
ASSOCIATED(equationsset))
THEN 1548 IF(
SIZE(specification,1)/=3)
THEN 1549 CALL flagerror(
"Equations set specification must have three entries for a biodomain equation type equations set.", &
1552 equationssettype=specification(2)
1553 equationssetsubtype=specification(3)
1554 SELECT CASE(equationssettype)
1556 SELECT CASE(equationssetsubtype)
1565 localerror=
"The third equations set specification of "//
trim(
numbertovstring(equationssetsubtype,
"*",err,error))// &
1566 &
" is not valid for a monodomain type of a bioelectric equations set." 1567 CALL flagerror(localerror,err,error,*999)
1570 SELECT CASE(equationssetsubtype)
1576 localerror=
"The third equations set specification of "//
trim(
numbertovstring(equationssetsubtype,
"*",err,error))// &
1577 &
" is not valid for a bidomain equation type of a bioelectric equations set class." 1578 CALL flagerror(localerror,err,error,*999)
1581 localerror=
"The second equations set specification of "//
trim(
numbertovstring(equationssettype,
"*",err,error))// &
1582 &
" is not valid for a bioelectric equations set." 1583 CALL flagerror(localerror,err,error,*999)
1586 IF(
ALLOCATED(equationsset%specification))
THEN 1587 CALL flagerror(
"Equations set specification is already allocated.",err,error,*999)
1589 ALLOCATE(equationsset%specification(3),stat=err)
1590 IF(err/=0)
CALL flagerror(
"Could not allocate equations set specification.",err,error,*999)
1594 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1597 exits(
"Biodomain_EquationsSetSpecificationSet")
1599 999
errors(
"Biodomain_EquationsSetSpecificationSet",err,error)
1600 exits(
"Biodomain_EquationsSetSpecificationSet")
1614 INTEGER(INTG),
INTENT(OUT) :: ERR
1617 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
1623 enters(
"BIODOMAIN_PRE_SOLVE",err,error,*999)
1625 IF(
ASSOCIATED(solver))
THEN 1626 solvers=>solver%SOLVERS
1627 IF(
ASSOCIATED(solvers))
THEN 1628 control_loop=>solvers%CONTROL_LOOP
1629 IF(
ASSOCIATED(control_loop))
THEN 1631 problem=>control_loop%PROBLEM
1632 IF(
ASSOCIATED(problem))
THEN 1633 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 1634 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
1635 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 1636 CALL flagerror(
"Problem specification must have three entries for a biodomain problem.",err,error,*999)
1638 SELECT CASE(problem%SPECIFICATION(2))
1640 SELECT CASE(problem%SPECIFICATION(3))
1642 SELECT CASE(solver%GLOBAL_NUMBER)
1648 local_error=
"The solver global number of "//
trim(
number_to_vstring(solver%GLOBAL_NUMBER,
"*",err,error))// &
1649 &
" is invalid for a Gudunov split monodomain problem." 1650 CALL flagerror(local_error,err,error,*999)
1653 SELECT CASE(solver%GLOBAL_NUMBER)
1655 CALL solver_dae_times_set(solver,current_time,current_time+time_increment/2.0_dp,err,error,*999)
1659 CALL solver_dae_times_set(solver,current_time+time_increment/2.0_dp,current_time+time_increment, &
1662 local_error=
"The solver global number of "//
trim(
number_to_vstring(solver%GLOBAL_NUMBER,
"*",err,error))// &
1663 &
" is invalid for a Strang split monodomain problem." 1664 CALL flagerror(local_error,err,error,*999)
1667 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
1668 &
" is invalid for a monodomain problem type." 1669 CALL flagerror(local_error,err,error,*999)
1672 SELECT CASE(problem%SPECIFICATION(3))
1674 SELECT CASE(solver%GLOBAL_NUMBER)
1682 local_error=
"The solver global number of "//
trim(
number_to_vstring(solver%GLOBAL_NUMBER,
"*",err,error))// &
1683 &
" is invalid for a Gudunov split bidomain problem." 1684 CALL flagerror(local_error,err,error,*999)
1687 SELECT CASE(solver%GLOBAL_NUMBER)
1689 CALL solver_dae_times_set(solver,current_time,current_time+time_increment/2.0_dp,err,error,*999)
1695 CALL solver_dae_times_set(solver,current_time+time_increment/2.0_dp,current_time+time_increment, &
1698 local_error=
"The solver global number of "//
trim(
number_to_vstring(solver%GLOBAL_NUMBER,
"*",err,error))// &
1699 &
" is invalid for a Gudunov split bidomain problem." 1700 CALL flagerror(local_error,err,error,*999)
1703 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
1704 &
" is invalid for a bidomain problem type." 1705 CALL flagerror(local_error,err,error,*999)
1708 SELECT CASE(problem%SPECIFICATION(3))
1712 SELECT CASE(solver%GLOBAL_NUMBER)
1718 local_error=
"The solver global number of "//
trim(
number_to_vstring(solver%GLOBAL_NUMBER,
"*",err,error))// &
1719 &
" is invalid for a bioelectrics finite elasticity problem." 1720 CALL flagerror(local_error,err,error,*999)
1723 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
1724 &
" is invalid for a monodomain problem type." 1725 CALL flagerror(local_error,err,error,*999)
1728 local_error=
"The problem type of "//
trim(
number_to_vstring(problem%SPECIFICATION(2),
"*",err,error))// &
1730 CALL flagerror(local_error,err,error,*999)
1733 CALL flagerror(
"Control loop problem is not associated.",err,error,*999)
1736 CALL flagerror(
"Solvers control loop is not associated.",err,error,*999)
1739 CALL flagerror(
"Solver solvers is not associated.",err,error,*999)
1742 CALL flagerror(
"Solver is not associated.",err,error,*999)
1745 exits(
"BIODOMAIN_PRE_SOLVE")
1747 999 errorsexits(
"BIODOMAIN_PRE_SOLVE",err,error)
1762 INTEGER(INTG),
INTENT(OUT) :: ERR
1772 NULLIFY(cellml_equations)
1773 NULLIFY(control_loop)
1776 NULLIFY(solver_equations)
1778 enters(
"BIODOMAIN_EQUATION_PROBLEM_SETUP",err,error,*999)
1780 IF(
ASSOCIATED(problem))
THEN 1781 SELECT CASE(problem_setup%SETUP_TYPE)
1783 SELECT CASE(problem_setup%ACTION_TYPE)
1789 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1791 &
" is invalid for a bioelectric domain equation." 1792 CALL flagerror(local_error,err,error,*999)
1795 SELECT CASE(problem_setup%ACTION_TYPE)
1803 control_loop_root=>problem%CONTROL_LOOP
1807 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1809 &
" is invalid for a bioelectric domain equation." 1810 CALL flagerror(local_error,err,error,*999)
1814 control_loop_root=>problem%CONTROL_LOOP
1816 SELECT CASE(problem_setup%ACTION_TYPE)
1820 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 1821 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
1822 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 1823 CALL flagerror(
"Problem specification must have three entries for a biodomain problem.",err,error,*999)
1825 SELECT CASE(problem%SPECIFICATION(2))
1827 SELECT CASE(problem%SPECIFICATION(3))
1876 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
1877 &
" is invalid for a monodomain problem type of a bioelectric problem class." 1878 CALL flagerror(local_error,err,error,*999)
1881 SELECT CASE(problem%SPECIFICATION(3))
1944 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
1945 &
" is invalid for a monodomain problem type of a bioelectric problem class." 1946 CALL flagerror(local_error,err,error,*999)
1949 local_error=
"The problem type of "//
trim(
number_to_vstring(problem%SPECIFICATION(2),
"*",err,error))// &
1950 &
" is invalid for a bioelectric problem class." 1951 CALL flagerror(local_error,err,error,*999)
1959 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1961 &
" is invalid for a bioelectric equation." 1962 CALL flagerror(local_error,err,error,*999)
1965 SELECT CASE(problem_setup%ACTION_TYPE)
1968 control_loop_root=>problem%CONTROL_LOOP
1972 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 1973 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
1974 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 1975 CALL flagerror(
"Problem specification must have three entries for a biodomain problem.",err,error,*999)
1977 SELECT CASE(problem%SPECIFICATION(2))
1994 NULLIFY(solver_equations)
1995 SELECT CASE(problem%SPECIFICATION(3))
2001 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
2002 &
" is invalid for a bidomain problem type." 2003 CALL flagerror(local_error,err,error,*999)
2010 local_error=
"The problem type of "//
trim(
number_to_vstring(problem%SPECIFICATION(2),
"*",err,error))// &
2011 &
" is invalid for a bioelectric problem class." 2012 CALL flagerror(local_error,err,error,*999)
2016 control_loop_root=>problem%CONTROL_LOOP
2019 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 2020 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2021 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 2022 CALL flagerror(
"Problem specification must have three entries for a biodomain problem.",err,error,*999)
2024 SELECT CASE(problem%SPECIFICATION(2))
2039 NULLIFY(solver_equations)
2040 SELECT CASE(problem%SPECIFICATION(3))
2046 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
2047 &
" is invalid for a bidomain problem type." 2048 CALL flagerror(local_error,err,error,*999)
2054 local_error=
"The problem type of "//
trim(
number_to_vstring(problem%SPECIFICATION(2),
"*",err,error))// &
2055 &
" is invalid for a bioelectric problem class." 2056 CALL flagerror(local_error,err,error,*999)
2059 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
2061 &
" is invalid for a bioelectric equation." 2062 CALL flagerror(local_error,err,error,*999)
2065 SELECT CASE(problem_setup%ACTION_TYPE)
2068 control_loop_root=>problem%CONTROL_LOOP
2072 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 2073 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2074 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 2075 CALL flagerror(
"Problem specification must have three entries for a biodomain problem.",err,error,*999)
2077 SELECT CASE(problem%SPECIFICATION(2))
2085 NULLIFY(cellml_equations)
2096 NULLIFY(cellml_equations)
2101 local_error=
"The problem type of "//
trim(
number_to_vstring(problem%SPECIFICATION(2),
"*",err,error))// &
2102 &
" is invalid for a bioelectric problem class." 2103 CALL flagerror(local_error,err,error,*999)
2107 control_loop_root=>problem%CONTROL_LOOP
2110 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 2111 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2112 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 2113 CALL flagerror(
"Problem specification must have three entries for a biodomain problem.",err,error,*999)
2115 SELECT CASE(problem%SPECIFICATION(2))
2125 NULLIFY(cellml_equations)
2140 NULLIFY(cellml_equations)
2147 local_error=
"The problem type of "//
trim(
number_to_vstring(problem%SPECIFICATION(2),
"*",err,error))// &
2148 &
" is invalid for a bioelectric problem class." 2149 CALL flagerror(local_error,err,error,*999)
2152 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
2154 &
" is invalid for a bioelectric equation." 2155 CALL flagerror(local_error,err,error,*999)
2158 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
2159 &
" is invalid for a bioelectric domain equation." 2160 CALL flagerror(local_error,err,error,*999)
2163 CALL flagerror(
"Problem is not associated.",err,error,*999)
2166 exits(
"BIODOMAIN_EQUATION_PROBLEM_SETUP")
2168 999 errorsexits(
"BIODOMAIN_EQUATION_PROBLEM_SETUP",err,error)
2181 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
2182 INTEGER(INTG),
INTENT(OUT) :: err
2186 INTEGER(INTG) :: problemType
2187 INTEGER(INTG) :: problemSubtype
2189 enters(
"Biodomain_ProblemSpecificationSet",err,error,*999)
2191 IF(
ASSOCIATED(problem))
THEN 2192 IF(
SIZE(problemspecification,1)==3)
THEN 2193 problemtype=problemspecification(2)
2194 problemsubtype=problemspecification(3)
2195 SELECT CASE(problemtype)
2197 SELECT CASE(problemsubtype)
2202 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
2203 &
" is not valid for a monodomain type of a bioelectric problem." 2204 CALL flagerror(localerror,err,error,*999)
2207 SELECT CASE(problemsubtype)
2212 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
2213 &
" is not valid for a bidomain type of a bioelectric problem." 2214 CALL flagerror(localerror,err,error,*999)
2217 localerror=
"The second problem specification of "//
trim(
numbertovstring(problemtype,
"*",err,error))// &
2218 &
" is not valid for a bioelectric problem." 2219 CALL flagerror(localerror,err,error,*999)
2221 IF(
ALLOCATED(problem%specification))
THEN 2222 CALL flagerror(
"Problem specification is already allocated.",err,error,*999)
2224 ALLOCATE(problem%specification(3),stat=err)
2225 IF(err/=0)
CALL flagerror(
"Could not allocate problem specification.",err,error,*999)
2229 CALL flagerror(
"Biodomain problem specification must have three entries.",err,error,*999)
2232 CALL flagerror(
"Problem is not associated.",err,error,*999)
2235 exits(
"Biodomain_ProblemSpecificationSet")
2237 999
errors(
"Biodomain_ProblemSpecificationSet",err,error)
2238 exits(
"Biodomain_ProblemSpecificationSet")
2252 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
2253 INTEGER(INTG),
INTENT(OUT) :: ERR
2256 INTEGER(INTG) FIELD_VAR_TYPE,mh,mhs,ms,ng,nh,nhs,ni,nj,ns
2257 LOGICAL :: USE_FIBRES
2258 REAL(DP) :: CONDUCTIVITY(3,3),DPHIDX(3,64),RWG,SUM
2259 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS,GEOMETRIC_BASIS,FIBRE_BASIS
2267 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,FIBRE_FIELD,MATERIALS_FIELD
2272 enters(
"BIODOMAIN_EQUATION_FINITE_ELEMENT_CALCULATE",err,error,*999)
2274 IF(
ASSOCIATED(equations_set))
THEN 2275 equations=>equations_set%EQUATIONS
2276 IF(
ASSOCIATED(equations))
THEN 2278 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
2279 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
2280 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
2281 fibre_field=>equations%INTERPOLATION%FIBRE_FIELD
2282 use_fibres=
ASSOCIATED(fibre_field)
2283 equations_mapping=>equations%EQUATIONS_MAPPING
2284 equations_matrices=>equations%EQUATIONS_MATRICES
2285 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
2286 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2287 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
2288 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2289 geometric_variable=>geometric_field%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR
2290 IF(use_fibres) fibre_basis=>fibre_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
2291 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2293 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2294 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
2295 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2296 & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
2297 IF(use_fibres)
CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations% &
2298 & interpolation%FIBRE_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
2300 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 2301 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
2302 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<2)
THEN 2303 CALL flagerror(
"Equations set specification does not have a type set.",err,error,*999)
2305 SELECT CASE(equations_set%SPECIFICATION(2))
2308 dynamic_matrices=>equations_matrices%DYNAMIC_MATRICES
2309 stiffness_matrix=>dynamic_matrices%MATRICES(1)%PTR
2310 damping_matrix=>dynamic_matrices%MATRICES(2)%PTR
2311 rhs_vector=>equations_matrices%RHS_VECTOR
2312 dynamic_mapping=>equations_mapping%DYNAMIC_MAPPING
2313 field_variable=>dynamic_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
2314 field_var_type=field_variable%VARIABLE_TYPE
2316 IF(stiffness_matrix%UPDATE_MATRIX.OR.damping_matrix%UPDATE_MATRIX.OR.rhs_vector%UPDATE_VECTOR)
THEN 2318 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
2320 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
2321 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
2322 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
2324 & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
2327 & fibre_interp_point(field_u_variable_type)%PTR,err,error,*999)
2328 CALL field_interpolated_point_metrics_calculate(fibre_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
2329 & fibre_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
2332 rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
2333 & quadrature_scheme%GAUSS_WEIGHTS(ng)
2338 CALL flagerror(
"Not implemented.",err,error,*999)
2341 DO nj=1,geometric_variable%NUMBER_OF_COMPONENTS
2342 conductivity(nj,nj)=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(nj+2,1)
2346 DO nj=1,geometric_variable%NUMBER_OF_COMPONENTS
2347 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2348 dphidx(nj,ms)=0.0_dp
2349 DO ni=1,dependent_basis%NUMBER_OF_XI
2350 dphidx(nj,ms)=dphidx(nj,ms)+ &
2352 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%DXI_DX(ni,nj)
2358 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2360 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2364 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
2365 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2368 IF(stiffness_matrix%UPDATE_MATRIX)
THEN 2369 DO ni=1,geometric_variable%NUMBER_OF_COMPONENTS
2370 DO nj=1,geometric_variable%NUMBER_OF_COMPONENTS
2371 sum=sum+conductivity(ni,nj)*dphidx(ni,mhs)*dphidx(nj,nhs)
2374 IF((equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,1)<
zero_tolerance)&
2375 & .OR. (equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,1) &
2377 local_error=
"The value of the surface area to volume ratio or the capacitance is below zero tolerance" 2378 CALL flagerror(local_error,err,error,*999)
2380 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum*rwg/ &
2381 & equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,1)/ &
2382 & equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,1)
2384 IF(damping_matrix%UPDATE_MATRIX)
THEN 2385 damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+ &
2387 & quadrature_scheme%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)*rwg
2391 IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=0.0_dp
2397 IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 2398 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
2400 SELECT CASE(equations_set%SPECIFICATION(3))
2404 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
2405 &
" is not valid for a bioelectric domain type of a bioelectrics equations set class." 2406 CALL flagerror(local_error,err,error,*999)
2409 local_error=
"The equations set type of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(2),
"*",err,error))// &
2410 &
" is not valid for a bioelectric domain type of a bioelectrics equations set class." 2411 CALL flagerror(local_error,err,error,*999)
2414 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
2417 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2420 exits(
"BIODOMAIN_EQUATION_FINITE_ELEMENT_CALCULATE")
2422 999 errorsexits(
"BIODOMAIN_EQUATION_FINITE_ELEMENT_CALCULATE",err,error)
integer(intg), parameter equations_set_setup_dependent_type
Dependent variables.
integer(intg), parameter equations_set_fem_solution_method
Finite Element Method solution method.
This module contains all basis function routines.
integer(intg), parameter equations_set_setup_materials_type
Materials setup.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
subroutine, public solvers_create_finish(SOLVERS, ERR, ERROR,)
Finish the creation of solvers.
integer(intg), parameter, public control_loop_progress_output
Progress output from control loop.
subroutine, public equations_mapping_dynamic_variable_type_set(EQUATIONS_MAPPING, DYNAMIC_VARIABLE_TYPE, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set dynamic matrices...
Contains information on the equations mapping i.e., how field variable DOFS are mapped to the rows an...
Contains information about the CellML equations for a solver.
Contains information about the equations in an equations set.
integer(intg), parameter equations_set_gfem_solution_method
Grid-based Finite Element Method solution method.
Contains information for a region.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
Contains information on a time iteration control loop.
integer(intg), parameter problem_setup_control_type
Solver setup for a problem.
This module handles all problem wide constants.
integer(intg), parameter solver_equations_first_order_dynamic
Solver equations are first order dynamic.
integer(intg), parameter, public control_loop_node
The identifier for a each "leaf" node in a control loop.
subroutine, public solver_dynamic_order_set(SOLVER, ORDER, ERR, ERROR,)
Sets/changes the order for a dynamic solver.
Converts a number to its equivalent varying string representation.
subroutine, public equations_create_start(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Start the creation of equations for the equation set.
Contains information on the mesh decomposition.
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 ...
subroutine, public equations_matrices_create_start(EQUATIONS, EQUATIONS_MATRICES, ERR, ERROR,)
Starts the creation of the equations matrices and rhs for the the equations.
Contains information on the type of solver to be used.
integer(intg), parameter, public solver_petsc_library
PETSc solver library.
subroutine, public solvers_number_set(SOLVERS, NUMBER_OF_SOLVERS, ERR, ERROR,)
Sets/changes the number of solvers.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
integer(intg), parameter, public solver_dynamic_crank_nicolson_scheme
Crank-Nicolson dynamic solver.
integer(intg), parameter problem_bioelectric_finite_elasticity_type
subroutine, public solver_dynamic_degree_set(SOLVER, DEGREE, ERR, ERROR,)
Sets/changes the degree of the polynomial used to interpolate time for a dynamic solver.
This module handles all equations matrix and rhs routines.
integer(intg), parameter, public solver_dynamic_first_order
Dynamic solver has first order terms.
subroutine, public solver_type_set(SOLVER, SOLVE_TYPE, ERR, ERROR,)
Sets/changes the type for a solver.
integer(intg), parameter problem_monodomain_elasticity_w_titin_subtype
integer(intg), parameter equations_set_bioelectrics_class
integer(intg), parameter equations_static
The equations are static and have no time dependence.
integer(intg), parameter problem_bidomain_strang_split_subtype
Contains information on an equations set.
This module handles all equations routines.
integer(intg), parameter, public solver_dae_type
A differential-algebraic equation solver.
integer(intg), parameter equations_set_setup_source_type
Source setup.
integer(intg), parameter problem_control_fixed_loop_type
Fixed iteration control loop.
integer(intg), parameter equations_set_no_subtype
This module contains all string manipulation and transformation routines.
subroutine, public solvers_create_start(CONTROL_LOOP, SOLVERS, ERR, ERROR,)
Start the creation of a solvers for the control loop.
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_control_simple_type
Simple, one iteration control loop.
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
This module contains routines for timing the program.
subroutine, public control_loop_current_times_get(CONTROL_LOOP, CURRENT_TIME, TIME_INCREMENT, ERR, ERROR,)
Gets the current time parameters for a time control loop.
subroutine, public equations_matrices_dynamic_lumping_type_set(EQUATIONS_MATRICES, LUMPING_TYPE, ERR, ERROR,)
Sets the lumping of the linear equations matrices.
integer(intg), parameter equations_set_first_bidomain_subtype
integer(intg), parameter solver_equations_static
Solver equations are static.
subroutine, public equations_time_dependence_type_set(EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for equations.
subroutine, public solver_equations_sparsity_type_set(SOLVER_EQUATIONS, SPARSITY_TYPE, ERR, ERROR,)
Sets/changes the sparsity type for solver equations.
subroutine, public solvers_solver_get(SOLVERS, SOLVER_INDEX, SOLVER, ERR, ERROR,)
Returns a pointer to the specified solver in the list of solvers.
Contains information for a field defined on a region.
integer(intg), parameter, public equations_matrices_full_matrices
Use fully populated equation matrices.
integer(intg), parameter problem_bidomain_equation_type
integer(intg), parameter equations_set_1d3d_monodomain_elasticity_subtype
subroutine, public biodomain_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a bioelectric domain equation type of a bioelectric equations set...
subroutine, public equations_mapping_rhs_variable_type_set(EQUATIONS_MAPPING, RHS_VARIABLE_TYPE, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set rhs vector.
integer(intg), parameter solver_equations_linear
Solver equations are linear.
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 solver_equations_create_finish(SOLVER_EQUATIONS, ERR, ERROR,)
Finishes the process of creating solver equations.
integer(intg), parameter, public solver_sparse_matrices
Use sparse solver matrices.
integer(intg), parameter problem_bioelectrics_class
subroutine, public solver_equations_create_start(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Starts the process of creating solver equations.
integer(intg), parameter, public solver_dynamic_type
A dynamic solver.
subroutine, public biodomain_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a bioelectric domain problem class.
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
integer(intg), parameter problem_setup_solvers_type
Solver setup for a problem.
integer(intg), parameter equations_set_setup_equations_type
Equations setup.
Contains information for mapping field variables to the dynamic matrices in the equations set of the ...
integer(intg), parameter equations_set_setup_independent_type
Independent variables.
This module contains all program wide constants.
subroutine, public solver_library_type_set(SOLVER, SOLVER_LIBRARY_TYPE, ERR, ERROR,)
Sets/changes the type of library type to use for the solver.
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
integer(intg), parameter, public equations_lumped_matrices
The equations matrices are "mass" lumped.
integer(intg), parameter problem_setup_initial_type
Initial setup for a problem.
subroutine, public equationsmapping_linearmatricesvariabletypesset(EQUATIONS_MAPPING, LINEAR_MATRIX_VARIABLE_TYPES, ERR, ERROR,)
Sets the mapping between the dependent field variable types and the linear equations matrices...
integer(intg), parameter equations_set_monodomain_strang_splitting_equation_type
integer(intg), parameter problem_bidomain_gudunov_split_subtype
integer(intg), parameter equations_first_order_dynamic
The equations are first order dynamic.
integer(intg), parameter problem_monodomain_strang_split_subtype
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 solver_equations_linearity_type_set(SOLVER_EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for solver equations.
integer(intg), parameter equations_set_setup_start_action
Start setup action.
subroutine, public cellml_equations_create_start(SOLVER, CELLML_EQUATIONS, ERR, ERROR,)
Starts the process of creating CellML equations.
subroutine, public exits(NAME)
Records the exit out of the named procedure.
recursive subroutine, public control_loop_solvers_get(CONTROL_LOOP, SOLVERS, ERR, ERROR,)
Returns a pointer to the solvers for a control loop.
This module contains all type definitions in order to avoid cyclic module references.
subroutine, public solver_cellml_equations_get(SOLVER, CELLML_EQUATIONS, ERR, ERROR,)
Returns a pointer to the CellML equations for a solver.
Contains information on the equations matrices and vectors.
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
integer(intg), parameter equations_set_1d3d_monodomain_active_strain_subtype
subroutine, public equationsmatrices_dynamicstructuretypeset(EQUATIONS_MATRICES, STRUCTURE_TYPE, ERR, ERROR,)
Sets the structure (sparsity) of the dynamic equations matrices.
integer(intg), parameter equations_set_second_bidomain_subtype
integer(intg), parameter problem_monodomain_gudunov_split_subtype
subroutine, public equations_matrices_linear_storage_type_set(EQUATIONS_MATRICES, STORAGE_TYPE, ERR, ERROR,)
Sets the storage type (sparsity) of the linear equations matrices.
subroutine, public equationsmatrices_linearstructuretypeset(EQUATIONS_MATRICES, STRUCTURE_TYPE, ERR, ERROR,)
Sets the structure (sparsity) of the linear equations matrices.
subroutine, public equations_mapping_create_finish(EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping.
Returns the specified control loop as indexed by the control loop identifier from the control loop ro...
subroutine, public control_loop_type_set(CONTROL_LOOP, LOOP_TYPE, ERR, ERROR,)
Sets/changes the control loop type.
integer(intg), parameter equations_set_monodomain_equation_type
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
integer(intg), dimension(4) partial_derivative_first_derivative_map
PARTIAL_DERIVATIVE_FIRST_DERIVATIVE_MAP(nic) gives the partial derivative index for the first derivat...
subroutine, public equations_create_finish(EQUATIONS, ERR, ERROR,)
Finish the creation of equations.
This module handles all domain mappings routines.
integer(intg), parameter problem_setup_finish_action
Finish setup action.
This module handles all equations mapping routines.
Contains information about the solver equations for a solver.
integer(intg), parameter, public matrix_compressed_row_storage_type
Matrix compressed row storage type.
subroutine, public equations_matrices_dynamic_storage_type_set(EQUATIONS_MATRICES, STORAGE_TYPE, ERR, ERROR,)
Sets the storage type (sparsity) of the dynamic equations matrices.
integer(intg), parameter, public equations_matrix_diagonal_structure
Diagonal matrix structure.
integer(intg), parameter equations_set_gfv_solution_method
Grid-based Finite Volume solution method.
integer(intg), parameter equations_set_setup_geometry_type
Geometry setup.
Contains information for a problem.
integer(intg), parameter problem_setup_cellml_equations_type
CellML equations setup for a problem.
integer(intg), parameter equations_linear
The equations are linear.
subroutine, public equations_matrices_create_finish(EQUATIONS_MATRICES, ERR, ERROR,)
Finishes the creation of the equations matrices and RHS for the the equations.
This module handles all distributed matrix vector routines.
This module handles all boundary conditions routines.
This module handles all solver routines.
subroutine, public equations_mapping_create_start(EQUATIONS, EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping for a equations set equations.
integer(intg), parameter, public equations_matrix_unlumped
The matrix is not lumped.
Contains information about an equations matrix.
Contains information for a particular quadrature scheme.
subroutine, public solver_dynamic_restart_set(SOLVER, RESTART, ERR, ERROR,)
Sets/changes the restart value for a dynamic solver.
Implements lists of Field IO operation.
This module contains all routines dealing with (non-distributed) matrix and vectors types...
integer(intg), parameter, public distributed_matrix_block_storage_type
Distributed matrix block storage type.
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...
integer(intg), parameter, public equations_matrix_lumped
The matrix is "mass" lumped.
subroutine, public equations_linearity_type_set(EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for equations.
subroutine, public control_loop_create_start(PROBLEM, CONTROL_LOOP, ERR, ERROR,)
Start the process of creating a control loop for a problem.
integer(intg), parameter problem_setup_solver_equations_type
Solver equations setup for a problem.
integer(intg), parameter equations_set_monodomain_elasticity_velocity_subtype
subroutine, public biodomain_pre_solve(SOLVER, ERR, ERROR,)
Performs pre-solve actions for mono- and bi-domain problems.
Contains information on the solver mapping between the global equation sets and the solver matrices...
subroutine, public solver_dynamic_scheme_set(SOLVER, SCHEME, ERR, ERROR,)
Sets/changes the scheme for a dynamic solver.
Contains information for a field variable defined on a field.
subroutine, public cellml_equations_create_finish(CELLML_EQUATIONS, ERR, ERROR,)
Finishes the process of creating CellML equations.
integer(intg), parameter equations_set_fd_solution_method
Finite Difference solution method.
integer(intg), parameter, public equations_matrices_sparse_matrices
Use sparse equations matrices.
integer(intg), parameter problem_control_load_increment_loop_type
Load increment control loop.
Contains information on the setup information for an equations set.
integer(intg), parameter problem_setup_start_action
Start setup action.
subroutine, public solver_equations_time_dependence_type_set(SOLVER_EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for solver equations.
This module handles all control loop routines.
integer(intg), parameter, public solver_cmiss_library
CMISS (internal) solver library.
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.
integer(intg), parameter equations_set_bem_solution_method
Boundary Element Method solution method.
subroutine, public solver_solver_equations_get(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Returns a pointer to the solver equations for a solver.
integer(intg), parameter equations_set_monodomain_elasticity_w_titin_subtype
Contains all information about a basis .
integer(intg), parameter equations_set_fv_solution_method
Finite Volume solution method.
integer(intg), parameter, public matrix_block_storage_type
Matrix block storage type.
integer(intg), parameter, public solver_dynamic_first_degree
Dynamic solver uses a first degree polynomial for time interpolation.
integer(intg), parameter equations_set_setup_initial_type
Initial setup.
recursive subroutine, public control_loop_create_finish(CONTROL_LOOP, ERR, ERROR,)
Finish the process of creating a control loop.
integer(intg), parameter problem_monodomain_1d3d_active_strain_subtype
integer(intg), parameter equations_set_setup_analytic_type
Analytic setup.
subroutine, public solver_dae_times_set(SOLVER, START_TIME, END_TIME, ERR, ERROR,)
Set/change the times for a differential-algebraic equation solver.
Flags an error condition.
integer(intg), parameter problem_control_while_loop_type
While control loop.
integer(intg), parameter, public solver_linear_type
A linear solver.
Contains information of the RHS vector for equations matrices.
integer(intg), parameter problem_gudunov_monodomain_1d3d_elasticity_subtype
real(dp), parameter zero_tolerance
integer(intg), parameter, public distributed_matrix_diagonal_storage_type
Distributed matrix diagonal storage type.
integer(intg), parameter equations_set_bidomain_equation_type
This module contains all kind definitions.
subroutine, public field_io_nodes_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export nodal information.
integer(intg), parameter equations_set_setup_finish_action
Finish setup action.
integer(intg), parameter, public distributed_matrix_compressed_row_storage_type
Distributed matrix compressed row storage type.
Contains information of the dynamic matrices for equations matrices.
subroutine, public biodomain_control_loop_post_loop(CONTROL_LOOP, ERR, ERROR,)
Runs after each control loop iteration.
integer(intg), parameter problem_gudunov_monodomain_simple_elasticity_subtype