![]()
|
VECFEM3 Reference Manual: userbType: FORTRAN routine NAMEuserb - subroutine frame for the definition of Dirichlet conditions SYNOPSIS
PURPOSEuserb 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
EXAMPLESSee also vemexamples. 1st ExampleIf 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 ExampleIf 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 ExapmleThe 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.'. SEEVECFEM, mesh, vemexamples, equation, veme00, veme02, vemp02. COPYRIGHTSCopyrights by Universitaet Karlsruhe 1989-1996. Copyrights by Lutz Grosz 1996. All rights reserved. More details see VECFEM. |