Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RemoveBCHT.f90
Go to the documentation of this file.
1 
2 !!****
3 !!
4 !! NAME
5 !! RemoveBCHT_reff
6 !!
7 !! FUNCTION
8 !! This subroutine removes values from the load vector
9 !! that are associated with perscribed boundary
10 !! conditions.
11 !!
12 !! INPUTS
13 !! ndim -- The size of one dimension of the global Meff matrix
14 !! nstart -- The global index of the first row assigned to this processor
15 !! pbar -- The part of the global load vector that is assigned to this processor
16 !! newndim -- The size of the global Meff matrix after BCs have been removed
17 !!
18 !! OUTPUTS
19 !! newpbar -- The part of the global load vector that is assigned to this processor after BCs have been removed
20 !!
21 !! USES
22 !! none
23 !!
24 !!****
25 
26 SUBROUTINE removebcht_reff(nstart,ndim,pbar,newndim,newpbar)
27 
29  USE comp_row_global
30  USE implicit_global
31  USE precision
32 
33  IMPLICIT NONE
34 
35  include 'mpif.h'
36 
37  INTEGER :: i, m, counter1, counter2
38 
39  INTEGER :: ndim, newndim, nstart
40  REAL(kind=wp), DIMENSION(ndim) :: pbar
41  REAL(kind=wp), DIMENSION(newndim) :: newpbar
42 
43 
44  ! Construct new vector
45  counter2 = 0
46  DO i = 1, ndim
47  counter1 = 0
48  DO m = 1, gnumtemp
49  IF(gtempbc(m) == i + nstart - 1) THEN
50  counter1 = 1
51  ENDIF
52  ENDDO
53  IF(counter1 == 0) THEN
54  counter2 = counter2 + 1
55  newpbar(counter2) = pbar(i)
56  ENDIF
57  ENDDO
58 
59 
60 END SUBROUTINE removebcht_reff
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 !!****
71 !!
72 !! NAME
73 !! removeBCs_newa
74 !!
75 !! FUNCTION
76 !! This subroutine takes the acceleration vector that
77 !! does not include boundary conditions and expands it
78 !! back into the acceleration vector with rows associated
79 !! with boundary conditions in it.
80 !!
81 !! INPUTS
82 !! ndim -- The size of one dimension of the global Meff matrix
83 !! nstart -- The global index of the first row assigned to this processor
84 !! newa -- The part of the global acceleration vector assigned to this proc without rows associated with boundary conditions
85 !! newndim -- The size of the global Meff matrix after BCs have been removed
86 !!
87 !! OUTPUTS
88 !! a -- The part of the global acceleration vector assigned to this proc with rows associated with boundary conditions
89 !!
90 !! USES
91 !! none
92 !!
93 !!****
94 
95 SUBROUTINE removebcht_newtemp(nstart,ndim,a,newndim,newa)
96 
98  USE comp_row_global
99  USE implicit_global
100  USE precision
101 
102  IMPLICIT NONE
103 
104  include 'mpif.h'
105 
106  INTEGER :: i, m, counter1, counter2, counter3
107 
108  INTEGER :: ndim, newndim, nstart
109  REAL(kind=wp), DIMENSION(ndim) :: a
110  REAL(kind=wp), DIMENSION(newndim) :: newa
111 
112 
113  ! Construct new vector
114  counter2 = 0
115  DO i = 1, newndim
116  counter3 = 0
117  DO m = 1, gnumtemp
118  IF((gtempbc(m) <= i + counter3 + nstart - 1).AND.(gtempbc(m) >= nstart)) THEN
119  counter3 = counter3 + 1
120  ENDIF
121  ENDDO
122  a(i+counter3) = newa(i)
123  !if(myid==2) print*,myid,i,counter3,i+counter3
124  ENDDO
125 
126 
127 END SUBROUTINE removebcht_newtemp
FT m(int i, int j) const
blockLoc i
Definition: read.cpp:79
subroutine removebcht_reff(nstart, ndim, pbar, newndim, newpbar)
Definition: RemoveBCHT.f90:26
subroutine removebcht_newtemp(nstart, ndim, a, newndim, newa)
Definition: RemoveBCHT.f90:95
RT a() const
Definition: Line_2.h:140