116 TYPE(
field_type),
INTENT(IN),
POINTER :: FIELD
117 CHARACTER(LEN=*) :: FILENAME
118 INTEGER(INTG),
INTENT(OUT) :: ERR
121 INTEGER(INTG) :: component_idx,deriv_idx,element_idx,GHOST_NUMBER(8),local_ny,MESH_COMPONENT,MPI_IERROR,node_idx, &
122 & NUMBER(8),OUTPUT_ID,var_idx,variable_type
123 REAL(DP) :: GHOST_RMS_ERROR_PER(8),GHOST_RMS_ERROR_ABS(8),GHOST_RMS_ERROR_REL(8),RMS_ERROR_PER(8),RMS_ERROR_ABS(8), &
124 & RMS_ERROR_REL(8),VALUES(5)
125 REAL(DP),
POINTER :: ANALYTIC_VALUES(:),NUMERICAL_VALUES(:)
126 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:),GHOST_INTEGRAL_ERRORS(:,:)
127 CHARACTER(LEN=40) :: FIRST_FORMAT
128 CHARACTER(LEN=MAXSTRLEN) :: FILE_NAME
139 NULLIFY(analytic_values)
140 NULLIFY(numerical_values)
142 enters(
"AnalyticAnalysis_Output",err,error,*999)
144 IF(
ASSOCIATED(field))
THEN 145 IF(field%FIELD_FINISHED)
THEN 146 IF(field%DEPENDENT_TYPE==field_dependent_type)
THEN 151 & my_computational_node_number
153 file_name=filename(1:
len_trim(filename))//
".opanal" 155 output_id=io1_file_unit
156 OPEN(unit=output_id,file=file_name(1:
len_trim(file_name)),status=
"REPLACE",form=
"FORMATTED",iostat=err)
157 IF(err/=0)
CALL flagerror(
"Error opening analysis output file.",err,error,*999)
159 output_id=general_output_type
161 decomposition=>field%DECOMPOSITION
162 IF(
ASSOCIATED(decomposition))
THEN 163 decomposition_topology=>decomposition%TOPOLOGY
164 IF(
ASSOCIATED(decomposition_topology))
THEN 165 CALL write_string(output_id,
"Analytic error analysis:",err,error,*999)
169 CALL write_string(output_id,local_string,err,error,*999)
170 NULLIFY(numerical_values)
171 NULLIFY(analytic_values)
173 DO var_idx=1,field%NUMBER_OF_VARIABLES
174 variable_type=field%VARIABLES(var_idx)%VARIABLE_TYPE
175 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
176 IF(
ASSOCIATED(field_variable))
THEN 179 & field_variable%VARIABLE_LABEL
181 CALL write_string(output_id,local_string,err,error,*999)
184 CALL field_parameter_set_data_get(field,variable_type,field_values_set_type,numerical_values,err,error,*999)
185 CALL field_parameter_set_data_get(field,variable_type,field_analytic_values_set_type,analytic_values, &
188 DO component_idx=1,field%VARIABLES(var_idx)%NUMBER_OF_COMPONENTS
189 mesh_component=field_variable%COMPONENTS(component_idx)%MESH_COMPONENT_NUMBER
190 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
191 IF(
ASSOCIATED(domain))
THEN 192 domain_topology=>domain%TOPOLOGY
193 IF(
ASSOCIATED(domain_topology))
THEN 195 & field_variable%COMPONENTS(component_idx)%COMPONENT_LABEL
197 CALL write_string(output_id,local_string,err,error,*999)
199 SELECT CASE(field%VARIABLES(var_idx)%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
200 CASE(field_constant_interpolation)
201 CALL write_string(output_id,
"Constant errors:",err,error,*999)
202 local_string=
" Numerical Analytic % error Absolute err Relative err" 203 CALL write_string(output_id,local_string,err,error,*999)
204 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
205 values(1)=numerical_values(local_ny)
206 values(2)=analytic_values(local_ny)
210 CALL write_string_vector(output_id,1,1,5,5,5,values,
"(20X,5(2X,E12.5))",
"(20X,5(2X,E12.5))", &
212 CASE(field_element_based_interpolation)
213 elements_domain=>domain_topology%ELEMENTS
214 IF(
ASSOCIATED(elements_domain))
THEN 215 decomposition=>domain%DECOMPOSITION
216 IF(
ASSOCIATED(decomposition))
THEN 217 decomposition_topology=>decomposition%TOPOLOGY
218 IF(
ASSOCIATED(decomposition_topology))
THEN 219 elements_decomposition=>decomposition_topology%ELEMENTS
220 IF(
ASSOCIATED(elements_decomposition))
THEN 226 ghost_rms_error_per=0.0_dp
227 ghost_rms_error_abs=0.0_dp
228 ghost_rms_error_rel=0.0_dp
229 CALL write_string(output_id,
"Element errors:",err,error,*999)
231 &
" Element# Numerical Analytic % error Absolute err Relative err" 232 CALL write_string(output_id,local_string,err,error,*999)
233 DO element_idx=1,elements_domain%NUMBER_OF_ELEMENTS
234 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
235 & element_param2dof_map%ELEMENTS(element_idx)
236 values(1)=numerical_values(local_ny)
237 values(2)=analytic_values(local_ny)
242 number(1)=number(1)+1
243 rms_error_per(1)=rms_error_per(1)+values(3)*values(3)
244 rms_error_abs(1)=rms_error_abs(1)+values(4)*values(4)
245 rms_error_rel(1)=rms_error_rel(1)+values(5)*values(5)
246 WRITE(first_format,
"(A,I10,A)")
"('",elements_decomposition%ELEMENTS(element_idx)%USER_NUMBER, &
247 &
"',20X,3(2X,E12.5))" 248 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))", &
251 DO element_idx=elements_domain%NUMBER_OF_ELEMENTS+1,elements_domain%TOTAL_NUMBER_OF_ELEMENTS
252 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
253 & element_param2dof_map%ELEMENTS(element_idx)
254 values(1)=numerical_values(local_ny)
255 values(2)=analytic_values(local_ny)
260 ghost_number(1)=ghost_number(1)+1
261 ghost_rms_error_per(1)=ghost_rms_error_per(1)+values(3)*values(3)
262 ghost_rms_error_abs(1)=ghost_rms_error_abs(1)+values(4)*values(4)
263 ghost_rms_error_rel(1)=ghost_rms_error_rel(1)+values(5)*values(5)
264 WRITE(first_format,
"(A,I10,A)")
"('",elements_decomposition%ELEMENTS(element_idx)%USER_NUMBER, &
265 &
"',20X,3(2X,E12.5))" 266 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))", &
274 CALL write_string(output_id,
"Local RMS errors:",err,error,*999)
276 &
" % error Absolute err Relative err" 277 CALL write_string(output_id,local_string,err,error,*999)
278 values(1)=sqrt(rms_error_per(deriv_idx)/number(deriv_idx))
279 values(2)=sqrt(rms_error_abs(deriv_idx)/number(deriv_idx))
280 values(3)=sqrt(rms_error_rel(deriv_idx)/number(deriv_idx))
281 CALL write_string_vector(output_id,1,1,3,3,3,values,
"(46X,3(2X,E12.5))",
"(46X,3(2X,E12.5))", &
284 CALL write_string(output_id,
"Local + Ghost RMS errors:",err,error,*999)
286 &
" % error Absolute err Relative err" 287 CALL write_string(output_id,local_string,err,error,*999)
288 values(1)=sqrt((rms_error_per(1)+ghost_rms_error_per(1))/(number(1)+ghost_number(1)))
289 values(2)=sqrt((rms_error_abs(1)+ghost_rms_error_abs(1))/(number(1)+ghost_number(1)))
290 values(3)=sqrt((rms_error_rel(1)+ghost_rms_error_rel(1))/(number(1)+ghost_number(1)))
291 CALL write_string_vector(output_id,1,1,3,3,3,values,
"(46X,3(2X,E12.5))",
"(46X,3(2X,E12.5))", &
295 CALL mpi_allreduce(mpi_in_place,number,1,mpi_integer,mpi_sum, &
298 CALL mpi_allreduce(mpi_in_place,rms_error_per,1,mpi_double_precision,mpi_sum, &
301 CALL mpi_allreduce(mpi_in_place,rms_error_abs,1,mpi_double_precision,mpi_sum, &
304 CALL mpi_allreduce(mpi_in_place,rms_error_rel,1,mpi_double_precision,mpi_sum, &
307 CALL write_string(output_id,
"Global RMS errors:",err,error,*999)
309 &
" % error Absolute err Relative err" 310 CALL write_string(output_id,local_string,err,error,*999)
311 values(1)=sqrt(rms_error_per(1)/number(1))
312 values(2)=sqrt(rms_error_abs(1)/number(1))
313 values(3)=sqrt(rms_error_rel(1)/number(1))
314 CALL write_string_vector(output_id,1,1,3,3,3,values,
"(46X,3(2X,E12.5))",
"(46X,3(2X,E12.5))", &
317 CALL write_string(output_id,
"RMS errors:",err,error,*999)
319 &
" % error Absolute err Relative err" 320 CALL write_string(output_id,local_string,err,error,*999)
321 values(1)=sqrt(rms_error_per(deriv_idx)/number(deriv_idx))
322 values(2)=sqrt(rms_error_abs(deriv_idx)/number(deriv_idx))
323 values(3)=sqrt(rms_error_rel(deriv_idx)/number(deriv_idx))
324 CALL write_string_vector(output_id,1,1,3,3,3,values,
"(46X,3(2X,E12.5))",
"(46X,3(2X,E12.5))", &
329 CALL flagerror(
"Decomposition topology elements is not associated.",err,error,*999)
332 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
335 CALL flagerror(
"Domain decomposition is not associated.",err,error,*999)
338 CALL flagerror(
"Elements domain topology is not associated.",err,error,*999)
340 CASE(field_node_based_interpolation)
341 nodes_domain=>domain_topology%NODES
342 IF(
ASSOCIATED(nodes_domain))
THEN 348 ghost_rms_error_per=0.0_dp
349 ghost_rms_error_abs=0.0_dp
350 ghost_rms_error_rel=0.0_dp
351 CALL write_string(output_id,
"Nodal errors:",err,error,*999)
352 local_string=
" Node# Deriv# Numerical Analytic % error Absolute err Relative err" 353 CALL write_string(output_id,local_string,err,error,*999)
354 DO node_idx=1,nodes_domain%NUMBER_OF_NODES
355 DO deriv_idx=1,nodes_domain%NODES(node_idx)%NUMBER_OF_DERIVATIVES
356 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
357 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
358 values(1)=numerical_values(local_ny)
359 values(2)=analytic_values(local_ny)
364 number(deriv_idx)=number(deriv_idx)+1
365 rms_error_per(deriv_idx)=rms_error_per(deriv_idx)+values(3)*values(3)
366 rms_error_abs(deriv_idx)=rms_error_abs(deriv_idx)+values(4)*values(4)
367 rms_error_rel(deriv_idx)=rms_error_rel(deriv_idx)+values(5)*values(5)
368 IF(deriv_idx==1)
THEN 369 WRITE(first_format,
"(A,I10,A,I6,A)")
"('",nodes_domain%NODES(node_idx)%USER_NUMBER,
"',2X,'", &
370 & deriv_idx,
"',5(2X,E12.5))" 372 WRITE(first_format,
"(A,I6,A)")
"(12X,'",deriv_idx,
"',5(2X,E12.5))" 374 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
377 DO node_idx=nodes_domain%NUMBER_OF_NODES+1,nodes_domain%TOTAL_NUMBER_OF_NODES
378 DO deriv_idx=1,nodes_domain%NODES(node_idx)%NUMBER_OF_DERIVATIVES
379 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
380 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
381 values(1)=numerical_values(local_ny)
382 values(2)=analytic_values(local_ny)
387 ghost_number(deriv_idx)=ghost_number(deriv_idx)+1
388 ghost_rms_error_per(deriv_idx)=ghost_rms_error_per(deriv_idx)+values(3)*values(3)
389 ghost_rms_error_abs(deriv_idx)=ghost_rms_error_abs(deriv_idx)+values(4)*values(4)
390 ghost_rms_error_rel(deriv_idx)=ghost_rms_error_rel(deriv_idx)+values(5)*values(5)
391 IF(deriv_idx==1)
THEN 392 WRITE(first_format,
"(A,I10,A,I6,A)")
"('",nodes_domain%NODES(node_idx)%USER_NUMBER, &
393 &
"',2X,'",deriv_idx,
"',5(2X,E12.5))" 395 WRITE(first_format,
"(A,I6,A)")
"(12X,'",deriv_idx,
"',5(2X,E12.5))" 397 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
403 IF(any(number>0))
THEN 405 CALL write_string(output_id,
"Local RMS errors:",err,error,*999)
407 &
" Deriv# % error Absolute err Relative err" 408 CALL write_string(output_id,local_string,err,error,*999)
410 IF(number(deriv_idx)>0)
THEN 411 values(1)=sqrt(rms_error_per(deriv_idx)/number(deriv_idx))
412 values(2)=sqrt(rms_error_abs(deriv_idx)/number(deriv_idx))
413 values(3)=sqrt(rms_error_rel(deriv_idx)/number(deriv_idx))
414 WRITE(first_format,
"(A,I6,A)")
"(12X,'",deriv_idx,
"',28X,3(2X,E12.5))" 415 CALL write_string_vector(output_id,1,1,3,3,3,values,first_format,
"(46X,3(2X,E12.5))", &
420 CALL write_string(output_id,
"Local + Ghost RMS errors:",err,error,*999)
422 &
" Deriv# % error Absolute err Relative err" 423 CALL write_string(output_id,local_string,err,error,*999)
425 IF(number(deriv_idx)>0)
THEN 426 values(1)=sqrt((rms_error_per(deriv_idx)+ghost_rms_error_per(deriv_idx))/ &
427 & (number(deriv_idx)+ghost_number(deriv_idx)))
428 values(2)=sqrt((rms_error_abs(deriv_idx)+ghost_rms_error_abs(deriv_idx))/ &
429 & (number(deriv_idx)+ghost_number(deriv_idx)))
430 values(3)=sqrt((rms_error_rel(deriv_idx)+ghost_rms_error_rel(deriv_idx))/ &
431 & (number(deriv_idx)+ghost_number(deriv_idx)))
432 WRITE(first_format,
"(A,I6,A)")
"(12X,'",deriv_idx,
"',28X,3(2X,E12.5))" 433 CALL write_string_vector(output_id,1,1,3,3,3,values,first_format,
"(46X,3(2X,E12.5))", &
442 CALL mpi_allreduce(mpi_in_place,rms_error_per,8,mpi_double_precision,mpi_sum, &
445 CALL mpi_allreduce(mpi_in_place,rms_error_abs,8,mpi_double_precision,mpi_sum, &
448 CALL mpi_allreduce(mpi_in_place,rms_error_rel,8,mpi_double_precision,mpi_sum, &
451 CALL write_string(output_id,
"Global RMS errors:",err,error,*999)
453 &
" Deriv# % error Absolute err Relative err" 454 CALL write_string(output_id,local_string,err,error,*999)
456 IF(number(deriv_idx)>0)
THEN 457 values(1)=sqrt(rms_error_per(deriv_idx)/number(deriv_idx))
458 values(2)=sqrt(rms_error_abs(deriv_idx)/number(deriv_idx))
459 values(3)=sqrt(rms_error_rel(deriv_idx)/number(deriv_idx))
460 WRITE(first_format,
"(A,I6,A)")
"(12X,'",deriv_idx,
"',28X,3(2X,E12.5))" 461 CALL write_string_vector(output_id,1,1,3,3,3,values,first_format,
"(46X,3(2X,E12.5))", &
467 IF(any(number>0))
THEN 468 CALL write_string(output_id,
"RMS errors:",err,error,*999)
470 &
" Deriv# % error Absolute err Relative err" 471 CALL write_string(output_id,local_string,err,error,*999)
473 IF(number(deriv_idx)>0)
THEN 474 values(1)=sqrt(rms_error_per(deriv_idx)/number(deriv_idx))
475 values(2)=sqrt(rms_error_abs(deriv_idx)/number(deriv_idx))
476 values(3)=sqrt(rms_error_rel(deriv_idx)/number(deriv_idx))
477 WRITE(first_format,
"(A,I6,A)")
"(12X,'",deriv_idx,
"',28X,3(2X,E12.5))" 478 CALL write_string_vector(output_id,1,1,3,3,3,values,first_format,
"(46X,3(2X,E12.5))", &
485 CALL flagerror(
"Nodes domain topology is not associated.",err,error,*999)
487 CASE(field_grid_point_based_interpolation)
488 CALL flagerror(
"Not implemented.",err,error,*999)
489 CASE(field_gauss_point_based_interpolation)
490 CALL flagerror(
"Not implemented.",err,error,*999)
492 local_error=
"The interpolation type of "// &
494 & interpolation_type,
"*",err,error))//
" for component number "// &
498 CALL flagerror(local_error,err,error,*999)
501 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
504 CALL flagerror(
"Domain is not associated.",err,error,*999)
509 CALL field_parameter_set_data_restore(field,variable_type,field_values_set_type,numerical_values, &
511 CALL field_parameter_set_data_restore(field,variable_type,field_analytic_values_set_type,analytic_values, &
514 ALLOCATE(integral_errors(6,field_variable%NUMBER_OF_COMPONENTS),stat=err)
515 IF(err/=0)
CALL flagerror(
"Could not allocate integral errors.",err,error,*999)
516 ALLOCATE(ghost_integral_errors(6,field_variable%NUMBER_OF_COMPONENTS),stat=err)
517 IF(err/=0)
CALL flagerror(
"Could not allocate ghost integral errors.",err,error,*999)
520 CALL write_string(output_id,
"Local Integral errors:",err,error,*999)
521 local_string=
"Component# Numerical Analytic % error Absolute err Relative err" 522 CALL write_string(output_id,local_string,err,error,*999)
523 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
524 values(1)=integral_errors(1,component_idx)
525 values(2)=integral_errors(3,component_idx)
529 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Intg ',5(2X,E12.5))" 530 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
531 values(1)=integral_errors(2,component_idx)
532 values(2)=integral_errors(4,component_idx)
536 WRITE(first_format,
"(A)")
"(12X,'Intg^2',5(2X,E12.5))" 537 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
539 local_string=
"Component# Numerical Analytic NID NID(%)" 540 CALL write_string(output_id,local_string,err,error,*999)
541 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
542 values(1)=integral_errors(5,component_idx)
543 values(2)=integral_errors(3,component_idx)
545 values(4)=values(3)*100.0_dp
546 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Diff ',4(2X,E12.5))" 547 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
548 values(1)=integral_errors(6,component_idx)
549 values(2)=integral_errors(4,component_idx)
551 values(4)=values(3)*100.0_dp
552 WRITE(first_format,
"(A)")
"(12X,'Diff^2',4(2X,E12.5))" 553 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
555 CALL write_string(output_id,
"Local + Ghost Integral errors:",err,error,*999)
556 local_string=
"Component# Numerical Analytic % error Absolute err Relative err" 557 CALL write_string(output_id,local_string,err,error,*999)
558 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
559 values(1)=integral_errors(1,component_idx)+ghost_integral_errors(1,component_idx)
560 values(2)=integral_errors(3,component_idx)+ghost_integral_errors(3,component_idx)
564 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Intg ',5(2X,E12.5))" 565 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
566 values(1)=integral_errors(2,component_idx)
567 values(2)=integral_errors(4,component_idx)
571 WRITE(first_format,
"(A)")
"(12X,'Intg^2',5(2X,E12.5))" 572 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
574 local_string=
"Component# Numerical Analytic NID NID(%)" 575 CALL write_string(output_id,local_string,err,error,*999)
576 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
577 values(1)=integral_errors(5,component_idx)+ghost_integral_errors(5,component_idx)
578 values(2)=integral_errors(3,component_idx)+ghost_integral_errors(3,component_idx)
580 values(4)=values(3)*100.0_dp
581 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Diff ',4(2X,E12.5))" 582 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
583 values(1)=integral_errors(6,component_idx)+ghost_integral_errors(6,component_idx)
584 values(2)=integral_errors(4,component_idx)+ghost_integral_errors(4,component_idx)
586 values(4)=values(3)*100.0_dp
587 WRITE(first_format,
"(A)")
"(12X,'Diff^2',4(2X,E12.5))" 588 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
591 CALL mpi_allreduce(mpi_in_place,integral_errors,6*field_variable%NUMBER_OF_COMPONENTS,mpi_double_precision, &
593 CALL write_string(output_id,
"Global Integral errors:",err,error,*999)
594 local_string=
"Component# Numerical Analytic % error Absolute err Relative err" 595 CALL write_string(output_id,local_string,err,error,*999)
596 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
598 values(1)=integral_errors(1,component_idx)
599 values(2)=integral_errors(3,component_idx)
602 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Intg ',5(2X,E12.5))" 603 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
604 values(1)=integral_errors(2,component_idx)
605 values(2)=integral_errors(4,component_idx)
609 WRITE(first_format,
"(A)")
"(12X,'Intg^2',5(2X,E12.5))" 610 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
612 local_string=
"Component# Numerical Analytic NID NID(%)" 613 CALL write_string(output_id,local_string,err,error,*999)
614 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
615 values(1)=integral_errors(5,component_idx)
616 values(2)=integral_errors(3,component_idx)
618 values(4)=values(3)*100.0_dp
619 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Diff ',4(2X,E12.5))" 620 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
621 values(1)=integral_errors(6,component_idx)
622 values(2)=integral_errors(4,component_idx)
624 values(4)=values(3)*100.0_dp
625 WRITE(first_format,
"(A)")
"(12X,'Diff^2',4(2X,E12.5))" 626 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
629 CALL write_string(output_id,
"Integral errors:",err,error,*999)
630 local_string=
"Component# Numerical Analytic % error Absolute err Relative err" 631 CALL write_string(output_id,local_string,err,error,*999)
632 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
633 values(1)=integral_errors(1,component_idx)
634 values(2)=integral_errors(3,component_idx)
638 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Intg ',5(2X,E12.5))" 639 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
640 values(1)=integral_errors(2,component_idx)
641 values(2)=integral_errors(4,component_idx)
645 WRITE(first_format,
"(A)")
"(12X,'Intg^2',5(2X,E12.5))" 646 CALL write_string_vector(output_id,1,1,5,5,5,values,first_format,
"(20X,5(2X,E12.5))",err,error,*999)
648 local_string=
"Component# Numerical Analytic NID NID(%)" 649 CALL write_string(output_id,local_string,err,error,*999)
650 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
651 values(1)=integral_errors(5,component_idx)
652 values(2)=integral_errors(3,component_idx)
654 values(4)=values(3)*100.0_dp
655 WRITE(first_format,
"(A,I10,A)")
"('",component_idx,
"',2X,'Diff ',4(2X,E12.5))" 656 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
657 values(1)=integral_errors(6,component_idx)
658 values(2)=integral_errors(4,component_idx)
660 values(4)=values(3)*100.0_dp
661 WRITE(first_format,
"(A)")
"(12X,'Diff^2',4(2X,E12.5))" 662 CALL write_string_vector(output_id,1,1,4,4,4,values,first_format,
"(20X,4(2X,E12.5))",err,error,*999)
666 IF(
ALLOCATED(integral_errors))
DEALLOCATE(integral_errors)
667 IF(
ALLOCATED(ghost_integral_errors))
DEALLOCATE(ghost_integral_errors)
669 CALL flagerror(
"Field variable is not associated.",err,error,*999)
673 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
676 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
679 CLOSE(unit=output_id,iostat=err)
680 IF(err/=0)
CALL flagerror(
"Error closing analysis output file.",err,error,*999)
684 &
" is not a dependent field." 685 CALL flagerror(local_error,err,error,*999)
689 &
" has not been finished." 690 CALL flagerror(local_error,err,error,*999)
693 CALL flagerror(
"Field is not associated.",err,error,*999)
696 exits(
"AnalyticAnalysis_Output")
698 999
IF(
ALLOCATED(integral_errors))
DEALLOCATE(integral_errors)
699 IF(
ALLOCATED(ghost_integral_errors))
DEALLOCATE(ghost_integral_errors)
700 errorsexits(
"AnalyticAnalysis_Output",err,error)
712 REAL(DP),
INTENT(IN) :: NUMERIC_VALUE
713 REAL(DP),
INTENT(IN) :: ANALYTIC_VALUE
715 REAL(DP) :: ANALYTIC_ANALYSIS_ABSOLUTE_ERROR
717 analytic_analysis_absolute_error=abs(analytic_value-numeric_value)
729 REAL(DP),
INTENT(IN) :: NUMERIC_VALUE
730 REAL(DP),
INTENT(IN) :: ANALYTIC_VALUE
732 REAL(DP) :: ANALYTIC_ANALYSIS_PERCENTAGE_ERROR
735 analytic_analysis_percentage_error=(analytic_value-numeric_value)/analytic_value*100.0_dp
737 analytic_analysis_percentage_error=0.0_dp
750 REAL(DP),
INTENT(IN) :: NUMERIC_VALUE
751 REAL(DP),
INTENT(IN) :: ANALYTIC_VALUE
753 REAL(DP) :: ANALYTIC_ANALYSIS_RELATIVE_ERROR
756 analytic_analysis_relative_error=(analytic_value-numeric_value)/(1.0_dp+analytic_value)
758 analytic_analysis_relative_error=0.0_dp
771 REAL(DP),
INTENT(IN) :: NUMERIC_VALUE
772 REAL(DP),
INTENT(IN) :: ANALYTIC_VALUE
774 REAL(DP) :: ANALYTIC_ANALYSIS_NID_ERROR
777 analytic_analysis_nid_error=(analytic_value-numeric_value)/analytic_value
779 analytic_analysis_nid_error=(analytic_value-numeric_value)/(1.0_dp+analytic_value)
793 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERRORS(:,:)
794 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERRORS(:,:)
795 INTEGER(INTG),
INTENT(OUT) :: ERR
798 INTEGER(INTG) :: element_idx,component_idx,gauss_idx,parameter_idx,variable_type
799 REAL(DP) :: ANALYTIC_INT,NUMERICAL_INT,RWG
800 TYPE(
basis_type),
POINTER :: BASIS,DEPENDENT_BASIS,GEOMETRIC_BASIS
803 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD
807 & NUMERICAL_INTERP_PARAMETERS(:)
812 NULLIFY(geometric_interp_point)
813 NULLIFY(geometric_interp_point_metrics)
814 NULLIFY(analytic_interp_parameters)
815 NULLIFY(geometric_interp_parameters)
816 NULLIFY(numerical_interp_parameters)
818 enters(
"ANALYTIC_ANALYSIS_INTEGRAL_ERRORS",err,error,*999)
820 integral_errors=0.0_dp
821 ghost_integral_errors=0.0_dp
822 IF(
ASSOCIATED(field_variable))
THEN 823 IF(
SIZE(integral_errors,1)>=6.AND.
SIZE(integral_errors,2)>=field_variable%NUMBER_OF_COMPONENTS)
THEN 824 IF(
SIZE(ghost_integral_errors,1)>=6.AND.
SIZE(ghost_integral_errors,2)>=field_variable%NUMBER_OF_COMPONENTS)
THEN 825 variable_type=field_variable%VARIABLE_TYPE
826 dependent_field=>field_variable%FIELD
827 IF(
ASSOCIATED(dependent_field))
THEN 828 decomposition=>dependent_field%DECOMPOSITION
829 IF(
ASSOCIATED(decomposition))
THEN 830 geometric_field=>dependent_field%GEOMETRIC_FIELD
831 IF(
ASSOCIATED(geometric_field))
THEN 832 geometric_variable=>geometric_field%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR
833 IF(
ASSOCIATED(geometric_variable))
THEN 834 CALL field_interpolation_parameters_initialise(geometric_field,geometric_interp_parameters,err,error,*999)
835 CALL field_interpolation_parameters_initialise(dependent_field,numerical_interp_parameters,err,error,*999)
836 CALL field_interpolation_parameters_initialise(dependent_field,analytic_interp_parameters,err,error,*999)
837 CALL field_interpolated_points_initialise(geometric_interp_parameters,geometric_interp_point,err,error,*999)
838 CALL field_interpolatedpointsmetricsinitialise(geometric_interp_point,geometric_interp_point_metrics, &
840 domain_elements1=>field_variable%COMPONENTS(decomposition%MESH_COMPONENT_NUMBER)%DOMAIN%TOPOLOGY%ELEMENTS
841 domain_elements2=>geometric_variable%COMPONENTS(decomposition%MESH_COMPONENT_NUMBER)%DOMAIN%TOPOLOGY%ELEMENTS
842 DO element_idx=1,domain_elements1%NUMBER_OF_ELEMENTS
843 dependent_basis=>domain_elements1%ELEMENTS(element_idx)%BASIS
844 geometric_basis=>domain_elements2%ELEMENTS(element_idx)%BASIS
846 CALL field_interpolation_parameters_element_get(field_values_set_type,element_idx, &
847 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
848 CALL field_interpolation_parameters_element_get(field_values_set_type,element_idx, &
849 & numerical_interp_parameters(variable_type)%PTR,err,error,*999)
850 CALL field_interpolation_parameters_element_get(field_analytic_values_set_type,element_idx, &
851 & analytic_interp_parameters(variable_type)%PTR,err,error,*999)
852 DO gauss_idx=1,quadrature_scheme%NUMBER_OF_GAUSS
854 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
855 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI, &
856 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
857 rwg=geometric_interp_point_metrics(field_u_variable_type)%PTR%JACOBIAN* &
858 & quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
859 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
860 domain_elements3=>field_variable%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS
861 basis=>domain_elements3%ELEMENTS(element_idx)%BASIS
864 SELECT CASE(dependent_field%SCALINGS%SCALING_TYPE)
865 CASE(field_no_scaling)
866 DO parameter_idx=1,basis%NUMBER_OF_ELEMENT_PARAMETERS
867 numerical_int=numerical_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
868 & numerical_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)
869 analytic_int=analytic_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
870 & analytic_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)
872 CASE(field_unit_scaling,field_arc_length_scaling,field_arithmetic_mean_scaling,field_harmonic_mean_scaling)
873 DO parameter_idx=1,basis%NUMBER_OF_ELEMENT_PARAMETERS
874 numerical_int=numerical_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
875 & numerical_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)* &
876 & numerical_interp_parameters(variable_type)%PTR%SCALE_FACTORS(parameter_idx,component_idx)
877 analytic_int=analytic_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
878 & analytic_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)* &
879 & analytic_interp_parameters(variable_type)%PTR%SCALE_FACTORS(parameter_idx,component_idx)
882 local_error=
"The dependent field scaling type of "// &
884 CALL flagerror(local_error,err,error,*999)
886 integral_errors(1,component_idx)=integral_errors(1,component_idx)+numerical_int*rwg
887 integral_errors(2,component_idx)=integral_errors(2,component_idx)+numerical_int**2*rwg
888 integral_errors(3,component_idx)=integral_errors(3,component_idx)+analytic_int*rwg
889 integral_errors(4,component_idx)=integral_errors(4,component_idx)+analytic_int**2*rwg
890 integral_errors(5,component_idx)=integral_errors(5,component_idx)+(analytic_int-numerical_int)*rwg
891 integral_errors(6,component_idx)=integral_errors(6,component_idx)+(analytic_int-numerical_int)**2*rwg
895 DO element_idx=domain_elements1%NUMBER_OF_ELEMENTS+1,domain_elements1%TOTAL_NUMBER_OF_ELEMENTS
896 dependent_basis=>domain_elements1%ELEMENTS(element_idx)%BASIS
897 geometric_basis=>domain_elements2%ELEMENTS(element_idx)%BASIS
899 CALL field_interpolation_parameters_element_get(field_values_set_type,element_idx, &
900 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
901 CALL field_interpolation_parameters_element_get(field_values_set_type,element_idx, &
902 & numerical_interp_parameters(variable_type)%PTR,err,error,*999)
903 CALL field_interpolation_parameters_element_get(field_analytic_values_set_type,element_idx, &
904 & analytic_interp_parameters(variable_type)%PTR,err,error,*999)
905 DO gauss_idx=1,quadrature_scheme%NUMBER_OF_GAUSS
907 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
908 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI, &
909 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
910 rwg=geometric_interp_point_metrics(field_u_variable_type)%PTR%JACOBIAN* &
911 & quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
912 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
913 domain_elements3=>field_variable%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS
914 basis=>domain_elements3%ELEMENTS(element_idx)%BASIS
917 SELECT CASE(dependent_field%SCALINGS%SCALING_TYPE)
918 CASE(field_no_scaling)
919 DO parameter_idx=1,basis%NUMBER_OF_ELEMENT_PARAMETERS
920 numerical_int=numerical_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
921 & numerical_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)
922 analytic_int=analytic_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
923 & analytic_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)
925 CASE(field_unit_scaling,field_arc_length_scaling,field_arithmetic_mean_scaling,field_harmonic_mean_scaling)
926 DO parameter_idx=1,basis%NUMBER_OF_ELEMENT_PARAMETERS
927 numerical_int=numerical_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
928 & numerical_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)* &
929 & numerical_interp_parameters(variable_type)%PTR%SCALE_FACTORS(parameter_idx,component_idx)
930 analytic_int=analytic_int+quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)* &
931 & analytic_interp_parameters(variable_type)%PTR%PARAMETERS(parameter_idx,component_idx)* &
932 & analytic_interp_parameters(variable_type)%PTR%SCALE_FACTORS(parameter_idx,component_idx)
935 local_error=
"The dependent field scaling type of "// &
937 CALL flagerror(local_error,err,error,*999)
939 ghost_integral_errors(1,component_idx)=ghost_integral_errors(1,component_idx)+numerical_int*rwg
940 ghost_integral_errors(2,component_idx)=ghost_integral_errors(2,component_idx)+numerical_int**2*rwg
941 ghost_integral_errors(3,component_idx)=ghost_integral_errors(3,component_idx)+analytic_int*rwg
942 ghost_integral_errors(4,component_idx)=ghost_integral_errors(4,component_idx)+analytic_int**2*rwg
943 ghost_integral_errors(5,component_idx)=ghost_integral_errors(5,component_idx)+ &
944 & (analytic_int-numerical_int)*rwg
945 ghost_integral_errors(6,component_idx)=ghost_integral_errors(6,component_idx)+ &
946 & (analytic_int-numerical_int)**2*rwg
950 CALL field_interpolatedpointsmetricsfinalise(geometric_interp_point_metrics,err,error,*999)
951 CALL field_interpolated_points_finalise(geometric_interp_point,err,error,*999)
952 CALL field_interpolation_parameters_finalise(analytic_interp_parameters,err,error,*999)
953 CALL field_interpolation_parameters_finalise(numerical_interp_parameters,err,error,*999)
954 CALL field_interpolation_parameters_finalise(geometric_interp_parameters,err,error,*999)
956 CALL flagerror(
"Geometric field variable is not associated.",err,error,*999)
959 CALL flagerror(
"Field geometric field is not associated.",err,error,*999)
962 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
965 CALL flagerror(
"Field variable field is not associated.",err,error,*999)
968 local_error=
"Invalid size for GHOST_INTEGRAL_ERRORS. The size is ("// &
970 &
trim(
number_to_vstring(
SIZE(ghost_integral_errors,2),
"*",err,error))//
") and it needs to be at least (6,"// &
972 CALL flagerror(local_error,err,error,*999)
975 local_error=
"Invalid size for INTEGRAL_ERRORS. The size is ("// &
977 &
trim(
number_to_vstring(
SIZE(integral_errors,2),
"*",err,error))//
") and it needs to be at least (6,"// &
979 CALL flagerror(local_error,err,error,*999)
982 CALL flagerror(
"Field variable is not associated.",err,error,*999)
985 exits(
"ANALYTIC_ANALYSIS_INTEGRAL_ERRORS")
987 999 errorsexits(
"ANALYTIC_ANALYSIS_INTEGRAL_ERRORS",err,error)
997 & ghost_integral_error,err,error,*)
1001 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1002 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1003 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1004 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1005 INTEGER(INTG),
INTENT(OUT) :: ERR
1009 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1010 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1012 enters(
"AnalyticAnalysis_IntegralAbsoluteErrorGet",err,error,*999)
1014 IF(
ASSOCIATED(field))
THEN 1015 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1020 & ghost_integral_errors(3,component_number))
1022 & ghost_integral_errors(4,component_number))
1024 CALL flagerror(
"Field is not associated",err,error,*999)
1027 exits(
"AnalyticAnalysis_IntegralAbsoluteErrorGet")
1029 999 errorsexits(
"AnalyticAnalysis_IntegralAbsoluteErrorGet",err,error)
1040 & ghost_integral_error,err,error,*)
1044 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1045 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1046 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1047 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1048 INTEGER(INTG),
INTENT(OUT) :: ERR
1052 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1053 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1055 enters(
"AnalyticAnalysis_IntegralAnalyticValueGet",err,error,*999)
1057 IF(
ASSOCIATED(field))
THEN 1058 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1060 integral_error(1)=integral_errors(3,component_number)
1061 integral_error(2)=integral_errors(4,component_number)
1062 ghost_integral_error(1)=ghost_integral_errors(3,component_number)
1063 ghost_integral_error(2)=ghost_integral_errors(4,component_number)
1065 CALL flagerror(
"Field is not associated",err,error,*999)
1068 exits(
"AnalyticAnalysis_IntegralAnalyticValueGet")
1070 999 errorsexits(
"AnalyticAnalysis_IntegralAnalyticValueGet",err,error)
1081 & ghost_integral_error,err,error,*)
1085 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1086 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1087 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1088 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1089 INTEGER(INTG),
INTENT(OUT) :: ERR
1093 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1094 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1096 enters(
"AnalyticAnalysis_IntegralNumericalValueGet",err,error,*999)
1098 IF(
ASSOCIATED(field))
THEN 1099 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1101 integral_error(1)=integral_errors(1,component_number)
1102 integral_error(2)=integral_errors(2,component_number)
1103 ghost_integral_error(1)=ghost_integral_errors(1,component_number)
1104 ghost_integral_error(2)=ghost_integral_errors(2,component_number)
1106 CALL flagerror(
"Field is not associated",err,error,*999)
1109 exits(
"AnalyticAnalysis_IntegralNumericalValueGet")
1111 999 errorsexits(
"AnalyticAnalysis_IntegralNumericalValueGet",err,error)
1122 & ghost_integral_error,err,error,*)
1126 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1127 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1128 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1129 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1130 INTEGER(INTG),
INTENT(OUT) :: ERR
1134 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1135 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1137 enters(
"AnalyticAnalysis_IntegralNIDNumericalValueGet",err,error,*999)
1139 IF(
ASSOCIATED(field))
THEN 1140 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1142 integral_error(1)=integral_errors(5,component_number)
1143 integral_error(2)=integral_errors(6,component_number)
1144 ghost_integral_error(1)=ghost_integral_errors(5,component_number)
1145 ghost_integral_error(2)=ghost_integral_errors(6,component_number)
1147 CALL flagerror(
"Field is not associated",err,error,*999)
1150 exits(
"AnalyticAnalysis_IntegralNIDNumericalValueGet")
1152 999 errors(
"AnalyticAnalysis_IntegralNIDNumericalValueGet",err,error)
1153 exits(
"AnalyticAnalysis_IntegralNIDNumericalValueGet")
1164 & ghost_integral_error,err,error,*)
1168 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1169 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1170 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1171 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1172 INTEGER(INTG),
INTENT(OUT) :: ERR
1176 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1177 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1179 enters(
"AnalyticAnalysis_IntegralNIDErrorGet",err,error,*999)
1181 IF(
ASSOCIATED(field))
THEN 1182 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1187 & ghost_integral_errors(3,component_number))
1189 & ghost_integral_errors(4,component_number))
1191 CALL flagerror(
"Field is not associated",err,error,*999)
1194 exits(
"AnalyticAnalysis_IntegralNIDErrorGet")
1196 999 errorsexits(
"AnalyticAnalysis_IntegralNIDErrorGet",err,error)
1206 & ghost_integral_error,err,error,*)
1210 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1211 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1212 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1213 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1214 INTEGER(INTG),
INTENT(OUT) :: ERR
1218 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1219 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1221 enters(
"AnalyticAnalysis_IntegralPercentageErrorGet",err,error,*999)
1223 IF(
ASSOCIATED(field))
THEN 1224 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1229 & ghost_integral_errors(3,component_number))
1231 & ghost_integral_errors(4,component_number))
1233 CALL flagerror(
"Field is not associated",err,error,*999)
1236 exits(
"AnalyticAnalysis_IntegralPercentageErrorGet")
1238 999 errorsexits(
"AnalyticAnalysis_IntegralPercentageErrorGet",err,error)
1249 & ghost_integral_error,err,error,*)
1253 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1254 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1255 REAL(DP),
INTENT(OUT) :: INTEGRAL_ERROR(2)
1256 REAL(DP),
INTENT(OUT) :: GHOST_INTEGRAL_ERROR(2)
1257 INTEGER(INTG),
INTENT(OUT) :: ERR
1261 REAL(DP),
ALLOCATABLE :: INTEGRAL_ERRORS(:,:)
1262 REAL(DP),
ALLOCATABLE :: GHOST_INTEGRAL_ERRORS(:,:)
1264 enters(
"AnalyticAnalysis_IntegralRelativeErrorGet",err,error,*999)
1266 IF(
ASSOCIATED(field))
THEN 1267 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1272 & ghost_integral_errors(3,component_number))
1274 & ghost_integral_errors(4,component_number))
1276 CALL flagerror(
"Field is not associated",err,error,*999)
1279 exits(
"AnalyticAnalysis_IntegralRelativeErrorGet")
1281 999 errorsexits(
"AnalyticAnalysis_IntegralRelativeErrorGet",err,error)
1292 & component_number,
VALUE,err,error,*)
1296 INTEGER(INTG),
INTENT(IN) :: VERSION_NUMBER
1297 INTEGER(INTG),
INTENT(IN) :: DERIVATIVE_NUMBER
1298 INTEGER(INTG),
INTENT(IN) :: USER_NODE_NUMBER
1299 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1300 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1301 REAL(DP),
INTENT(OUT) ::
VALUE 1302 INTEGER(INTG),
INTENT(OUT) :: ERR
1305 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1307 enters(
"AnalyticAnalysis_AbsoluteErrorGetNode",err,error,*999)
1309 IF(
ASSOCIATED(field))
THEN 1310 CALL field_parameter_set_get_node(field,variable_type,field_values_set_type,version_number,derivative_number, &
1311 & user_node_number,component_number,numerical_value,err,error,*999)
1312 CALL field_parameter_set_get_node(field,variable_type,field_analytic_values_set_type,version_number,derivative_number, &
1313 & user_node_number,component_number,analytic_value,err,error,*999)
1316 CALL flagerror(
"Field is not associated",err,error,*999)
1319 exits(
"AnalyticAnalysis_AbsoluteErrorGetNode")
1321 999 errorsexits(
"AnalyticAnalysis_AbsoluteErrorGetNode",err,error)
1331 & component_number,
VALUE,err,error,*)
1335 INTEGER(INTG),
INTENT(IN) :: VERSION_NUMBER
1336 INTEGER(INTG),
INTENT(IN) :: DERIVATIVE_NUMBER
1337 INTEGER(INTG),
INTENT(IN) :: USER_NODE_NUMBER
1338 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1339 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1340 REAL(DP),
INTENT(OUT) ::
VALUE 1341 INTEGER(INTG),
INTENT(OUT) :: ERR
1344 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1346 enters(
"AnalyticAnalysis_PercentageErrorGetNode",err,error,*999)
1348 IF(
ASSOCIATED(field))
THEN 1349 CALL field_parameter_set_get_node(field,variable_type,field_values_set_type,version_number,derivative_number, &
1350 & user_node_number,component_number,numerical_value,err,error,*999)
1351 CALL field_parameter_set_get_node(field,variable_type,field_analytic_values_set_type,version_number,derivative_number, &
1352 & user_node_number,component_number,analytic_value,err,error,*999)
1355 CALL flagerror(
"Field is not associated",err,error,*999)
1358 exits(
"AnalyticAnalysis_PercentageErrorGetNode")
1360 999 errorsexits(
"AnalyticAnalysis_PercentageErrorGetNode",err,error)
1372 & component_number,
VALUE,err,error,*)
1376 INTEGER(INTG),
INTENT(IN) :: VERSION_NUMBER
1377 INTEGER(INTG),
INTENT(IN) :: DERIVATIVE_NUMBER
1378 INTEGER(INTG),
INTENT(IN) :: USER_NODE_NUMBER
1379 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1380 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1381 REAL(DP),
INTENT(OUT) ::
VALUE 1382 INTEGER(INTG),
INTENT(OUT) :: ERR
1385 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1387 enters(
"AnalyticAnalysis_RelativeErrorGetNode",err,error,*999)
1389 IF(
ASSOCIATED(field))
THEN 1390 CALL field_parameter_set_get_node(field,variable_type,field_values_set_type,version_number,derivative_number, &
1391 & user_node_number,component_number,numerical_value,err,error,*999)
1392 CALL field_parameter_set_get_node(field,variable_type,field_analytic_values_set_type,version_number,derivative_number, &
1393 & user_node_number,component_number,analytic_value,err,error,*999)
1396 CALL flagerror(
"Field is not associated",err,error,*999)
1399 exits(
"AnalyticAnalysis_RelativeErrorGetNode")
1401 999 errorsexits(
"AnalyticAnalysis_RelativeErrorGetNode",err,error)
1415 INTEGER(INTG),
INTENT(IN) :: USER_ELEMENT_NUMBER
1416 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1417 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1418 REAL(DP),
INTENT(OUT) ::
VALUE 1419 INTEGER(INTG),
INTENT(OUT) :: ERR
1422 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1424 enters(
"AnalyticAnalysis_AbsoluteErrorGetElement",err,error,*999)
1426 IF(
ASSOCIATED(field))
THEN 1427 CALL field_parameter_set_get_element(field,variable_type,field_values_set_type,user_element_number,component_number, &
1428 & numerical_value,err,error,*999)
1429 CALL field_parameter_set_get_element(field,variable_type,field_analytic_values_set_type,user_element_number, &
1430 & component_number,analytic_value,err,error,*999)
1433 CALL flagerror(
"Field is not associated",err,error,*999)
1436 exits(
"AnalyticAnalysis_AbsoluteErrorGetElement")
1438 999 errorsexits(
"AnalyticAnalysis_AbsoluteErrorGetElement",err,error)
1449 & user_element_number,component_number,
VALUE,err,error,*)
1453 INTEGER(INTG),
INTENT(IN) :: USER_ELEMENT_NUMBER
1454 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1455 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1456 REAL(DP),
INTENT(OUT) ::
VALUE 1457 INTEGER(INTG),
INTENT(OUT) :: ERR
1460 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1462 enters(
"AnalyticAnalysis_PercentageErrorGetElement",err,error,*999)
1464 IF(
ASSOCIATED(field))
THEN 1465 CALL field_parameter_set_get_element(field,variable_type,field_values_set_type,user_element_number,component_number, &
1466 & numerical_value,err,error,*999)
1467 CALL field_parameter_set_get_element(field,variable_type,field_analytic_values_set_type,user_element_number, &
1468 & component_number,analytic_value,err,error,*999)
1471 CALL flagerror(
"Field is not associated",err,error,*999)
1474 exits(
"AnalyticAnalysis_PercentageErrorGetElement")
1476 999 errorsexits(
"AnalyticAnalysis_PercentageErrorGetElement",err,error)
1491 INTEGER(INTG),
INTENT(IN) :: USER_ELEMENT_NUMBER
1492 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1493 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1494 REAL(DP),
INTENT(OUT) ::
VALUE 1495 INTEGER(INTG),
INTENT(OUT) :: ERR
1498 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1500 enters(
"AnalyticAnalysis_RelativeErrorGetElement",err,error,*999)
1502 IF(
ASSOCIATED(field))
THEN 1503 CALL field_parameter_set_get_element(field,variable_type,field_values_set_type,user_element_number,component_number, &
1504 & numerical_value,err,error,*999)
1505 CALL field_parameter_set_get_element(field,variable_type,field_analytic_values_set_type,user_element_number, &
1506 & component_number,analytic_value,err,error,*999)
1509 CALL flagerror(
"Field is not associated",err,error,*999)
1512 exits(
"AnalyticAnalysis_RelativeErrorGetElement")
1514 999 errorsexits(
"AnalyticAnalysis_RelativeErrorGetElement",err,error)
1529 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1530 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1531 REAL(DP),
INTENT(OUT) ::
VALUE 1532 INTEGER(INTG),
INTENT(OUT) :: ERR
1535 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1537 enters(
"AnalyticAnalysis_AbsoluteErrorGetConstant",err,error,*999)
1539 IF(
ASSOCIATED(field))
THEN 1540 CALL field_parameter_set_get_constant(field,variable_type,field_values_set_type,component_number,numerical_value,err,error, &
1542 CALL field_parameter_set_get_constant(field,variable_type,field_analytic_values_set_type,component_number,analytic_value, &
1546 CALL flagerror(
"Field is not associated",err,error,*999)
1549 exits(
"AnalyticAnalysis_AbsoluteErrorGetConstant")
1551 999 errorsexits(
"AnalyticAnalysis_AbsoluteErrorGetConstant",err,error)
1565 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1566 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1567 REAL(DP),
INTENT(OUT) ::
VALUE 1568 INTEGER(INTG),
INTENT(OUT) :: ERR
1571 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1573 enters(
"AnalyticAnalysis_PercentageErrorGetConstant",err,error,*999)
1575 IF(
ASSOCIATED(field))
THEN 1576 CALL field_parameter_set_get_constant(field,variable_type,field_values_set_type,component_number,numerical_value,err,error, &
1578 CALL field_parameter_set_get_constant(field,variable_type,field_analytic_values_set_type,component_number,analytic_value, &
1582 CALL flagerror(
"Field is not associated",err,error,*999)
1585 exits(
"AnalyticAnalysis_PercentageErrorGetConstant")
1587 999 errorsexits(
"AnalyticAnalysis_PercentageErrorGetConstant",err,error)
1603 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1604 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1605 REAL(DP),
INTENT(OUT) ::
VALUE 1606 INTEGER(INTG),
INTENT(OUT) :: ERR
1609 REAL(DP) :: NUMERICAL_VALUE, ANALYTIC_VALUE
1611 enters(
"AnalyticAnalysis_RelativeErrorGetConstant",err,error,*999)
1613 IF(
ASSOCIATED(field))
THEN 1614 CALL field_parameter_set_get_constant(field,variable_type,field_values_set_type,component_number,numerical_value,err,error, &
1616 CALL field_parameter_set_get_constant(field,variable_type,field_analytic_values_set_type,component_number,analytic_value, &
1620 CALL flagerror(
"Field is not associated",err,error,*999)
1623 exits(
"AnalyticAnalysis_RelativeErrorGetConstant")
1625 999 errorsexits(
"AnalyticAnalysis_RelativeErrorGetConstant",err,error)
1636 & global_rms,err,error,*)
1640 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1641 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1642 INTEGER(INTG),
INTENT(IN) :: ERROR_TYPE
1643 REAL(DP),
INTENT(OUT) :: LOCAL_RMS(8)
1644 REAL(DP),
INTENT(OUT) :: LOCAL_GHOST_RMS(8)
1645 REAL(DP),
INTENT(OUT) :: GLOBAL_RMS(8)
1646 INTEGER(INTG),
INTENT(OUT) :: ERR
1649 REAL(DP) :: ERROR_VALUE
1650 INTEGER(INTG) :: GHOST_NUMBER(8),NUMBER(8),MPI_IERROR
1651 REAL(DP) :: RMS_ERROR(8),GHOST_RMS_ERROR(8)
1653 INTEGER(INTG) :: node_idx,deriv_idx
1655 enters(
"ANALYTIC_ANALYSIS_RMS_PERCENTAGE_ERROR_GET_NODE",err,error,*999)
1657 IF(
ASSOCIATED(field))
THEN 1658 nodes_domain=>field%VARIABLE_TYPE_MAP(variable_type)%PTR%COMPONENTS(component_number)%DOMAIN%TOPOLOGY%NODES
1659 IF(
ASSOCIATED(nodes_domain))
THEN 1663 ghost_rms_error=0.0_dp
1664 DO node_idx=1,nodes_domain%NUMBER_OF_NODES
1665 DO deriv_idx=1,nodes_domain%NODES(node_idx)%NUMBER_OF_DERIVATIVES
1666 SELECT CASE(error_type)
1670 & error_value,err,error,*999)
1674 & error_value,err,error,*999)
1678 & error_value,err,error,*999)
1680 CALL flagerror(
"The error type is not valid!",err,error,*999)
1683 number(deriv_idx)=number(deriv_idx)+1
1684 rms_error(deriv_idx)=rms_error(deriv_idx)+error_value*error_value
1687 DO node_idx=nodes_domain%NUMBER_OF_NODES+1,nodes_domain%TOTAL_NUMBER_OF_NODES
1688 DO deriv_idx=1,nodes_domain%NODES(node_idx)%NUMBER_OF_DERIVATIVES
1689 SELECT CASE(error_type)
1693 & error_value,err,error,*999)
1697 & error_value,err,error,*999)
1701 & error_value,err,error,*999)
1703 CALL flagerror(
"The error type is not valid!",err,error,*999)
1706 ghost_number(deriv_idx)=ghost_number(deriv_idx)+1
1707 ghost_rms_error(deriv_idx)=ghost_rms_error(deriv_idx)+error_value*error_value
1712 IF(any(number>0))
THEN 1714 IF(number(deriv_idx)>0)
THEN 1715 local_rms(deriv_idx)=sqrt(rms_error(deriv_idx)/number(deriv_idx))
1719 IF(number(deriv_idx)>0)
THEN 1720 local_ghost_rms(deriv_idx)=sqrt((rms_error(deriv_idx)+ghost_rms_error(deriv_idx))/(number(deriv_idx) &
1721 & +ghost_number(deriv_idx)))
1732 IF(number(deriv_idx)>0)
THEN 1733 global_rms(deriv_idx)=sqrt(rms_error(deriv_idx)/number(deriv_idx))
1738 IF(any(number>0))
THEN 1740 IF(number(deriv_idx)>0)
THEN 1741 local_rms(deriv_idx)=sqrt(rms_error(deriv_idx)/number(deriv_idx))
1742 global_rms(deriv_idx)=local_rms(deriv_idx)
1748 CALL flagerror(
"Nodes domain topology is not associated.",err,error,*999)
1751 CALL flagerror(
"Field is not associated",err,error,*999)
1754 exits(
"AnalyticAnalysis_RMSErrorGetNode")
1756 999 errorsexits(
"AnalyticAnalysis_RMSErrorGetNode",err,error)
1766 & global_rms,err,error,*)
1770 INTEGER(INTG),
INTENT(IN) :: VARIABLE_TYPE
1771 INTEGER(INTG),
INTENT(IN) :: COMPONENT_NUMBER
1772 INTEGER(INTG),
INTENT(IN) :: ERROR_TYPE
1773 REAL(DP),
INTENT(OUT) :: LOCAL_RMS
1774 REAL(DP),
INTENT(OUT) :: LOCAL_GHOST_RMS
1775 REAL(DP),
INTENT(OUT) :: GLOBAL_RMS
1776 INTEGER(INTG),
INTENT(OUT) :: ERR
1779 REAL(DP) :: ERROR_VALUE
1780 INTEGER(INTG) :: GHOST_NUMBER,NUMBER,MPI_IERROR
1781 REAL(DP) :: RMS_ERROR,GHOST_RMS_ERROR
1787 INTEGER(INTG) :: element_idx
1789 enters(
"AnalyticAnalysis_RMSErrorGetElement",err,error,*999)
1791 IF(
ASSOCIATED(field))
THEN 1792 domain=>field%VARIABLE_TYPE_MAP(variable_type)%PTR%COMPONENTS(component_number)%DOMAIN
1793 elements_domain=>domain%TOPOLOGY%ELEMENTS
1794 IF(
ASSOCIATED(elements_domain))
THEN 1795 decomposition=>domain%DECOMPOSITION
1796 IF(
ASSOCIATED(decomposition))
THEN 1797 decomposition_topology=>decomposition%TOPOLOGY
1798 IF(
ASSOCIATED(decomposition_topology))
THEN 1799 elements_decomposition=>decomposition_topology%ELEMENTS
1800 IF(
ASSOCIATED(elements_decomposition))
THEN 1804 ghost_rms_error=0.0_dp
1805 DO element_idx=1,elements_domain%NUMBER_OF_ELEMENTS
1806 SELECT CASE(error_type)
1812 & error_value,err,error,*999)
1817 CALL flagerror(
"The error type is not valid!",err,error,*999)
1820 rms_error=rms_error+error_value*error_value
1822 DO element_idx=elements_domain%NUMBER_OF_ELEMENTS+1,elements_domain%TOTAL_NUMBER_OF_ELEMENTS
1823 SELECT CASE(error_type)
1829 & error_value,err,error,*999)
1834 CALL flagerror(
"The error type is not valid!",err,error,*999)
1836 ghost_number=ghost_number+1
1837 ghost_rms_error=ghost_rms_error+error_value*error_value
1842 local_rms=sqrt(rms_error/number)
1844 local_ghost_rms=sqrt((rms_error+ghost_rms_error)/(number+ghost_number))
1852 global_rms=sqrt(rms_error/number)
1856 CALL flagerror(
"Decomposition topology elements is not associated.",err,error,*999)
1859 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
1862 CALL flagerror(
"Domain decomposition is not associated.",err,error,*999)
1865 CALL flagerror(
"Elements domain topology is not associated.",err,error,*999)
1868 CALL flagerror(
"Field is not associated",err,error,*999)
1871 exits(
"AnalyticAnalysis_RMSErrorGetElement")
1873 999 errorsexits(
"AnalyticAnalysis_RMSErrorGetElement",err,error)
This module contains all basis function routines.
subroutine, public analyticanalysis_rmserrorgetelement(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, ERROR_TYPE, LOCAL_RMS, LOCAL_GHOST_RMS, GLOBAL_RMS, ERR, ERROR,)
Get rms error value for the field.
Converts a number to its equivalent varying string representation.
Contains information on the mesh decomposition.
subroutine, public analyticanalysis_relativeerrorgetconstant(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get relative error value for a constant.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
subroutine, public analyticanalysis_absoluteerrorgetnode(FIELD, VARIABLE_TYPE, VERSION_NUMBER, DERIVATIVE_NUMBER, USER_NODE_NUMBER, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get absolute error value for the node.
Contains the topology information for a domain.
subroutine, public analyticanalysis_absoluteerrorgetelement(FIELD, VARIABLE_TYPE, USER_ELEMENT_NUMBER, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get absolute error value for an element.
This module contains all string manipulation and transformation routines.
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
This module contains routines for timing the program.
This module handles all analytic analysis routines.
integer(intg), parameter percentage_error_type
The percentage type.
Contains information for a field defined on a region.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
integer(intg), parameter relative_error_type
The relative type.
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
This module contains all program wide constants.
subroutine analytic_analysis_integral_errors(FIELD_VARIABLE, INTEGRAL_ERRORS, GHOST_INTEGRAL_ERRORS, ERR, ERROR,)
Calculates the relative error between a numeric value and an analytic value.
Contains the topology information for the elements of a domain.
Contains the topology information for a decomposition.
This module contains all type definitions in order to avoid cyclic module references.
subroutine, public analyticanalysis_integralpercentageerrorget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral percentage error value for the field.
subroutine, public analyticanalysis_integralnidnumericalvalueget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral nid numerical value for the field, TODO check integral calculation.
This module contains all computational environment variables.
subroutine, public analyticanalysis_relativeerrorgetnode(FIELD, VARIABLE_TYPE, VERSION_NUMBER, DERIVATIVE_NUMBER, USER_NODE_NUMBER, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get relative error value for the node.
This module contains CMISS MPI routines.
subroutine, public analyticanalysis_percentageerrorgetnode(FIELD, VARIABLE_TYPE, VERSION_NUMBER, DERIVATIVE_NUMBER, USER_NODE_NUMBER, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get percentage error value for the node.
subroutine, public analyticanalysis_relativeerrorgetelement(FIELD, VARIABLE_TYPE, USER_ELEMENT_NUMBER, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get relative error value for an element.
type(computational_environment_type), target, public computational_environment
The computational environment the program is running in.
Contains the topology information for the elements of a decomposition.
subroutine, public analyticanalysis_integralniderrorget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral nid error value for the field.
subroutine, public analyticanalysis_output(FIELD, FILENAME, ERR, ERROR,)
Output the analytic error analysis for a dependent field compared to the analytic values parameter se...
pure real(dp) function analytic_analysis_percentage_error(NUMERIC_VALUE, ANALYTIC_VALUE)
Calculates the percentage error between a numeric value and an analytic value.
Contains the topology information for the nodes of a domain.
Contains information for a particular quadrature scheme.
This module contains all routines dealing with (non-distributed) matrix and vectors types...
subroutine, public analyticanalysis_integralanalyticvalueget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral analytic value for the field TODO should we use analytical formula to calculate the inte...
pure real(dp) function analytic_analysis_relative_error(NUMERIC_VALUE, ANALYTIC_VALUE)
Calculates the relative error between a numeric value and an analytic value.
subroutine, public analyticanalysis_percentageerrorgetelement(FIELD, VARIABLE_TYPE, USER_ELEMENT_NUMBER, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get percentage error value for the node.
Contains information for a field variable defined on a field.
pure real(dp) function analytic_analysis_nid_error(NUMERIC_VALUE, ANALYTIC_VALUE)
Calculates the Normalised Integral Difference (NID) error with a numeric value and an analytic value...
subroutine, public analyticanalysis_integralrelativeerrorget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral relative error value for the field.
A pointer to the domain decomposition for this domain.
subroutine, public analyticanalysis_percentageerrorgetconstant(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get percentage error value for a constant.
subroutine, public analyticanalysis_integralnumericalvalueget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral numerical value for the field, TODO check integral calculation.
subroutine, public analyticanalysis_absoluteerrorgetconstant(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, VALUE, ERR, ERROR,)
Get absolute error value for the node.
Contains all information about a basis .
integer(intg), parameter absolute_error_type
The absolute type.
subroutine, public analyticanalysis_integralabsoluteerrorget(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, INTEGRAL_ERROR, GHOST_INTEGRAL_ERROR, ERR, ERROR,)
Get integral absolute error value for the field.
pure real(dp) function analytic_analysis_absolute_error(NUMERIC_VALUE, ANALYTIC_VALUE)
Calculates the absolute error between a numeric value and an analytic value.
subroutine, public analyticanalysis_rmserrorgetnode(FIELD, VARIABLE_TYPE, COMPONENT_NUMBER, ERROR_TYPE, LOCAL_RMS, LOCAL_GHOST_RMS, GLOBAL_RMS, ERR, ERROR,)
Get rms error value for the field.
real(dp), parameter zero_tolerance
This module contains all kind definitions.
subroutine, public mpi_error_check(ROUTINE, MPI_ERR_CODE, ERR, ERROR,)
Checks to see if an MPI error has occured during an MPI call and flags a CMISS error it if it has...