
|
VECFEM3 Reference Manual: userb
Type: FORTRAN routine
NAME
userb - subroutine frame for the definition of Dirichlet conditions
SYNOPSIS
- SUBROUTINE USERB (
- T, COMPU, RHS, NRSDP, RSDPRM, NRVDP, RVDP1, RVDPRM, NISDP, ISDPRM, NIVDP, IVDP1, IVDPRM, NDC, DIM, X, NOP, NOPARM, B)
- INTEGER
- COMPU, RHS, NRSDP, NRVDP, RVDP1, NISDP, NIVDP, IVDP1, NDC, DIM, NOP
- INTEGER
- ISDPRM(NISDP), IVDPRM(IVDP1,NIVDP)
- DOUBLE PRECISION
- T, RSDPRM(NRSDP), RVDPRM(RVDP1,NRVDP), X(NDC,DIM), NOPARM(NDC,NOP), B(NDC)
PURPOSE
userb is the subroutine, which has to be written by the user to define the values at the Dirichlet condition
for all COMPU=1,...,NK :
U(COMPU)|D(COMPU)=B(T,COMPU).
You have to enter the statements, which define the function B into a subroutine with the argument list of userb. The name of the routine may be changed. The name has to be declared by the EXTERNAL statement and has to be entered instead of USERB into the argument lists of veme00, veme02 and vemp02.
By one call the values of the function B have to be set to the array B for one solution component COMPU and right hand side RHS. The values of COMPU and RHS are prescribed by VECFEM. The values of B may depend on all input values in an arbitrary way.
ARGUMENTS
- T double precision, scalar, input
- Current time, only used by vemp02.
- RHS integer, scalar, input
- Current right hand side, only used by veme00.
- COMPU integer, scalar, input
- Current component.
- NRSDP integer, scalar, input
- Number of real scalar parameters of the current component.
- RSDPRM double precision, array: RSDPRM(NRSDP), input
- Set of the real scalar parameters of the current component.
- NRVDP integer, scalar, input
- Number of real vector parameters of the current component.
- RVDP1 integer, scalar, input
- Leading dimension of the real vector parameters of the current component.
- RVDPRM double precision, array: RVDPRM(RVDP1,NRVDP), input
- Set of the real vector parameters of the current component. RVDPRM(z,*) is the parameter set of the z-th condition.
- NISDP integer, scalar, input
- Number of integer scalar parameters of the current component.
- ISDPRM integer, array: ISDPRM(NISDP), input
- Set of the real scalar parameters of the current component.
- NIVDP integer, scalar, input
- Number of integer vector parameters of the current component.
- IVDP1 integer, scalar, input
- Leading dimension of the integer vector parameters of the current component.
- IVDPRM integer, array: IVDPRM(IVDP1,NIVDP), input
- Set of the integer vector parameters of the current component. IVDPRM(z,*) is the parameter set of the z-th condition.
- NDC integer, scalar, input
- Number of Dirichlet conditions for the current component.
- DIM integer, scalar, input
- Space dimension.
- X double precision, array: X(NDC,DIM), input
- Coordinates of the nodes with Dirichlet conditions. X(z,.) are the coordinates of the geometrical nodes for the z-th condition.
- NOP integer, scalar, input
- Number of node parameters.
- NOPARM double precision, array: NOPARM(NDC,NOP), input
- Node parameters at the nodes with Dirichlet conditions. NOPARM(z,i) is the i-th node parameter at point X(z,.).
- B double precision, array: B(NDC), output
- The values of the solution at the Dirichlet nodes for component COMPU. B(z) is the value of z-th condition. Only non-zero entries of B have to be defined.
EXAMPLES
See also vemexamples.
1st Example
If the function 'x1*x1-1.' has to be prescribed for the Dirichlet conditions of component COMPU=1, the following statements have to be entered into userb:
IF (COMPU.EQ.1) THEN
DO 10 Z=1,NDC
B(Z)=X(Z,1)**2-1.
10 CONTINUE
ENDIF
2nd Example
If the first real vector parameter prescribes the values for the Dirichlet conditions of component COMPU=2 (e.g. it is set in the main program or by a preprocessor interface (see idevem, patvem)), the following statements have to be entered into userb:
IF (COMPU.EQ.2) THEN
DO 20 Z=1,NDC
B(Z)=RVDPRM(Z,1)
20 CONTINUE
ENDIF
3rd Exapmle
The integer vector parameters can be used to distinguish different parts of the boundary, where different formulas are used for the settings of the Dirichlet conditions. It can be set in the main program or by a preprocessor interface (see idevem, patvem). If the first integer vector parameter marks the boundary part, the statements
IF (COMPU.EQ.3) THEN
DO 30 Z=1,NDC
IF (IVDPRM(Z,1).EQ.1) B(Z)=1.-EXP(-T)
30 CONTINUE
ENDIF
will assign the time depending value '1.-EXP(-T)' to all Dirichlet conditions on boundary portion 1. The other conditions will get the value '0.'.
SEE
VECFEM, mesh, vemexamples, equation, veme00, veme02, vemp02.
COPYRIGHTS
Copyrights by Universitaet Karlsruhe 1989-1996. Copyrights by Lutz Grosz 1996. All rights reserved. More details see VECFEM.
|