37 #include "../config.h"
53 INTEGER :: runs, counter, nindex, verbin
55 REAL(KIND=dp) :: ct, rt
57 CHARACTER(LEN=MAX_NAME_LEN) :: datestr, toutput
58 INTEGER,
POINTER :: tempnodelist(:)
59 LOGICAL :: nodepresent
60 INTEGER :: lastfsielement
67 WRITE(6,*)
'ElmerCSCParallel:Initializer: Starting ...'
70 ALLOCATE(global%verbosity(1))
72 global%verbosity = verbin
74 WRITE(*,*)
'verbosity = ', global%verbosity
76 CALL envir(
'ELMERSOLVER_OUTPUT_TOTAL'//char(0), toutput, tlen )
77 silent = toutput(1:1)==
'0' .OR. toutput(1:5)==
'false'
82 IF ( .NOT. silent )
THEN
83 datestr = formatdate()
84 WRITE( *,
'(A,A)' )
"ELMER SOLVER (v " // version //
") STARTED AT: ", trim(datestr)
88 IF( myverbosity > 3)
WRITE( *, * )
'Calling ElmerInitialize ... '
92 global%MyModel => currentmodel
96 DO i=1, currentmodel % NumberOfSolvers
97 solver => global % MyModel % Solvers(i)
98 solverparams => getsolverparams(solver)
99 equation = getstring(solverparams,
'Equation', gotit)
100 WRITE(*,*)
'Equation = ',equation
101 IF( equation .eq.
'nonlinear elasticity' )
THEN
104 ELSE IF( equation .eq.
'linear elasticity' )
THEN
112 DO t=1,currentmodel % NumberOfBCs
113 isfsi = listgetlogical(currentmodel % BCs(t) % Values,&
116 IF (myverbosity > 3)
WRITE(*,*)
'BC', t,
'is FSI'
121 IF (global%FSIbcId == -1)
THEN
122 WRITE(*,*)
'Not registering data no FSI BC!'
128 mymesh => currentmodel % Meshes
133 WRITE (*,*)
"Number of Bulk elemenets = ", mymesh % NumberOfBulkElements
134 WRITE (*,*)
"Number of Boundary elemenets = ", mymesh % NumberOfBoundaryElements
136 t = mymesh % NumberOfBulkElements
138 mycurrentelement => mymesh % Elements(t+1)
139 t = mycurrentelement % TYPE % DIMENSION
140 counter = (mymesh % NumberOfBoundaryElements)*(t + 1)
141 ALLOCATE(tempnodelist(counter))
146 DO t = mymesh % NumberOfBulkElements+1, &
147 mymesh % NumberOfBulkElements + &
148 mymesh % NumberOfBoundaryElements
150 mycurrentelement => mymesh % Elements(t)
151 bc_id = getbcid(mycurrentelement)
154 IF ( bc_id == global%FSIbcId )
THEN
156 IF( myverbosity > 3)
THEN
157 WRITE(*,*)
'Initializer element = ',t,
' bc_id = ',bc_id
159 global%nElem = global%nElem + 1
160 DO nt = 1,mycurrentelement % TYPE % NumberOfNodes
161 mynodeindexes => mycurrentelement % NodeIndexes
162 IF( myverbosity > 3)
THEN
163 WRITE(*,*)
'Node index = ', mynodeindexes(nt)
165 nodepresent = .false.
167 IF (tempnodelist(nk) == mynodeindexes(nt))
THEN
172 IF ( nodepresent .eqv. .false. )
THEN
173 counter = counter + 1
174 IF( myverbosity > 4)
THEN
175 WRITE(*,*)
'counter = ', counter
177 tempnodelist(counter) = mynodeindexes(nt)
183 IF( myverbosity > 5)
THEN
184 WRITE(*,*)
'SIZE(TempNodeList) =',
SIZE(tempnodelist)
185 DO t = 1,
SIZE(tempnodelist)
186 WRITE(*,*) tempnodelist(t)
190 global%nNodes = counter
192 IF( myverbosity > 4)
THEN
193 WRITE(*,*)
'global%nElem = ',global%nElem
194 WRITE(*,*)
'global%nNodes = ',global%nNodes
199 IF( myverbosity > 3)
WRITE(*,*)
'global%nNodes =', global%nNodes
200 ALLOCATE(global%NodeDisplacements(3*global%nNodes))
201 global%NodeDisplacements = 0.0
203 ALLOCATE(global%PreviousNodeDisplacements(3*global%nNodes))
204 global%PreviousNodeDisplacements = 0.d0
205 ALLOCATE(global%IsLoadFreeNode(global%nNodes))
206 global%IsLoadFreeNode = .false.
208 ALLOCATE(global%MyToElmerNodes(global%nNodes))
209 IF( myverbosity > 3)
THEN
210 WRITE(*,*)
'SIZE(NodeDisplacements)=',
SIZE(global%NodeDisplacements)
212 ALLOCATE(currentmodel%ElmerToMyNodes(currentmodel % NumberOfNodes))
213 global%MyToElmerNodes = -1
214 currentmodel%ElmerToMyNodes = -1
218 ALLOCATE(global%FaceLoads(3*global%nElem))
219 global%FaceLoads = 0.0
222 ALLOCATE(global%FacePressures(global%nElem))
223 global%FacePressures = 0.0
226 ALLOCATE(global%NodePressures(global%nNodes))
227 global%NodePressures = 0
230 ALLOCATE(global%NodeLoads(3*global%nNodes))
231 global%NodeLoads = 0.0
234 ALLOCATE(global%PreviousLoads(3,global%nNodes))
235 global%PreviousLoads = 0.0
237 ALLOCATE(currentmodel%NodeLoadsPass(3,global%nNodes))
238 IF( myverbosity > 3)
WRITE(*,*)
'SIZE(NodeLoads)=',
SIZE(global%NodeLoads)
240 DO t = 1, global%nNodes
243 currentmodel%NodeLoadsPass(j,t) = 0.0
244 global%PreviousLoads(j,t) = 0.0
251 mycurrentelement => mymesh % Elements(lastfsielement)
252 IF (mycurrentelement % TYPE % DIMENSION == 1)
THEN
253 IF (mycurrentelement % TYPE % NumberOfNodes == 2)
THEN
254 global%MeshType =
':b2:'
256 ELSE IF (mycurrentelement % TYPE % NumberOfNodes == 3)
THEN
257 global%MeshType =
':b3:'
260 CALL fatal(
' ',
'FSI elements of 1 dimension must have 2 or 3 nodes!' )
262 ELSE IF (mycurrentelement % TYPE % DIMENSION == 2)
THEN
263 IF( myverbosity > 3)
THEN
264 WRITE(*,*)
'FSI BC element NumberOfNodes =',&
265 mycurrentelement % TYPE % NumberOfNodes
267 IF (mycurrentelement % TYPE % NumberOfNodes == 3)
THEN
268 global%MeshType =
':t3:'
270 ELSE IF (mycurrentelement % TYPE % NumberOfNodes == 6)
THEN
271 global%MeshType =
':t6:'
273 ELSE IF (mycurrentelement % TYPE % NumberOfNodes == 4)
THEN
274 global%MeshType =
':q4:'
276 ELSE IF (mycurrentelement % TYPE % NumberOfNodes == 8)
THEN
277 global%MeshType =
':q8:'
280 CALL fatal(
' ',
'FSI elements of 2 dimensions must have 3 or 6 node&
281 triangles or 4 or 8 node quadrilaterals!' )
284 CALL fatal(
' ',
'FSI elements cannot have dimension greater than 2!' )
287 IF( myverbosity > 3)
THEN
288 WRITE(*,*)
'global%MeshType = ',global%MeshType
289 WRITE(*,*)
'global%nConn =',global%nConn
291 ALLOCATE(global%Conn(global%nConn*global%nElem))
292 ALLOCATE(global%Coords(3*global%nNodes))
297 DO t = mymesh % NumberOfBulkElements+1, &
298 mymesh % NumberOfBulkElements + &
299 mymesh % NumberOfBoundaryElements
303 mycurrentelement => mymesh % Elements(t)
304 bc_id = getbcid(mycurrentelement)
307 CALL getelementnodes(elementnodes,mycurrentelement)
315 IF ( bc_id == global%FSIbcId )
THEN
316 counter = counter + 1
317 IF( myverbosity > 3)
THEN
318 WRITE(*,*)
'element = ',t
320 CALL getelementnodes(elementnodes,mycurrentelement)
322 global%FacePressures(counter) = 0.0
323 global%FaceLoads(3*(counter-1) + 1) = 0.0
324 global%FaceLoads(3*(counter-1) + 1) = 0.0
325 global%FaceLoads(3*(counter-1) + 1) = 0.0
327 DO nt = 1,mycurrentelement % TYPE % NumberOfNodes
328 mynodeindexes => mycurrentelement % NodeIndexes
330 IF( myverbosity > 3)
THEN
331 WRITE(*,*)
'Node index = ', mynodeindexes(nt)
332 WRITE(*,*) elementnodes % x(nt), elementnodes % y(nt), &
336 DO nk=1,global%nNodes
337 IF (tempnodelist(nk) == mynodeindexes(nt))
THEN
344 global%MyToElmerNodes(nindex) = mynodeindexes(nt)
345 currentmodel%ElmerToMyNodes(mynodeindexes(nt)) = nindex
346 global%Conn(global%nConn*(counter-1) + nt) = nindex
347 global%Coords(3*(nindex-1) + 1) = elementnodes % x(nt)
348 global%Coords(3*(nindex-1) + 2) = elementnodes % y(nt)
349 global%Coords(3*(nindex-1) + 3) = elementnodes % z(nt)
350 global%NodeLoads(3*(nindex-1) + 1) = 0.0
351 global%NodeLoads(3*(nindex-1) + 2) = 0.0
352 global%NodeLoads(3*(nindex-1) + 3) = 0.0
353 global%NodePressures(nindex) = 0.0
355 IF (abs(elementnodes % x(nt) - 0.6) < 10.0*epsilon(1.0))
THEN
367 IF( myverbosity >= 5)
THEN
368 WRITE(6,*)
'global%MyToElmerNodes = '
370 WRITE(6,*) i,
' = ',global%MyToElmerNodes(i)
372 WRITE(6,*)
'CurrentModel%ElmerToMyNodes = '
373 DO i=1,currentmodel % NumberOfNodes
374 WRITE(6,*) i,
' = ',currentmodel%ElmerToMyNodes(i)
377 WRITE(6,*)
'-------------------------------------------'
378 WRITE(*,*)
'global%Conn = '
379 WRITE(6,*)
'-------------------------------------------'
380 DO t = 1, global%nElem
381 WRITE(*,*) t,
':',global%Conn(global%nConn*(t-1) + 1),&
382 global%Conn(global%nConn*(t-1) + 2)
387 WRITE(6,*)
'-------------------------------------------'
388 WRITE(*,*)
'global%Coords = '
389 WRITE(6,*)
'-------------------------------------------'
390 DO t = 1, global%nNodes
391 WRITE(*,*) t,
':',global%Coords(3*(t-1)+1),global%Coords(3*(t-1)+2),&
392 global%Coords(3*(t-1)+3)
399 IF( myverbosity > 3)
THEN
400 WRITE(*,*)
'window.mesh = ', &
401 trim(global%window_name)//
'.'//trim(global%MeshType)
404 paneid = 100 + global % procId
405 CALL com_set_size(trim(global%window_name)//
'.nc',paneid,global%nNodes)
406 CALL com_set_array(trim(global%window_name)//
'.nc',paneid,global%Coords,3)
407 CALL com_set_size(trim(global%window_name)//
'.'//trim(global%MeshType),paneid,&
409 CALL com_set_array(trim(global%window_name)//
'.'//trim(global%MeshType),paneid,&
410 global%Conn, global%nConn)
418 CALL com_new_dataitem(trim(global%window_name)//
'.Displacements',
'n', com_double_precision, 3,
'm')
419 CALL com_set_array(trim(global%window_name)//
'.Displacements',paneid,&
420 global%NodeDisplacements,3)
424 CALL com_new_dataitem(trim(global%window_name)//
'.PreviousDisplacements',
'n', com_double_precision, 3,
'm')
425 CALL com_set_array(trim(global%window_name)//
'.PreviousDisplacements',paneid,&
426 global%PreviousNodeDisplacements,3)
430 CALL com_new_dataitem(trim(global%window_name)//
'.Loads',
'n', com_double_precision, 3,
'')
431 CALL com_set_array(trim(global%window_name)//
'.Loads',paneid,&
435 CALL com_new_dataitem(trim(global%window_name)//
'.NodePressures',&
436 'n', com_double_precision, 1,
'')
437 CALL com_set_array(trim(global%window_name)//
'.NodePressures',paneid,&
438 global%NodePressures,1)
441 CALL com_new_dataitem(trim(global%window_name)//
'.Pressures',
'e',&
442 com_double_precision, 1,
'')
443 CALL com_set_array(trim(global%window_name)//
'.Pressures',paneid,&
444 global%FacePressures,1)
447 CALL com_new_dataitem(trim(global%window_name)//
'.FaceLoads',
'e',&
448 com_double_precision, 3,
'')
449 CALL com_set_array(trim(global%window_name)//
'.FaceLoads',paneid,&
460 IF( myverbosity > 4)
THEN
461 WRITE(6,*)
'-------------------------------------------'
462 WRITE(*,*)
'global%NodeDisplacements = '
463 WRITE(6,*)
'-------------------------------------------'
464 DO i = 1,global%nNodes
466 global%NodeDisplacements(3*(i-1) + j) = 0.0
468 WRITE(6,*) (global%NodeDisplacements(3*(i-1) + j),j=1,3)
475 WRITE(6,*)
'ElmerCSCParallel:Initializer: Done.....'
477 nullify(tempnodelist)
483 SUBROUTINE run(global, runs, tFinal)
495 DOUBLE PRECISION,
INTENT(IN) :: tfinal
496 DOUBLE PRECISION :: standardtimestep
497 DOUBLE PRECISION :: var1, var2, var3
498 DOUBLE PRECISION :: deltatime
512 DOUBLE PRECISION :: tfinal
517 currentmodel => global%MyModel
521 IF (previoustime >= finaltime)
THEN
522 CALL fatal(
' ',
'Next time step passed to RUN is greater than &
523 previous time step!')
526 IF (myverbosity > 3)
WRITE(*,*)
'In RUN function'
528 standardtimestep = timestepsizes(1,1)
529 deltatime = tfinal - stime(1)
530 timesteps(1) = floor(deltatime/standardtimestep)
532 IF (myverbosity > 3)
THEN
533 WRITE(*,*)
'tFinal = ', tfinal
534 WRITE(*,*)
'sTime(1) = ', stime(1)
535 WRITE(*,*)
'standardTimestep = ', standardtimestep
538 var3 = deltatime - int(deltatime/standardtimestep)*standardtimestep
540 IF ( abs(var3) < 1.0d-12 )
THEN
542 IF (myverbosity > 3)
WRITE(*,*)
'standardTimestep evenly divides time'
544 timestepsizes(2,1) = deltatime - timesteps(1)*standardtimestep
547 IF (outputintervals(1) == 1)
THEN
548 outputintervals(2) = 1
550 IF (myverbosity > 3)
THEN
551 WRITE(*,*)
'Remainder for time'
552 WRITE(*,*)
'TimestepSizes(2,1) = ', timestepsizes(2,1)
556 IF (myverbosity > 3)
THEN
557 WRITE(*,*)
'In Run function'
558 WRITE(*,*)
'tFinal = ', tfinal
559 WRITE(*,*)
'sTime(1) = ', stime(1)
560 WRITE(*,*)
'Timesteps(1) = ', timesteps(1)
561 WRITE(*,*)
'standardTimestep = ', standardtimestep
563 WRITE(*,*)
'Pressures '
564 DO t = 1, global%nElem
565 WRITE(*,*) global%FacePressures(t)
568 WRITE(*,*)
'FaceLoads '
569 DO t = 1, global%nElem
570 WRITE(*,*) global%FaceLoads(3*(t-1) + 1), global%FaceLoads(3*(t-1) + 2),&
571 global%FaceLoads(3*(t-1) + 3)
574 WRITE(*,*)
'NodePressures '
575 DO t = 1, global%nNodes
576 WRITE(*,*) global%NodePressures(t)
586 IF (myverbosity > 3)
WRITE(*,*)
'Calling TimeStepper'
588 IF (myverbosity > 3)
WRITE(*,*)
'Done with TimeStepper'
590 IF (global%FSIbcId /= -1)
THEN
591 IF (myverbosity > 3)
WRITE(*,*)
'Calling UpdateDisplacements'
597 DO t = 1, global%nNodes
599 global%PreviousLoads(j,t) = global%NodeLoads(3*(t-1) + j)
605 previoustime = finaltime
607 WRITE(*,*)
'ElmerCSCParallel:Run: runs = ',runs
608 WRITE(*,*)
'ElmerCSCParallel:Run: CurrentModel%GetTestLoads = ',&
609 currentmodel%GetTestLoads
610 WRITE(*,*)
'ElmerCSCParallel:Run: CurrentModel%UDFUsed = ',&
612 IF (runs == 1 .AND. currentmodel%GetTestLoads .eqv. .true. &
613 .AND. currentmodel%UDFUsed .eqv. .true.)
THEN
632 DOUBLE PRECISION :: tfinal
633 INTEGER :: ncount, counter, ncountmax
635 WRITE(*,*)
'ElmerCSCParallel:UpdateDisplacements:',&
636 ' Reporting displacements to the fluid solver'
639 solver => currentmodel % Solvers(global%SolverId)
642 stresssol => solver % Variable
643 displacement => stresssol % Values
644 myperm => stresssol % Perm
646 IF( myverbosity > 3)
THEN
647 WRITE(*,*)
'The SIZE(Displacement) = ',
SIZE(displacement)
648 WRITE(*,*)
'After SolverActivate Call, Displacement(1) = ',&
650 DO t=1,
SIZE(displacement)
651 WRITE(*,*)
'Displacement',t,
'=',displacement(t)
656 elementcount = getnofactive()
657 boundaryelementcount = getnofboundaryelements()
659 mymesh => currentmodel % Meshes
666 IF( myverbosity > 3)
THEN
667 WRITE(*,*)
'Number of bulk elements = ', mymesh % NumberOfBulkElements
668 WRITE(*,*)
'Number of boundary elements = ', mymesh % NumberOfBoundaryElements
670 DO t = mymesh % NumberOfBulkElements+1, &
671 mymesh % NumberOfBulkElements + &
672 mymesh % NumberOfBoundaryElements
673 mycurrentelement => mymesh % Elements(t)
674 bc_id = getbcid(mycurrentelement)
675 IF ( bc_id == global%FSIbcId )
THEN
677 IF( myverbosity > 3)
THEN
678 WRITE(*,*)
'*************************************'
679 WRITE(*,*)
'element ',counter,
'on FSI boundary'
680 WRITE(*,*)
'Update t = ',t,
' bc_id = ',bc_id
682 WRITE(*,*)
'Element no. of nodes:', &
683 mycurrentelement % TYPE % NumberOfNodes
686 CALL getelementnodes(elementnodes,mycurrentelement)
688 DO nt = 1,mycurrentelement % TYPE % NumberOfNodes
689 mynodeindexes => mycurrentelement % NodeIndexes
691 IF( myverbosity > 3)
THEN
692 WRITE(*,*)
'*********************'
693 WRITE(*,*)
'Node index = ', mynodeindexes(nt)
694 WRITE(*,*) elementnodes % x(nt), elementnodes % y(nt), &
696 WRITE(*,*)
'MyPerm = ', myperm(mynodeindexes(nt))
699 IF ( myperm(mynodeindexes(nt)) > 0 )
THEN
700 nk = (stresssol % DOFs)*(myperm(mynodeindexes(nt)) - 1)
701 IF( myverbosity > 3)
WRITE(*,*)
'DOFs = ', stresssol % DOFs
703 ncount = currentmodel%ElmerToMyNodes(mynodeindexes(nt))
708 IF ( ncount > ncountmax )
THEN
709 IF( myverbosity > 3)
THEN
710 WRITE(6,*)
'Updating NodeDisplacement(',ncount,
')'
713 IF ( stresssol % DOFs == 1 )
THEN
714 IF( myverbosity > 3)
WRITE(*,*) displacement(nk+1), 0.0, 0.0
715 global%NodeDisplacements(3*(ncount-1) + 1) = displacement(nk+1)
716 global%NodeDisplacements(3*(ncount-1) + 2) = 0.0d0
717 global%NodeDisplacements(3*(ncount-1) + 3) = 0.0d0
718 ELSE IF ( stresssol % DOFs == 2 )
THEN
719 IF( myverbosity > 3)
WRITE(*,*) displacement(nk+1), displacement(nk+2)
720 global%NodeDisplacements(3*(ncount-1) + 1) = displacement(nk+1)
721 global%NodeDisplacements(3*(ncount-1) + 2) = displacement(nk+2)
722 global%NodeDisplacements(3*(ncount-1) + 3) = 0.0d0
723 ELSE IF ( stresssol % DOFs == 3 )
THEN
725 global%NodeDisplacements(3*(ncount-1) + 1) = displacement(nk+1)&
726 - global%PreviousNodeDisplacements(3*(ncount-1) + 1)
727 global%NodeDisplacements(3*(ncount-1) + 2) = displacement(nk+2)&
728 - global%PreviousNodeDisplacements(3*(ncount-1) + 2)
729 global%NodeDisplacements(3*(ncount-1) + 3) = displacement(nk+3)&
730 - global%PreviousNodeDisplacements(3*(ncount-1) + 3)
733 global%PreviousNodeDisplacements(3*(ncount-1) + 1) = displacement(nk+1)
734 global%PreviousNodeDisplacements(3*(ncount-1) + 2) = displacement(nk+2)
735 global%PreviousNodeDisplacements(3*(ncount-1) + 3) = displacement(nk+3)
743 WRITE(*,*)
'StressSol % DOFs = ', stresssol % DOFs
744 WRITE(*,*)
'DOFs are assumed to be <= 3'
745 CALL fatal(
' ',
'StressSol DOFs are greater than 3 ' )
747 ncountmax = max(ncount, ncountmax)
757 IF( myverbosity > 50)
THEN
758 WRITE(6,*)
'tFinal = ', tfinal
759 WRITE(6,*)
'NodeDisplacements'
760 DO i = 1,global%nNodes
761 WRITE(6,*) (global%NodeDisplacements(3*(i-1) + j),j=1,3)
763 WRITE(6,*)
'Exiting UpdateDisplacements'
787 CHARACTER(LEN=MAX_NAME_LEN) :: datestr, toutput
789 currentmodel => global%MyModel
791 WRITE(*,*)
'ElmerCSCParallel:Finalize: Finishing simulation'
795 CALL envir(
'ELMERSOLVER_OUTPUT_TOTAL'//char(0), toutput, tlen )
796 silent = toutput(1:1)==
'0' .OR. toutput(1:5)==
'false'
798 IF ( .NOT. silent )
THEN
799 IF ( parenv % myPE == 0 )
THEN
802 datestr = formatdate()
803 WRITE( *,
'(A,A)' )
'ELMER SOLVER FINISHED AT: ', trim(datestr)
807 WRITE(6,*)
'ElmerCSCParallel:Finalize: End Finalize. FirstTime = ',firsttime
822 SUBROUTINE com_set_pointer(attr,ptr,asso)
824 CHARACTER(*),
INTENT(IN) :: attr
827 END SUBROUTINE com_set_pointer
832 INTEGER :: runs, verbin
835 SUBROUTINE run(global, runs, tFinal)
839 DOUBLE PRECISION,
INTENT(IN) :: tfinal
846 DOUBLE PRECISION :: tfinal
857 CHARACTER(*),
intent(in) :: name
858 INTEGER :: com_types(7)
861 INTEGER,
target :: nproc, procid
863 WRITE(*,
'(A)')
"Loading ElmerCSCParallel: "//trim(name)
867 glb%window_name = trim(name)
868 glb%other_window_handle = -1
869 glb%c_window_handle = -1
870 CALL com_new_window(trim(name), mpi_comm_null)
872 glb%ElmerComm = com_get_default_communicator()
873 CALL mpi_comm_size(glb%ElmerComm, nproc, ierror)
875 CALL mpi_comm_rank(glb%ElmerComm, procid, ierror)
878 CALL com_new_dataitem(trim(name)//
'.global',
'w',com_f90pointer,1,
'')
879 CALL com_allocate_array(trim(name)//
'.global')
880 CALL com_new_dataitem(trim(name)//
'.nProc',
'w',com_integer,1,
'')
881 CALL com_set_size(trim(name)//
'.nProc',0,1)
882 CALL com_set_array(name//
'.nProc', 0, glb%nProc)
884 com_types(1) = com_f90pointer
885 com_types(2) = com_integer
886 com_types(3) = com_integer
888 CALL com_set_member_function(trim(name)//
'.Initialize',
initializer, &
889 trim(name)//
'.global',
'bbi',com_types)
891 com_types(3) = com_double_precision
893 CALL com_set_member_function(trim(name)//
'.Run',
run, &
894 trim(name)//
'.global',
'bbi',com_types)
896 CALL com_set_member_function(trim(name)//
'.Finalize',
finalize, &
897 trim(name)//
'.global',
'bb',com_types)
899 CALL com_window_init_done(name)
911 SUBROUTINE com_get_pointer(attr,ptr,asso)
913 CHARACTER(*),
INTENT(IN) :: attr
916 END SUBROUTINE com_get_pointer
918 character(*),
intent(in) :: name
920 INTEGER :: window_handle,other_window_handle,c_window_handle, owlen
922 WRITE(*,
'(A)')
"Unloading ElmerCSCParallel: "//trim(name)
924 window_handle = com_get_window_handle(trim(name))
925 if(window_handle .gt. 0)
then
927 IF(
ASSOCIATED(glb).eqv..true.)
THEN
928 WRITE(*,
'(A)')
'Fortran module '//trim(glb%window_name)//
' unloading name '//trim(name)
929 if(glb%other_window_handle .gt. 0)
then
930 WRITE(*,*)
'Fortran module '//trim(glb%window_name)//&
931 ' unloading external Fortran module '//trim(glb%other_window_name)//
'.'
932 other_window_handle = com_get_window_handle(trim(glb%other_window_name))
933 IF(other_window_handle .gt. 0)
THEN
934 CALL com_unload_module(
"ElmerCSCParallel",trim(glb%other_window_name))
937 if(glb%c_window_handle .gt. 0)
then
938 WRITE(*,*)
'Fortran module '//trim(glb%window_name)//&
939 ' unloading external C module '//trim(glb%c_window_name)//
'.'
940 c_window_handle = com_get_window_handle(trim(glb%c_window_name))
941 IF(c_window_handle .gt. 0)
THEN
942 CALL com_unload_module(
"ElmerCSCParallel",trim(glb%c_window_name))
947 CALL com_delete_window(trim(name))
ElmerLib Elmer library routines
subroutine elmercscparallel_unload_module(name)
subroutine timestepper(global, runs)
subroutine elmerfinalize(runs)
ElmerLib Elmer library routines
subroutine finalize(global, runs)
subroutine elmercscparallel_load_module(name)
subroutine elmerinitialize(runs)
ElmerLib Elmer library routines
subroutine updatedisplacements(global, runs, tFinal)
subroutine associate_pointer(attr, ptr)
ElmerLib Elmer library routines
subroutine initializer(global, runs, verbIn)
A caller for the Elmer main program.
subroutine run(global, runs, tFinal)