OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
segvar_mod.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| segvar_mod ../engine/share/modules/segvar_mod.F
25!||--- called by ------------------------------------------------------
26!|| aconve ../engine/source/ale/aconve.F
27!|| afluxt ../engine/source/ale/ale51/afluxt.F
28!|| ale51_antidiff2 ../engine/source/ale/ale51/ale51_antidiff2.F
29!|| ale51_antidiff3 ../engine/source/ale/ale51/ale51_antidiff3.f
30!|| ale51_gradient_reconstruction ../engine/source/ale/alemuscl/ale51_gradient_reconstruction.F
31!|| ale51_gradient_reconstruction2 ../engine/source/ale/alemuscl/ale51_gradient_reconstruction2.F
32!|| alefvm_main ../engine/source/ale/alefvm/alefvm_main.F
33!|| alemain ../engine/source/ale/alemain.F
34!|| alemuscl_upwind ../engine/source/ale/alemuscl/alemuscl_upwind.F
35!|| alemuscl_upwind2 ../engine/source/ale/alemuscl/alemuscl_upwind2.F
36!|| alethe ../engine/source/ale/alethe.F
37!|| ebcs0 ../engine/source/boundary_conditions/ebcs/ebcs0.F
38!|| ebcs1 ../engine/source/boundary_conditions/ebcs/ebcs1.F
39!|| ebcs10 ../engine/source/boundary_conditions/ebcs/ebcs10.F
40!|| ebcs11 ../engine/source/boundary_conditions/ebcs/ebcs11.F90
41!|| ebcs4 ../engine/source/boundary_conditions/ebcs/ebcs4.F
42!|| ebcs5 ../engine/source/boundary_conditions/ebcs/ebcs5.F
43!|| ebcs6 ../engine/source/boundary_conditions/ebcs/ebcs6.F
44!|| ebcs7 ../engine/source/boundary_conditions/ebcs/ebcs7.F
45!|| ebcs_main ../engine/source/boundary_conditions/ebcs/ebcs_main.F
46!|| ebcs_vol2seg ../engine/source/boundary_conditions/ebcs/ebcs_vol2seg.F
47!|| gradient_reconstruction ../engine/source/ale/alemuscl/gradient_reconstruction.F
48!|| gradient_reconstruction2 ../engine/source/ale/alemuscl/gradient_reconstruction2.F
49!|| i12m2s ../engine/source/interfaces/interf/i12m2s.F
50!|| i12nod3 ../engine/source/interfaces/interf/i12nod3.F
51!|| i12s2m ../engine/source/interfaces/interf/i12s2m.F
52!|| intti0 ../engine/source/interfaces/interf/intti0.F
53!|| intti12a ../engine/source/interfaces/interf/intti12.F
54!|| radioss2 ../engine/source/engine/radioss2.F
55!|| resol ../engine/source/engine/resol.F
56!|| resol_head ../engine/source/engine/resol_head.F
57!|| restalloc ../engine/source/output/restart/arralloc.F
58!|| seggetv ../engine/source/interfaces/interf/seggetv.F
59!|| spmd_segcom ../engine/source/mpi/fluid/spmd_cfd.F
60!||====================================================================
62C-----------------------------------------------
63C I m p l i c i t T y p e s
64C-----------------------------------------------
65#include "my_real.inc"
66C-----------------------------------------------
67C C o m m o n B l o c k s
68C-----------------------------------------------
70 INTEGER :: nseg
71 INTEGER :: NBMAT !NUMBER OF PHASES
72 LOGICAL :: has_rho = .false.
73 LOGICAL :: has_eint = .false.
74 LOGICAL :: has_rk = .false.
75 LOGICAL :: has_re = .false.
76 LOGICAL :: has_uvar = .false.
77 LOGICAL :: has_phase_alpha = .false.
78 LOGICAL :: has_phase_rho = .false.
79 LOGICAL :: has_phase_eint = .false.
80 my_real,ALLOCATABLE,DIMENSION(:) :: rho
81 my_real,ALLOCATABLE,DIMENSION(:) :: eint
82 my_real,ALLOCATABLE,DIMENSION(:) :: rk
83 my_real,ALLOCATABLE,DIMENSION(:) :: re
84 my_real,ALLOCATABLE,DIMENSION(:) :: uvar
85 my_real,ALLOCATABLE,DIMENSION(:,:) :: phase_alpha
86 my_real,ALLOCATABLE,DIMENSION(:,:) :: phase_rho
87 my_real,ALLOCATABLE,DIMENSION(:,:) :: phase_eint
88 CONTAINS
89 PROCEDURE, pass :: destroy => segvar_destroy
90 PROCEDURE, pass :: create => segvar_create
91 END TYPE t_segvar
92
93 CONTAINS
94
95!||====================================================================
96!|| segvar_destroy ../engine/share/modules/segvar_mod.F
97!||====================================================================
98 SUBROUTINE segvar_destroy(this)
99 IMPLICIT NONE
100 CLASS(t_segvar), INTENT(INOUT) :: this
101 IF(ALLOCATED(this%RHO)) DEALLOCATE(this%RHO)
102 IF(ALLOCATED(this%EINT)) DEALLOCATE(this%EINT)
103 IF(ALLOCATED(this%RK)) DEALLOCATE(this%RK)
104 IF(ALLOCATED(this%RE)) DEALLOCATE(this%RE)
105 IF(ALLOCATED(this%UVAR)) DEALLOCATE(this%UVAR)
106 IF(ALLOCATED(this%PHASE_ALPHA)) DEALLOCATE(this%PHASE_ALPHA)
107 IF(ALLOCATED(this%PHASE_ALPHA)) DEALLOCATE(this%PHASE_RHO)
108 IF(ALLOCATED(this%PHASE_ALPHA)) DEALLOCATE(this%PHASE_EINT)
109 END SUBROUTINE segvar_destroy
110
111!||====================================================================
112!|| segvar_create ../engine/share/modules/segvar_mod.F
113!||--- uses -----------------------------------------------------
114!|| ale_mod ../common_source/modules/ale/ale_mod.F
115!||====================================================================
116 SUBROUTINE segvar_create(this,NBMAT)
117 USE ale_mod
118 IMPLICIT NONE
119#include "constant.inc"
120#include "../includes/com04_c.inc"
121 CLASS(t_segvar), INTENT(INOUT) :: this
122 INTEGER,INTENT(IN) :: NBMAT
123 this%NSEG=nsegflu
124 this%NBMAT=nbmat
125 IF(this%NSEG > 0)THEN
126 IF(ale%GLOBAL%NVCONV >= 1)this%HAS_RHO=.true.
127 IF(ale%GLOBAL%NVCONV >= 2)this%HAS_EINT=.true.
128 IF(ale%GLOBAL%NVCONV >= 3)this%HAS_RK=.true.
129 IF(ale%GLOBAL%NVCONV >= 4)this%HAS_RE=.true.
130 IF(ale%GLOBAL%NVCONV >= 5)this%HAS_UVAR=.true.
131 IF(this%HAS_RHO)THEN
132 ALLOCATE(this%RHO(this%NSEG))
133 this%RHO(1:this%NSEG)=zero
134 ENDIF
135 IF(this%HAS_EINT)THEN
136 ALLOCATE(this%EINT(this%NSEG))
137 this%EINT(1:this%NSEG)=zero
138 ENDIF
139 IF(this%HAS_RK)THEN
140 ALLOCATE(this%RK(this%NSEG))
141 this%RK(1:this%NSEG)=zero
142 ENDIF
143 IF(this%HAS_RE)THEN
144 ALLOCATE(this%RE(this%NSEG))
145 this%RE(1:this%NSEG)=zero
146 ENDIF
147 IF(this%HAS_UVAR)THEN
148 ALLOCATE(this%UVAR(this%NSEG))
149 this%UVAR(1:this%NSEG)=zero
150 ENDIF
151 IF(nbmat > 0)THEN
152 this%HAS_PHASE_ALPHA = .true.
153 ALLOCATE(this%PHASE_ALPHA(this%NBMAT,this%NSEG))
154 this%PHASE_ALPHA(1:this%NBMAT,1:this%NSEG) = zero
155 this%HAS_PHASE_RHO = .true.
156 ALLOCATE(this%PHASE_RHO(this%NBMAT,this%NSEG))
157 this%PHASE_RHO(1:this%NBMAT,1:this%NSEG) = zero
158 this%HAS_PHASE_EINT = .true.
159 ALLOCATE(this%PHASE_EINT(this%NBMAT,this%NSEG))
160 this%PHASE_EINT(1:this%NBMAT,1:this%NSEG) = zero
161 ENDIF
162 ENDIF
163 END SUBROUTINE segvar_create
164
165 END MODULE segvar_mod
subroutine ale51_antidiff3(flux, ale_connect, alph, vol, ixs, flux_vois, n4_vois, itab, nv46, itrimat, segvar)
#define my_real
Definition cppsort.cpp:32
type(ale_) ale
Definition ale_mod.F:249
subroutine segvar_destroy(this)
Definition segvar_mod.F:99
subroutine segvar_create(this, nbmat)
Definition segvar_mod.F:117