alberta-2.0.1/0000777000042300001440000000000011067147344010130 500000000000000alberta-2.0.1/demo/0000777000042300001440000000000011067147346011056 500000000000000alberta-2.0.1/demo/src/0000777000042300001440000000000011067147346011645 500000000000000alberta-2.0.1/demo/src/1d/0000777000042300001440000000000011067147346012151 500000000000000alberta-2.0.1/demo/src/1d/Makefile.in0000644000042300001440000000421210676724256014137 00000000000000######################################################################## # Sample ALBERTA Makefile for 1d # ######################################################################## .PHONY: all all: ellipt nonlin heat DEFAULT = ellipt prefix = @prefix@ # delete line, if the paths are environment variables ALBERTA_INCLUDE_PATH = @includedir@/@PACKAGE_NAME@ ALBERTA_LIB_PATH = @libdir@ ALBERTA_DATA_PATH = @datarootdir@/@PACKAGE_NAME@ # compile flags # # run make with "make DEBUG=1" to get debuggable code # ifeq ($(DEBUG),1) CFLAGS = @ALBERTA_DEBUG_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 1 else CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 0 endif FFLAGS = @FFLAGS@ # link flags (use "-shared" or "-static" to specify ALBERTA library type) # Default is "-shared" if configuration permits it. # Use "-all-static" to create a standalone, truly static binary. LDFLAGS = @LDFLAGS@ # uncomment line for using the debug library #DEBUG = 1 include $(ALBERTA_DATA_PATH)/Makefile.alberta ######################################################################## # DFLAGS: DIM_OF_WORLD # ######################################################################## DIM_OF_WORLD = 1 ######################################################################## # set virtual path # ######################################################################## VPATH = ./:../Common ######################################################################## # and now the user's files # ######################################################################## ELLIPT_OFILES = ellipt.o graphics.o ellipt: $(ELLIPT_OFILES) $(LINK) $(ELLIPT_OFILES) $(LIBS) NONLIN_OFILES = nonlin.o nlprob.o nlsolve.o graphics.o $(NONLIN_OFILES): nonlin.h nonlin: $(NONLIN_OFILES) $(LINK) $(NONLIN_OFILES) $(LIBS) HEAT_OFILES = heat.o graphics.o heat: $(HEAT_OFILES) $(LINK) $(HEAT_OFILES) $(LIBS) .PHONY: clean realclean new clean: albertaclean -rm -f ellipt nonlin heat realclean: albertarealclean new: albertanew alberta-2.0.1/demo/src/1d/INIT/0000777000042300001440000000000011067147346012714 500000000000000alberta-2.0.1/demo/src/1d/INIT/ellipt.dat0000644000042300001440000000217110676724256014622 00000000000000mesh dimension: 1 macro file name: Macro/macro-big.amc global refinements: 1 polynomial degree: 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 400 400 400 0 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: 0.0 -1.0 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-12 solver info: 2 solver precon: 2 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 1.e-6 adapt->MS_gamma: 0.5 adapt->max_iteration: 20 adapt->info: 4 WAIT: 0 alberta-2.0.1/demo/src/1d/INIT/heat.dat0000644000042300001440000000365310676724256014260 00000000000000mesh dimension: 1 macro file name: Macro/macro.amc global refinements: 0 polynomial degree: 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 400 400 400 400 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: -1.0 1.0 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-8 solver info: 2 solver precon: 1 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon parameter theta: 1.0 adapt->start_time: 0.0 adapt->end_time: 5.0 adapt->tolerance: 1.0e-3 adapt->timestep: 1.0e-2 adapt->rel_initial_error: 0.5 adapt->rel_space_error: 0.5 adapt->rel_time_error: 0.5 adapt->strategy: 1 % 0=explicit, 1=implicit adapt->max_iteration: 10 adapt->info: 2 adapt->initial->strategy: 2 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS adapt->initial->MS_gamma: 0.5 adapt->initial->max_iteration: 10 adapt->initial->info: 2 adapt->space->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS adapt->space->ES_theta: 0.9 adapt->space->ES_theta_c: 0.05 adapt->space->max_iteration: 10 adapt->space->coarsen_allowed: 1 % 0|1 adapt->space->info: 2 estimator C0: 0.1 estimator C1: 0.1 estimator C2: 0.1 estimator C3: 0.1 write finite element data: 0 % write data for post-processing or not write statistical data: 0 % write statistical data or not data path: ./data % path for data to be written WAIT: 0 alberta-2.0.1/demo/src/1d/INIT/nonlin.dat0000644000042300001440000000261210701404613014603 00000000000000mesh dimension: 1 problem number: 0 global refinements: 3 polynomial degree: 1 U0: -5.0 % height of initial guess for Problem 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 400 400 400 400 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: 1.0 0.0 newton tolerance: 1.e-6 % tolerance for Newton newton max. iter: 50 % maximal number of iterations of Newton newton info: 6 % information level of Newton newton restart: 10 % number of iterations for step size control linear solver max iteration: 1000 linear solver restart: 100 % only used for GMRES linear solver tolerance: 1.e-8 linear solver info: 0 linear solver precon: 2 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 1.e-4 adapt->MS_gamma: 0.5 adapt->max_iteration: 50 adapt->info: 4 WAIT: 1 alberta-2.0.1/demo/src/1d/Macro/0000777000042300001440000000000011067147346013212 500000000000000alberta-2.0.1/demo/src/1d/Macro/macro-big.amc0000644000042300001440000000022510676723603015450 00000000000000DIM: 1 DIM_OF_WORLD: 1 number of vertices: 2 number of elements: 1 vertex coordinates: -1.0 1.0 element vertices: 0 1 element boundaries: 1 1 alberta-2.0.1/demo/src/1d/Macro/macro-big_2d.amc0000644000042300001440000000023710676723603016040 00000000000000DIM: 1 DIM_OF_WORLD: 2 number of vertices: 2 number of elements: 1 vertex coordinates: -1.0 -1.0 1.0 1.0 element vertices: 0 1 element boundaries: 1 1 alberta-2.0.1/demo/src/1d/Macro/macro.amc0000644000042300001440000000023310676723603014710 00000000000000DIM: 1 DIM_OF_WORLD: 1 number of elements: 1 number of vertices: 2 element vertices: 0 1 element boundaries: 1 1 vertex coordinates: 0.0 1.0 alberta-2.0.1/demo/src/2d/0000777000042300001440000000000011067147346012152 500000000000000alberta-2.0.1/demo/src/2d/Makefile.in0000644000042300001440000000423410676724256014144 00000000000000#!gmake ######################################################################## # Sample ALBERTA Makefile for 2d # ######################################################################## .PHONY: all all: ellipt nonlin heat DEFAULT = ellipt prefix = @prefix@ # delete line, if the paths are environment variables ALBERTA_INCLUDE_PATH = @includedir@/@PACKAGE_NAME@ ALBERTA_LIB_PATH = @libdir@ ALBERTA_DATA_PATH = @datarootdir@/@PACKAGE_NAME@ # compile flags # # run make with "make DEBUG=1" to get debuggable code # ifeq ($(DEBUG),1) CFLAGS = @ALBERTA_DEBUG_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 1 else CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 0 endif FFLAGS = @FFLAGS@ # default link flags (use "-shared" or "-static" to specify ALBERTA library type) # Default is "-shared", if configuration permits it. # Use "-all-static" to create a standalone, truly static binary. LDFLAGS = @LDFLAGS@ # uncomment line for using the debug library #DEBUG = 1 include $(ALBERTA_DATA_PATH)/Makefile.alberta ######################################################################## # DFLAGS: DIM_OF_WORLD # ######################################################################## DIM_OF_WORLD = 2 ######################################################################## # set virtual path # ######################################################################## VPATH = ./:../Common ######################################################################## # and now the user's files # ######################################################################## ELLIPT_OFILES = ellipt.o graphics.o ellipt: $(ELLIPT_OFILES) $(LINK) $(ELLIPT_OFILES) $(LIBS) NONLIN_OFILES = nonlin.o nlprob.o nlsolve.o graphics.o $(NONLIN_OFILES): nonlin.h nonlin: $(NONLIN_OFILES) $(LINK) $(NONLIN_OFILES) $(LIBS) HEAT_OFILES = heat.o graphics.o heat: $(HEAT_OFILES) $(LINK) $(HEAT_OFILES) $(LIBS) .PHONY: clean realclean new clean: albertaclean -rm -f ellipt nonlin heat realclean: albertarealclean new: albertanew alberta-2.0.1/demo/src/2d/INIT/0000777000042300001440000000000011067147346012715 500000000000000alberta-2.0.1/demo/src/2d/INIT/ellipt.dat0000644000042300001440000000221110676724256014616 00000000000000mesh dimension: 2 macro file name: Macro/macro.amc global refinements: 1 polynomial degree: 3 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 400 400 400 400 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: 0.0 -1.0 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-8 solver info: 2 solver precon: 2 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 1.e-4 adapt->MS_gamma: 0.5 adapt->max_iteration: 20 adapt->info: 8 WAIT: 1 alberta-2.0.1/demo/src/2d/INIT/heat.dat0000644000042300001440000000365310676724256014261 00000000000000mesh dimension: 2 macro file name: Macro/macro.amc global refinements: 4 polynomial degree: 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 400 400 400 400 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: -1.0 1.0 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-12 solver info: 2 solver precon: 1 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon parameter theta: 1.0 adapt->start_time: 0.0 adapt->end_time: 2.0 adapt->tolerance: 1.0e-3 adapt->timestep: 1.0e-1 adapt->rel_initial_error: 0.5 adapt->rel_space_error: 0.5 adapt->rel_time_error: 0.5 adapt->strategy: 0 % 0=explicit, 1=implicit adapt->max_iteration: 10 adapt->info: 2 adapt->initial->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS adapt->initial->MS_gamma: 0.5 adapt->initial->max_iteration: 10 adapt->initial->info: 2 adapt->space->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS adapt->space->ES_theta: 0.9 adapt->space->ES_theta_c: 0.2 adapt->space->max_iteration: 10 adapt->space->coarsen_allowed: 1 % 0|1 adapt->space->info: 2 estimator C0: 0.1 estimator C1: 0.1 estimator C2: 0.1 estimator C3: 0.1 write finite element data: 0 % write data for post-processing or not write statistical data: 0 % write statistical data or not data path: ./data % path for data to be written WAIT: 0 alberta-2.0.1/demo/src/2d/INIT/nonlin.dat0000644000042300001440000000260510676723603014624 00000000000000mesh dimension: 2 problem number: 2 global refinements: 1 polynomial degree: 2 U0: -5.0 % height of initial guess for Problem 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 500 500 0 0 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: 1.0 0.0 newton tolerance: 1.e-6 % tolerance for Newton newton max. iter: 50 % maximal number of iterations of Newton newton info: 6 % information level of Newton newton restart: 10 % number of iterations for step size control linear solver max iteration: 1000 linear solver restart: 10 % only used for GMRES linear solver tolerance: 1.e-8 linear solver info: 0 linear solver precon: 2 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 1.e-2 adapt->MS_gamma: 0.5 adapt->max_iteration: 15 adapt->info: 4 WAIT: 1 alberta-2.0.1/demo/src/2d/Macro/0000777000042300001440000000000011067147346013213 500000000000000alberta-2.0.1/demo/src/2d/Macro/macro-1.amc0000644000042300001440000000031410676723603015047 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of elements: 1 number of vertices: 3 element vertices: 0 1 3 element boundaries: 1 1 1 vertex coordinates: 0.0 0.0 1.0 0.0 1.0 1.0 element neighbours: -1 -1 -1 alberta-2.0.1/demo/src/2d/Macro/macro-2.amc0000644000042300001440000000030210676723603015045 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of elements: 2 number of vertices: 4 element vertices: 1 3 0 3 1 2 element boundaries: 1 1 0 1 1 0 vertex coordinates: 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 alberta-2.0.1/demo/src/2d/Macro/macro-34circ.amc0000644000042300001440000000034110676723603015776 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of vertices: 5 number of elements: 3 vertex coordinates: 0.0 0.0 1.0 0.0 0.0 1.0 -1.0 0.0 0.0 -1.0 element vertices: 1 2 0 2 3 0 3 4 0 element boundaries: 0 1 2 0 0 2 1 0 2 alberta-2.0.1/demo/src/2d/Macro/macro-44circ.amc0000644000042300001440000000036510676723603016005 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of vertices: 6 number of elements: 4 vertex coordinates: 0.0 0.0 1.0 0.0 0.0 1.0 -1.0 0.0 0.0 -1.0 1.0 0.0 element vertices: 1 2 0 2 3 0 3 4 0 4 5 0 element boundaries: 0 1 2 0 0 2 0 0 2 1 0 2 alberta-2.0.1/demo/src/2d/Macro/macro-big.amc0000644000042300001440000000034610676723603015455 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of vertices: 5 number of elements: 4 vertex coordinates: -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 0.0 0.0 element vertices: 0 1 4 1 2 4 2 3 4 3 0 4 element boundaries: 0 0 1 0 0 1 0 0 1 0 0 1 alberta-2.0.1/demo/src/2d/Macro/macro-circ.amc0000644000042300001440000000035610676723603015635 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of vertices: 5 number of elements: 4 vertex coordinates: 0.0 0.0 1.0 0.0 0.0 1.0 -1.0 0.0 0.0 -1.0 element vertices: 1 2 0 2 3 0 3 4 0 4 1 0 element boundaries: 0 0 2 0 0 2 0 0 2 0 0 2 alberta-2.0.1/demo/src/2d/Macro/macro-neum.amc0000644000042300001440000000036210676723603015656 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of vertices: 5 number of elements: 4 vertex coordinates: 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 0.5 0.5 element vertices: 0 1 4 1 2 4 2 3 4 3 0 4 element boundaries: 0 0 -1 0 0 -1 0 0 -1 0 0 -1 alberta-2.0.1/demo/src/2d/Macro/macro.amc0000644000042300001440000000044410676723603014715 00000000000000DIM: 2 DIM_OF_WORLD: 2 number of elements: 4 number of vertices: 5 element vertices: 0 1 4 1 2 4 2 3 4 3 0 4 element boundaries: 0 0 1 0 0 1 0 0 1 0 0 1 vertex coordinates: 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 0.5 0.5 element neighbours: 1 3 -1 2 0 -1 3 1 -1 0 2 -1 alberta-2.0.1/demo/src/2d/Macro/macro_3d.amc0000644000042300001440000000046610676723603015307 00000000000000DIM: 2 DIM_OF_WORLD: 3 number of elements: 4 number of vertices: 5 element vertices: 0 1 4 1 2 4 2 3 4 3 0 4 element boundaries: 0 0 1 0 0 1 0 0 1 0 0 1 vertex coordinates: 0.0 0.0 0.0 1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.5 0.5 0.5 element neighbours: 1 3 -1 2 0 -1 3 1 -1 0 2 -1 alberta-2.0.1/demo/src/3d/0000777000042300001440000000000011067147346012153 500000000000000alberta-2.0.1/demo/src/3d/Makefile.in0000644000042300001440000000434110676724257014145 00000000000000#!gmake ######################################################################## # Sample ALBERTA Makefile for 3d # ######################################################################## .PHONY: all all: ellipt nonlin heat ellipt2 DEFAULT = ellipt prefix = @prefix@ # delete line, if the paths are environment variables ALBERTA_INCLUDE_PATH = @includedir@/@PACKAGE_NAME@ ALBERTA_LIB_PATH = @libdir@ ALBERTA_DATA_PATH = @datarootdir@/@PACKAGE_NAME@ # compile flags # # run make with "make DEBUG=1" to get debuggable code # ifeq ($(DEBUG),1) CFLAGS = @ALBERTA_DEBUG_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 1 else CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ @CFLAGS@ ALBERTA_DEBUG = 0 endif FFLAGS = @FFLAGS@ # link flags (use "-shared" or "-static" to specify ALBERTA library type) # Default type is "-shared", if the configuration permits it. # Use "-all-static" to create a standalone, truly static binary. LDFLAGS = @LDFLAGS@ # uncomment line for using the debug library #DEBUG = 1 include $(ALBERTA_DATA_PATH)/Makefile.alberta ######################################################################## # DFLAGS: DIM_OF_WORLD # ######################################################################## DIM_OF_WORLD = 3 ######################################################################## # set virtual path # ######################################################################## VPATH = ./:../Common ######################################################################## # and now the user's files # ######################################################################## ELLIPT_OFILES = ellipt.o graphics.o ellipt: $(ELLIPT_OFILES) $(LINK) $(ELLIPT_OFILES) $(LIBS) ellipt2: ellipt2.o $(LINK) ellipt2.o $(LIBS) NONLIN_OFILES = nonlin.o nlprob.o nlsolve.o graphics.o $(NONLIN_OFILES): nonlin.h nonlin: $(NONLIN_OFILES) $(LINK) $(NONLIN_OFILES) $(LIBS) HEAT_OFILES = heat.o graphics.o heat: $(HEAT_OFILES) $(LINK) $(HEAT_OFILES) $(LIBS) .PHONY: clean realclean new clean: albertaclean -rm -f ellipt ellipt2 nonlin heat *.gmv realclean: albertarealclean new: albertanew alberta-2.0.1/demo/src/3d/INIT/0000777000042300001440000000000011067147346012716 500000000000000alberta-2.0.1/demo/src/3d/INIT/ellipt.dat0000644000042300001440000000221110676724257014620 00000000000000mesh dimension: 3 macro file name: Macro/macro-big.amc global refinements: 1 polynomial degree: 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 500 500 0 0 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: 0.0 -1.0 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-8 solver info: 2 solver precon: 2 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 1.e-1 adapt->MS_gamma: 0.5 adapt->max_iteration: 15 adapt->info: 8 WAIT: 1 alberta-2.0.1/demo/src/3d/INIT/ellipt2.dat0000644000042300001440000000151410676724257014707 00000000000000macro file name: Macro/halfsphere.amc global refinements: 0 polynomial degree: 4 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-8 solver info: 2 solver precon: 2 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 1 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 1.e-4 adapt->MS_gamma: 0.5 adapt->max_iteration: 20 adapt->info: 8 WAIT: 1 alberta-2.0.1/demo/src/3d/INIT/heat.dat0000644000042300001440000000365610676724257014266 00000000000000mesh dimension: 3 macro file name: Macro/macro.amc global refinements: 0 polynomial degree: 1 % graphic windows: solution, estimate, mesh, and error if size > 0 graphic windows: 300 300 300 300 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: -1.0 1.0 solver: 2 % 1: BICGSTAB 2: CG 3: TFQMR 4: GMRES 5: ODIR 6: ORES solver max iteration: 1000 solver restart: 10 % only used for GMRES solver tolerance: 1.e-8 solver info: 2 solver precon: 1 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon parameter theta: 1.0 adapt->start_time: 0.0 adapt->end_time: 2.0 adapt->tolerance: 1.0e-3 adapt->timestep: 1.0e-2 adapt->rel_initial_error: 0.5 adapt->rel_space_error: 0.5 adapt->rel_time_error: 0.05 adapt->strategy: 1 % 0=explicit, 1=implicit adapt->max_iteration: 10 adapt->info: 2 adapt->initial->strategy: 2 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS adapt->initial->MS_gamma: 0.5 adapt->initial->max_iteration: 10 adapt->initial->info: 2 adapt->space->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS adapt->space->ES_theta: 0.9 adapt->space->ES_theta_c: 0.05 adapt->space->max_iteration: 10 adapt->space->coarsen_allowed: 1 % 0|1 adapt->space->info: 2 estimator C0: 0.0 estimator C1: 0.1 estimator C2: 0.1 estimator C3: 0.1 write finite element data: 0 % write data for post-processing or not write statistical data: 1 % write statistical data or not data path: ./data % path for data to be written WAIT: 0 alberta-2.0.1/demo/src/3d/INIT/nonlin.dat0000644000042300001440000000260410676723604014625 00000000000000mesh dimension: 3 problem number: 2 global refinements: 0 polynomial degree: 3 U0: -5.0 % height of initial guess for Problem 1 % graphic windows: solution, estimate, mesh, and errorif size > 0 graphic windows: 500 500 0 0 % for gltools graphics you can specify the range for the values of % discrete solution for displaying: min max % automatical scaling by display routine if min >= max gltools range: 1.0 0.0 newton tolerance: 1.e-6 % tolerance for Newton newton max. iter: 50 % maximal number of iterations of Newton newton info: 6 % information level of Newton newton restart: 10 % number of iterations for step size control linear solver max iteration: 1000 linear solver restart: 10 % only used for GMRES linear solver tolerance: 1.e-8 linear solver info: 0 linear solver precon: 1 % 0: no precon 1: diag precon % 2: HB precon 3: BPX precon error norm: 1 % 1: H1_NORM, 2: L2_NORM estimator C0: 0.1 % constant of element residual estimator C1: 0.1 % constant of jump residual estimator C2: 0.0 % constant of coarsening estimate adapt->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS adapt->tolerance: 5.e-1 adapt->MS_gamma: 0.5 adapt->max_iteration: 10 adapt->info: 4 WAIT: 1 alberta-2.0.1/demo/src/3d/Macro/0000777000042300001440000000000011067147346013214 500000000000000alberta-2.0.1/demo/src/3d/Macro/halfsphere.amc0000644000042300001440000000044710676723604015742 00000000000000DIM: 3 DIM_OF_WORLD: 3 number of vertices: 5 number of elements: 2 vertex coordinates: 0.0 -1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 0.0 0.0 1.0 element vertices: 2 0 1 4 0 2 3 4 element boundaries: 2 2 0 1 2 2 0 1 alberta-2.0.1/demo/src/3d/Macro/macro-big.amc0000644000042300001440000000117010676723604015453 00000000000000DIM: 3 DIM_OF_WORLD: 3 number of vertices: 8 number of elements: 6 vertex coordinates: -1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 -1.0 1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 element vertices: 0 5 4 1 0 5 3 1 0 5 3 2 0 5 4 6 0 5 7 6 0 5 7 2 element boundaries: 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 element neighbours: -1 -1 1 3 -1 -1 0 2 -1 -1 5 1 -1 -1 4 0 -1 -1 3 5 -1 -1 2 4 alberta-2.0.1/demo/src/3d/Macro/macro.amc0000644000042300001440000000116710676723604014722 00000000000000DIM: 3 DIM_OF_WORLD: 3 number of vertices: 8 number of elements: 6 vertex coordinates: 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 1.0 1.0 element vertices: 0 5 4 1 0 5 3 1 0 5 3 2 0 5 4 6 0 5 7 6 0 5 7 2 element boundaries: 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 element neighbours: -1 -1 1 3 -1 -1 0 2 -1 -1 5 1 -1 -1 4 0 -1 -1 3 5 -1 -1 2 4 alberta-2.0.1/demo/src/3d/ellipt2.c0000644000042300001440000004135010676724257013620 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: ellipt2.c */ /* */ /* description: solver for an elliptic model problem */ /* */ /* -\Delta u = f in \Omega */ /* u = g on \partial \Omega */ /* */ /* This program is meant to show off some of the new features of */ /* ALBERTA 2.0, including submeshes, parametric meshes and the GMV */ /* visualization interface. */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* author: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2002-2005) */ /*--------------------------------------------------------------------------*/ #include /*--------------------------------------------------------------------------*/ /* global variables: finite element space, discrete solution */ /* load vector and system matrix */ /*--------------------------------------------------------------------------*/ static const FE_SPACE *fe_space; /* initialized by main() */ static DOF_REAL_VEC *u_h = nil; /* initialized by build() */ static DOF_REAL_VEC *error_h = nil; /* initialized by estimate() */ static DOF_REAL_VEC *f_h = nil; /* initialized by build() */ static DOF_MATRIX *matrix = nil; /* initialized by build() */ /*--------------------------------------------------------------------------*/ /* struct ellipt_leaf_data: structure for storing one REAL value on each */ /* leaf element as LEAF_DATA */ /* rw_el_est(): return a pointer to the memory for storing the element */ /* estimate (stored as LEAF_DATA), called by ellipt_est() */ /* get_el_est(): return the value of the element estimates (from LEAF_DATA),*/ /* called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ struct ellipt_leaf_data { REAL estimate; /* one real for the estimate */ }; static REAL *rw_el_est(EL *el) { if (IS_LEAF_EL(el)) return(&((struct ellipt_leaf_data *)LEAF_DATA(el))->estimate); else return(nil); } static REAL get_el_est(EL *el) { if (IS_LEAF_EL(el)) return(((struct ellipt_leaf_data *)LEAF_DATA(el))->estimate); else return(0.0); } /*--------------------------------------------------------------------------*/ /* For test purposes: exact solution and its gradient (optional) */ /*--------------------------------------------------------------------------*/ static void phi_theta(const REAL_D old_x, REAL *phi, REAL *theta) { FUNCNAME("phi_theta"); REAL_D x; REAL r; COPY_DOW(old_x, x); r= NORM_DOW(x); if(r < 1.0E-15) ERROR_EXIT("Radius is too small!\n"); else AXEY_DOW(1.0/r, old_x, x); if(ABS(x[0]) < 1.0E-15) { if(x[1] > 0.0) *phi = M_PI / 2.0; else *phi = -M_PI / 2.0; } else { if(x[0] > 0.0) *phi = atan(x[1]/x[0]); else *phi = atan(x[1]/x[0]) + M_PI; } *theta = acos(x[2]); return; } static REAL u(const REAL_D x) { REAL phi, theta, result; phi_theta(x, &phi, &theta); result = sin(2.0 * theta); result *= result * result * cos(3.0 * phi); return result; } static const REAL *grd_u(const REAL_D x, REAL_D input) { static REAL_D buffer = {}; REAL *grd = input ? input : buffer; REAL ph, th; phi_theta(x, &ph, &th); if(th < 1.0E-15) SET_DOW(0.0, grd); else { REAL s1p = sin(ph), s3p = sin(3.0*ph), c1p = cos(ph), c3p = cos(3.0*ph), s1t = sin(th), s2t = sin(2.0*th), c1t = cos(th), c2t = cos(2.0*th); grd[0] = 3.0*s1p*s3p*s2t*s2t*s2t/s1t + 6.0*c1p*c3p*c1t*s2t*s2t*c2t; grd[1] = -3.0*c1p*s3p*s2t*s2t*s2t/s1t + 6.0*s1p*c3p*c1t*s2t*s2t*c2t; grd[2] = -6.0*c3p*s1t*s2t*s2t*c2t; } return(grd); } /*--------------------------------------------------------------------------*/ /* problem data: right hand side, boundary values */ /*--------------------------------------------------------------------------*/ static REAL g(const REAL_D x) /* boundary values, not optional */ { return u(x); } static REAL f(const REAL_D x) /* -Delta u, not optional */ { REAL result, ph, th; phi_theta(x, &ph, &th); if(th < 1.0E-15) result = 0.0; else { REAL c3p = cos(3.0*ph), s1t = sin(th), s2t = sin(2.0*th), c1t = cos(th), c2t = cos(2.0*th); result = 9.0*c3p*s2t*s2t*s2t/(s1t*s1t) - 6.0*(c3p*s2t/s1t) * (c1t*s2t*c2t + 4.0*s1t*c2t*c2t - 2.0*s1t*s2t*s2t); } return result; } static void ball_proj_func(REAL_D vertex, const EL_INFO *eli, const REAL_B lambda) { REAL norm = NORM_DOW(vertex); norm = 1.0 / MAX(1.0E-15, norm); SCAL_DOW(norm, vertex); return; } static NODE_PROJECTION *init_node_proj(MESH *mesh, MACRO_EL *mel, int c) { static NODE_PROJECTION ball_proj = {ball_proj_func}; if(!mesh || ((c > 0) && mel->face_bound[c-1] == 2)) return &ball_proj; return nil; } static int binding_method(MESH *master, MACRO_EL *mel, int face, void *ud) { if(mel->face_bound[face] == 2) return true; return false; } /*--------------------------------------------------------------------------*/ /* build(): assemblage of the linear system: matrix, load vector, */ /* boundary values, called by adapt_method_stat() */ /* on the first call initialize u_h, f_h, matrix and information */ /* for assembling the system matrix */ /* */ /* struct op_info: structure for passing information from init_element() to */ /* LALt() */ /* init_element(): initialization on the element; calculates the */ /* coordinates and |det DF_S| used by LALt; passes these */ /* values to LALt via user_data, */ /* called on each element by update_matrix() */ /* LALt(): implementation of -Lambda id Lambda^t for -Delta u, */ /* called by update_matrix() after init_element() */ /*--------------------------------------------------------------------------*/ struct op_info { REAL_D Lambda[MAX_N_QUAD_POINTS][N_LAMBDA]; REAL det[MAX_N_QUAD_POINTS]; }; static int init_element(const EL_INFO *el_info, const QUAD *quad[3], void *ud) { struct op_info *info = (struct op_info *)ud; PARAMETRIC *parametric = el_info->mesh->parametric; int result = 0; if(parametric) { result = parametric->init_element(el_info, parametric); parametric->grd_lambda(el_info, quad[2], 0, nil, info->Lambda, info->det); } else info->det[0] = el_grd_lambda_2d(el_info, info->Lambda[0]); return result; } const REAL (*LALt(const EL_INFO *el_info, const QUAD *quad, int iq, void *ud))[N_LAMBDA] { struct op_info *info = (struct op_info *)ud; int i, j, k; static REAL LALt[N_LAMBDA][N_LAMBDA]; for (i = 0; i <= 2; i++) for (j = i; j <= 2; j++) { for (LALt[i][j] = k = 0; k < DIM_OF_WORLD; k++) LALt[i][j] += info->Lambda[iq][i][k]*info->Lambda[iq][j][k]; LALt[i][j] *= info->det[iq]; LALt[j][i] = LALt[i][j]; } return((const REAL (*)[N_LAMBDA]) LALt); } static void build(MESH *mesh, U_CHAR flag) { FUNCNAME("build"); static const EL_MATRIX_INFO *matrix_info = nil; static const QUAD *quad = nil; dof_compress(mesh); MSG("%d DOFs for %s\n", fe_space->admin->size_used, fe_space->name); if (!u_h) /* access matrix and vector for linear system */ { matrix = get_dof_matrix("A", fe_space, fe_space); f_h = get_dof_real_vec("f_h", fe_space); u_h = get_dof_real_vec("u_h", fe_space); u_h->refine_interpol = fe_space->bas_fcts->real_refine_inter; u_h->coarse_restrict = fe_space->bas_fcts->real_coarse_inter; dof_set(0.0, u_h); /* initialize u_h ! */ } if (!matrix_info) /* information for matrix assembling */ { OPERATOR_INFO o_info = {nil}; if(mesh->parametric) quad = get_quadrature(2, 2*fe_space->bas_fcts->degree + 2); else quad = get_quadrature(2, 2*fe_space->bas_fcts->degree-2); o_info.quad[2] = quad; o_info.row_fe_space = o_info.col_fe_space = fe_space; o_info.init_element = init_element; o_info.LALt = LALt; o_info.LALt_pw_const = true; /* pw const. assemblage is faster */ o_info.LALt_symmetric = true; /* symmetric assemblage is faster */ o_info.use_get_bound = true; /* Dirichlet boundary conditions! */ o_info.user_data = MEM_ALLOC(1, struct op_info); /* user data! */ o_info.fill_flag = CALL_LEAF_EL|FILL_COORDS; matrix_info = fill_matrix_info(&o_info, nil); } clear_dof_matrix(matrix); /* assembling of matrix */ update_matrix(matrix, matrix_info); dof_set(0.0, f_h); /* assembling of load vector */ L2scp_fct_bas(f, quad, f_h); dirichlet_bound(g, f_h, u_h, nil); /* boundary values */ return; } /*--------------------------------------------------------------------------*/ /* solve(): solve the linear system, called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static void solve(MESH *mesh) { FUNCNAME("solve"); static REAL tol = 1.e-8; static int miter = 1000, info = 2, icon = 1, restart = 0; static OEM_SOLVER solver = NoSolver; if (solver == NoSolver) { tol = 1.e-8; GET_PARAMETER(1, "solver", "%d", &solver); GET_PARAMETER(1, "solver tolerance", "%f", &tol); GET_PARAMETER(1, "solver precon", "%d", &icon); GET_PARAMETER(1, "solver max iteration", "%d", &miter); GET_PARAMETER(1, "solver info", "%d", &info); if (solver == GMRes) GET_PARAMETER(1, "solver restart", "%d", &restart); } oem_solve_s(matrix, f_h, u_h, solver, tol, icon, restart, miter, info); return; } /*--------------------------------------------------------------------------*/ /* Functions for error estimate: */ /* estimate(): calculates error estimate via ellipt_est() */ /* calculates exact error also (only for test purpose), */ /* called by adapt_method_stat() */ /* r(): calculates the lower order terms of the element residual */ /* on each element at the quadrature node iq of quad */ /* argument to ellipt_est() and called by ellipt_est() */ /*--------------------------------------------------------------------------*/ static REAL r(const EL_INFO *el_info, const QUAD *quad, int iq, REAL uh_iq, const REAL_D grd_uh_iq) { REAL_D x; coord_to_world(el_info, quad->lambda[iq], x); return(-f(x)); } #define EOC(e,eo) log(eo/MAX(e,1.0e-15))/M_LN2 static REAL estimate(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("estimate"); static int degree, norm = -1; static REAL C[3] = {1.0, 1.0, 0.0}; static REAL est, est_old = -1.0, err, err_old = -1.0; static FLAGS r_flag = 0; /* = (INIT_UH | INIT_GRD_UH), if needed by r() */ REAL_DD A = {{1.0, 0.0, 0.0},{0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}; const QUAD *quad; if (norm < 0) { norm = H1_NORM; GET_PARAMETER(1, "error norm", "%d", &norm); GET_PARAMETER(1, "estimator C0", "%f", &C[0]); GET_PARAMETER(1, "estimator C1", "%f", &C[1]); GET_PARAMETER(1, "estimator C2", "%f", &C[2]); error_h = get_dof_real_vec("u-u_h", u_h->fe_space); } degree = 2*u_h->fe_space->bas_fcts->degree; /* Error estimation is not yet implemented for parametric meshes. */ if(!mesh->parametric) { est = ellipt_est(u_h, adapt, rw_el_est, nil, degree, norm, C, (const REAL_D *) A, r, r_flag); MSG("estimate = %.8le", est); if (est_old >= 0) print_msg(", EOC: %.2lf\n", EOC(est,est_old)); else print_msg("\n"); est_old = est; } else adapt->err_sum = 1.0; /* To keep mesh refinement going. */ quad = get_quadrature(2, degree); if (norm == L2_NORM) err = L2_err(u, u_h, quad, 0, nil, nil); else err = H1_err(grd_u, u_h, quad, 0, nil, nil); interpol(u, error_h); dof_axpy(-1.0, u_h, error_h); MSG("||u-uh||%s = %.8le", norm == L2_NORM ? "L2" : "H1", err); if (err_old >= 0) print_msg(", EOC: %.2lf\n", EOC(err,err_old)); else print_msg("\n"); err_old = err; if(!mesh->parametric) MSG("||u-uh||%s/estimate = %.2lf\n", norm == L2_NORM ? "L2" : "H1", err/MAX(est,1.e-15)); { DOF_REAL_VEC *drv_list[2] = {u_h, error_h}; write_mesh_gmv(mesh, "ellipt2.gmv", true, true, 2, drv_list, 0, nil, nil, 0.0); } return(adapt->err_sum); } /*--------------------------------------------------------------------------*/ /* main program */ /*--------------------------------------------------------------------------*/ int main(int argc, char **argv) { FUNCNAME("main"); MACRO_DATA *data; MESH *volume_mesh, *surf_mesh; int n_refine = 0, degree = 1; const BAS_FCTS *lagrange; static ADAPT_STAT *adapt; char filename[100]; /*--------------------------------------------------------------------------*/ /* first of all, init parameters of the init file */ /*--------------------------------------------------------------------------*/ init_parameters(0, "INIT/ellipt2.dat"); GET_PARAMETER(1, "macro file name", "%s", filename); GET_PARAMETER(1, "polynomial degree", "%d", °ree); GET_PARAMETER(1, "global refinements", "%d", &n_refine); /*--------------------------------------------------------------------------*/ /* get a mesh, and read the macro triangulation from file */ /*--------------------------------------------------------------------------*/ data = read_macro(filename); volume_mesh = GET_MESH(3, "ALBERTA volume mesh", data, init_node_proj); free_macro_data(data); surf_mesh = get_submesh(volume_mesh, "ALBERTA surface mesh", binding_method, nil); use_lagrange_parametric(volume_mesh, 2, init_node_proj(nil, nil, 0), 2); free_mesh(volume_mesh); init_leaf_data(surf_mesh, sizeof(struct ellipt_leaf_data), nil, nil); lagrange = get_lagrange(2, degree); TEST_EXIT(lagrange, "no lagrange BAS_FCTS\n"); fe_space = get_fe_space(surf_mesh, lagrange->name, nil, lagrange, false); global_refine(surf_mesh, n_refine); /*--------------------------------------------------------------------------*/ /* init adapt structure and start adaptive method */ /*--------------------------------------------------------------------------*/ adapt = get_adapt_stat(2, "ellipt", "adapt", 2, nil); adapt->estimate = estimate; adapt->get_el_est = get_el_est; adapt->build_after_coarsen = build; adapt->solve = solve; adapt_method_stat(surf_mesh, adapt); return(0); } alberta-2.0.1/demo/src/Makefile.in0000644000042300001440000000134510676723605013634 00000000000000SHELL = /bin/sh .PHONY: clean tgz tar backup default: tgz DATA = */*.[ch] *d/Makefile *d/Macro/*.amc *d/INIT/*.dat Makefile ############################################################################# # target for removing object and ~ files # ############################################################################# clean: find . \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; find . \( -name ellipt -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; tgz: tar cvf - $(DATA) | gzip -9v > demo.tgz @ls -l demo.tgz tar: tar cvf demo.tar $(DATA) @ls -l demo.tar backup: tar cvf - $(DATA) | gzip -9v > demo-`date '+%y%m%d.tgz'` @ls -l demo-`date '+%y%m%d.tgz'` alberta-2.0.1/demo/src/Common/0000777000042300001440000000000011067147346013075 500000000000000alberta-2.0.1/demo/src/Common/ellipt.c0000644000042300001440000003625010676724257014463 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: ellipt.c */ /* */ /* description: solver for an elliptic model problem */ /* */ /* -\Delta u = f in \Omega */ /* u = g on \partial \Omega */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include /*--------------------------------------------------------------------------*/ /* function for displaying mesh, discrete solution, and/or estimate */ /* defined in graphics.c */ /*--------------------------------------------------------------------------*/ void graphics(MESH *mesh, DOF_REAL_VEC *u_h, REAL (*get_est)(EL *el), REAL (*u)(const REAL_D x)); /*--------------------------------------------------------------------------*/ /* global variables: finite element space, discrete solution */ /* load vector and system matrix */ /*--------------------------------------------------------------------------*/ static const FE_SPACE *fe_space; /* initialized by main() */ static DOF_REAL_VEC *u_h = nil; /* initialized by build() */ static DOF_REAL_VEC *f_h = nil; /* initialized by build() */ static DOF_MATRIX *matrix = nil; /* initialized by build() */ /*--------------------------------------------------------------------------*/ /* struct ellipt_leaf_data: structure for storing one REAL value on each */ /* leaf element as LEAF_DATA */ /* rw_el_est(): return a pointer to the memory for storing the element */ /* estimate (stored as LEAF_DATA), called by ellipt_est() */ /* get_el_est(): return the value of the element estimates (from LEAF_DATA),*/ /* called by adapt_method_stat() and graphics() */ /*--------------------------------------------------------------------------*/ struct ellipt_leaf_data { REAL estimate; /* one real for the estimate */ }; static REAL *rw_el_est(EL *el) { if (IS_LEAF_EL(el)) return(&((struct ellipt_leaf_data *)LEAF_DATA(el))->estimate); else return(nil); } static REAL get_el_est(EL *el) { if (IS_LEAF_EL(el)) return(((struct ellipt_leaf_data *)LEAF_DATA(el))->estimate); else return(0.0); } /*--------------------------------------------------------------------------*/ /* For test purposes: exact solution and its gradient (optional) */ /*--------------------------------------------------------------------------*/ static REAL u(const REAL_D x) { return(exp(-10.0*SCP_DOW(x,x))); } static const REAL *grd_u(const REAL_D x, REAL_D input) { static REAL_D buffer = {}; REAL *grd = input ? input : buffer; REAL ux = exp(-10.0*SCP_DOW(x,x)); int n; for (n = 0; n < DIM_OF_WORLD; n++) grd[n] = -20.0*x[n]*ux; return(grd); } /*--------------------------------------------------------------------------*/ /* problem data: right hand side, boundary values */ /*--------------------------------------------------------------------------*/ static REAL g(const REAL_D x) /* boundary values, not optional */ { return(u(x)); } static REAL f(const REAL_D x) /* -Delta u, not optional */ { REAL r2 = SCP_DOW(x,x), ux = exp(-10.0*r2); return(-(400.0*r2 - 20.0*DIM_OF_WORLD)*ux); } /*--------------------------------------------------------------------------*/ /* build(): assemblage of the linear system: matrix, load vector, */ /* boundary values, called by adapt_method_stat() */ /* on the first call initialize u_h, f_h, matrix and information */ /* for assembling the system matrix */ /* */ /* struct op_info: structure for passing information from init_element() to */ /* LALt() */ /* init_element(): initialization on the element; calculates the */ /* coordinates and |det DF_S| used by LALt; passes these */ /* values to LALt via user_data, */ /* called on each element by update_matrix() */ /* LALt(): implementation of -Lambda id Lambda^t for -Delta u, */ /* called by update_matrix() after init_element() */ /*--------------------------------------------------------------------------*/ struct op_info { REAL_D Lambda[N_LAMBDA]; /* the gradient of the barycentric coordinates */ REAL det; /* |det D F_S| */ }; static int init_element(const EL_INFO *el_info, const QUAD *quad[3], void *ud) { FUNCNAME("init_element"); struct op_info *info = (struct op_info *)ud; switch(el_info->mesh->dim) { case 1: info->det = el_grd_lambda_1d(el_info, info->Lambda); break; #if DIM_OF_WORLD > 1 case 2: info->det = el_grd_lambda_2d(el_info, info->Lambda); break; #if DIM_OF_WORLD > 2 case 3: info->det = el_grd_lambda_3d(el_info, info->Lambda); break; #endif #endif default: ERROR_EXIT("Illegal dim!\n"); } return 0; } const REAL (*LALt(const EL_INFO *el_info, const QUAD *quad, int iq, void *ud))[N_LAMBDA] { struct op_info *info = (struct op_info *)ud; int i, j, k, dim = el_info->mesh->dim; static REAL LALt[N_LAMBDA][N_LAMBDA]; for (i = 0; i <= dim; i++) for (j = i; j <= dim; j++) { for (LALt[i][j] = k = 0; k < DIM_OF_WORLD; k++) LALt[i][j] += info->Lambda[i][k]*info->Lambda[j][k]; LALt[i][j] *= info->det; LALt[j][i] = LALt[i][j]; } return((const REAL (*)[N_LAMBDA]) LALt); } static void build(MESH *mesh, U_CHAR flag) { FUNCNAME("build"); static const EL_MATRIX_INFO *matrix_info = nil; const QUAD *quad; dof_compress(mesh); MSG("%d DOFs for %s\n", fe_space->admin->size_used, fe_space->name); if (!u_h) /* access matrix and vector for linear system */ { matrix = get_dof_matrix("A", fe_space, fe_space); f_h = get_dof_real_vec("f_h", fe_space); u_h = get_dof_real_vec("u_h", fe_space); u_h->refine_interpol = fe_space->bas_fcts->real_refine_inter; u_h->coarse_restrict = fe_space->bas_fcts->real_coarse_inter; dof_set(0.0, u_h); /* initialize u_h ! */ } if (!matrix_info) /* information for matrix assembling */ { OPERATOR_INFO o_info = {nil}; o_info.row_fe_space = o_info.col_fe_space = fe_space; o_info.init_element = init_element; o_info.LALt = LALt; o_info.LALt_pw_const = true; /* pw const. assemblage is faster */ o_info.LALt_symmetric = true; /* symmetric assemblage is faster */ o_info.use_get_bound = true; /* Dirichlet boundary conditions! */ o_info.user_data = MEM_ALLOC(1, struct op_info); /* user data! */ o_info.fill_flag = CALL_LEAF_EL|FILL_COORDS; matrix_info = fill_matrix_info(&o_info, nil); } clear_dof_matrix(matrix); /* assembling of matrix */ update_matrix(matrix, matrix_info); dof_set(0.0, f_h); /* assembling of load vector */ quad = get_quadrature(mesh->dim, 2*fe_space->bas_fcts->degree - 2); L2scp_fct_bas(f, quad, f_h); dirichlet_bound(g, f_h, u_h, nil); /* boundary values */ return; } /*--------------------------------------------------------------------------*/ /* solve(): solve the linear system, called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static void solve(MESH *mesh) { FUNCNAME("solve"); static REAL tol = 1.e-8; static int miter = 1000, info = 2, icon = 1, restart = 0; static OEM_SOLVER solver = NoSolver; if (solver == NoSolver) { GET_PARAMETER(1, "solver", "%d", &solver); GET_PARAMETER(1, "solver tolerance", "%f", &tol); GET_PARAMETER(1, "solver precon", "%d", &icon); GET_PARAMETER(1, "solver max iteration", "%d", &miter); GET_PARAMETER(1, "solver info", "%d", &info); if (solver == GMRes) GET_PARAMETER(1, "solver restart", "%d", &restart); } oem_solve_s(matrix, f_h, u_h, solver, tol, icon, restart, miter, info); graphics(mesh, u_h, nil, u); return; } /*--------------------------------------------------------------------------*/ /* Functions for error estimate: */ /* estimate(): calculates error estimate via ellipt_est() */ /* calculates exact error also (only for test purpose), */ /* called by adapt_method_stat() */ /* r(): calculates the lower order terms of the element residual */ /* on each element at the quadrature node iq of quad */ /* argument to ellipt_est() and called by ellipt_est() */ /*--------------------------------------------------------------------------*/ static REAL r(const EL_INFO *el_info, const QUAD *quad, int iq, REAL uh_iq, const REAL_D grd_uh_iq) { REAL_D x; coord_to_world(el_info, quad->lambda[iq], x); return(-f(x)); } #define EOC(e,eo) log(eo/MAX(e,1.0e-15))/M_LN2 static REAL estimate(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("estimate"); static int degree, norm = -1; static REAL C[3] = {1.0, 1.0, 0.0}; static REAL est, est_old = -1.0, err, err_old = -1.0; static FLAGS r_flag = 0; /* = (INIT_UH | INIT_GRD_UH), if needed by r() */ REAL_DD A = {{0.0}}; int n; const QUAD *quad; for (n = 0; n < DIM_OF_WORLD; n++) A[n][n] = 1.0; /* set diagonal of A; all other elements are zero */ if (norm < 0) { norm = H1_NORM; GET_PARAMETER(1, "error norm", "%d", &norm); GET_PARAMETER(1, "estimator C0", "%f", &C[0]); GET_PARAMETER(1, "estimator C1", "%f", &C[1]); GET_PARAMETER(1, "estimator C2", "%f", &C[2]); } degree = 2*u_h->fe_space->bas_fcts->degree; est = ellipt_est(u_h, adapt, rw_el_est, nil, degree, norm, C, (const REAL_D *) A, r, r_flag); MSG("estimate = %.8le", est); if (est_old >= 0) print_msg(", EOC: %.2lf\n", EOC(est,est_old)); else print_msg("\n"); est_old = est; quad = get_quadrature(mesh->dim, degree); if (norm == L2_NORM) err = L2_err(u, u_h, quad, 0, nil, nil); else err = H1_err(grd_u, u_h, quad, 0, nil, nil); MSG("||u-uh||%s = %.8le", norm == L2_NORM ? "L2" : "H1", err); if (err_old >= 0) print_msg(", EOC: %.2lf\n", EOC(err,err_old)); else print_msg("\n"); err_old = err; MSG("||u-uh||%s/estimate = %.2lf\n", norm == L2_NORM ? "L2" : "H1", err/MAX(est,1.e-15)); graphics(mesh, nil, get_el_est, nil); return(adapt->err_sum); } /*--------------------------------------------------------------------------*/ /* main program */ /*--------------------------------------------------------------------------*/ int main(int argc, char **argv) { FUNCNAME("main"); MACRO_DATA *data; MESH *mesh; int n_refine = 0, dim, degree = 1; const BAS_FCTS *lagrange; static ADAPT_STAT *adapt; char filename[100]; /*--------------------------------------------------------------------------*/ /* first of all, init parameters of the init file */ /*--------------------------------------------------------------------------*/ init_parameters(0, "INIT/ellipt.dat"); GET_PARAMETER(1, "mesh dimension", "%d", &dim); GET_PARAMETER(1, "macro file name", "%s", filename); GET_PARAMETER(1, "polynomial degree", "%d", °ree); GET_PARAMETER(1, "global refinements", "%d", &n_refine); /*--------------------------------------------------------------------------*/ /* get a mesh, and read the macro triangulation from file */ /*--------------------------------------------------------------------------*/ data = read_macro(filename); mesh = GET_MESH(dim, "ALBERTA mesh", data, nil); free_macro_data(data); init_leaf_data(mesh, sizeof(struct ellipt_leaf_data), nil, nil); lagrange = get_lagrange(mesh->dim, degree); TEST_EXIT(lagrange, "no lagrange BAS_FCTS\n"); fe_space = get_fe_space(mesh, lagrange->name, nil, lagrange, false); global_refine(mesh, n_refine * mesh->dim); graphics(mesh, nil, nil, nil); /*--------------------------------------------------------------------------*/ /* init adapt structure and start adaptive method */ /*--------------------------------------------------------------------------*/ adapt = get_adapt_stat(mesh->dim, "ellipt", "adapt", 2, nil); adapt->estimate = estimate; adapt->get_el_est = get_el_est; adapt->build_after_coarsen = build; adapt->solve = solve; adapt_method_stat(mesh, adapt); WAIT_REALLY; return(0); } alberta-2.0.1/demo/src/Common/graphics.c0000644000042300001440000001732210676724257014771 00000000000000#include /*---8<---------------------------------------------------------------------*/ /*--- graphical output of mesh, discrete solution, estimate, and error ---*/ /*--------------------------------------------------------------------->8---*/ #if !HAVE_LIBGLTOOLS /*---8<---------------------------------------------------------------------*/ /*--- simple GL graphics ... ---*/ /*--- nothing will be done in 3d ---*/ /*--------------------------------------------------------------------->8---*/ void graphics(MESH *mesh, DOF_REAL_VEC *u_h, REAL (*get_est)(EL *el), REAL (*u)(const REAL_D x)) { FUNCNAME("graphics"); static int first = true; static GRAPH_WINDOW win_est=nil, win_val=nil, win_mesh=nil, win_err=nil; static DOF_REAL_VEC *u_diff = nil; int refine = 0; if (first) { int size[4] = {}; char geom[128] = "500x500+0+0"; GET_PARAMETER(1,"graphic windows","%d %d %d %d",size,size+1,size+2,size+3); if (size[0] > 0) { sprintf(geom, "%dx%d+%d+%d", size[0], size[0], 0, 0); win_val = graph_open_window("ALBERTA values", geom, nil, mesh); } if (size[1] > 0) { sprintf(geom, "%dx%d+%d+%d", size[0], size[0], size[0], 0); win_est = graph_open_window("ALBERTA estimate", geom, nil, mesh); } if (size[2] > 0) { sprintf(geom, "%dx%d+%d+%d", size[2], size[2], size[0]+size[1], 0); win_mesh = graph_open_window("ALBERTA mesh", geom, nil, mesh); } if (size[3] > 0) { sprintf(geom, "%dx%d+%d+%d", size[3], size[3], 0, size[0]); win_err = graph_open_window("ALBERTA error (u_h-u)", geom, nil, mesh); } first = false; } if (mesh && win_mesh) { graph_clear_window(win_mesh, rgb_white); graph_mesh(win_mesh, mesh, rgb_black, 2); } if (u_h && win_val) { graph_clear_window(win_val, rgb_white); refine = u_h->fe_space->bas_fcts->degree; if (refine<2) refine=0; graph_drv(win_val, u_h, 0.0, 0.0, refine); } if (get_est && win_est) { graph_clear_window(win_est, rgb_white); graph_mesh(win_est, mesh, rgb_blue, 0); graph_el_est(win_est, mesh, get_est, 0.0, 0.0); } if(u && u_h && win_err) { if(!u_diff) u_diff = get_dof_real_vec("u_h - u", u_h->fe_space); interpol(u, u_diff); dof_xpay(-1.0, u_h, u_diff); graph_drv(win_err, u_diff, 0.0, 0.0, refine); } WAIT; return; } void graphics_d(MESH *mesh, DOF_REAL_D_VEC *u_h, REAL (*get_est)(EL *el), const REAL *(*u)(const REAL_D val, REAL_D x)) { FUNCNAME("graphics_d"); static int first = true; static GRAPH_WINDOW win_est=nil, win_val=nil, win_mesh=nil, win_err=nil; static DOF_REAL_D_VEC *u_diff = nil; int refine; if (first) { int size[4] = {}; char geom[128] = "500x500+0+0"; GET_PARAMETER(1,"graphic windows","%d %d %d %d",size,size+1,size+2,size+3); if (size[0] > 0) { sprintf(geom, "%dx%d+%d+%d", size[0], size[0], 0, 0); win_val = graph_open_window("ALBERTA values", geom, nil, mesh); } if (size[1] > 0) { sprintf(geom, "%dx%d+%d+%d", size[0], size[0], size[0], 0); win_est = graph_open_window("ALBERTA estimate", geom, nil, mesh); } if (size[2] > 0) { sprintf(geom, "%dx%d+%d+%d", size[2], size[2], size[0]+size[1], 0); win_mesh = graph_open_window("ALBERTA mesh", geom, nil, mesh); } if (size[3] > 0) { sprintf(geom, "%dx%d+%d+%d", size[3], size[3], 0, size[0]); win_err = graph_open_window("ALBERTA error ||u_h-u||", geom, nil, mesh); } first = false; } if (mesh && win_mesh) { graph_clear_window(win_mesh, rgb_white); graph_mesh(win_mesh, mesh, rgb_black, 2); } if (u_h && win_val) { graph_clear_window(win_val, rgb_white); refine = u_h->fe_space->bas_fcts->degree; if (refine<2) refine=0; graph_drv_d(win_val, u_h, 0.0, 0.0, refine); } if (get_est && win_est) { graph_clear_window(win_est, rgb_white); graph_mesh(win_est, mesh, rgb_blue, 0); graph_el_est(win_est, mesh, get_est, 0.0, 0.0); } if(u && u_h && win_err) { if(!u_diff) u_diff = get_dof_real_d_vec("u_h - u", u_h->fe_space); interpol_d(u, u_diff); dof_xpay_d(-1.0, u_h, u_diff); graph_drv_d(win_err, u_diff, 0.0, 0.0, refine); } WAIT; return; } #else void graphics(MESH *mesh, DOF_REAL_VEC *u_h, REAL (*get_est)(EL *el), REAL (*u)(const REAL_D x)) { FUNCNAME("graphics"); static int first = true; static GLTOOLS_WINDOW win_est=nil, win_val=nil, win_mesh=nil, win_err=nil; static DOF_REAL_VEC *u_diff = nil; static REAL min, max; if (first) { int size[4] = {}; char geom[128] = "500x500+0+0"; GET_PARAMETER(1,"graphic windows","%d %d %d %d",size,size+1,size+2,size+3); GET_PARAMETER(1, "gltools range", "%e %e", &min, &max); if (size[0] > 0) { sprintf(geom, "%dx%d+%d+%d", size[0], size[0], 0, 0); win_val = open_gltools_window("ALBERTA values", geom, nil, mesh, true); } if (size[1] > 0) { sprintf(geom, "%dx%d+%d+%d", size[1], size[1], size[0], 0); win_est = open_gltools_window("ALBERTA estimate", geom, nil, mesh, true); } if (size[2] > 0) { sprintf(geom, "%dx%d+%d+%d", size[2], size[2], size[0]+size[1], 0); win_mesh = open_gltools_window("ALBERTA mesh", geom, nil, mesh, true); } if (size[3] > 0) { sprintf(geom, "%dx%d+%d+%d", size[3], size[3], 0, size[0]); win_err=open_gltools_window("ALBERTA error (u_h-u)",geom,nil,mesh,true); } first = false; } if (mesh && win_mesh) { gltools_mesh(win_mesh, mesh, 0); } if (u_h && win_val) { gltools_drv(win_val, u_h, min, max); } if (get_est && win_est ) { gltools_est(win_est, mesh, get_est, 0.0, -1.0); } if(u && u_h && win_err) { if(!u_diff) u_diff = get_dof_real_vec("u_h - u", u_h->fe_space); interpol(u, u_diff); dof_xpay(-1.0, u_h, u_diff); gltools_drv(win_err, u_diff, 0.0, -1.0); } return; } void graphics_d(MESH *mesh, DOF_REAL_D_VEC *u_h, REAL (*get_est)(EL *el), const REAL *(*u)(const REAL_D val, REAL_D x)) { FUNCNAME("graphics_d"); static int first = true; static GLTOOLS_WINDOW win_est=nil, win_val=nil, win_mesh=nil, win_err=nil; static DOF_REAL_D_VEC *u_diff = nil; static REAL min, max; if (first) { int size[4] = {}; char geom[128] = "500x500+0+0"; GET_PARAMETER(1,"graphic windows","%d %d %d %d",size,size+1,size+2,size+3); GET_PARAMETER(1, "gltools range", "%e %e", &min, &max); if (size[0] > 0) { sprintf(geom, "%dx%d+%d+%d", size[0], size[0], 0, 0); win_val = open_gltools_window("ALBERTA values", geom, nil, mesh, true); } if (size[1] > 0) { sprintf(geom, "%dx%d+%d+%d", size[1], size[1], size[0], 0); win_est = open_gltools_window("ALBERTA estimate", geom, nil, mesh, true); } if (size[2] > 0) { sprintf(geom, "%dx%d+%d+%d", size[2], size[2], size[0]+size[1], 0); win_mesh = open_gltools_window("ALBERTA mesh", geom, nil, mesh, true); } if (size[3] > 0) { sprintf(geom, "%dx%d+%d+%d", size[3], size[3], 0, size[0]); win_err=open_gltools_window("ALBERTA error ||u_h-u||", geom, nil, mesh, true); } first = false; } if (mesh && win_mesh) gltools_mesh(win_mesh, mesh, 0); if (u_h && win_val) gltools_drv_d(win_val, u_h, min, max); if (get_est && win_est) gltools_est(win_est, mesh, get_est, 0.0, -1.0); if(u && u_h && win_err) { if(!u_diff) u_diff = get_dof_real_d_vec("u_h - u", u_h->fe_space); interpol_d(u, u_diff); dof_xpay_d(-1.0, u_h, u_diff); gltools_drv_d(win_err, u_diff, 0.0, -1.0); } return; } #endif alberta-2.0.1/demo/src/Common/heat.c0000644000042300001440000006612210676724257014114 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: heat.c */ /* */ /* description: solver for parabolic model problem */ /* */ /* u,t - \Delta u = f in \Omega */ /* u = g on \partial \Omega */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include /*--------------------------------------------------------------------------*/ /* function for displaying mesh, discrete solution, and/or estimate */ /* defined in graphics.c */ /*--------------------------------------------------------------------------*/ void graphics(MESH *mesh, DOF_REAL_VEC *u_h, REAL (*get_est)(EL *el), REAL (*u)(const REAL_D x)); /*--------------------------------------------------------------------------*/ /* global variables: finite element space, discrete solution, discrete */ /* solution from previous time step, load vector, */ /* system matrix, and structure for adaptive procedure */ /*--------------------------------------------------------------------------*/ static const FE_SPACE *fe_space; /* initialized by main() */ static DOF_REAL_VEC *u_h = nil; /* initialized by main() */ static DOF_REAL_VEC *u_old = nil; /* initialized by main() */ static DOF_REAL_VEC *f_h = nil; /* initialized by main() */ static DOF_MATRIX *matrix = nil; /* initialized by main() */ static ADAPT_INSTAT *adapt_instat; /* initialized by main() */ static REAL theta = 0.5; /*--- parameter of the time discretization ---*/ static REAL err_L2 = 0.0; /*--- spatial error in a single time step ---*/ /*--------------------------------------------------------------------------*/ /* struct heat_leaf_data: structure for storing one REAL value on each */ /* leaf element as LEAF_DATA */ /* rw_el_est(): return a pointer to the memory for storing the element */ /* estimate (stored as LEAF_DATA), called by heat_est() */ /* get_el_est(): return the value of the element estimates (from LEAF_DATA),*/ /* called by adapt_method_stat() and graphics() */ /*--------------------------------------------------------------------------*/ struct heat_leaf_data { REAL estimate; /* one real for the estimate */ REAL est_c; /* one real for the coarsening estimate */ }; static REAL *rw_el_est(EL *el) { if (IS_LEAF_EL(el)) return(&((struct heat_leaf_data *)LEAF_DATA(el))->estimate); else return(nil); } static REAL get_el_est(EL *el) { if (IS_LEAF_EL(el)) return(((struct heat_leaf_data *)LEAF_DATA(el))->estimate); else return(0.0); } static REAL *rw_el_estc(EL *el) { if (IS_LEAF_EL(el)) return(&((struct heat_leaf_data *)LEAF_DATA(el))->est_c); else return(nil); } static REAL get_el_estc(EL *el) { if (IS_LEAF_EL(el)) return(((struct heat_leaf_data *)LEAF_DATA(el))->est_c); else return(0.0); } static REAL time_est = 0.0; static REAL get_time_est(MESH *mesh, ADAPT_INSTAT *adapt) { return(time_est); } /*--------------------------------------------------------------------------*/ /* For test purposes: exact solution and its gradient (optional) */ /*--------------------------------------------------------------------------*/ static REAL eval_time_u = 0.0; static REAL u(const REAL_D x) { return(sin(M_PI*eval_time_u)*exp(-10.0*SCP_DOW(x,x))); } static REAL eval_time_u0 = 0.0; static REAL u0(const REAL_D x) { eval_time_u = eval_time_u0; return(u(x)); } #if 0 static REAL eval_time_grd_u = 0.0; static const REAL *grd_u(const REAL_D x) { static REAL_D grd; REAL ux = sin(M_PI*eval_time_grd_u)*exp(-10.0*SCP_DOW(x,x)); int n; for (n = 0; n < DIM_OF_WORLD; n++) grd[n] = -20.0*x[n]*ux; return(grd); } #endif /*--------------------------------------------------------------------------*/ /* problem data: right hand side, boundary values */ /*--------------------------------------------------------------------------*/ static REAL eval_time_g = 0.0; static REAL g(const REAL_D x) /* boundary values, not optional */ { eval_time_u = eval_time_g; return(u(x)); } static REAL eval_time_f = 0.0; static REAL f(const REAL_D x) /* -Delta u, not optional */ { REAL r2 = SCP_DOW(x,x), ux = sin(M_PI*eval_time_f)*exp(-10.0*r2); REAL ut = M_PI*cos(M_PI*eval_time_f)*exp(-10.0*r2); return(ut - (400.0*r2 - 20.0*DIM_OF_WORLD)*ux); } /*---8<---------------------------------------------------------------------*/ /*--- write error and estimator data to files ---*/ /*--------------------------------------------------------------------->8---*/ static void write_statistics(const char *path, ADAPT_INSTAT *adapt, int n_dof, REAL space_est, REAL time_est, REAL err_L2) { static FILE *file_ndof = nil, *file_tau = nil; static FILE *file_space_est = nil, *file_time_est = nil, *file_L2_err = nil; const char *name = fe_space->bas_fcts->name; REAL time = adapt->time; char filename[1024]; if (!file_ndof) { sprintf(filename, "%s/n_dof-%s.agr", path ? path : ".", name); file_ndof = fopen(filename, "w"); } if (!file_tau) { sprintf(filename, "%s/tau-%s.agr", path ? path : ".", name); file_tau = fopen(filename, "w"); } if (!file_space_est) { sprintf(filename, "%s/space_est-%s.agr", path ? path : ".", name); file_space_est = fopen(filename, "w"); } if (!file_time_est) { sprintf(filename, "%s/time_est-%s.agr", path ? path : ".", name); file_time_est = fopen(filename, "w"); } if (!file_L2_err) { sprintf(filename, "%s/L2_err-%s.agr", path ? path : ".", name); file_L2_err = fopen(filename, "w"); } if (file_ndof) fprintf(file_ndof, "%.6le %d\n", time, n_dof); /*--- don't print zeros, zeros do not allow log display of estimate ---*/ if (file_space_est) fprintf(file_space_est, "%.6le %.6le\n", time, MAX(space_est,1.e-20)); if (time > adapt->start_time) { if (file_tau) { fprintf(file_tau, "%.6le %.6le\n", time, adapt->timestep); } /*--- don't print zeros, zeros do not allow log display of estimate ---*/ if (file_time_est) fprintf(file_time_est, "%.6le %.6le\n", time, MAX(time_est,1.e-20)); } /*--- don't print zeros, zeros do not allow log display of error ---*/ if (file_L2_err) fprintf(file_L2_err, "%.6le %.6le\n", time, MAX(err_L2,1.e-20)); if (time >= adapt->end_time) { if (file_ndof) fclose(file_ndof); if (file_tau) fclose(file_tau); if (file_space_est) fclose(file_space_est); if (file_time_est) fclose(file_time_est); if (file_L2_err) fclose(file_L2_err); } else { fflush(nil); } return; } /*---8<---------------------------------------------------------------------*/ /*--- interpolation is solve on the initial grid ---*/ /*--------------------------------------------------------------------->8---*/ static void interpol_u0(MESH *mesh) { dof_compress(mesh); interpol(u0, u_h); return; } static void init_timestep(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("init_timestep"); INFO(adapt_instat->info,1, "---8<---------------------------------------------------\n"); INFO(adapt_instat->info, 1,"starting new timestep\n"); dof_copy(u_h, u_old); return; } static void set_time(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("set_time"); INFO(adapt->info,1, "---8<---------------------------------------------------\n"); if (adapt->time == adapt->start_time) { INFO(adapt->info, 1,"start time: %.4le\n", adapt->time); } else { INFO(adapt->info, 1,"timestep for (%.4le %.4le), tau = %.4le\n", adapt->time-adapt->timestep, adapt->time, adapt->timestep); } eval_time_f = adapt->time - (1 - theta)*adapt->timestep; eval_time_g = adapt->time; return; } static void close_timestep(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("close_timestep"); static REAL err_max = 0.0; /* max space-time error */ static REAL est_max = 0.0; /* max space-time estimate */ static int write_fe_data = 0, write_stat_data = 0; static int step = 0; static char path[256] = "./"; REAL space_est = adapt->adapt_space->err_sum; REAL tolerance = adapt->rel_time_error*adapt->tolerance; err_max = MAX(err_max, err_L2); est_max = MAX(est_max, space_est + time_est); INFO(adapt->info,1, "---8<---------------------------------------------------\n"); if (adapt->time == adapt->start_time) { tolerance = adapt->adapt_initial->tolerance; INFO(adapt->info,1,"start time: %.4le\n", adapt->time); } else { tolerance += adapt->adapt_space->tolerance; INFO(adapt->info,1,"timestep for (%.4le %.4le), tau = %.4le\n", adapt->time-adapt->timestep, adapt->time, adapt->timestep); } INFO(adapt->info,2,"max. est. = %.4le, tolerance = %.4le\n", est_max, tolerance); INFO(adapt->info,2,"max. error = %.4le, ratio = %.2lf\n", err_max, err_max/MAX(est_max,1.0e-20)); if (!step) { GET_PARAMETER(1, "write finite element data", "%d", &write_fe_data); GET_PARAMETER(1, "write statistical data", "%d", &write_stat_data); GET_PARAMETER(1, "data path", "%s", path); } /*---8<---------------------------------------------------------------------*/ /*--- write mesh and discrete solution to file for post-processing ---*/ /*--------------------------------------------------------------------->8---*/ if (write_fe_data) { const char *fn; fn= generate_filename(path, "mesh", step); write_mesh_xdr(mesh, fn, adapt->time); fn= generate_filename(path, "u_h", step); write_dof_real_vec(u_h, fn); } step++; /*---8<---------------------------------------------------------------------*/ /*--- write data about estimate, error, time step size, etc. ---*/ /*--------------------------------------------------------------------->8---*/ if (write_stat_data) { int n_dof = fe_space->admin->size_used; write_statistics(path, adapt, n_dof, space_est, time_est, err_L2); } graphics(mesh, u_h, get_el_est, u); return; } /*--------------------------------------------------------------------------*/ /* build(): assemblage of the linear system: matrix, load vector, */ /* boundary values, called by adapt_method_stat() */ /* on the first call initialize u_h, f_h, matrix and information */ /* for assembling the system matrix */ /* */ /* struct op_info: structure for passing information from init_element() to */ /* LALt() */ /* init_element(): initialization on the element; calculates the */ /* coordinates and |det DF_S| used by LALt; passes these */ /* values to LALt via user_data, */ /* called on each element by update_matrix() */ /* LALt(): implementation of -Lambda id Lambda^t for -Delta u, */ /* called by update_matrix() */ /* c(): implementation of 1/tau*m(,) */ /*--------------------------------------------------------------------------*/ struct op_info { REAL_D Lambda[N_LAMBDA]; /* the gradient of the barycentric coordinates */ REAL det; /* |det D F_S| */ REAL tau_1; }; static const REAL (*LALt(const EL_INFO *el_info, const QUAD *quad, int iq, void *ud))[N_LAMBDA] { struct op_info *info = (struct op_info *)ud; int i, j, k, dim = el_info->mesh->dim; static REAL LALt[N_LAMBDA][N_LAMBDA] = {}; for (i = 0; i <= dim; i++) for (j = i; j <= dim; j++) { for (LALt[i][j] = k = 0; k < DIM_OF_WORLD; k++) LALt[i][j] += info->Lambda[i][k]*info->Lambda[j][k]; LALt[i][j] *= info->det; LALt[j][i] = LALt[i][j]; } return((const REAL (*)[N_LAMBDA]) LALt); } static REAL c(const EL_INFO *el_info, const QUAD *quad, int iq, void *ud) { struct op_info *info = (struct op_info *)ud; return(info->tau_1*info->det); } static void assemble(DOF_REAL_VEC *u_old, DOF_MATRIX *matrix, DOF_REAL_VEC *fh, DOF_REAL_VEC *u_h, REAL theta, REAL tau, REAL (*f)(const REAL_D), REAL (*g)(const REAL_D)) { FUNCNAME("assemble"); static struct op_info *op_info = nil; static const REAL **(*fill_a)(const EL_INFO *, void *) = nil; static void *a_info = nil; static const REAL **(*fill_c)(const EL_INFO *, void *) = nil; static void *c_info = nil; static const DOF_ADMIN *admin = nil; static int n; static const REAL *(*get_u_loc)(const EL *, const DOF_REAL_VEC *, REAL *); static const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); static const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); static const QUAD *quad = nil; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag; const REAL **a_mat, **c_mat; REAL *f_vec; int i, j; if(!quad) quad = get_quadrature(u_h->fe_space->bas_fcts->dim, 2*u_h->fe_space->bas_fcts->degree); /*--------------------------------------------------------------------------*/ /* init functions for matrix assembling */ /*--------------------------------------------------------------------------*/ if (admin != u_h->fe_space->admin) { OPERATOR_INFO o_info2 = {nil}, o_info0 = {nil}; const EL_MATRIX_INFO *matrix_info; const BAS_FCTS *bas_fcts = u_h->fe_space->bas_fcts; admin = u_h->fe_space->admin; n = bas_fcts->n_bas_fcts; get_dof = bas_fcts->get_dof_indices; get_bound = bas_fcts->get_bound; get_u_loc = bas_fcts->get_real_vec; if (!op_info) op_info = MEM_ALLOC(1, struct op_info); o_info2.row_fe_space = o_info2.col_fe_space = u_h->fe_space; o_info2.quad[2] = quad; o_info2.LALt = LALt; o_info2.LALt_pw_const = true; o_info2.LALt_symmetric = true; o_info2.user_data = op_info; matrix_info = fill_matrix_info(&o_info2, nil); fill_a = matrix_info->el_matrix_fct; a_info = matrix_info->fill_info; o_info0.row_fe_space = o_info0.col_fe_space = u_h->fe_space; o_info0.quad[0] = quad; o_info0.c = c; o_info0.c_pw_const = true; o_info0.user_data = op_info; matrix_info = fill_matrix_info(&o_info0, nil); fill_c = matrix_info->el_matrix_fct; c_info = matrix_info->fill_info; } op_info->tau_1 = 1.0/tau; /*--------------------------------------------------------------------------*/ /* and now assemble the matrix and right hand side */ /*--------------------------------------------------------------------------*/ clear_dof_matrix(matrix); dof_set(0.0, fh); f_vec = fh->vec; fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_BOUND; el_info = traverse_first(stack, u_h->fe_space->mesh, -1, fill_flag); while (el_info) { const REAL *u_old_loc = (*get_u_loc)(el_info->el, u_old, nil); const DOF *dof = (*get_dof)(el_info->el, admin, nil); const S_CHAR *bound = (*get_bound)(el_info, nil); /*--------------------------------------------------------------------------*/ /* initialization of values used by LALt and c */ /*--------------------------------------------------------------------------*/ switch(el_info->mesh->dim) { case 1: op_info->det = el_grd_lambda_1d(el_info, op_info->Lambda); break; #if DIM_OF_WORLD > 1 case 2: op_info->det = el_grd_lambda_2d(el_info, op_info->Lambda); break; #if DIM_OF_WORLD > 2 case 3: op_info->det = el_grd_lambda_3d(el_info, op_info->Lambda); break; #endif #endif default: ERROR_EXIT("Illegal dim!\n"); } a_mat = fill_a(el_info, a_info); c_mat = fill_c(el_info, c_info); /*--------------------------------------------------------------------------*/ /* add theta*a(psi_i,psi_j) + 1/tau*m(4*u^3*psi_i,psi_j) */ /*--------------------------------------------------------------------------*/ if (theta) { add_element_matrix(matrix, theta, n, n, dof, dof, a_mat, bound); } add_element_matrix(matrix, 1.0, n, n, dof, dof, c_mat, bound); /*--------------------------------------------------------------------------*/ /* f += -(1-theta)*a(u_old,psi_i) + 1/tau*m(u_old,psi_i) */ /*--------------------------------------------------------------------------*/ if (1.0 - theta) { REAL theta1 = 1.0 - theta; for (i = 0; i < n; i++) { if (bound[i] < DIRICHLET) { REAL val = 0.0; for (j = 0; j < n; j++) val += (-theta1*a_mat[i][j] + c_mat[i][j])*u_old_loc[j]; f_vec[dof[i]] += val; } } } else { for (i = 0; i < n; i++) { if (bound[i] < DIRICHLET) { REAL val = 0.0; for (j = 0; j < n; j++) val += c_mat[i][j]*u_old_loc[j]; f_vec[dof[i]] += val; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); L2scp_fct_bas(f, quad, fh); dirichlet_bound(g, fh, u_h, nil); return; } static void build(MESH *mesh, U_CHAR flag) { FUNCNAME("build"); dof_compress(mesh); INFO(adapt_instat->adapt_space->info, 2, "%d DOFs for %s\n", fe_space->admin->size_used, fe_space->name); assemble(u_old, matrix, f_h, u_h, theta, adapt_instat->timestep, f, g); return; } /*--------------------------------------------------------------------------*/ /* solve(): solve the linear system, called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static void solve(MESH *mesh) { FUNCNAME("solve"); static REAL tol = 1.e-8; static int max_iter = 1000, info = 2, icon = 1, restart = 0; static OEM_SOLVER solver = NoSolver; if (solver == NoSolver) { tol = 1.e-8; GET_PARAMETER(1, "solver", "%d", &solver); GET_PARAMETER(1, "solver tolerance", "%f", &tol); GET_PARAMETER(1, "solver precon", "%d", &icon); GET_PARAMETER(1, "solver max iteration", "%d", &max_iter); GET_PARAMETER(1, "solver info", "%d", &info); if (solver == GMRes) GET_PARAMETER(1, "solver restart", "%d", &restart); } oem_solve_s(matrix, f_h, u_h, solver, tol, icon, restart, max_iter, info); return; } /*--------------------------------------------------------------------------*/ /* Functions for error estimate: */ /* estimate(): calculates error estimate via heat_est() */ /* calculates exact error also (only for test purpose), */ /* called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static REAL r(const EL_INFO *el_info, const QUAD *quad, int iq, REAL t, REAL uh_iq, const REAL_D grd_uh_iq) { REAL_D x; coord_to_world(el_info, quad->lambda[iq], x); eval_time_f = t; return(-f(x)); } static REAL estimate(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("estimate"); static int degree; static REAL C[4] = {-1.0, 1.0, 1.0, 1.0}; REAL_DD A = {{0.0}}; FLAGS r_flag = 0; /* = (INIT_UH|INIT_GRD_UH), if needed by r() */ int n; REAL space_est; for (n = 0; n < DIM_OF_WORLD; n++) A[n][n] = 1.0; /* set diagonal of A; all other elements are zero */ eval_time_u = adapt_instat->time; if (C[0] < 0) { C[0] = 1.0; GET_PARAMETER(1, "estimator C0", "%f", &C[0]); GET_PARAMETER(1, "estimator C1", "%f", &C[1]); GET_PARAMETER(1, "estimator C2", "%f", &C[2]); GET_PARAMETER(1, "estimator C3", "%f", &C[3]); } degree = 2*u_h->fe_space->bas_fcts->degree; time_est = heat_est(u_h, adapt_instat, rw_el_est, rw_el_estc, degree, C, u_old, (const REAL_D *) A, r, r_flag); space_est = adapt_instat->adapt_space->err_sum; err_L2 = L2_err(u, u_h, nil, 0, nil, nil); INFO(adapt_instat->info,2, "---8<---------------------------------------------------\n"); INFO(adapt_instat->info, 2,"time = %.4le with timestep = %.4le\n", adapt_instat->time, adapt_instat->timestep); INFO(adapt_instat->info, 2,"estimate = %.4le, max = %.4le\n", space_est, sqrt(adapt_instat->adapt_space->err_max)); INFO(adapt_instat->info, 2,"||u-uh||L2 = %.4le, ratio = %.2lf\n", err_L2, err_L2/MAX(space_est,1.e-20)); return(adapt_instat->adapt_space->err_sum); } static REAL est_initial(MESH *mesh, ADAPT_STAT *adapt) { err_L2 = adapt->err_sum = L2_err(u0, u_h, nil, 0, rw_el_est, &adapt->err_max); return(adapt->err_sum); } /*--------------------------------------------------------------------------*/ /* main program */ /*--------------------------------------------------------------------------*/ int main(int argc, char **argv) { FUNCNAME("main"); MACRO_DATA *data; MESH *mesh; const BAS_FCTS *lagrange; int n_refine = 0, k, p = 1, dim; char filename[128]; REAL fac = 1.0; /*--------------------------------------------------------------------------*/ /* first of all, init parameters of the init file */ /*--------------------------------------------------------------------------*/ init_parameters(0, "INIT/heat.dat"); for (k = 1; k+1 < argc; k += 2) ADD_PARAMETER(0, argv[k], argv[k+1]); GET_PARAMETER(1, "mesh dimension", "%d", &dim); GET_PARAMETER(1, "macro file name", "%s", filename); GET_PARAMETER(1, "global refinements", "%d", &n_refine); GET_PARAMETER(1, "parameter theta", "%e", &theta); GET_PARAMETER(1, "polynomial degree", "%d", &p); /*--------------------------------------------------------------------------*/ /* get a mesh, and read the macro triangulation from file */ /*--------------------------------------------------------------------------*/ data = read_macro(filename); mesh = GET_MESH(dim, "ALBERTA mesh", data, nil); free_macro_data(data); init_leaf_data(mesh, sizeof(struct heat_leaf_data), nil, nil); lagrange = get_lagrange(mesh->dim, p); TEST_EXIT(lagrange, "no lagrange BAS_FCTS\n"); fe_space = get_fe_space(mesh, lagrange->name, nil, lagrange, false); global_refine(mesh, n_refine * dim); graphics(mesh, nil, nil, nil); matrix = get_dof_matrix("A", fe_space, fe_space); f_h = get_dof_real_vec("f_h", fe_space); u_h = get_dof_real_vec("u_h", fe_space); u_h->refine_interpol = fe_space->bas_fcts->real_refine_inter; u_h->coarse_restrict = fe_space->bas_fcts->real_coarse_inter; u_old = get_dof_real_vec("u_old", fe_space); u_old->refine_interpol = fe_space->bas_fcts->real_refine_inter; u_old->coarse_restrict = fe_space->bas_fcts->real_coarse_inter; dof_set(0.0, u_h); /* initialize u_h ! */ /*--------------------------------------------------------------------------*/ /* init adapt structure and start adaptive method */ /*--------------------------------------------------------------------------*/ adapt_instat = get_adapt_instat(dim, "heat", "adapt", 2, adapt_instat); /*--------------------------------------------------------------------------*/ /* adapt time step size to refinement level and polynomial degree */ /*--------------------------------------------------------------------------*/ if (theta < 0.5) { WARNING("You are using the explicit Euler scheme\n"); WARNING("Use a sufficiently small time step size!!!\n"); fac = 1.0e-3; } if (theta == 0.5) adapt_instat->timestep *= fac*pow(2, -(REAL)(p*(n_refine))/2.0); else adapt_instat->timestep *= fac*pow(2, -(REAL)(p*(n_refine))); MSG("using initial timestep size = %.4le\n", adapt_instat->timestep); eval_time_u0 = adapt_instat->start_time; adapt_instat->adapt_initial->get_el_est = get_el_est; adapt_instat->adapt_initial->estimate = est_initial; adapt_instat->adapt_initial->solve = interpol_u0; adapt_instat->adapt_space->get_el_est = get_el_est; adapt_instat->adapt_space->get_el_estc = get_el_estc; adapt_instat->adapt_space->estimate = estimate; adapt_instat->adapt_space->build_after_coarsen = build; adapt_instat->adapt_space->solve = solve; adapt_instat->init_timestep = init_timestep; adapt_instat->set_time = set_time; adapt_instat->get_time_est = get_time_est; adapt_instat->close_timestep = close_timestep; adapt_method_instat(mesh, adapt_instat); WAIT_REALLY; return(0); } alberta-2.0.1/demo/src/Common/nlprob.c0000644000042300001440000001502510676724257014463 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: nlprob.c */ /* */ /* description: solver for an nonlinear elliptic model problem */ /* */ /* -k \Delta u + \sigma u^4 = f in \Omega */ /* u = g on \partial \Omega */ /* */ /* definitions and settings for different problems */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "nonlin.h" static REAL k = 1.0, sigma = 1.0; /*--------------------------------------------------------------------------*/ /* Problem 0: problem with exact solution */ /* solution is the `exponential peak' */ /*--------------------------------------------------------------------------*/ static REAL u_0(const REAL_D x) { REAL x2 = SCP_DOW(x,x); return(exp(-10.0*x2)); } static const REAL *grd_u_0(const REAL_D x, REAL_D input) { static REAL_D buffer = {}; REAL *grd = input ? input : buffer; REAL ux = exp(-10.0*SCP_DOW(x,x)); int n; for (n = 0; n < DIM_OF_WORLD; n++) grd[n] = -20.0*x[n]*ux; return(grd); } static REAL f_0(const REAL_D x) { REAL r2 = SCP_DOW(x,x), ux = exp(-10.0*r2), ux4 = ux*ux*ux*ux; return(sigma*ux4 - k*(400.0*r2 - 20.0*DIM_OF_WORLD)*ux); } /*--------------------------------------------------------------------------*/ /* Problem 1: */ /* compute a stable and an unstable solution, depending on the inital */ /* choice of u_h */ /* there is no true solution */ /*--------------------------------------------------------------------------*/ static REAL U0 = 0.0; static REAL g_1(const REAL_D x) { #if DIM_OF_WORLD == 1 return(4.0*U0*x[0]*(1.0-x[0])); #endif #if DIM_OF_WORLD == 2 return(16.0*U0*x[0]*(1.0-x[0])*x[1]*(1.0-x[1])); #endif #if DIM_OF_WORLD == 3 return(64.0*U0*x[0]*(1.0-x[0])*x[1]*(1.0-x[1])*x[2]*(1.0-x[2])); #endif } static REAL f_1(const REAL_D x) { return(1.0); } /*--------------------------------------------------------------------------*/ /* Problem 2: */ /* physical problem: heat transport in a thin plate */ /* no true solution known */ /*--------------------------------------------------------------------------*/ static REAL g2 = 300.0, sigma_uext4 = 0.0; static REAL g_2(const REAL_D x) { return(g2); } static REAL f_2(const REAL_D x) { if (x[0] >= -0.25 && x[0] <= 0.25 && x[1] >= -0.25 && x[1] <= 0.25) return(150.0 + sigma_uext4); else return(sigma_uext4); } /*--------------------------------------------------------------------------*/ /* init_problem: */ /* initialize k and sigma, adjust function pointers and the read macro */ /* triangulation */ /*--------------------------------------------------------------------------*/ const PROB_DATA *init_problem(MESH *mesh) { FUNCNAME("init_problem"); static PROB_DATA prob_data = {0}; int pn = 2; GET_PARAMETER(1, "problem number", "%d", &pn); switch (pn) { case 0: /*--- problem with known true solution -----------------------*/ k = 1.0; sigma = 1.0; prob_data.g = u_0; prob_data.f = f_0; prob_data.u = u_0; prob_data.grd_u = grd_u_0; prob_data.data = read_macro("Macro/macro-big.amc"); break; case 1: /*--- problem for computing a stable and an unstable sol. ----*/ k = 1.0; sigma = 1.0; prob_data.g = g_1; prob_data.f = f_1; prob_data.u0 = g_1; GET_PARAMETER(1, "U0", "%f", &U0); prob_data.data = read_macro("Macro/macro.amc"); break; case 2: /*--- physical problem ---------------------------------------*/ k = 2.0; sigma = 5.67e-8; sigma_uext4 = sigma*273*273*273*273; prob_data.g = g_2; prob_data.f = f_2; prob_data.data = read_macro("Macro/macro-big.amc"); break; default: ERROR_EXIT("no problem defined with problem no. %d\n", pn); } prob_data.k = k; prob_data.sigma = sigma; return(&prob_data); } alberta-2.0.1/demo/src/Common/nlsolve.c0000644000042300001440000003615210676724257014655 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: nlsolve.c */ /* */ /* description: solver for an nonlinear elliptic model problem */ /* */ /* -k \Delta u + \sigma u^4 = f in \Omega */ /* u = g on \partial \Omega */ /* */ /* implementation of the nonlinear solver by a */ /* Newton method */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "nonlin.h" /*--------------------------------------------------------------------------*/ /* data structure for the assembling of the linearized system */ /*--------------------------------------------------------------------------*/ struct op_info { REAL_D Lambda[N_LAMBDA]; /* the gradient of the barycentric coordinates */ REAL det; /* |det D F_S| */ REAL k, sigma; /* diffusion and reaction coefficient */ const QUAD_FAST *quad_fast; /* quad_fast for the zero order term */ const REAL *v_qp; /* v at all quadrature nodes of quad_fast */ }; /*--------------------------------------------------------------------------*/ /* data structure for passing information from the newton solver to the */ /* the function for assembling, solving and norm calculation */ /*--------------------------------------------------------------------------*/ typedef struct newton_data NEWTON_DATA; struct newton_data { const FE_SPACE *fe_space; /* used finite element space */ REAL k; /* diffusion coefficient */ REAL sigma; /* reaction coefficient */ REAL (*f)(const REAL_D); /* for evaluation f + sigma u_ext^4 */ DOF_MATRIX *DF; /* pointer to system matrix */ /*--- parameters for the linear solver -----------------------------------*/ OEM_SOLVER solver; /* used solver: CG (v >= 0) else BiCGStab */ REAL tolerance; int max_iter; int icon; int restart; int info; }; static const REAL (*LALt(const EL_INFO *el_info, const QUAD *quad, int iq, void *ud))[N_LAMBDA] { struct op_info *info = (struct op_info *)ud; REAL fac = info->k*info->det; int i, j, k, dim = el_info->mesh->dim; static REAL LALt[N_LAMBDA][N_LAMBDA] = {}; for (i = 0; i <= dim; i++) { for (j = i; j <= dim; j++) { for (LALt[i][j] = k = 0; k < DIM_OF_WORLD; k++) LALt[i][j] += info->Lambda[i][k]*info->Lambda[j][k]; LALt[i][j] *= fac; LALt[j][i] = LALt[i][j]; } } return((const REAL (*)[N_LAMBDA]) LALt); } static REAL c(const EL_INFO *el_info, const QUAD *quad, int iq, void *ud) { struct op_info *info = (struct op_info *)ud; REAL v3; DEBUG_TEST_EXIT(info->quad_fast->quad == quad, "quads differ\n"); v3 = info->v_qp[iq]*info->v_qp[iq]*info->v_qp[iq]; return(info->sigma*info->det*v3); } static void update(void *ud, int dim, const REAL *v, int up_DF, REAL *F) { FUNCNAME("update"); static struct op_info *op_info = nil; static const REAL **(*fill_a)(const EL_INFO *, void *) = nil; static void *a_info = nil; static const REAL **(*fill_c)(const EL_INFO *, void *) = nil; static void *c_info = nil; static const DOF_ADMIN *admin = nil; static int n_phi; static const REAL *(*get_v_loc)(const EL *, const DOF_REAL_VEC *, REAL *); static const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); static const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); NEWTON_DATA *data = (NEWTON_DATA *)ud; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag; DOF_REAL_VEC dof_v = {nil, nil, "v"}; DOF_REAL_VEC dof_F = {nil, nil, "F(v)"}; /*--------------------------------------------------------------------------*/ /* init functions for assembling DF(v) and F(v) */ /*--------------------------------------------------------------------------*/ if (admin != data->fe_space->admin) { OPERATOR_INFO o_info2 = {nil}, o_info0 = {nil}; const EL_MATRIX_INFO *matrix_info; const BAS_FCTS *bas_fcts = data->fe_space->bas_fcts; const QUAD *quad = get_quadrature(bas_fcts->dim, 2*bas_fcts->degree-2); admin = data->fe_space->admin; n_phi = bas_fcts->n_bas_fcts; get_dof = bas_fcts->get_dof_indices; get_bound = bas_fcts->get_bound; get_v_loc = bas_fcts->get_real_vec;; if (!op_info) op_info = MEM_ALLOC(1, struct op_info); o_info2.row_fe_space = o_info2.col_fe_space = data->fe_space; o_info2.quad[2] = quad; o_info2.LALt = LALt; o_info2.LALt_pw_const = true; o_info2.LALt_symmetric = true; o_info2.user_data = op_info; matrix_info = fill_matrix_info(&o_info2, nil); fill_a = matrix_info->el_matrix_fct; a_info = matrix_info->fill_info; o_info0.row_fe_space = o_info0.col_fe_space = data->fe_space; o_info0.quad[0] = quad; o_info0.c = c; o_info0.c_pw_const = false; o_info0.user_data = op_info; op_info->quad_fast = get_quad_fast(bas_fcts, quad, INIT_PHI); matrix_info = fill_matrix_info(&o_info0, nil); fill_c = matrix_info->el_matrix_fct; c_info = matrix_info->fill_info; } /*--------------------------------------------------------------------------*/ /* make a DOF vector from input vector v_vec */ /*--------------------------------------------------------------------------*/ dof_v.fe_space = data->fe_space; dof_v.size = dim; dof_v.vec = (REAL *) v; /* cast needed; dof_v.vec isn't const REAL * */ /* nevertheless, values are NOT changed */ /*--------------------------------------------------------------------------*/ /* make a DOF vector from F, if not nil */ /*--------------------------------------------------------------------------*/ if (F) { dof_F.fe_space = data->fe_space; dof_F.size = dim; dof_F.vec = F; } /*--------------------------------------------------------------------------*/ /* and now assemble DF(v) and/or F(v) */ /*--------------------------------------------------------------------------*/ op_info->k = data->k; op_info->sigma = data->sigma; if (up_DF) { /*--- if v_vec[i] >= 0 for all i => matrix is positive definite (p=1) ----*/ data->solver = dof_min(&dof_v) >= 0 ? CG : BiCGStab; clear_dof_matrix(data->DF); } if (F) { dof_set(0.0, &dof_F); L2scp_fct_bas(data->f, op_info->quad_fast->quad, &dof_F); dof_scal(-1.0, &dof_F); } fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_BOUND; el_info = traverse_first(stack, data->fe_space->mesh, -1, fill_flag); while (el_info) { const REAL *v_loc = (*get_v_loc)(el_info->el, &dof_v, nil); const DOF *dof = (*get_dof)(el_info->el, admin, nil); const S_CHAR *bound = (*get_bound)(el_info, nil); const REAL **a_mat, **c_mat; /*--------------------------------------------------------------------------*/ /* initialization of values used by LALt and c */ /*--------------------------------------------------------------------------*/ switch(el_info->mesh->dim) { case 1: op_info->det = el_grd_lambda_1d(el_info, op_info->Lambda); break; #if DIM_OF_WORLD > 1 case 2: op_info->det = el_grd_lambda_2d(el_info, op_info->Lambda); break; #if DIM_OF_WORLD > 2 case 3: op_info->det = el_grd_lambda_3d(el_info, op_info->Lambda); break; #endif #endif default: ERROR_EXIT("Illegal dim!\n"); } op_info->v_qp = uh_at_qp(op_info->quad_fast, v_loc, nil); a_mat = fill_a(el_info, a_info); c_mat = fill_c(el_info, c_info); if (up_DF) /*--- add element contribution to matrix DF(v) ----------*/ { /*--------------------------------------------------------------------------*/ /* add a(phi_i,phi_j) + 4*m(u^3*phi_i,phi_j) to matrix */ /*--------------------------------------------------------------------------*/ add_element_matrix(data->DF, 1.0, n_phi, n_phi, dof, dof, a_mat, bound); add_element_matrix(data->DF, 4.0, n_phi, n_phi, dof, dof, c_mat, bound); } if (F) /*--- add element contribution to F(v) --------------------*/ { int i, j; /*--------------------------------------------------------------------------*/ /* F(v) += a(v, phi_i) + m(v^4, phi_i) */ /*--------------------------------------------------------------------------*/ for (i = 0; i < n_phi; i++) { if (bound[i] < DIRICHLET) { REAL val = 0.0; for (j = 0; j < n_phi; j++) val += (a_mat[i][j] + c_mat[i][j])*v_loc[j]; F[dof[i]] += val; } else F[dof[i]] = 0.0; /*--- zero Dirichlet boundary conditions! ------*/ } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } static int solve(void *ud, int dim, const REAL *F, REAL *d) { NEWTON_DATA *data = (NEWTON_DATA *)ud; int iter; DOF_REAL_VEC dof_F = {nil, nil, "F"}; DOF_REAL_VEC dof_d = {nil, nil, "d"}; /*--------------------------------------------------------------------------*/ /* make DOF vectors from F and d */ /*--------------------------------------------------------------------------*/ dof_F.fe_space = dof_d.fe_space = data->fe_space; dof_F.size = dof_d.size = dim; dof_F.vec = (REAL *) F; /* cast needed ... */ dof_d.vec = d; iter = oem_solve_s(data->DF, &dof_F, &dof_d, data->solver, data->tolerance, data->icon, data->restart, data->max_iter, data->info); return(iter); } static REAL norm(void *ud, int dim, const REAL *v) { NEWTON_DATA *data = (NEWTON_DATA *)ud; DOF_REAL_VEC dof_v = {nil, nil, "v"}; dof_v.fe_space = data->fe_space; dof_v.size = dim; dof_v.vec = (REAL *) v; /* cast needed ... */ return(H1_norm_uh(nil, &dof_v)); } int nlsolve(DOF_REAL_VEC *u0, REAL k, REAL sigma, REAL (*f)(const REAL_D)) { FUNCNAME("nlsolve"); static NEWTON_DATA data = {nil, 0, 0, nil, nil, CG, 0, 500, 2, 10, 1}; static NLS_DATA nls_data = {nil}; int iter, dim = u0->fe_space->admin->size_used; if (!data.fe_space) { /*--------------------------------------------------------------------------*/ /*-- init parameters for newton ------------------------------------------*/ /*--------------------------------------------------------------------------*/ nls_data.update = update; nls_data.update_data = &data; nls_data.solve = solve; nls_data.solve_data = &data; nls_data.norm = norm; nls_data.norm_data = &data; nls_data.tolerance = 1.e-4; GET_PARAMETER(1, "newton tolerance", "%e", &nls_data.tolerance); nls_data.max_iter = 50; GET_PARAMETER(1, "newton max. iter", "%d", &nls_data.max_iter); nls_data.info = 8; GET_PARAMETER(1, "newton info", "%d", &nls_data.info); nls_data.restart = 0; GET_PARAMETER(1, "newton restart", "%d", &nls_data.restart); /*--------------------------------------------------------------------------*/ /*-- init data for update and solve --------------------------------------*/ /*--------------------------------------------------------------------------*/ data.fe_space = u0->fe_space; data.DF = get_dof_matrix("DF(v)", u0->fe_space, u0->fe_space); data.tolerance = 1.e-2*nls_data.tolerance; GET_PARAMETER(1, "linear solver tolerance", "%f", &data.tolerance); GET_PARAMETER(1, "linear solver max iteration", "%d", &data.max_iter); GET_PARAMETER(1, "linear solver info", "%d", &data.info); GET_PARAMETER(1, "linear solver precon", "%d", &data.icon); GET_PARAMETER(1, "linear solver restart", "%d", &data.restart); } TEST_EXIT(data.fe_space == u0->fe_space, "can't change f.e. spaces\n"); /*--------------------------------------------------------------------------*/ /*-- init problem dependent parameters -----------------------------------*/ /*--------------------------------------------------------------------------*/ data.k = k; data.sigma = sigma; data.f = f; /*--------------------------------------------------------------------------*/ /*-- enlarge workspace used by newton(_fs), and solve by Newton ----------*/ /*--------------------------------------------------------------------------*/ if (nls_data.restart) { nls_data.ws = REALLOC_WORKSPACE(nls_data.ws, 4*dim*sizeof(REAL)); iter = nls_newton_fs(&nls_data, dim, u0->vec); } else { nls_data.ws = REALLOC_WORKSPACE(nls_data.ws, 2*dim*sizeof(REAL)); iter = nls_newton(&nls_data, dim, u0->vec); } return(iter); } alberta-2.0.1/demo/src/Common/nonlin.c0000644000042300001440000002435110676730760014462 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: nonlin.c */ /* */ /* description: solver for an nonlinear elliptic model problem */ /* */ /* -k \Delta u + \sigma u^4 = f in \Omega */ /* u = g on \partial \Omega */ /* */ /* initialization of the fe_space, build, solver, and */ /* estimates routines for the ALBERTA adaptive methods */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "nonlin.h" /*--------------------------------------------------------------------------*/ /* global variables: finite element space, discrete solution */ /* and information about problem data */ /*--------------------------------------------------------------------------*/ static const FE_SPACE *fe_space; /* initialized by main() */ static DOF_REAL_VEC *u_h = nil; /* initialized by build() */ static const PROB_DATA *prob_data = nil; /* initialized by main() */ /*--------------------------------------------------------------------------*/ /* rw_el_est(): read and write access to error estimates in LEAF_DATA */ /* called by ellipt_est() in estimate() */ /*--------------------------------------------------------------------------*/ /* get_el_est(): reading of error estimates from LEAF_DATA */ /* called by adapt_method_stat() and graph_el_est() */ /*--------------------------------------------------------------------------*/ typedef struct leaf_dat { REAL est; } LEAF_DAT; static REAL *rw_el_est(EL *el) { FUNCNAME("rw_el_est"); if (IS_LEAF_EL(el)) return(&((LEAF_DAT *)LEAF_DATA(el))->est); else { ERROR("no leaf element\n"); return(nil); } } static REAL get_el_est(EL *el) { FUNCNAME("get_el_est"); if (IS_LEAF_EL(el)) return(((LEAF_DAT *)LEAF_DATA(el))->est); else { ERROR("no leaf element\n"); return(0.0); } } /*--------------------------------------------------------------------------*/ /* build(): compress the grid, access vector for discrete solution */ /* matrix and load vector are handled by nlsolve() */ /* called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static void build(MESH *mesh, U_CHAR flag) { FUNCNAME("build"); dof_compress(mesh); MSG("%d DOFs for %s\n", fe_space->admin->size_used, fe_space->name); if (!u_h) /* access and initialize discrete solution */ { u_h = get_dof_real_vec("u_h", fe_space); u_h->refine_interpol = fe_space->bas_fcts->real_refine_inter; u_h->coarse_restrict = fe_space->bas_fcts->real_coarse_inter; if (prob_data->u0) interpol(prob_data->u0, u_h); else dof_set(0.0, u_h); } dirichlet_bound(prob_data->g, u_h, nil, nil); /* set boundary values */ return; } /*--------------------------------------------------------------------------*/ /* solve(): solve the linear system */ /* called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static void solve(MESH *mesh) { nlsolve(u_h, prob_data->k, prob_data->sigma, prob_data->f); graphics(mesh, u_h, nil, prob_data->u); return; } /*--------------------------------------------------------------------------*/ /* estimate(): calculates error estimate via ellipt_est() */ /* calculates exact error also (only for test purpose) */ /* called by adapt_method_stat() */ /*--------------------------------------------------------------------------*/ static REAL r(const EL_INFO *el_info, const QUAD *quad, int iq, REAL uh_iq, const REAL_D grd_uh_iq) { REAL_D x; REAL uhx2 = SQR(uh_iq); coord_to_world(el_info, quad->lambda[iq], x); return(prob_data->sigma*uhx2*uhx2 - (*prob_data->f)(x)); } #define EOC(e,eo) log(eo/MAX(e,1.0e-15))/M_LN2 static REAL estimate(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("estimate"); static int degree, norm = -1; static REAL C[3] = {1.0, 1.0, 0.0}; static REAL est, est_old = -1.0, err = -1.0, err_old = -1.0; static FLAGS r_flag = INIT_UH; REAL_DD A = {{0.0}}; int n; const QUAD *quad; for (n = 0; n < DIM_OF_WORLD; n++) A[n][n] = prob_data->k; /* set diagonal of A; other elements are zero */ if (norm < 0) { norm = H1_NORM; GET_PARAMETER(1, "error norm", "%d", &norm); GET_PARAMETER(1, "estimator C0", "%f", C); GET_PARAMETER(1, "estimator C1", "%f", C+1); GET_PARAMETER(1, "estimator C2", "%f", C+2); } degree = 2*u_h->fe_space->bas_fcts->degree; est = ellipt_est(u_h, adapt, rw_el_est, nil, degree, norm, C, (const REAL_D *) A, r, r_flag); MSG("estimate = %.8le", est); if (est_old >= 0) print_msg(", EOC: %.2lf\n", EOC(est,est_old)); else print_msg("\n"); est_old = est; quad = get_quadrature(mesh->dim, degree); if (norm == L2_NORM && prob_data->u) err = L2_err(prob_data->u, u_h, quad, 0, nil, nil); else if (norm == H1_NORM && prob_data->grd_u) err = H1_err(prob_data->grd_u, u_h, quad, 0, nil, nil); if (err >= 0) { MSG("||u-uh||%s = %.8le", norm == L2_NORM ? "L2" : "H1", err); if (err_old >= 0) print_msg(", EOC: %.2lf\n", EOC(err,err_old)); else print_msg("\n"); err_old = err; MSG("||u-uh||%s/estimate = %.2lf\n", norm == L2_NORM ? "L2" : "H1", err/MAX(est,1.e-15)); } graphics(mesh, nil, get_el_est, nil); return(adapt->err_sum); } /*--------------------------------------------------------------------------*/ /* main program */ /*--------------------------------------------------------------------------*/ int main(int argc, char **argv) { FUNCNAME("main"); MESH *mesh = nil; const BAS_FCTS *lagrange; ADAPT_STAT *adapt; int k, dim, degree = 1, n_refine; /*--------------------------------------------------------------------------*/ /* first of all, init parameters from the init file and command line */ /*--------------------------------------------------------------------------*/ init_parameters(0, "INIT/nonlin.dat"); for (k = 1; k+1 < argc; k += 2) ADD_PARAMETER(0, argv[k], argv[k+1]); GET_PARAMETER(1, "global refinements", "%d", &n_refine); GET_PARAMETER(1, "polynomial degree", "%d", °ree); GET_PARAMETER(1, "mesh dimension", "%d", &dim); /*--------------------------------------------------------------------------*/ /* init problem dependent data and read macro triangulation */ /*--------------------------------------------------------------------------*/ prob_data = init_problem(mesh); /*--------------------------------------------------------------------------*/ /* get a mesh with DOFs and leaf data */ /*--------------------------------------------------------------------------*/ mesh = GET_MESH(dim,"Nonlinear problem mesh", prob_data->data, nil); free_macro_data(prob_data->data); init_leaf_data(mesh, sizeof(LEAF_DAT), nil, nil); lagrange = get_lagrange(mesh->dim, degree); TEST_EXIT(lagrange, "no lagrange BAS_FCTS\n"); fe_space = get_fe_space(mesh, lagrange->name, nil, lagrange, false); global_refine(mesh, n_refine*mesh->dim); /*--------------------------------------------------------------------------*/ /* init adapt struture and start adaptive method */ /*--------------------------------------------------------------------------*/ adapt = get_adapt_stat(dim, "nonlin", "adapt", 1, nil); adapt->estimate = estimate; adapt->get_el_est = get_el_est; adapt->build_after_coarsen = build; adapt->solve = solve; adapt_method_stat(mesh, adapt); WAIT_REALLY; return(0); } alberta-2.0.1/demo/src/Common/nonlin.h0000644000042300001440000001103010676724257014461 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: nonlin.h */ /* */ /* description: solver for an nonlinear elliptic model problem */ /* */ /* -k \Delta u + \sigma u^4 = f in \Omega */ /* u = g on \partial \Omega */ /* */ /* header file with definition of data structures and */ /* function definitions */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include /*--------------------------------------------------------------------------*/ /* structure for collecting data of the problem: */ /* k: consant heat conductivity */ /* sigma: Stefan--Bolzmann constant */ /* g: pointer to a function for evaluating boundary values */ /* f: pointer to a function for evaluating the right-hand side */ /* (heat source) */ /* u0: if not nil, pointer to a function for evaluating an initial */ /* guess for the discrete solution on the macro triangulation */ /* u: if not nil, pointer to a function for evaluating the true */ /* solution (only for test purpose) */ /* grd_u: if not nil, pointer to a function for evaluating the gradient */ /* of the true solution (only for test purpose) */ /*--------------------------------------------------------------------------*/ typedef struct prob_data PROB_DATA; struct prob_data { MACRO_DATA *data; REAL k, sigma; REAL (*g)(const REAL_D x); REAL (*f)(const REAL_D x); REAL (*u0)(const REAL_D x); REAL (*u)(const REAL_D x); const REAL *(*grd_u)(const REAL_D x, REAL_D input); }; /*--- file nlprob.c --------------------------------------------------------*/ const PROB_DATA *init_problem(MESH *mesh); /*--- file nlsolve.c -------------------------------------------------------*/ int nlsolve(DOF_REAL_VEC *, REAL, REAL, REAL (*)(const REAL_D)); /*--- file graphics.c ------------------------------------------------------*/ void graphics(MESH *, DOF_REAL_VEC *, REAL (*)(EL *), REAL (*)(const REAL_D)); alberta-2.0.1/demo/AUTHORS0000644000042300001440000000114110676724257012046 00000000000000ALBERTA: an Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. Authors of Demo package for ALBERTA: Alfred Schmidt Zentrum fuer Technomathematik Fachbereich 3 Mathematik/Informatik Universitaet Bremen Bibliothekstr. 2 D-28359 Bremen, Germany Kunibert G. Siebert Institut fuer Mathematik Universitaet Augsburg Universitaetsstr. 14 D-86159 Augsburg, Germany http://www.mathematik.uni-freiburg.de/IAM/ALBERTA (c) by A. Schmidt and K.G. Siebert (1996-2003) alberta-2.0.1/demo/COPYING0000644000042300001440000010451311067145732012026 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . alberta-2.0.1/demo/ChangeLog0000644000042300001440000000056310676723605012553 000000000000002000-05-05 Kunibert G. Siebert * using CVS for version control * using autoconfig 2001-05-03 Kunibert G. Siebert * added 1d directory * changed Makefiles to use virtual path * removed symbolic links 2003-07-09 Kunibert G. Siebert * renamed macro triangulation files * adapted to version 1.2 of ALBERTA * adjusted all parameter files alberta-2.0.1/demo/INSTALL0000644000042300001440000000066310676723605012033 00000000000000ALBERTA: an Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. This is the demo package for ALBERTA-1.2 with the implementation of the model problems described in Chapter 2 of the book ALBERTA: An Adaptive Finite Element Toolbox For creating the executables, go to src/1d, src/2d, or src/3d and run the command make. alberta-2.0.1/demo/NEWS0000644000042300001440000000000010676723605011462 00000000000000alberta-2.0.1/demo/README0000644000042300001440000000060610676724257011663 00000000000000ALBERTA: an Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. This is the demo package for ALBERTA-1.2 with the implementation of the model problems described in Chapter 2 of the book ALBERTA: An Adaptive Finite Element Toolbox For installation instructions see INSTALL. alberta-2.0.1/demo/THANKS0000644000042300001440000000000010676723605011676 00000000000000alberta-2.0.1/m4/0000777000042300001440000000000011067147341010445 500000000000000alberta-2.0.1/m4/alberta-dims.m40000644000042300001440000000101110676732532013167 00000000000000# # disable building of $1_library (dimension) # # # NOTE: it is a bad idea to remove the unneeded Makefiles from the # config-files, it breaks "make distclean" # AC_DEFUN([ALBERTA_DIMENSION_DISABLE], [ALBERTA_ENABLE_FLAG([alberta-$1], [disable building of an ALBERTA library for Finite Elements of dimension $1.], 1) dnl if test "$ALBERTA_$1$1" -eq 1; then AC_CONFIG_FILES([alberta/src/alberta_$1d/Makefile]) dnl if test "$DEBUG" -eq 1; then AC_CONFIG_FILES([alberta/src/alberta_$1d_debug/Makefile]) dnl fi dnl fi ]) alberta-2.0.1/m4/check-package.m40000644000042300001440000001712310676723572013310 00000000000000dnl ALBERTA_CHECK_PACKAGE() dnl dnl Check for a library + header files dnl dnl Arguments: dnl dnl $1: symbolic name (fancy) dnl $2: library name (base name, lib$2[.so|.a] dnl $3: library path (-L$3) dnl $4: additional libraries needed (e.g. -lm -lGL) dnl $5: header name dnl $6: include path (-I$6) dnl $7: package prefix, headers and library below $7/ dnl $8 \in \{optional, required\}, bail out if required, warning otherwise dnl dnl Default is to check for libraries below $prefix/lib/ and for header-files dnl below $prefix/include/ dnl dnl $5 may be empty (e.g. to check for a Fortran library). In this case dnl $6 is ignored dnl dnl $7 may be empty, actually the idea to install libraries and dnl headers in the same directory is a little bit awkward. dnl dnl This Macro defines the following variables: dnl dnl Makefile-substitution dnl dnl $1_INCLUDE_PATH dnl $1_LIB_PATH dnl $1_INCLUDE dnl $1_LIB linker flags excluding $4 dnl $1_ALL_LIB linker flags including $4 dnl dnl config.h preprocessor macros dnl dnl HAVE_LIB$2 dnl HAVE_$5_H dnl dnl dnl Helper-macros dnl dnl dnl ALBERTA_CHECK_PKG_OPT(PKGNAME) dnl AC_DEFUN([ALBERTA_CHECK_PKG_OPT], [m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)]) AC_ARG_WITH($1, AC_HELP_STRING([--without-$1], [disable use of package $1 (default: autodetect)]), [case "$withval" in yes) ;; no) UPNAME[_DISABLE]=yes AC_MSG_RESULT([Disabling "$1"]) ;; *) AC_MSG_ERROR(["$withval" should have been either "yes" or "no"]) ;; esac], [UPNAME[_DISABLE]=no]) ]) dnl dnl ALBERTA_CHECK_PKG_HDR_OPT(PKGNAME, INCLUDEPATH) dnl AC_DEFUN([ALBERTA_CHECK_PKG_HDR_OPT], [m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)]) AC_ARG_WITH($1-headers, m4_if($2,[], [AC_HELP_STRING([--with-$1-headers=DIR], [use $1 include files below directory DIR (default: PREFIX/include/)])], [AC_HELP_STRING([--with-$1-headers=DIR], [use $1 include files below directory DIR (default: $2)])]), [case "$withval" in yes) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument") ;; no) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument") ;; *) UPNAME[_INCLUDE_PATH]=$withval ;; esac], test -z "${UPNAME[_INCLUDE_PATH]}" && UPNAME[_INCLUDE_PATH]=$DEFAULT_INCDIR) ]) dnl dnl headers and libraries below the same directory :( dnl AC_DEFUN([ALBERTA_CHECK_PKG_DIR_OPT], [m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)]) AC_ARG_WITH($1-dir, AC_HELP_STRING([--with-$1-dir=DIR], [use $1 library (and headers) below directory DIR (no default)]), [case "$withval" in yes) AC_MSG_ERROR("option \"--with-$1-dir\" requires an argument") ;; no) AC_MSG_ERROR("option \"--with-$1-dir\" requires an argument") ;; *) UPNAME[_LIB_PATH]=$withval UPNAME[_INCLUDE_PATH]=$withval ;; esac]) ]) dnl dnl the macro itself dnl AC_DEFUN([ALBERTA_CHECK_PACKAGE], [AC_REQUIRE([ALBERTA_SET_PREFIX]) m4_if($#, 8,,[ errprint([$0] needs EXACTLY eight (8) arguments, but got $# ) m4exit(1)]) dnl dnl upcase $1 dnl m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)]) dnl dnl need to use m4_if, the $i arguments are not shell variables dnl m4_if($8, optional,[ALBERTA_CHECK_PKG_OPT([$1])]) dnl dnl bail out if package is completely disabled dnl if test "${UPNAME[_DISABLE]}" = yes; then : else m4_if($3,[],[DEFAULT_LIBDIR=`eval eval echo ${libdir}`], [DEFAULT_LIBDIR=$3]) dnl dnl Optionally use an alternate name (e.g. MesaGL instead of GL etc.) dnl AC_ARG_WITH($1-name, AC_HELP_STRING([--with-$1-name=NAME], [use NAME as the name of the $1 library (without leading "lib" prefix and trailing suffix). Default: "$2"]), [case "$withval" in yes) AC_MSG_ERROR("option \"--with-$1-name\" requires an argument") ;; no) AC_MSG_ERROR("option \"--with-$1-name\" requires an argument") ;; *) UPNAME[_NAME]=$withval ;; esac], UPNAME[_NAME]=$2) dnl dnl headers and libraries below the same directory :( dnl m4_if($5,[],[],[ALBERTA_CHECK_PKG_DIR_OPT([$1])]) dnl dnl location of library dnl AC_ARG_WITH($1-lib, m4_if($3,[], [AC_HELP_STRING([--with-$1-lib=DIR], [use $1 library below directory DIR (default: EPREFIX/lib/)])], [AC_HELP_STRING([--with-$1-lib=DIR], [use $1 library below directory DIR (default: $3)])]), [case "$withval" in yes) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument") ;; no) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument") ;; *) UPNAME[_LIB_PATH]=$withval ;; esac], test -z "${UPNAME[_LIB_PATH]}" && UPNAME[_LIB_PATH]=$DEFAULT_LIBDIR) dnl dnl now for the header file dnl m4_if($5,[],[], [m4_if($6,[],[DEFAULT_INCDIR=`eval eval echo ${includedir}`], [DEFAULT_INCDIR=$6]) ALBERTA_CHECK_PKG_HDR_OPT([$1], [PREFIX/include/])]) dnl dnl now check if the library and header files exist dnl m4_if($8,[optional], [AC_CHECK_LIB(${UPNAME[_NAME]}, main, [UPNAME[_LIB]="-L${UPNAME[_LIB_PATH]} -l${UPNAME[_NAME]}" UPNAME[_ALL_LIB]="-L${UPNAME[_LIB_PATH]} -l${UPNAME[_NAME]} $4"], [UPNAME[_LIB]="" UPNAME[_ALL_LIB]="" UPNAME[_LIB_PATH]="" UPNAME[_INCLUDE]="" UPNAME[_INCLUDE_PATH]=""], -L${UPNAME[_LIB_PATH]} $4)], [AC_CHECK_LIB(${UPNAME[_NAME]}, main, [UPNAME[_LIB]="-L${UPNAME[_LIB_PATH]} -l${UPNAME[_NAME]}" UPNAME[_ALL_LIB]="-L${UPNAME[_LIB_PATH]} -l${UPNAME[_NAME]} $4"], [case "$host" in *darwin*) AC_MSG_RESULT([Running the test for "$1" again with -framework switch]) ;; *) AC_MSG_ERROR([Library "lib${UPNAME[_NAME]}" was not found]) ;; esac], -L$UPNAME[_LIB_PATH] $4)]) dnl dnl On MacOS X we have that funky -framework switch ... dnl So just run the test again with the framework switch in case the dnl package was not found. dnl if test "x${UPNAME[_LIB]}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${UPNAME[_NAME]}___main" m4_if($8,[optional], [AC_CHECK_FRAMEWORK(${UPNAME[_NAME]}, main, [UPNAME[_LIB]="-F${UPNAME[_LIB_PATH]} -framework ${UPNAME[_NAME]}" UPNAME[_ALL_LIB]="-F${UPNAME[_LIB_PATH]} -framework ${UPNAME[_NAME]} $4"], [UPNAME[_LIB]="" UPNAME[_ALL_LIB]="" UPNAME[_LIB_PATH]="" UPNAME[_INCLUDE]="" UPNAME[_INCLUDE_PATH]=""], -F${UPNAME[_LIB_PATH]} $4)], [AC_CHECK_FRAMEWORK(${UPNAME[_NAME]}, main, [UPNAME[_LIB]="-F${UPNAME[_LIB_PATH]} -framework ${UPNAME[_NAME]}" UPNAME[_ALL_LIB]="-F${UPNAME[_LIB_PATH]} -framework ${UPNAME[_NAME]} $4"], [AC_MSG_ERROR([Framework "${UPNAME[_NAME]}" was not found])], -F$UPNAME[_LIB_PATH] $4)]) ;; esac fi if test "x${UPNAME[_LIB]}" = "x" ; then : else m4_if($5,[],,[ dnl dnl check for the header file dnl [ac_]UPNAME[_save_CPPFLAGS]="$CPPFLAGS" CPPFLAGS="-I${UPNAME[_INCLUDE_PATH]} $CPPFLAGS" m4_if($8,[optional], [AC_CHECK_HEADERS($5,, [UPNAME[_LIB]="" UPNAME[_ALL_LIB]="" UPNAME[_INCLUDE]="" UPNAME[_LIB_PATH]="" UPNAME[_INCLUDE_PATH]=""])], [AC_CHECK_HEADERS($5,, AC_MSG_ERROR([Header file "$5" was not found]))]) dnl dnl no need to use -I... if header is located in standard include path dnl if ! test -f "${UPNAME[_INCLUDE_PATH]}/$5"; then UPNAME[_INCLUDE]="" fi CPPCLAGS="${[ac_]UPNAME[_save_CPPFLAGS]}" ]) dnl dnl define makefile substitutions and config.h macros dnl if test "x${UPNAME[_LIB]}" = "x" ; then : else AC_DEFINE(m4_bpatsubst(m4_toupper([HAVE_LIB$2]),-,_), 1, Define to 1 if you have lib$2) fi fi fi dnl disable fi AM_CONDITIONAL([HAVE_]UPNAME, [test -n "$[]UPNAME[_LIB]"]) AC_SUBST(UPNAME[_INCLUDE_PATH]) AC_SUBST(UPNAME[_LIB_PATH]) AC_SUBST(UPNAME[_INCLUDE]) AC_SUBST(UPNAME[_LIB]) AC_SUBST(UPNAME[_ALL_LIB]) AC_SUBST(UPNAME[_NAME]) ]) alberta-2.0.1/m4/frameworks.m40000644000042300001440000000567710676723572013035 00000000000000# AC_SEARCH_FRAMEWORKS(FUNCTION, SEARCH-FRAMEWORKS, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [OTHER-LIBRARIES]) # -------------------------------------------------------- # Search for a library defining FUNC, if it's not already available. AC_DEFUN([AC_SEARCH_FRAMEWORKS], [AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], [ac_func_search_save_LIBS=$LIBS ac_cv_search_$1=no AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [ac_cv_search_$1="none required"]) if test "$ac_cv_search_$1" = no; then for ac_lib in $2; do LIBS="-framework $ac_lib $5 $ac_func_search_save_LIBS" AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [ac_cv_search_$1="-framework $ac_lib" break]) done fi LIBS=$ac_func_search_save_LIBS]) AS_IF([test "$ac_cv_search_$1" != no], [test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" $3], [$4])dnl ]) # AC_CHECK_LIB(LIBRARY, FUNCTION, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [OTHER-LIBRARIES]) # ------------------------------------------------------ # # Use a cache variable name containing both the library and function name, # because the test really is for library $1 defining function $2, not # just for library $1. Separate tests with the same $1 and different $2s # may have different results. # # Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2]) # is asking for troubles, since AC_CHECK_LIB($lib, fun) would give # ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence # the AS_LITERAL_IF indirection. # # FIXME: This macro is extremely suspicious. It DEFINEs unconditionally, # whatever the FUNCTION, in addition to not being a *S macro. Note # that the cache does depend upon the function we are looking for. # # It is on purpose we used `ac_check_lib_save_LIBS' and not just # `ac_save_LIBS': there are many macros which don't want to see `LIBS' # changed but still want to use AC_CHECK_LIB, so they save `LIBS'. # And ``ac_save_LIBS' is too tempting a name, so let's leave them some # freedom. AC_DEFUN([AC_CHECK_FRAMEWORK], [m4_ifval([$3], , [AH_CHECK_FRAMEWORK([$1])])dnl AS_LITERAL_IF([$1], [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])], [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl AC_CACHE_CHECK([for $2 in -framework $1], ac_Lib, [ac_check_lib_save_LIBS=$LIBS LIBS="-framework $1 $5 $LIBS" AC_LINK_IFELSE([AC_LANG_CALL([], [$2])], [AS_VAR_SET(ac_Lib, yes)], [AS_VAR_SET(ac_Lib, no)]) LIBS=$ac_check_lib_save_LIBS]) AS_IF([test AS_VAR_GET(ac_Lib) = yes], [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) LIBS="-framework $1 $LIBS" ])], [$4])dnl AS_VAR_POPDEF([ac_Lib])dnl ])# AC_CHECK_FRAMEWORK # AH_CHECK_FRAMEWORK(LIBNAME) # --------------------- m4_define([AH_CHECK_FRAMEWORK], [AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1), [Define to 1 if you have the `]$1[' library (-framework ]$1[).])]) alberta-2.0.1/m4/grapeiface.m40000644000042300001440000000224310676732744012726 00000000000000AC_DEFUN([ALBERTA_GRAPE_STUFF],[ dnl dnl Some defines to enable building of alberta_movi. This is more dnl complicated than necessary so that it is easier to build a dnl stand-alone version of albert_movi. dnl ALBERTA_CHECK_PACKAGE(grape, gr, , ${OPENGL_LIB} ${X_ALL_LIBS}, grape.h,,, optional) AM_CONDITIONAL(GRAPE, test -n "${GRAPE_LIB}") ALBERTA_LIB_PATH=$prefix/lib ALBERTA_INCLUDE_PATH='$(top_srcdir)/alberta/src/Common/ -I$(top_srcdir)/alberta_util/src/ -I$(top_builddir)/alberta_util/src/' ALBERTA_LIBS_1='$(top_builddir)/alberta/src/alberta_1d/libalberta_1d.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_LIBS_2='$(top_builddir)/alberta/src/alberta_2d/libalberta_2d.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_LIBS_3='$(top_builddir)/alberta/src/alberta_3d/libalberta_3d.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_DEBUG= AC_SUBST(ALBERTA_DEBUG) AC_SUBST(ALBERTA_LIB_PATH) AC_SUBST(ALBERTA_INCLUDE_PATH) AC_SUBST(ALBERTA_LIBS_1) AC_SUBST(ALBERTA_LIBS_2) AC_SUBST(ALBERTA_LIBS_3) dnl dnl end of alberta_movi dnl ])alberta-2.0.1/m4/set-prefix.m40000644000042300001440000000065410676723572012731 00000000000000dnl set prefix to its proper value, so that one can define substitutions dnl depending on the value of prefix AC_DEFUN([ALBERTA_SET_PREFIX], [test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' expanded_prefix=`eval echo ${prefix}` AC_SUBST(expanded_prefix) expanded_exec_prefix=`eval echo ${exec_prefix}` AC_SUBST(expanded_exec_prefix) ]) alberta-2.0.1/m4/simple-enable-flag.m40000644000042300001440000000210110676723572014254 00000000000000# # $1: name of the enable-switch (e.g. el-index) # $2: help string # $3: one of {0,1}, default value # # _OR_ # # $1: name of the enable/disable option # $2: help string # $3: default value # $4: name of the preprocessor/Makefile/shell variable # # Results: declare proper AC_ARG_ENABLE(), define make-file # subsitution (e.g. EL_INDEX), define automake conditional # (e.g. EL_INDEX). # AC_DEFUN([ALBERTA_ENABLE_FLAG], [m4_if($#,3, [m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])], [m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$4]),-,_)])]) m4_if([$3],[1], [m4_define([NEGDEFAULT],[disable]) m4_define([DEFAULT],[enabled])], [m4_define([NEGDEFAULT],[enable]) m4_define([DEFAULT],[disabled])]) AC_ARG_ENABLE($1, AC_HELP_STRING(--[]NEGDEFAULT[]-$1, [$2 (default: DEFAULT)]), [case "$enableval" in yes) FLAGNAME=1 ;; no) FLAGNAME=0 ;; *) AC_MSG_ERROR(["--[]NEGDEFAULT[]-$1" does not take an argument.]) ;; esac], [FLAGNAME=$3]) AC_SUBST(FLAGNAME) AM_CONDITIONAL(FLAGNAME, [test "$[]FLAGNAME" -eq 1]) ]) alberta-2.0.1/README0000644000042300001440000005011110701404611010705 00000000000000 is an Adaptive multi-Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. ------------------------------------------------------------------------------- Contents ======== I. Introduction II. External Packages (both required and optional packages) 1.) Required Packages OpenGL BLAS (with examples) 2.) Optional Packages gltools GRAPE Silo Open DX alternate compilers III. Configure Options 1.) Non-standard behaviour of ALBERTA 2.) Options affecting which versions of ALBERTA are built 3.) Options controlling the search-path for external libraries IV. Compiler flags (with examples) V. Some platform dependent notes and examples ------------------------------------------------------------------------------- I) Introduction =============== This is ALBERTA Version 2.0. Generic installation instructions can be found in the file `INSTALL' in this directory. ALBERTA has a web-page at http://www.alberta-fem.de/ Please see the file `COPYING' for information about the availability of ALBERTA. The directory layout Contained in the package are the following sub-packages: __________ alberta/ __________ src/ _______|--- 1d/ / \ |--- 2d/ / -- doc/ |--- 3d/ / |--- Common/ /_____________ demo/ __ src/ _______|--- 1d/ |--- alberta*/ alberta-2.0 / |--- 2d/ \ |--- 3d/ \ |--- Common/ \ \__________ alberta_util/ ___ src/ \ \ \_______ add_ons/ ---- grape/ __ mesh/ ____|--- 2d/ \ \ |--- 3d/ \ \ |--- Common/ \ \ \___ - meshtv/ ___|--- 1d/ \ |--- 2d/ \ |--- 3d/ \ |--- Common/ \ \_ configure.ac and other distribution files 1) alberta The main package. 2) demo The sub-directory demo/ contains a few demonstration programs. After running "make install" (see file ./INSTALL) a tar-ball containing all demo programs will be installed in PREFIX/share/alberta/. The tar-ball can be extracted elsewhere; the make-files contained in the tar-ball have apropriate defaults for the location of the (installed) ALBERTA libraries and header files. 3) alberta_util This package contains the old ALBERTA util.c file, now split into several smaller source files. As of version 2.0 it also contains the former SOLVER library. It is compiled to form a separate utility library (message macros, ALBERTA memory allocation routines, BLAS routines and wrappers, etc.) and should linked to any program using the ALBERTA package. It can also be used as a standalone utility library. 4) grape GRAPE interface for ALBERTA. Only for non-parametric FE of dimension 2 and 3. The GRAPE-interface consists of "make" will create "alberta_grapeXX" and alberta_moviXX" where XX is in {22, 33}. "make install" will install those programs below PREFIX/bin. The GRAPE interface is only installed when the GRAPE library and header file are available on your system (determined at configure time, use "configure --help" for appropriate command line switches for "configure"). 5) meshtv MeshTV interface for ALBERTA. Only for non-parametric FE. The MeshTV interface consists of the programs "alberta_meshtvX" with X in {1,2,3}. These are installed in PREFIX/bin as well. The interface is only installed if the Silo library and header files are available on your system. See "configure --help" for details. II) External packages ===================== 1) Required Packages -------------------- The software-packages mentioned here are mandatory. You will not be able to compile and use ALBERTA without them. The configure-script will attempt to detect them at build-time (see "Configure Options" below). OpenGL -- you need some implementation of SGI's 3D-API. If your system does not have OpenGL you can fetch the free OpenGL implementation "MesaGL" from http://www.mesa3d.org/ If you don't have a clue what this is all about then ask your system-administrator. BLAS -- "Basic Linear Algebra Subprograms" You definitely need some version of the BLAS. Often the BLAS can be found at "/usr/lib/libblas.a", but this need not be the case. You should have a look at http://www.netlib.org/blas/faq.html which lists some URLs to optimized BLAS-implementations for some architectures. For an optimized version for AMD's Athlon and Opteron CPUs you should have a look at AMD's web-site (www.amd.com) and search for "acml". Compiler dependence ------------------- In general, you need a version of the BLAS which was compiled by the Fortran compiler you are using to compile (parts of) the ALBERTA package. Sometimes it is possible to get around this restriction by linking in additional libraries, as shown in some of the platform dependent examples listed below. 2) Optional Packages -------------------- The software-packages mentioned here are not required to compile and use ALBERTA. They are detected by the configure-script at build-time and are used when available (see "Configure Options" below). gltools -- OpenGL toolkit We strongly recommend that you install the gltools package; you can fetch it from http://www.wias-berlin.de/software/gltools/ gltools provides a more flexible graphical output than would be otherwise available with ALBERTA. NOTE: you need at least gltools-2-4. Version 2-3 will _not_ work. "configure" does not check for right version, it's up to yourself. dxtools -- Open DX toolkit The dxtools are an interface to the Open DX visualization software. It may be downloaded from http://www.opendx.org/ The visualization features are far more advanced than gltools, however Open DX is a huge project that takes time getting used to. The dxtools interface was designed to keep things simple and intuitive. GRAPE -- Graphics Programming Environment If GRAPE is present, the four programs alberta_grape22, alberta_grape33, alberta_movi22 and alberta_movi33 are compiled and installed in PREFIX/bin/. They can be used to display data-files created by ALBERTA during your numerical simulations. GRAPE is available from http://www.mathematik.uni-freiburg.de/IAM/Research/grape/GENERAL/ Silo -- Silo is a library developed at the Lawrence Livermore National Laboratory to handle portable storage of mesh and function data. It serves as an interface to MeshTV, an open source visualization project also based at the LLNL. If the Silo library is present, the programs alberta_meshtv? are compiled and installed. They can be used to convert ALBERTA meshes and DOF_REAL[_D]_VECS to Silo data files, which can then be visualized using the MeshTV binary. MeshTV and Silo are available from http://www.llnl.gov/bdiv/meshtv/ alternate compilers Many CPU-vendors distribute highly optimizing compilers for their specific CPU architecture. Often those compilers generate much faster code than even a modern gcc. Sometimes they are available at no costs, at least for private and academical use. III) Configure Options ====================== "configure --help" will give you a summary of available options. The file "INSTALL" contains generic configuration instructions and a description of generic command line options for configure. The remaining (i.e. ALBERTA specific) options are explained here: 1.) Non-standard behaviour of ALBERTA ------------------------------------- BIG FAT NOTE: the _default_ installation prefix of the ALBERTA-package is _NOT_ the default GNU installation prefix which would be /usr/local/ on Un*x systems, but it is the build-directory. Of course, you can change the default behavior by using the "--prefix=PREFIX" switch when running configure (see ./INSTALL). However, the default layout is like follows: When compiling ALBERTA below /usr/people/claus/alberta-2.0/ then the libraries will go to /usr/people/claus/alberta-2.0/lib/ the header-files and Makefile.alberta will end up in /usr/people/claus/alberta-2.0/include/ libtool.alberta will reside in /usr/people/claus/alberta-1.2/libexec/ and finally the demo package (under the name alberta-1.2.demo.tar.gz) will be copied to /usr/people/claus/alberta-2.0/share/alberta This will be the layout after running "make install". 2.) Options affecting which versions of ALBERTA are built --------------------------------------------------------- Compiling all flavours of the ALBERTA libraries takes a long time. The ALBERTA libraries are all named libalberta_d[_debug] The options below control which of them are actually created. --disable-alberta-1 Disable building of an ALBERTA library for Finite Elements of dimension 1. (default: enabled) --disable-alberta-2 Disable building of an ALBERTA library for Finite Elements of dimension 2. (default: enabled) --disable-alberta-3 Disable building of an ALBERTA library for Finite Elements of dimension 3. (default: enabled) --disable-debug Disable building of ALBERTA libraries with debugging information. On some systems (or better: with some compilers) optimization and debugging are mutual exclusive, therefore there are separate ALBERTA libraries which are compiled with optimization, but without debugging information, and other versions which are compiled without optimization, but with debugging. (default: enabled) 3.) Options controlling the search-path for external libraries -------------------------------------------------------------- See also "External Packages" above. For each external package PKG the configure script provides the following options: --without-PKG Prohibit the use of this package, even if it is installed on your system. --with-PKG-name=NAME Alter the default name of the package, e.g. "--with-opengl-name=MesaGL" or "--with-blas-name=cxml". NOTE: it is possible to specify more than one library. For example on (some versions of?) Solaris the BLAS-library is called "libsunperf.so". If you want to link with this library using gcc and g77, then you need to specify "--with-blas-name=sunperf -lfui -lfsu -lsunmath" Note the "-l" in front of the additional libraries. (of course, in addition to --with-blas-name you also need --with-blas-lib=WHATEVER) --with-PKG-dir=DIR Search for header-files and for the library itself below DIR, e.g. "--with-gltools-dir=/foo/bar/gltools-2.4". --with-PKG-lib=DIR Search for the library below DIR, e.g. "--with-blas-lib=/usr/people/claus/software/lib/". --with-PKG-headers=DIR Use DIR as search-path for the include-files for PKG, e.g. "--with-opengl-include=/usr/people/claus/software/include/". The following quotes the relevant fragment of the online-help obtained by running "configure --help". Please see the file ./INSTALL for the notation (e.g. PREFIX, EPREFIX etc.). --with-blas-name=NAME use NAME as the name of the blas library (without leading "lib" prefix and trailing suffix). Default: "blas" --with-blas-lib=DIR use blas library below directory DIR (default: EPREFIX/lib/) --with-opengl-name=NAME use NAME as the name of the opengl library (without leading "lib" prefix and trailing suffix). Default: "GL" --with-opengl-dir=DIR use opengl library (and headers) below directory DIR (no default) --with-opengl-lib=DIR use opengl library below directory DIR (default: EPREFIX/lib/) --with-opengl-headers=DIR use opengl include files below directory DIR (default: PREFIX/include/) --without-gltools disable use of package gltools (default: autodetect) --with-gltools-name=NAME use NAME as the name of the gltools library (without leading "lib" prefix and trailing suffix). Default: "gltools" --with-gltools-dir=DIR use gltools library (and headers) below directory DIR (no default) --with-gltools-lib=DIR use gltools library below directory DIR (default: EPREFIX/lib/) --with-gltools-headers=DIR use gltools include files below directory DIR (default: PREFIX/include/) --without-dx disable use of package dx (default: autodetect) --with-dx-name=NAME use NAME as the name of the dx library (without leading "lib" prefix and trailing suffix). Default: "dx" --with-dx-dir=DIR use dx library (and headers) below directory DIR (no default) --with-dx-lib=DIR use dx library below directory DIR (default: EPREFIX/lib/) --with-dx-headers=DIR use dx include files below directory DIR (default: PREFIX/include/) --without-grape disable use of package grape (default: autodetect) --with-grape-name=NAME use NAME as the name of the grape library (without leading "lib" prefix and trailing suffix). Default: "gr" --with-grape-dir=DIR use grape library (and headers) below directory DIR (no default) --with-grape-lib=DIR use grape library below directory DIR (default: PREFIX/lib/) --with-grape-headers=DIR use grape include files below directory DIR (default: PREFIX/include/) --with-silo-dir=DIR use Silo library (and headers) below directory DIR (no default) --with-silo-lib=DIR use Silo library below directory DIR (default: PREFIX/lib/) --with-silo-headers=DIR use Silo include files below directory DIR (default: PREFIX/include/) IV. Compiler flags ================== The default flags for the optimized libraries are "-O3" when using gcc and "-O" otherwise. The default flags for the debugging-enabled libraries are "-O0 -ggdb -fno-inline -fno-builtin" with gcc and "-g" otherwise. The relevant environment- respectively make-variables are CFLAGS C-compiler flags used for _both_, optimized and debug enabled libraries ALBERTA_OPTIMIZE_CFLAGS C-compiler flags used fo the optimized library. They are prepended to the CFLAGS variable. ALBERTA_DEBUG_CFLAGS C-compiler flags used fo the debug enabled library. They are prepended to the CFLAGS variable. FFLAGS Fortran-compiler flags. They are separated from the CFLAGS because in general the Fortran compiler can come from a different vendor than the C-compiler in which case the flags understood by the Fortran compiler are different from the flags understood by the C-compiler. You have to consult the documentation for the compiler(s) you are using to determine the appropriate switches for your setup. There are three ways to set those flags: a.) arguments to configure b.) environment variables (have to be defined _before_ running configure) c.) arguments to make We recommend using a.). Examples: --------- 1.) gcc with a Pentium 4 ./configure [OTHER OPTIONS] \ CFLAGS="-march=pentium4 -mfpmath=sse" \ FFLAGS="-march=pentium4 -mfpmath=sse" make make install or (assuming a Bourne-shell) CFLAGS="-march=pentium4 -mfpmath=sse" FFLAGS="-march=pentium4 -mfpmath=sse" export CFLAGS FFLAGS ./configure [OTHER OPTIONS] make make install or ./configure [OTHER OPTIONS] make CFLAGS="-march=pentium4 -mfpmath=sse" \ FFLAGS="-march=pentium4 -mfpmath=sse" make install 2.) Pentium 4 with icc and with Intel "math kernel library" (BLAS implementation) ./configure [OTHER OPTIONS] \ CC=icc CFLAGS="-xW" ALBERTA_OPTIMIZE_CFLAGS="-O3" \ ALBERTA_DEBUG_CFLAGS="-O0 -g" \ F77=ifc FFLAGS="-xW -O3" \ --with-blas-name=mkl --with-blas-lib=/opt/intel/mkl61/lib/32/ make make install or set environment variables or use arguments to "make" as shown in example 1.) V. Some platform dependent notes and examples ============================================= 0) Compilation under SuSE Linux: -------------------------------- a) SuSE 9.2: We used MesaGL and a BLAS lib included in our distribution. If MesaGL is not found, "configure" will also try "GL". The alberta_util lib needed "-lg2c" to process FORTRAN code properly. b) SuSE 10.0: More trouble with the FORTRAN compiler. Try running F77=gfortran ../configure 1) Compilation under Fedora Core -------------------------------- a) Install the following packages (and dependencies) xorg-x11-devel blas gcc-gfortran This can be done with the command (as root): # yum -y install xorg-x11-devel blas gcc-gfortran You will also need the packages make, gcc which usually come by default if you have a "workstation" installation. b) install gltools (everything as root): # cd /usr/local # tar vxfz /path/to/gltools-2-4.tar.gz # cd gltools-2-4 edit the Makefile change the line LIBRARY_PATH=-L/usr/X11/lib to LIBRARY_PATH=-L/usr/X11R6/lib 2) Compilation under Ubuntu/Xubuntu/Kubuntu ------------------------------------------- a) Install the following packages (and dependencies) make gcc g77 mesa-common-dev libc6-dev libx11-dev libxext-dev atlas3-sse2-dev This can be done with the command: sudo apt-get install make gcc g77 mesa-common-dev libc6-dev libx11-dev\ libxext-dev atlas3-sse2-dev b) Install gltools cd /usr/local sudo tar vxfz /path/to/gltools-2-4.tar.gz cd gltools-2-4 edit the Makefile change the line LIBRARY_PATH=-L/usr/X11/lib to LIBRARY_PATH=-L/usr/lib sudo make 3) Intel's "math core library" libmkl: -------------------------------------- Make sure to also link with libguide, this can be achieved by the following configure switches: --with-blas-lib=/opt/intel/mkl61/lib/32/ --with-blas-name="mkl -lguide" You also need to set the LD_LIBRARY_PATH variable appropriately: export LD_LIBRARY_PATH=/opt/intel/mkl61/lib/32 or setenv LD_LIBRARY_PATH /opt/intel/mkl61/lib/32 4) g77-compiled libblas on Linux, but Intel's ifc compiler for ALBERTA ------------------------------------------------------------------- NOTE: this probably doesn't make to much sense, but you can try the following --with-blas-name="blas -lg2c" 5) SunOS (Solaris), using libsunperf: ---------------------------------- Find out about the location of libsunperf, then using Sun's f77 compiler you need the following switches: --with-blas-lib=LOCATION --with-blas-name=sunperf However, with gcc the following might work: --with-blas-lib=LOCATION --with-blas-name="sunperf -lfui -lfsu -lsunmath" 6) Alpha AXP with Compaq's extended math-library libcxml: ------------------------------------------------------ The following might work (UNTESTED!!!) --with-blas-lib=LOCATION --with-blas-name="cxml -lcpml" 7) MAC OS X using the Accelerate library: -------------------------------------- The following switch has been reported to work: --with-blas-name=Accelerate The following location was used for the OpenGL library: --with-opengl-lib=/usr/X11R6/lib --with-opengl-headers=/usr/X11R6/include ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PLEASE LEAVE HERE FOR ISPELL: LocalWords: src alberta UTIL ac in's installdir util gltools FE grapeXX SGI's LocalWords: moviXX OpenGL API MesaGL AMD's Athlon Opteron acml movi gcc LocalWords: libtool libalberta PKG GL cxml blas libNAME libPKG dir DIR opengl LocalWords: EPREFIX gr CFLAGS FFLAGS ggdb fno inline pentium sse LocalWords: mfpmath alberta-2.0.1/configure.ac0000644000042300001440000002113211067146106012324 00000000000000# Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT([alberta], [2.0.1], [claus@mathematik.uni-freiburg.de]) AC_CONFIG_SRCDIR([alberta/src/Common/alberta.h]) AM_MAINTAINER_MODE AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CONFIG_FILES([Makefile gnu-compat/Makefile alberta_util/Makefile alberta_util/src/Makefile alberta_util/src/alberta_util_inlines.h.in add_ons/Makefile add_ons/geomview/Makefile add_ons/grape/Makefile add_ons/grape/mesh/Makefile add_ons/grape/mesh/2d/Makefile add_ons/grape/mesh/3d/Makefile add_ons/meshtv/Makefile add_ons/meshtv/1d/Makefile add_ons/meshtv/2d/Makefile add_ons/meshtv/3d/Makefile demo/src/Makefile demo/src/1d/Makefile demo/src/2d/Makefile demo/src/3d/Makefile alberta/Makefile alberta/src/Makefile alberta/src/Common/Makefile alberta/src/Common/Makefile.alberta]) AC_CONFIG_COMMANDS([demo], [if ! test "$srcdir" = \. ; then AC_MSG_NOTICE([Copying $srcdir/demo sources to current directory]) ( cd $srcdir && tar cf - demo ) | tar xf - fi]) # # A special command that checks whether alberta_util_inlines.h exists # and is identical to alberta_util_inlines.h.in. Then do nothing. If # something has changed, copy albert_util_inlines.h.in to # alberta_util_inlines.h # AC_CONFIG_COMMANDS([alberta_util/src/alberta_util_inlines.h], [if test -f alberta_util/src/alberta_util_inlines.h && \ cmp alberta_util/src/alberta_util_inlines.h alberta_util/src/alberta_util_inlines.h.in then AC_MSG_NOTICE([alberta_util/src/alberta_util_inlines.h is unchanged]) else AC_MSG_NOTICE([Creating alberta_util/src/alberta_util_inlines.h]) cp \ alberta_util/src/alberta_util_inlines.h.in \ alberta_util/src/alberta_util_inlines.h fi]) dnl dnl all CONFIG_FILES for the ALBERTA libraries are added through the dnl ALBERT_DIMENSION_ENABLE/DISABLE() macros dnl AM_INIT_AUTOMAKE([1.7]) AM_CONFIG_HEADER([config.h]) # change the installation directory. This could surely be done more elegantly... dnl dnl cH: hey, boys and girls, why do we do that? dnl AC_PREFIX_DEFAULT([`pwd`]) # Checks for programs. AC_PROG_INSTALL AC_PROG_LN_S AC_CHECK_PROGS([GZIP_PROGRAM],[gzip]) AC_CHECK_PROGS([TAR_PROGRAM],[gtar tar]) AC_ARG_VAR([GZIP_PROGRAM],[name of gzip program]) AC_ARG_VAR([TAR_PROGRAM],[name of tar program (need _not_ be GNU-tar)]) # Compiler characteristics dnl dnl **************************************************************************** dnl dnl First, we zap CFLAGS, FFLAGS and CXXFLAGS (unless explicitly set dnl by the user). We then choose -O3 for gcc and -O for all other dnl compilers, and no optimization for the debugging library. dnl dnl NOTE: we use 7 spaces to distinguish a user-override of "" from dnl our internal hack. Personally, I'd prefer to leave the fiddling dnl with the CFLAGS to the user. Mmmh. dnl test -z "$CFLAGS" && CFLAGS=" " test -z "$FFLAGS" && FFLAGS=" " dnl test -z "$CXXFLAGS" && CXXFLAGS=" " dnl dnl **************************************************************************** dnl dnl now check for compilers dnl AC_PROG_CC AC_C_INLINE AC_PROG_F77 dnl dnl Support for FORTRAN code in ALBERTA dnl AC_F77_LIBRARY_LDFLAGS AC_F77_FUNC([dnrm2],[DNRM2_F77_FUNC]) AC_F77_FUNC([daxpy],[DAXPY_F77_FUNC]) AC_F77_FUNC([dexpy],[DEXPY_F77_FUNC]) AC_F77_FUNC([dmxpy],[DMXPY_F77_FUNC]) AC_F77_FUNC([dcopy],[DCOPY_F77_FUNC]) AC_F77_FUNC([ddot],[DDOT_F77_FUNC]) AC_F77_FUNC([dscal],[DSCAL_F77_FUNC]) AC_F77_FUNC([dswap],[DSWAP_F77_FUNC]) AC_F77_FUNC([dxpay],[DXPAY_F77_FUNC]) AC_F77_FUNC([drandn],[DRANDN_F77_FUNC]) AC_SUBST([DNRM2_F77_FUNC]) AC_SUBST([DAXPY_F77_FUNC]) AC_SUBST([DEXPY_F77_FUNC]) AC_SUBST([DMXPY_F77_FUNC]) AC_SUBST([DCOPY_F77_FUNC]) AC_SUBST([DDOT_F77_FUNC]) AC_SUBST([DSCAL_F77_FUNC]) AC_SUBST([DSWAP_F77_FUNC]) AC_SUBST([DXPAY_F77_FUNC]) AC_SUBST([DRANDN_F77_FUNC]) dnl dnl **************************************************************************** dnl dnl quick and very dirty hack for icc dnl if test `basename $CC` = icc; then GCC=yes fi dnl dnl work around a bug in libtool which pulls in the C++ compiler which dnl we do not want at the moment. Remove the next two lines when this dnl changes! dnl dnl AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG],[:]) dnl AC_DEFUN([AC_LIBTOOL_CXX],[:]) dnl *********************** end CXX hack *************************************** AC_PROG_LIBTOOL if test `basename $CC` = icc; then GCC=no fi dnl dnl **************************************************************************** dnl dnl set default debugging flags, but allow for user-override dnl if test -z "${ALBERTA_DEBUG_CFLAGS}"; then if test "$GCC" = yes; then ALBERTA_DEBUG_CFLAGS="-Wall -O0 -ggdb3" else ALBERTA_DEBUG_CFLAGS="-g" fi fi AC_ARG_VAR([ALBERTA_DEBUG_CFLAGS],[Compiler-flags used to create the debug-enabled libraries]) dnl dnl **************************************************************************** dnl dnl Set default optimizing flags, but allow for user-override. dnl With gcc, provide basic debugging facilities even with optimized dnl code. dnl if test -z "${ALBERTA_OPTIMIZE_CFLAGS}"; then if test "$GCC" = yes; then ALBERTA_OPTIMIZE_CFLAGS="-Wall -O3" else ALBERTA_OPTIMIZE_CFLAGS="-O" fi fi AC_ARG_VAR([ALBERTA_OPTIMIZE_CFLAGS],[Compiler-flags used to create the optimised libraries]) if test "${FFLAGS}" = " "; then if test "$GCC" = yes; then FFLAGS="-O3" else FFLAGS="-O" fi fi dnl if test "${CXXFLAGS}" = " "; then dnl if test "$GCC" = yes; then dnl CXXFLAGS="-O3" dnl else dnl CXXFLAGS="-O" dnl fi dnl fi dnl dnl **************************************************************************** dnl # Checks for libraries. # Replace `main' with a function in -lm: AC_CHECK_LIB([m],[main],, [AC_MSG_ERROR([no math library, exiting...!])]) AC_CHECK_FUNCS([alarm pow sqrt strdup strchr strstr random srandom],, [AC_MSG_ERROR([Sorry, these are needed..])]) AC_FUNC_MALLOC AC_FUNC_VPRINTF AC_CHECK_FUNCS([unsetenv]) AC_CHECK_FUNCS([getopt_long],[], [AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) GNUCOMPAT_INCLUDE_PATH='$(top_srcdir)/gnu-compat/']) AC_SUBST([GNUCOMPAT_INCLUDE_PATH]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([unistd.h X11/Xlib.h X11/Xutil.h],, [AC_MSG_ERROR([Exiting...])]) AC_CHECK_HEADERS([rpc/xdr.h],,[AC_MSG_ERROR([Exiting...])]) # xdr_intXX_t() functions (i.e. processor independent type sizes) AC_CHECK_FUNCS([xdr_int32_t xdr_int64_t xdr_int]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_TYPE_SIGNAL dnl ----------------------- dnl THESE ARE OUR OWN TESTS dnl ----------------------- dnl dnl check for BLAS library. The BLAS may come under different names. We default dnl to -lblas, but other possibilities are sunperf, atlas, cxml (Alpha AXP) dnl etc etc etc etc etc etc etc etc etc etc ........................... dnl dnl Let the user decide what it wants (handled by ALBERTA_CHECK_PACKAGE() dnl ALBERTA_CHECK_PACKAGE(blas, blas, , ${FLIBS},,,,required) dnl dnl check for X11 dnl AC_PATH_X AC_PATH_XTRA X_ALL_LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 ${X_EXTRA_LIBS}" AC_SUBST(X_ALL_LIBS) dnl dnl check for OpenGL dnl ALBERTA_CHECK_PACKAGE(opengl, GL, ,${X_ALL_LIBS}, GL/gl.h,,,required) dnl dnl check for optional package gltools dnl ALBERTA_CHECK_PACKAGE(gltools, gltools, ,${OPENGL_ALL_LIB} ${X_ALL_LIBS}, glmesh.h,,,optional) dnl dnl check for optional package dx dnl ALBERTA_CHECK_PACKAGE(dx, DXL, ,-lrt -lDXcallm,dx/dx.h,,,optional) if test -n "${HAVE_DX_FALSE}"; then AC_CHECK_HEADERS([unistd.h errno.h Xm/Xm.h Xm/Form.h Xm/DrawingA.h pthread.h],, [AC_MSG_ERROR([Sorry, needed for dxtools, exiting...])]) fi dnl dnl GRAPE interface stuff dnl ALBERTA_GRAPE_STUFF dnl dnl MeshTV interface stuff dnl ALBERTA_CHECK_PACKAGE(silo, silo, ,, silo.h, , ,optional) dnl dnl Geomview interface, should not depend on any other installed dnl library, just a conversion tool. dnl AM_CONDITIONAL(GEOMVIEW, false) dnl dnl Debugging dnl ALBERTA_ENABLE_FLAG([debug], [disable building of ALBERTA libraries with debugging information.], 1, ALBERTA_DEBUG) dnl dnl Install libtool.alberta for shared libraries? dnl ALBERTA_ENABLE_FLAG([install-libtool], [disable installation of libtool.alberta], 1) # building of all versions is enabled by default, but can be # disabled using --disable-DOW-dimension switches (the macros # below do _not_ disable the builds, but simply implement # AC_ARG_ENABLE() stuff # # BIG FAT NOTE: the DIMENSION_DISABLE macro MUST COME LAST, right # before the AC_OUTPUT # ALBERTA_DIMENSION_DISABLE(1) ALBERTA_DIMENSION_DISABLE(2) ALBERTA_DIMENSION_DISABLE(3) # # flush everything to disk # AC_OUTPUT alberta-2.0.1/aclocal.m40000644000042300001440000102501411067146142011702 00000000000000# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.61],, [m4_warning([this file was generated for autoconf 2.61. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 52 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Check if we have a version mismatch between libtool.m4 and ltmain.sh. # # Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. # We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually # calls AC_LIBTOOL_CONFIG and creates libtool. # _LT_VERSION_CHECK # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_VERSION_CHECK # ----------------- AC_DEFUN([_LT_VERSION_CHECK], [AC_MSG_CHECKING([for correct ltmain.sh version]) if test "x$ltmain" = "x" ; then AC_MSG_RESULT(no) AC_MSG_ERROR([ *** @<:@Gentoo@:>@ sanity check failed! *** *** \$ltmain is not defined, please check the patch for consistency! *** ]) fi gentoo_lt_version="1.5.26" gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then AC_MSG_RESULT(no) AC_MSG_ERROR([ *** @<:@Gentoo@:>@ sanity check failed! *** *** libtool.m4 and ltmain.sh have a version mismatch! *** *** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** Please run: libtoolize --copy --force if appropriate, please contact the maintainer of this package (or your distribution) for help. ]) else AC_MSG_RESULT(yes) fi ])# _LT_VERSION_CHECK # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/alberta-dims.m4]) m4_include([m4/check-package.m4]) m4_include([m4/frameworks.m4]) m4_include([m4/grapeiface.m4]) m4_include([m4/set-prefix.m4]) m4_include([m4/simple-enable-flag.m4]) alberta-2.0.1/Makefile.am0000644000042300001440000000705210676736560012115 00000000000000SUBDIRS = gnu-compat alberta_util alberta add_ons ACLOCAL_AMFLAGS = -I ./m4 # EXTRA_DIST = demo # # install the libtool-script in the libexecdir s.t. Makefile.alberta # can use it even if the ALBERTA _sources_ are deleted. # if INSTALL_LIBTOOL BUILT_SOURCES = libtool.alberta libexec_SCRIPTS = libtool.@PACKAGE@ libtool.@PACKAGE@: libtool cp libtool libtool.@PACKAGE@ endif # # Install the code for the ALBERTA libs. This is useful if when making an # rpm package including debug libs. # install_code: mkdir -p $(DESTDIR)$(prefix)/src/alberta cp $(top_srcdir)/alberta/src/*/*.c $(DESTDIR)$(prefix)/src/alberta/ uninstall_code: rm -rf $(prefix)/src/alberta # # make a DEMO tar-ball and install it in pkgdatadir for later use # DEMO = @PACKAGE_NAME@-@PACKAGE_VERSION@-demo pkgdata_DATA = $(DEMO).tar.gz demo-tarball: $(DEMO).tar.gz $(DEMO).tar.gz: $(DEMO) $(TAR_PROGRAM) cf - $(DEMO) | $(GZIP_PROGRAM) -9 > $@ $(DEMO): demo mkdir $@ ; cd $@ ; \ ( cd ../demo ; $(TAR_PROGRAM) cf - . ) | $(TAR_PROGRAM) xf - rm -f $@/src/[0-9]d/Makefile.in clean-local: -rm -f $(DEMO).tar.gz distclean-local: -rm -f $(BUILT_SOURCES) -chmod -R u+rwX $(DEMO) && rm -rf $(DEMO) -if ! test "$(srcdir)" = "." ; then \ chmod -R u+rwX demo ; \ rm -rf demo ; \ fi if MAINTAINER_MODE # These targets only makes sense for maintainers!! svn-clean: @echo Fixing package for svn commit... find . -name \*~ -exec rm -rf {} \; find ./alberta ./alberta_util -name Makefile.in -exec rm -rf {} \; find ./demo ./alberta ./alberta_util -name Makefile -exec rm -rf {} \; find ./demo \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; find ./demo \( -name ellipt -o -name ellipt2 -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; find ./demo -name Makefile -exec /bin/rm -f {} \; cp -f .cvsignore admin/ cp -f configure.ac admin/ cp -f Makefile.am admin/ cp -f config.h.in admin/ cp -f AUTHORS admin/ cp -f COPYING admin/ cp -f ChangeLog admin/ cp -f MAINTENANCE admin/ cp -f NEWS admin/ cp -f README admin/ cp -f INSTALL admin/ dist-hook: @echo Copying demo directory to $(distdir) cp -pR demo/. $(distdir)/demo/. @echo Cleaning up demo directory in $(distdir) find $(distdir)/demo \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; find $(distdir)/demo \( -name ellipt -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; find $(distdir)/demo -name Makefile -exec /bin/rm -f {} \; @echo Deleting .svn directories in $(distdir) rm -rf `find $(distdir) -name .svn -a -type d` @echo Deleting CVS directories in $(distdir) rm -rf `find $(distdir) -name CVS` @echo Deleting .cvsignore file in $(distdir) rm -f `find $(distdir) -name '.cvsignore'` # # NOTE: you better have GRAPE installed properly before doing this. # # This target does not depend on any specific compilers, but we have # to enable all optional ALBERTA flavours, and we need GRAPE, # otherwise the grape-interface will not be included into the # distribution. # generate-alberta-dist: ./generate-alberta-automakefiles.sh autoreconf ./configure --enable-maintainer-mode --prefix=@prefix@ make dist # # The documentation is available as book. # # EXTRA_DIST = doc/alberta.pdf # # this one requires write access to the source directory. One day one might # want to automakify alberta/doc/ ... # #doc/alberta.ps: # make -C $(srcdir)/doc/ vclean # make -C $(srcdir)/doc/ alberta.ps # doc/alberta.pdf: # make -C $(srcdir)/doc/ vclean # make -C $(srcdir)/doc/ alberta.pdf # documentation: doc/alberta.pdf #dist-hook: documentation endif alberta-2.0.1/Makefile.in0000644000042300001440000007225711067146151012121 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure $(top_srcdir)/demo/src/1d/Makefile.in \ $(top_srcdir)/demo/src/2d/Makefile.in \ $(top_srcdir)/demo/src/3d/Makefile.in \ $(top_srcdir)/demo/src/Makefile.in AUTHORS COPYING ChangeLog \ INSTALL NEWS config.guess config.sub depcomp install-sh \ ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = demo/src/Makefile demo/src/1d/Makefile \ demo/src/2d/Makefile demo/src/3d/Makefile am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(pkgdatadir)" libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(libexec_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = gnu-compat alberta_util alberta add_ons ACLOCAL_AMFLAGS = -I ./m4 # EXTRA_DIST = demo # # install the libtool-script in the libexecdir s.t. Makefile.alberta # can use it even if the ALBERTA _sources_ are deleted. # @INSTALL_LIBTOOL_TRUE@BUILT_SOURCES = libtool.alberta @INSTALL_LIBTOOL_TRUE@libexec_SCRIPTS = libtool.@PACKAGE@ # # make a DEMO tar-ball and install it in pkgdatadir for later use # DEMO = @PACKAGE_NAME@-@PACKAGE_VERSION@-demo pkgdata_DATA = $(DEMO).tar.gz all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 demo/src/Makefile: $(top_builddir)/config.status $(top_srcdir)/demo/src/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ demo/src/1d/Makefile: $(top_builddir)/config.status $(top_srcdir)/demo/src/1d/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ demo/src/2d/Makefile: $(top_builddir)/config.status $(top_srcdir)/demo/src/2d/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ demo/src/3d/Makefile: $(top_builddir)/config.status $(top_srcdir)/demo/src/3d/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libexecSCRIPTS: $(libexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" @list='$(libexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(libexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ $(libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(libexecdir)/$$f"; \ else :; fi; \ done uninstall-libexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(libexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @MAINTAINER_MODE_FALSE@dist-hook: distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(SCRIPTS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-pkgdataDATA install-dvi: install-dvi-recursive install-exec-am: install-libexecSCRIPTS install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libexecSCRIPTS uninstall-pkgdataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool clean-local ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libexecSCRIPTS install-man install-pdf \ install-pdf-am install-pkgdataDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-libexecSCRIPTS uninstall-pkgdataDATA @INSTALL_LIBTOOL_TRUE@libtool.@PACKAGE@: libtool @INSTALL_LIBTOOL_TRUE@ cp libtool libtool.@PACKAGE@ # # Install the code for the ALBERTA libs. This is useful if when making an # rpm package including debug libs. # install_code: mkdir -p $(DESTDIR)$(prefix)/src/alberta cp $(top_srcdir)/alberta/src/*/*.c $(DESTDIR)$(prefix)/src/alberta/ uninstall_code: rm -rf $(prefix)/src/alberta demo-tarball: $(DEMO).tar.gz $(DEMO).tar.gz: $(DEMO) $(TAR_PROGRAM) cf - $(DEMO) | $(GZIP_PROGRAM) -9 > $@ $(DEMO): demo mkdir $@ ; cd $@ ; \ ( cd ../demo ; $(TAR_PROGRAM) cf - . ) | $(TAR_PROGRAM) xf - rm -f $@/src/[0-9]d/Makefile.in clean-local: -rm -f $(DEMO).tar.gz distclean-local: -rm -f $(BUILT_SOURCES) -chmod -R u+rwX $(DEMO) && rm -rf $(DEMO) -if ! test "$(srcdir)" = "." ; then \ chmod -R u+rwX demo ; \ rm -rf demo ; \ fi # These targets only makes sense for maintainers!! @MAINTAINER_MODE_TRUE@svn-clean: @MAINTAINER_MODE_TRUE@ @echo Fixing package for svn commit... @MAINTAINER_MODE_TRUE@ find . -name \*~ -exec rm -rf {} \; @MAINTAINER_MODE_TRUE@ find ./alberta ./alberta_util -name Makefile.in -exec rm -rf {} \; @MAINTAINER_MODE_TRUE@ find ./demo ./alberta ./alberta_util -name Makefile -exec rm -rf {} \; @MAINTAINER_MODE_TRUE@ find ./demo \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; @MAINTAINER_MODE_TRUE@ find ./demo \( -name ellipt -o -name ellipt2 -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; @MAINTAINER_MODE_TRUE@ find ./demo -name Makefile -exec /bin/rm -f {} \; @MAINTAINER_MODE_TRUE@ cp -f .cvsignore admin/ @MAINTAINER_MODE_TRUE@ cp -f configure.ac admin/ @MAINTAINER_MODE_TRUE@ cp -f Makefile.am admin/ @MAINTAINER_MODE_TRUE@ cp -f config.h.in admin/ @MAINTAINER_MODE_TRUE@ cp -f AUTHORS admin/ @MAINTAINER_MODE_TRUE@ cp -f COPYING admin/ @MAINTAINER_MODE_TRUE@ cp -f ChangeLog admin/ @MAINTAINER_MODE_TRUE@ cp -f MAINTENANCE admin/ @MAINTAINER_MODE_TRUE@ cp -f NEWS admin/ @MAINTAINER_MODE_TRUE@ cp -f README admin/ @MAINTAINER_MODE_TRUE@ cp -f INSTALL admin/ @MAINTAINER_MODE_TRUE@dist-hook: @MAINTAINER_MODE_TRUE@ @echo Copying demo directory to $(distdir) @MAINTAINER_MODE_TRUE@ cp -pR demo/. $(distdir)/demo/. @MAINTAINER_MODE_TRUE@ @echo Cleaning up demo directory in $(distdir) @MAINTAINER_MODE_TRUE@ find $(distdir)/demo \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; @MAINTAINER_MODE_TRUE@ find $(distdir)/demo \( -name ellipt -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; @MAINTAINER_MODE_TRUE@ find $(distdir)/demo -name Makefile -exec /bin/rm -f {} \; @MAINTAINER_MODE_TRUE@ @echo Deleting .svn directories in $(distdir) @MAINTAINER_MODE_TRUE@ rm -rf `find $(distdir) -name .svn -a -type d` @MAINTAINER_MODE_TRUE@ @echo Deleting CVS directories in $(distdir) @MAINTAINER_MODE_TRUE@ rm -rf `find $(distdir) -name CVS` @MAINTAINER_MODE_TRUE@ @echo Deleting .cvsignore file in $(distdir) @MAINTAINER_MODE_TRUE@ rm -f `find $(distdir) -name '.cvsignore'` # # NOTE: you better have GRAPE installed properly before doing this. # # This target does not depend on any specific compilers, but we have # to enable all optional ALBERTA flavours, and we need GRAPE, # otherwise the grape-interface will not be included into the # distribution. # @MAINTAINER_MODE_TRUE@generate-alberta-dist: @MAINTAINER_MODE_TRUE@ ./generate-alberta-automakefiles.sh @MAINTAINER_MODE_TRUE@ autoreconf @MAINTAINER_MODE_TRUE@ ./configure --enable-maintainer-mode --prefix=@prefix@ @MAINTAINER_MODE_TRUE@ make dist # # The documentation is available as book. # # EXTRA_DIST = doc/alberta.pdf # # this one requires write access to the source directory. One day one might # want to automakify alberta/doc/ ... # #doc/alberta.ps: # make -C $(srcdir)/doc/ vclean # make -C $(srcdir)/doc/ alberta.ps # doc/alberta.pdf: # make -C $(srcdir)/doc/ vclean # make -C $(srcdir)/doc/ alberta.pdf # documentation: doc/alberta.pdf #dist-hook: documentation # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/config.h.in0000644000042300001440000001161511067146243012070 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to dummy `main' function (if any) required to link to the Fortran libraries. */ #undef F77_DUMMY_MAIN /* Define if F77 and FC dummy `main' functions are identical. */ #undef FC_DUMMY_MAIN_EQ_F77 /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_DX_DX_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the header file. */ #undef HAVE_GLMESH_H /* Define to 1 if you have the header file. */ #undef HAVE_GL_GL_H /* Define to 1 if you have the header file. */ #undef HAVE_GRAPE_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have libblas */ #undef HAVE_LIBBLAS /* Define to 1 if you have libDXL */ #undef HAVE_LIBDXL /* Define to 1 if you have libGL */ #undef HAVE_LIBGL /* Define to 1 if you have libgltools */ #undef HAVE_LIBGLTOOLS /* Define to 1 if you have libgr */ #undef HAVE_LIBGR /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have libsilo */ #undef HAVE_LIBSILO /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM /* Define to 1 if you have the header file. */ #undef HAVE_RPC_XDR_H /* Define to 1 if you have the header file. */ #undef HAVE_SILO_H /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if you have the `srandom' function. */ #undef HAVE_SRANDOM /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_X11_XLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_X11_XUTIL_H /* Define to 1 if you have the `xdr_int' function. */ #undef HAVE_XDR_INT /* Define to 1 if you have the `xdr_int32_t' function. */ #undef HAVE_XDR_INT32_T /* Define to 1 if you have the `xdr_int64_t' function. */ #undef HAVE_XDR_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_XM_DRAWINGA_H /* Define to 1 if you have the header file. */ #undef HAVE_XM_FORM_H /* Define to 1 if you have the header file. */ #undef HAVE_XM_XM_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `unsigned int' if does not define. */ #undef size_t alberta-2.0.1/configure0000755000042300001440000337446011067146152011770 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for alberta 2.0.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='alberta' PACKAGE_TARNAME='alberta' PACKAGE_VERSION='2.0.1' PACKAGE_STRING='alberta 2.0.1' PACKAGE_BUGREPORT='claus@mathematik.uni-freiburg.de' ac_unique_file="alberta/src/Common/alberta.h" ac_default_prefix=`pwd` # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar LN_S GZIP_PROGRAM TAR_PROGRAM CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE F77 FFLAGS ac_ct_F77 FLIBS DNRM2_F77_FUNC DAXPY_F77_FUNC DEXPY_F77_FUNC DMXPY_F77_FUNC DCOPY_F77_FUNC DDOT_F77_FUNC DSCAL_F77_FUNC DSWAP_F77_FUNC DXPAY_F77_FUNC DRANDN_F77_FUNC SED GREP EGREP ECHO AR RANLIB DSYMUTIL NMEDIT CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP LIBTOOL ALBERTA_DEBUG_CFLAGS ALBERTA_OPTIMIZE_CFLAGS LIBOBJS GNUCOMPAT_INCLUDE_PATH expanded_prefix expanded_exec_prefix HAVE_BLAS_TRUE HAVE_BLAS_FALSE BLAS_INCLUDE_PATH BLAS_LIB_PATH BLAS_INCLUDE BLAS_LIB BLAS_ALL_LIB BLAS_NAME XMKMF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_ALL_LIBS HAVE_OPENGL_TRUE HAVE_OPENGL_FALSE OPENGL_INCLUDE_PATH OPENGL_LIB_PATH OPENGL_INCLUDE OPENGL_LIB OPENGL_ALL_LIB OPENGL_NAME HAVE_GLTOOLS_TRUE HAVE_GLTOOLS_FALSE GLTOOLS_INCLUDE_PATH GLTOOLS_LIB_PATH GLTOOLS_INCLUDE GLTOOLS_LIB GLTOOLS_ALL_LIB GLTOOLS_NAME HAVE_DX_TRUE HAVE_DX_FALSE DX_INCLUDE_PATH DX_LIB_PATH DX_INCLUDE DX_LIB DX_ALL_LIB DX_NAME HAVE_GRAPE_TRUE HAVE_GRAPE_FALSE GRAPE_INCLUDE_PATH GRAPE_LIB_PATH GRAPE_INCLUDE GRAPE_LIB GRAPE_ALL_LIB GRAPE_NAME GRAPE_TRUE GRAPE_FALSE ALBERTA_DEBUG ALBERTA_LIB_PATH ALBERTA_INCLUDE_PATH ALBERTA_LIBS_1 ALBERTA_LIBS_2 ALBERTA_LIBS_3 HAVE_SILO_TRUE HAVE_SILO_FALSE SILO_INCLUDE_PATH SILO_LIB_PATH SILO_INCLUDE SILO_LIB SILO_ALL_LIB SILO_NAME GEOMVIEW_TRUE GEOMVIEW_FALSE ALBERTA_DEBUG_TRUE ALBERTA_DEBUG_FALSE INSTALL_LIBTOOL INSTALL_LIBTOOL_TRUE INSTALL_LIBTOOL_FALSE ALBERTA_1 ALBERTA_1_TRUE ALBERTA_1_FALSE ALBERTA_2 ALBERTA_2_TRUE ALBERTA_2_FALSE ALBERTA_3 ALBERTA_3_TRUE ALBERTA_3_FALSE LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias GZIP_PROGRAM TAR_PROGRAM CC CFLAGS LDFLAGS LIBS CPPFLAGS F77 FFLAGS CPP CXX CXXFLAGS CCC CXXCPP ALBERTA_DEBUG_CFLAGS ALBERTA_OPTIMIZE_CFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures alberta 2.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/alberta] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of alberta 2.0.1:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-debug disable building of ALBERTA libraries with debugging information. (default: enabled) --disable-install-libtool disable installation of libtool.alberta (default: enabled) --disable-alberta-1 disable building of an ALBERTA library for Finite Elements of dimension 1. (default: enabled) --disable-alberta-2 disable building of an ALBERTA library for Finite Elements of dimension 2. (default: enabled) --disable-alberta-3 disable building of an ALBERTA library for Finite Elements of dimension 3. (default: enabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-blas-name=NAME use NAME as the name of the blas library (without leading "lib" prefix and trailing suffix). Default: "blas" --with-blas-lib=DIR use blas library below directory DIR (default: EPREFIX/lib/) --with-x use the X Window System --with-opengl-name=NAME use NAME as the name of the opengl library (without leading "lib" prefix and trailing suffix). Default: "GL" --with-opengl-dir=DIR use opengl library (and headers) below directory DIR (no default) --with-opengl-lib=DIR use opengl library below directory DIR (default: EPREFIX/lib/) --with-opengl-headers=DIR use opengl include files below directory DIR (default: PREFIX/include/) --without-gltools disable use of package gltools (default: autodetect) --with-gltools-name=NAME use NAME as the name of the gltools library (without leading "lib" prefix and trailing suffix). Default: "gltools" --with-gltools-dir=DIR use gltools library (and headers) below directory DIR (no default) --with-gltools-lib=DIR use gltools library below directory DIR (default: EPREFIX/lib/) --with-gltools-headers=DIR use gltools include files below directory DIR (default: PREFIX/include/) --without-dx disable use of package dx (default: autodetect) --with-dx-name=NAME use NAME as the name of the dx library (without leading "lib" prefix and trailing suffix). Default: "DXL" --with-dx-dir=DIR use dx library (and headers) below directory DIR (no default) --with-dx-lib=DIR use dx library below directory DIR (default: EPREFIX/lib/) --with-dx-headers=DIR use dx include files below directory DIR (default: PREFIX/include/) --without-grape disable use of package grape (default: autodetect) --with-grape-name=NAME use NAME as the name of the grape library (without leading "lib" prefix and trailing suffix). Default: "gr" --with-grape-dir=DIR use grape library (and headers) below directory DIR (no default) --with-grape-lib=DIR use grape library below directory DIR (default: EPREFIX/lib/) --with-grape-headers=DIR use grape include files below directory DIR (default: PREFIX/include/) --without-silo disable use of package silo (default: autodetect) --with-silo-name=NAME use NAME as the name of the silo library (without leading "lib" prefix and trailing suffix). Default: "silo" --with-silo-dir=DIR use silo library (and headers) below directory DIR (no default) --with-silo-lib=DIR use silo library below directory DIR (default: EPREFIX/lib/) --with-silo-headers=DIR use silo include files below directory DIR (default: PREFIX/include/) Some influential environment variables: GZIP_PROGRAM name of gzip program TAR_PROGRAM name of tar program (need _not_ be GNU-tar) CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor ALBERTA_DEBUG_CFLAGS Compiler-flags used to create the debug-enabled libraries ALBERTA_OPTIMIZE_CFLAGS Compiler-flags used to create the optimised libraries XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF alberta configure 2.0.1 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by alberta $as_me 2.0.1, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_config_files="$ac_config_files Makefile gnu-compat/Makefile alberta_util/Makefile alberta_util/src/Makefile alberta_util/src/alberta_util_inlines.h.in add_ons/Makefile add_ons/geomview/Makefile add_ons/grape/Makefile add_ons/grape/mesh/Makefile add_ons/grape/mesh/2d/Makefile add_ons/grape/mesh/3d/Makefile add_ons/meshtv/Makefile add_ons/meshtv/1d/Makefile add_ons/meshtv/2d/Makefile add_ons/meshtv/3d/Makefile demo/src/Makefile demo/src/1d/Makefile demo/src/2d/Makefile demo/src/3d/Makefile alberta/Makefile alberta/src/Makefile alberta/src/Common/Makefile alberta/src/Common/Makefile.alberta" ac_config_commands="$ac_config_commands demo" # # A special command that checks whether alberta_util_inlines.h exists # and is identical to alberta_util_inlines.h.in. Then do nothing. If # something has changed, copy albert_util_inlines.h.in to # alberta_util_inlines.h # ac_config_commands="$ac_config_commands alberta_util/src/alberta_util_inlines.h" am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='alberta' VERSION='2.0.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" # change the installation directory. This could surely be done more elegantly... # Checks for programs. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi for ac_prog in gzip do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_GZIP_PROGRAM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$GZIP_PROGRAM"; then ac_cv_prog_GZIP_PROGRAM="$GZIP_PROGRAM" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GZIP_PROGRAM="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GZIP_PROGRAM=$ac_cv_prog_GZIP_PROGRAM if test -n "$GZIP_PROGRAM"; then { echo "$as_me:$LINENO: result: $GZIP_PROGRAM" >&5 echo "${ECHO_T}$GZIP_PROGRAM" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$GZIP_PROGRAM" && break done for ac_prog in gtar tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_TAR_PROGRAM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$TAR_PROGRAM"; then ac_cv_prog_TAR_PROGRAM="$TAR_PROGRAM" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_TAR_PROGRAM="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi TAR_PROGRAM=$ac_cv_prog_TAR_PROGRAM if test -n "$TAR_PROGRAM"; then { echo "$as_me:$LINENO: result: $TAR_PROGRAM" >&5 echo "${ECHO_T}$TAR_PROGRAM" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$TAR_PROGRAM" && break done # Compiler characteristics test -z "$CFLAGS" && CFLAGS=" " test -z "$FFLAGS" && FFLAGS=" " ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_v+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift echo "$as_me:$LINENO: $*" >&5 ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -f conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # If we are using xlf then replace all the commas with spaces. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac # look for -l* and *.a constructs in the output for ac_arg in $ac_f77_v_output; do case $ac_arg in [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) ac_cv_prog_f77_v=$ac_verb break 2 ;; esac done done if test -z "$ac_cv_prog_f77_v"; then { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: WARNING: compilation failed" >&5 echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 echo "${ECHO_T}$ac_cv_prog_f77_v" >&6; } { echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5 echo $ECHO_N "checking for Fortran 77 libraries of $F77... $ECHO_C" >&6; } if test "${ac_cv_f77_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift echo "$as_me:$LINENO: $*" >&5 ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -f conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # If we are using xlf then replace all the commas with spaces. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac ac_cv_f77_libs= # Save positional arguments (if any) ac_save_positional="$@" set X $ac_f77_v_output while test $# != 1; do shift ac_arg=$1 case $ac_arg in [\\/]*.a | ?:[\\/]*.a) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -bI:*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; -[LRuYz]) # These flags, when seen by themselves, take an argument. # We remove the space between option and argument and re-iterate # unless we find an empty arg or a new option (starting with -) case $2 in "" | -*);; *) ac_arg="$ac_arg$2" shift; shift set X $ac_arg "$@" ;; esac ;; -YP,*) for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi done ;; -[lLR]*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; # Ignore everything else. esac done # restore positional arguments set X $ac_save_positional; shift # We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, # then we insist that the "run path" must be an absolute path (i.e. it # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) ac_ld_run_path=`echo $ac_f77_v_output | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_ld_run_path; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" fi ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi { echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 echo "${ECHO_T}$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5 echo $ECHO_N "checking for dummy main to link with Fortran 77 libraries... $ECHO_C" >&6; } if test "${ac_cv_f77_dummy_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # First, try linking without a dummy main: cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_fortran_dummy_main=none else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_fortran_dummy_main=unknown fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define $ac_fortran_dm_var $ac_func #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_fortran_dummy_main=$ac_func; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main rm -f conftest* LIBS=$ac_f77_dm_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 echo "${ECHO_T}$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main if test "$F77_DUMMY_MAIN" != unknown; then if test $F77_DUMMY_MAIN != none; then cat >>confdefs.h <<_ACEOF #define F77_DUMMY_MAIN $F77_DUMMY_MAIN _ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then cat >>confdefs.h <<\_ACEOF #define FC_DUMMY_MAIN_EQ_F77 1 _ACEOF fi fi else { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails See \`config.log' for more details." >&5 echo "$as_me: error: linking to Fortran libraries from C fails See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5 echo $ECHO_N "checking for Fortran 77 name-mangling scheme... $ECHO_C" >&6; } if test "${ac_cv_f77_mangling+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF subroutine foobar() return end subroutine foo_bar() return end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success=no for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_success=yes; break 2 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success" = "yes"; then case $ac_foobar in foobar) ac_case=lower ac_foo_bar=foo_bar ;; FOOBAR) ac_case=upper ac_foo_bar=FOO_BAR ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_success_extra=yes; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success_extra" = "yes"; then ac_cv_f77_mangling="$ac_case case" if test -z "$ac_underscore"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" fi if test -z "$ac_extra"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" fi else ac_cv_f77_mangling="unknown" fi else ac_cv_f77_mangling="unknown" fi LIBS=$ac_save_LIBS rm -f cfortran_test* conftest* else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program See \`config.log' for more details." >&5 echo "$as_me: error: cannot compile a simple Fortran program See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 echo "${ECHO_T}$ac_cv_f77_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DNRM2" ;; lower*) ac_val="dnrm2" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DNRM2_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DAXPY" ;; lower*) ac_val="daxpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DAXPY_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DEXPY" ;; lower*) ac_val="dexpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DEXPY_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DMXPY" ;; lower*) ac_val="dmxpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DMXPY_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DCOPY" ;; lower*) ac_val="dcopy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DCOPY_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DDOT" ;; lower*) ac_val="ddot" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DDOT_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DSCAL" ;; lower*) ac_val="dscal" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DSCAL_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DSWAP" ;; lower*) ac_val="dswap" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DSWAP_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DXPAY" ;; lower*) ac_val="dxpay" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DXPAY_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DRANDN" ;; lower*) ac_val="drandn" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac DRANDN_F77_FUNC="$ac_val" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test `basename $CC` = icc; then GCC=yes fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5994 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 echo "${ECHO_T}$DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { echo "$as_me:$LINENO: result: $NMEDIT" >&5 echo "${ECHO_T}$NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_ld_exported_symbols_list=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check if we have a version mismatch between libtool.m4 and ltmain.sh. # # Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. # We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually # calls AC_LIBTOOL_CONFIG and creates libtool. # { echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5 echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6; } if test "x$ltmain" = "x" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: *** [Gentoo] sanity check failed! *** *** \$ltmain is not defined, please check the patch for consistency! *** " >&5 echo "$as_me: error: *** [Gentoo] sanity check failed! *** *** \$ltmain is not defined, please check the patch for consistency! *** " >&2;} { (exit 1); exit 1; }; } fi gentoo_lt_version="1.5.26" gentoo_ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' "$ltmain"` if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: *** [Gentoo] sanity check failed! *** *** libtool.m4 and ltmain.sh have a version mismatch! *** *** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** Please run: libtoolize --copy --force if appropriate, please contact the maintainer of this package (or your distribution) for help. " >&5 echo "$as_me: error: *** [Gentoo] sanity check failed! *** *** libtool.m4 and ltmain.sh have a version mismatch! *** *** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** Please run: libtoolize --copy --force if appropriate, please contact the maintainer of this package (or your distribution) for help. " >&2;} { (exit 1); exit 1; }; } else { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } fi # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8907: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8911: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9197: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9201: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9301: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9305: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14267: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14271: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14371: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14375: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15967: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15971: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16071: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16075: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18291: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:18295: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18581: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:18585: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18685: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:18689: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion if test `basename $CC` = icc; then GCC=no fi if test -z "${ALBERTA_DEBUG_CFLAGS}"; then if test "$GCC" = yes; then ALBERTA_DEBUG_CFLAGS="-Wall -O0 -ggdb3" else ALBERTA_DEBUG_CFLAGS="-g" fi fi if test -z "${ALBERTA_OPTIMIZE_CFLAGS}"; then if test "$GCC" = yes; then ALBERTA_OPTIMIZE_CFLAGS="-Wall -O3" else ALBERTA_OPTIMIZE_CFLAGS="-O" fi fi if test "${FFLAGS}" = " "; then if test "$GCC" = yes; then FFLAGS="-O3" else FFLAGS="-O" fi fi # Checks for libraries. # Replace `main' with a function in -lm: { echo "$as_me:$LINENO: checking for main in -lm" >&5 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else { { echo "$as_me:$LINENO: error: no math library, exiting...!" >&5 echo "$as_me: error: no math library, exiting...!" >&2;} { (exit 1); exit 1; }; } fi for ac_func in alarm pow sqrt strdup strchr strstr random srandom do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Sorry, these are needed.." >&5 echo "$as_me: error: Sorry, these are needed.." >&2;} { (exit 1); exit 1; }; } fi done for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__doprnt || defined __stub____doprnt choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return _doprnt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in unsetenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getopt_long do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIBOBJS " in *" getopt.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;; esac case " $LIBOBJS " in *" getopt1.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;; esac GNUCOMPAT_INCLUDE_PATH='$(top_srcdir)/gnu-compat/' fi done # Checks for header files. { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in unistd.h X11/Xlib.h X11/Xutil.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Exiting..." >&5 echo "$as_me: error: Exiting..." >&2;} { (exit 1); exit 1; }; } fi done for ac_header in rpc/xdr.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Exiting..." >&5 echo "$as_me: error: Exiting..." >&2;} { (exit 1); exit 1; }; } fi done # xdr_intXX_t() functions (i.e. processor independent type sizes) for ac_func in xdr_int32_t xdr_int64_t xdr_int do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_signal=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' expanded_prefix=`eval echo ${prefix}` expanded_exec_prefix=`eval echo ${exec_prefix}` if test "${BLAS_DISABLE}" = yes; then : else DEFAULT_LIBDIR=`eval eval echo ${libdir}` # Check whether --with-blas-name was given. if test "${with_blas_name+set}" = set; then withval=$with_blas_name; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-blas-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-blas-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-blas-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-blas-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) BLAS_NAME=$withval ;; esac else BLAS_NAME=blas fi # Check whether --with-blas-lib was given. if test "${with_blas_lib+set}" = set; then withval=$with_blas_lib; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-blas-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-blas-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-blas-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-blas-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) BLAS_LIB_PATH=$withval ;; esac else test -z "${BLAS_LIB_PATH}" && BLAS_LIB_PATH=$DEFAULT_LIBDIR fi as_ac_Lib=`echo "ac_cv_lib_${BLAS_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -l${BLAS_NAME}" >&5 echo $ECHO_N "checking for main in -l${BLAS_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${BLAS_NAME} -L$BLAS_LIB_PATH ${FLIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then BLAS_LIB="-L${BLAS_LIB_PATH} -l${BLAS_NAME}" BLAS_ALL_LIB="-L${BLAS_LIB_PATH} -l${BLAS_NAME} ${FLIBS}" else case "$host" in *darwin*) { echo "$as_me:$LINENO: result: Running the test for \"blas\" again with -framework switch" >&5 echo "${ECHO_T}Running the test for \"blas\" again with -framework switch" >&6; } ;; *) { { echo "$as_me:$LINENO: error: Library \"lib${BLAS_NAME}\" was not found" >&5 echo "$as_me: error: Library \"lib${BLAS_NAME}\" was not found" >&2;} { (exit 1); exit 1; }; } ;; esac fi if test "x${BLAS_LIB}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${BLAS_NAME}___main" as_ac_Lib=`echo "ac_cv_lib_${BLAS_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -framework ${BLAS_NAME}" >&5 echo $ECHO_N "checking for main in -framework ${BLAS_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-framework ${BLAS_NAME} -F$BLAS_LIB_PATH ${FLIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then BLAS_LIB="-F${BLAS_LIB_PATH} -framework ${BLAS_NAME}" BLAS_ALL_LIB="-F${BLAS_LIB_PATH} -framework ${BLAS_NAME} ${FLIBS}" else { { echo "$as_me:$LINENO: error: Framework \"${BLAS_NAME}\" was not found" >&5 echo "$as_me: error: Framework \"${BLAS_NAME}\" was not found" >&2;} { (exit 1); exit 1; }; } fi ;; esac fi if test "x${BLAS_LIB}" = "x" ; then : else if test "x${BLAS_LIB}" = "x" ; then : else cat >>confdefs.h <<\_ACEOF #define HAVE_LIBBLAS 1 _ACEOF fi fi fi if test -n "$BLAS_LIB"; then HAVE_BLAS_TRUE= HAVE_BLAS_FALSE='#' else HAVE_BLAS_TRUE='#' HAVE_BLAS_FALSE= fi { echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 echo "$as_me: error: Cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. { echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_gethostbyname || defined __stub___gethostbyname choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. { echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_connect || defined __stub___connect choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. { echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6; } if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_remove || defined __stub___remove choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. { echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shmat || defined __stub___shmat choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi X_ALL_LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 ${X_EXTRA_LIBS}" if test "${OPENGL_DISABLE}" = yes; then : else DEFAULT_LIBDIR=`eval eval echo ${libdir}` # Check whether --with-opengl-name was given. if test "${with_opengl_name+set}" = set; then withval=$with_opengl_name; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) OPENGL_NAME=$withval ;; esac else OPENGL_NAME=GL fi # Check whether --with-opengl-dir was given. if test "${with_opengl_dir+set}" = set; then withval=$with_opengl_dir; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) OPENGL_LIB_PATH=$withval OPENGL_INCLUDE_PATH=$withval ;; esac fi # Check whether --with-opengl-lib was given. if test "${with_opengl_lib+set}" = set; then withval=$with_opengl_lib; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) OPENGL_LIB_PATH=$withval ;; esac else test -z "${OPENGL_LIB_PATH}" && OPENGL_LIB_PATH=$DEFAULT_LIBDIR fi DEFAULT_INCDIR=`eval eval echo ${includedir}` # Check whether --with-opengl-headers was given. if test "${with_opengl_headers+set}" = set; then withval=$with_opengl_headers; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-opengl-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-opengl-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) OPENGL_INCLUDE_PATH=$withval ;; esac else test -z "${OPENGL_INCLUDE_PATH}" && OPENGL_INCLUDE_PATH=$DEFAULT_INCDIR fi as_ac_Lib=`echo "ac_cv_lib_${OPENGL_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -l${OPENGL_NAME}" >&5 echo $ECHO_N "checking for main in -l${OPENGL_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${OPENGL_NAME} -L$OPENGL_LIB_PATH ${X_ALL_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then OPENGL_LIB="-L${OPENGL_LIB_PATH} -l${OPENGL_NAME}" OPENGL_ALL_LIB="-L${OPENGL_LIB_PATH} -l${OPENGL_NAME} ${X_ALL_LIBS}" else case "$host" in *darwin*) { echo "$as_me:$LINENO: result: Running the test for \"opengl\" again with -framework switch" >&5 echo "${ECHO_T}Running the test for \"opengl\" again with -framework switch" >&6; } ;; *) { { echo "$as_me:$LINENO: error: Library \"lib${OPENGL_NAME}\" was not found" >&5 echo "$as_me: error: Library \"lib${OPENGL_NAME}\" was not found" >&2;} { (exit 1); exit 1; }; } ;; esac fi if test "x${OPENGL_LIB}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${OPENGL_NAME}___main" as_ac_Lib=`echo "ac_cv_lib_${OPENGL_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -framework ${OPENGL_NAME}" >&5 echo $ECHO_N "checking for main in -framework ${OPENGL_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-framework ${OPENGL_NAME} -F$OPENGL_LIB_PATH ${X_ALL_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then OPENGL_LIB="-F${OPENGL_LIB_PATH} -framework ${OPENGL_NAME}" OPENGL_ALL_LIB="-F${OPENGL_LIB_PATH} -framework ${OPENGL_NAME} ${X_ALL_LIBS}" else { { echo "$as_me:$LINENO: error: Framework \"${OPENGL_NAME}\" was not found" >&5 echo "$as_me: error: Framework \"${OPENGL_NAME}\" was not found" >&2;} { (exit 1); exit 1; }; } fi ;; esac fi if test "x${OPENGL_LIB}" = "x" ; then : else ac_OPENGL_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${OPENGL_INCLUDE_PATH} $CPPFLAGS" for ac_header in GL/gl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Header file \"GL/gl.h\" was not found" >&5 echo "$as_me: error: Header file \"GL/gl.h\" was not found" >&2;} { (exit 1); exit 1; }; } fi done if ! test -f "${OPENGL_INCLUDE_PATH}/GL/gl.h"; then OPENGL_INCLUDE="" fi CPPCLAGS="${ac_OPENGL_save_CPPFLAGS}" if test "x${OPENGL_LIB}" = "x" ; then : else cat >>confdefs.h <<\_ACEOF #define HAVE_LIBGL 1 _ACEOF fi fi fi if test -n "$OPENGL_LIB"; then HAVE_OPENGL_TRUE= HAVE_OPENGL_FALSE='#' else HAVE_OPENGL_TRUE='#' HAVE_OPENGL_FALSE= fi # Check whether --with-gltools was given. if test "${with_gltools+set}" = set; then withval=$with_gltools; case "$withval" in yes) ;; no) GLTOOLS_DISABLE=yes { echo "$as_me:$LINENO: result: Disabling \"gltools\"" >&5 echo "${ECHO_T}Disabling \"gltools\"" >&6; } ;; *) { { echo "$as_me:$LINENO: error: \"$withval\" should have been either \"yes\" or \"no\"" >&5 echo "$as_me: error: \"$withval\" should have been either \"yes\" or \"no\"" >&2;} { (exit 1); exit 1; }; } ;; esac else GLTOOLS_DISABLE=no fi if test "${GLTOOLS_DISABLE}" = yes; then : else DEFAULT_LIBDIR=`eval eval echo ${libdir}` # Check whether --with-gltools-name was given. if test "${with_gltools_name+set}" = set; then withval=$with_gltools_name; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GLTOOLS_NAME=$withval ;; esac else GLTOOLS_NAME=gltools fi # Check whether --with-gltools-dir was given. if test "${with_gltools_dir+set}" = set; then withval=$with_gltools_dir; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GLTOOLS_LIB_PATH=$withval GLTOOLS_INCLUDE_PATH=$withval ;; esac fi # Check whether --with-gltools-lib was given. if test "${with_gltools_lib+set}" = set; then withval=$with_gltools_lib; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GLTOOLS_LIB_PATH=$withval ;; esac else test -z "${GLTOOLS_LIB_PATH}" && GLTOOLS_LIB_PATH=$DEFAULT_LIBDIR fi DEFAULT_INCDIR=`eval eval echo ${includedir}` # Check whether --with-gltools-headers was given. if test "${with_gltools_headers+set}" = set; then withval=$with_gltools_headers; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-gltools-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-gltools-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GLTOOLS_INCLUDE_PATH=$withval ;; esac else test -z "${GLTOOLS_INCLUDE_PATH}" && GLTOOLS_INCLUDE_PATH=$DEFAULT_INCDIR fi as_ac_Lib=`echo "ac_cv_lib_${GLTOOLS_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -l${GLTOOLS_NAME}" >&5 echo $ECHO_N "checking for main in -l${GLTOOLS_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${GLTOOLS_NAME} -L${GLTOOLS_LIB_PATH} ${OPENGL_ALL_LIB} ${X_ALL_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then GLTOOLS_LIB="-L${GLTOOLS_LIB_PATH} -l${GLTOOLS_NAME}" GLTOOLS_ALL_LIB="-L${GLTOOLS_LIB_PATH} -l${GLTOOLS_NAME} ${OPENGL_ALL_LIB} ${X_ALL_LIBS}" else GLTOOLS_LIB="" GLTOOLS_ALL_LIB="" GLTOOLS_LIB_PATH="" GLTOOLS_INCLUDE="" GLTOOLS_INCLUDE_PATH="" fi if test "x${GLTOOLS_LIB}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${GLTOOLS_NAME}___main" as_ac_Lib=`echo "ac_cv_lib_${GLTOOLS_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -framework ${GLTOOLS_NAME}" >&5 echo $ECHO_N "checking for main in -framework ${GLTOOLS_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-framework ${GLTOOLS_NAME} -F${GLTOOLS_LIB_PATH} ${OPENGL_ALL_LIB} ${X_ALL_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then GLTOOLS_LIB="-F${GLTOOLS_LIB_PATH} -framework ${GLTOOLS_NAME}" GLTOOLS_ALL_LIB="-F${GLTOOLS_LIB_PATH} -framework ${GLTOOLS_NAME} ${OPENGL_ALL_LIB} ${X_ALL_LIBS}" else GLTOOLS_LIB="" GLTOOLS_ALL_LIB="" GLTOOLS_LIB_PATH="" GLTOOLS_INCLUDE="" GLTOOLS_INCLUDE_PATH="" fi ;; esac fi if test "x${GLTOOLS_LIB}" = "x" ; then : else ac_GLTOOLS_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${GLTOOLS_INCLUDE_PATH} $CPPFLAGS" for ac_header in glmesh.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else GLTOOLS_LIB="" GLTOOLS_ALL_LIB="" GLTOOLS_INCLUDE="" GLTOOLS_LIB_PATH="" GLTOOLS_INCLUDE_PATH="" fi done if ! test -f "${GLTOOLS_INCLUDE_PATH}/glmesh.h"; then GLTOOLS_INCLUDE="" fi CPPCLAGS="${ac_GLTOOLS_save_CPPFLAGS}" if test "x${GLTOOLS_LIB}" = "x" ; then : else cat >>confdefs.h <<\_ACEOF #define HAVE_LIBGLTOOLS 1 _ACEOF fi fi fi if test -n "$GLTOOLS_LIB"; then HAVE_GLTOOLS_TRUE= HAVE_GLTOOLS_FALSE='#' else HAVE_GLTOOLS_TRUE='#' HAVE_GLTOOLS_FALSE= fi # Check whether --with-dx was given. if test "${with_dx+set}" = set; then withval=$with_dx; case "$withval" in yes) ;; no) DX_DISABLE=yes { echo "$as_me:$LINENO: result: Disabling \"dx\"" >&5 echo "${ECHO_T}Disabling \"dx\"" >&6; } ;; *) { { echo "$as_me:$LINENO: error: \"$withval\" should have been either \"yes\" or \"no\"" >&5 echo "$as_me: error: \"$withval\" should have been either \"yes\" or \"no\"" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_DISABLE=no fi if test "${DX_DISABLE}" = yes; then : else DEFAULT_LIBDIR=`eval eval echo ${libdir}` # Check whether --with-dx-name was given. if test "${with_dx_name+set}" = set; then withval=$with_dx_name; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-dx-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-dx-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) DX_NAME=$withval ;; esac else DX_NAME=DXL fi # Check whether --with-dx-dir was given. if test "${with_dx_dir+set}" = set; then withval=$with_dx_dir; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-dx-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-dx-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) DX_LIB_PATH=$withval DX_INCLUDE_PATH=$withval ;; esac fi # Check whether --with-dx-lib was given. if test "${with_dx_lib+set}" = set; then withval=$with_dx_lib; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-dx-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-dx-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) DX_LIB_PATH=$withval ;; esac else test -z "${DX_LIB_PATH}" && DX_LIB_PATH=$DEFAULT_LIBDIR fi DEFAULT_INCDIR=`eval eval echo ${includedir}` # Check whether --with-dx-headers was given. if test "${with_dx_headers+set}" = set; then withval=$with_dx_headers; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-dx-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-dx-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-dx-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) DX_INCLUDE_PATH=$withval ;; esac else test -z "${DX_INCLUDE_PATH}" && DX_INCLUDE_PATH=$DEFAULT_INCDIR fi as_ac_Lib=`echo "ac_cv_lib_${DX_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -l${DX_NAME}" >&5 echo $ECHO_N "checking for main in -l${DX_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${DX_NAME} -L${DX_LIB_PATH} -lrt -lDXcallm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then DX_LIB="-L${DX_LIB_PATH} -l${DX_NAME}" DX_ALL_LIB="-L${DX_LIB_PATH} -l${DX_NAME} -lrt -lDXcallm" else DX_LIB="" DX_ALL_LIB="" DX_LIB_PATH="" DX_INCLUDE="" DX_INCLUDE_PATH="" fi if test "x${DX_LIB}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${DX_NAME}___main" as_ac_Lib=`echo "ac_cv_lib_${DX_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -framework ${DX_NAME}" >&5 echo $ECHO_N "checking for main in -framework ${DX_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-framework ${DX_NAME} -F${DX_LIB_PATH} -lrt -lDXcallm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then DX_LIB="-F${DX_LIB_PATH} -framework ${DX_NAME}" DX_ALL_LIB="-F${DX_LIB_PATH} -framework ${DX_NAME} -lrt -lDXcallm" else DX_LIB="" DX_ALL_LIB="" DX_LIB_PATH="" DX_INCLUDE="" DX_INCLUDE_PATH="" fi ;; esac fi if test "x${DX_LIB}" = "x" ; then : else ac_DX_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${DX_INCLUDE_PATH} $CPPFLAGS" for ac_header in dx/dx.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else DX_LIB="" DX_ALL_LIB="" DX_INCLUDE="" DX_LIB_PATH="" DX_INCLUDE_PATH="" fi done if ! test -f "${DX_INCLUDE_PATH}/dx/dx.h"; then DX_INCLUDE="" fi CPPCLAGS="${ac_DX_save_CPPFLAGS}" if test "x${DX_LIB}" = "x" ; then : else cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDXL 1 _ACEOF fi fi fi if test -n "$DX_LIB"; then HAVE_DX_TRUE= HAVE_DX_FALSE='#' else HAVE_DX_TRUE='#' HAVE_DX_FALSE= fi if test -n "${HAVE_DX_FALSE}"; then for ac_header in unistd.h errno.h Xm/Xm.h Xm/Form.h Xm/DrawingA.h pthread.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Sorry, needed for dxtools, exiting..." >&5 echo "$as_me: error: Sorry, needed for dxtools, exiting..." >&2;} { (exit 1); exit 1; }; } fi done fi # Check whether --with-grape was given. if test "${with_grape+set}" = set; then withval=$with_grape; case "$withval" in yes) ;; no) GRAPE_DISABLE=yes { echo "$as_me:$LINENO: result: Disabling \"grape\"" >&5 echo "${ECHO_T}Disabling \"grape\"" >&6; } ;; *) { { echo "$as_me:$LINENO: error: \"$withval\" should have been either \"yes\" or \"no\"" >&5 echo "$as_me: error: \"$withval\" should have been either \"yes\" or \"no\"" >&2;} { (exit 1); exit 1; }; } ;; esac else GRAPE_DISABLE=no fi if test "${GRAPE_DISABLE}" = yes; then : else DEFAULT_LIBDIR=`eval eval echo ${libdir}` # Check whether --with-grape-name was given. if test "${with_grape_name+set}" = set; then withval=$with_grape_name; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-grape-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-grape-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GRAPE_NAME=$withval ;; esac else GRAPE_NAME=gr fi # Check whether --with-grape-dir was given. if test "${with_grape_dir+set}" = set; then withval=$with_grape_dir; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-grape-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-grape-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GRAPE_LIB_PATH=$withval GRAPE_INCLUDE_PATH=$withval ;; esac fi # Check whether --with-grape-lib was given. if test "${with_grape_lib+set}" = set; then withval=$with_grape_lib; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-grape-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-grape-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GRAPE_LIB_PATH=$withval ;; esac else test -z "${GRAPE_LIB_PATH}" && GRAPE_LIB_PATH=$DEFAULT_LIBDIR fi DEFAULT_INCDIR=`eval eval echo ${includedir}` # Check whether --with-grape-headers was given. if test "${with_grape_headers+set}" = set; then withval=$with_grape_headers; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-grape-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-grape-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-grape-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) GRAPE_INCLUDE_PATH=$withval ;; esac else test -z "${GRAPE_INCLUDE_PATH}" && GRAPE_INCLUDE_PATH=$DEFAULT_INCDIR fi as_ac_Lib=`echo "ac_cv_lib_${GRAPE_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -l${GRAPE_NAME}" >&5 echo $ECHO_N "checking for main in -l${GRAPE_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${GRAPE_NAME} -L${GRAPE_LIB_PATH} ${OPENGL_LIB} ${X_ALL_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then GRAPE_LIB="-L${GRAPE_LIB_PATH} -l${GRAPE_NAME}" GRAPE_ALL_LIB="-L${GRAPE_LIB_PATH} -l${GRAPE_NAME} ${OPENGL_LIB} ${X_ALL_LIBS}" else GRAPE_LIB="" GRAPE_ALL_LIB="" GRAPE_LIB_PATH="" GRAPE_INCLUDE="" GRAPE_INCLUDE_PATH="" fi if test "x${GRAPE_LIB}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${GRAPE_NAME}___main" as_ac_Lib=`echo "ac_cv_lib_${GRAPE_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -framework ${GRAPE_NAME}" >&5 echo $ECHO_N "checking for main in -framework ${GRAPE_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-framework ${GRAPE_NAME} -F${GRAPE_LIB_PATH} ${OPENGL_LIB} ${X_ALL_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then GRAPE_LIB="-F${GRAPE_LIB_PATH} -framework ${GRAPE_NAME}" GRAPE_ALL_LIB="-F${GRAPE_LIB_PATH} -framework ${GRAPE_NAME} ${OPENGL_LIB} ${X_ALL_LIBS}" else GRAPE_LIB="" GRAPE_ALL_LIB="" GRAPE_LIB_PATH="" GRAPE_INCLUDE="" GRAPE_INCLUDE_PATH="" fi ;; esac fi if test "x${GRAPE_LIB}" = "x" ; then : else ac_GRAPE_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${GRAPE_INCLUDE_PATH} $CPPFLAGS" for ac_header in grape.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else GRAPE_LIB="" GRAPE_ALL_LIB="" GRAPE_INCLUDE="" GRAPE_LIB_PATH="" GRAPE_INCLUDE_PATH="" fi done if ! test -f "${GRAPE_INCLUDE_PATH}/grape.h"; then GRAPE_INCLUDE="" fi CPPCLAGS="${ac_GRAPE_save_CPPFLAGS}" if test "x${GRAPE_LIB}" = "x" ; then : else cat >>confdefs.h <<\_ACEOF #define HAVE_LIBGR 1 _ACEOF fi fi fi if test -n "$GRAPE_LIB"; then HAVE_GRAPE_TRUE= HAVE_GRAPE_FALSE='#' else HAVE_GRAPE_TRUE='#' HAVE_GRAPE_FALSE= fi if test -n "${GRAPE_LIB}"; then GRAPE_TRUE= GRAPE_FALSE='#' else GRAPE_TRUE='#' GRAPE_FALSE= fi ALBERTA_LIB_PATH=$prefix/lib ALBERTA_INCLUDE_PATH='$(top_srcdir)/alberta/src/Common/ -I$(top_srcdir)/alberta_util/src/ -I$(top_builddir)/alberta_util/src/' ALBERTA_LIBS_1='$(top_builddir)/alberta/src/alberta_1d/libalberta_1d.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_LIBS_2='$(top_builddir)/alberta/src/alberta_2d/libalberta_2d.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_LIBS_3='$(top_builddir)/alberta/src/alberta_3d/libalberta_3d.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_DEBUG= # Check whether --with-silo was given. if test "${with_silo+set}" = set; then withval=$with_silo; case "$withval" in yes) ;; no) SILO_DISABLE=yes { echo "$as_me:$LINENO: result: Disabling \"silo\"" >&5 echo "${ECHO_T}Disabling \"silo\"" >&6; } ;; *) { { echo "$as_me:$LINENO: error: \"$withval\" should have been either \"yes\" or \"no\"" >&5 echo "$as_me: error: \"$withval\" should have been either \"yes\" or \"no\"" >&2;} { (exit 1); exit 1; }; } ;; esac else SILO_DISABLE=no fi if test "${SILO_DISABLE}" = yes; then : else DEFAULT_LIBDIR=`eval eval echo ${libdir}` # Check whether --with-silo-name was given. if test "${with_silo_name+set}" = set; then withval=$with_silo_name; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-silo-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-silo-name\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-name\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) SILO_NAME=$withval ;; esac else SILO_NAME=silo fi # Check whether --with-silo-dir was given. if test "${with_silo_dir+set}" = set; then withval=$with_silo_dir; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-silo-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-silo-dir\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-dir\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) SILO_LIB_PATH=$withval SILO_INCLUDE_PATH=$withval ;; esac fi # Check whether --with-silo-lib was given. if test "${with_silo_lib+set}" = set; then withval=$with_silo_lib; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-silo-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-silo-lib\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-lib\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) SILO_LIB_PATH=$withval ;; esac else test -z "${SILO_LIB_PATH}" && SILO_LIB_PATH=$DEFAULT_LIBDIR fi DEFAULT_INCDIR=`eval eval echo ${includedir}` # Check whether --with-silo-headers was given. if test "${with_silo_headers+set}" = set; then withval=$with_silo_headers; case "$withval" in yes) { { echo "$as_me:$LINENO: error: "option \"--with-silo-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; no) { { echo "$as_me:$LINENO: error: "option \"--with-silo-headers\" requires an argument"" >&5 echo "$as_me: error: "option \"--with-silo-headers\" requires an argument"" >&2;} { (exit 1); exit 1; }; } ;; *) SILO_INCLUDE_PATH=$withval ;; esac else test -z "${SILO_INCLUDE_PATH}" && SILO_INCLUDE_PATH=$DEFAULT_INCDIR fi as_ac_Lib=`echo "ac_cv_lib_${SILO_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -l${SILO_NAME}" >&5 echo $ECHO_N "checking for main in -l${SILO_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${SILO_NAME} -L${SILO_LIB_PATH} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then SILO_LIB="-L${SILO_LIB_PATH} -l${SILO_NAME}" SILO_ALL_LIB="-L${SILO_LIB_PATH} -l${SILO_NAME} " else SILO_LIB="" SILO_ALL_LIB="" SILO_LIB_PATH="" SILO_INCLUDE="" SILO_INCLUDE_PATH="" fi if test "x${SILO_LIB}" = "x" ; then case "$host" in *darwin*) eval "unset ac_cv_lib_${SILO_NAME}___main" as_ac_Lib=`echo "ac_cv_lib_${SILO_NAME}''_main" | $as_tr_sh` { echo "$as_me:$LINENO: checking for main in -framework ${SILO_NAME}" >&5 echo $ECHO_N "checking for main in -framework ${SILO_NAME}... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-framework ${SILO_NAME} -F${SILO_LIB_PATH} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then SILO_LIB="-F${SILO_LIB_PATH} -framework ${SILO_NAME}" SILO_ALL_LIB="-F${SILO_LIB_PATH} -framework ${SILO_NAME} " else SILO_LIB="" SILO_ALL_LIB="" SILO_LIB_PATH="" SILO_INCLUDE="" SILO_INCLUDE_PATH="" fi ;; esac fi if test "x${SILO_LIB}" = "x" ; then : else ac_SILO_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${SILO_INCLUDE_PATH} $CPPFLAGS" for ac_header in silo.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------- ## ## Report this to claus@mathematik.uni-freiburg.de ## ## ----------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else SILO_LIB="" SILO_ALL_LIB="" SILO_INCLUDE="" SILO_LIB_PATH="" SILO_INCLUDE_PATH="" fi done if ! test -f "${SILO_INCLUDE_PATH}/silo.h"; then SILO_INCLUDE="" fi CPPCLAGS="${ac_SILO_save_CPPFLAGS}" if test "x${SILO_LIB}" = "x" ; then : else cat >>confdefs.h <<\_ACEOF #define HAVE_LIBSILO 1 _ACEOF fi fi fi if test -n "$SILO_LIB"; then HAVE_SILO_TRUE= HAVE_SILO_FALSE='#' else HAVE_SILO_TRUE='#' HAVE_SILO_FALSE= fi if false; then GEOMVIEW_TRUE= GEOMVIEW_FALSE='#' else GEOMVIEW_TRUE='#' GEOMVIEW_FALSE= fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; case "$enableval" in yes) ALBERTA_DEBUG=1 ;; no) ALBERTA_DEBUG=0 ;; *) { { echo "$as_me:$LINENO: error: \"--disable-debug\" does not take an argument." >&5 echo "$as_me: error: \"--disable-debug\" does not take an argument." >&2;} { (exit 1); exit 1; }; } ;; esac else ALBERTA_DEBUG=1 fi if test "$ALBERTA_DEBUG" -eq 1; then ALBERTA_DEBUG_TRUE= ALBERTA_DEBUG_FALSE='#' else ALBERTA_DEBUG_TRUE='#' ALBERTA_DEBUG_FALSE= fi # Check whether --enable-install-libtool was given. if test "${enable_install_libtool+set}" = set; then enableval=$enable_install_libtool; case "$enableval" in yes) INSTALL_LIBTOOL=1 ;; no) INSTALL_LIBTOOL=0 ;; *) { { echo "$as_me:$LINENO: error: \"--disable-install-libtool\" does not take an argument." >&5 echo "$as_me: error: \"--disable-install-libtool\" does not take an argument." >&2;} { (exit 1); exit 1; }; } ;; esac else INSTALL_LIBTOOL=1 fi if test "$INSTALL_LIBTOOL" -eq 1; then INSTALL_LIBTOOL_TRUE= INSTALL_LIBTOOL_FALSE='#' else INSTALL_LIBTOOL_TRUE='#' INSTALL_LIBTOOL_FALSE= fi # building of all versions is enabled by default, but can be # disabled using --disable-DOW-dimension switches (the macros # below do _not_ disable the builds, but simply implement # AC_ARG_ENABLE() stuff # # BIG FAT NOTE: the DIMENSION_DISABLE macro MUST COME LAST, right # before the AC_OUTPUT # # Check whether --enable-alberta-1 was given. if test "${enable_alberta_1+set}" = set; then enableval=$enable_alberta_1; case "$enableval" in yes) ALBERTA_1=1 ;; no) ALBERTA_1=0 ;; *) { { echo "$as_me:$LINENO: error: \"--disable-alberta-1\" does not take an argument." >&5 echo "$as_me: error: \"--disable-alberta-1\" does not take an argument." >&2;} { (exit 1); exit 1; }; } ;; esac else ALBERTA_1=1 fi if test "$ALBERTA_1" -eq 1; then ALBERTA_1_TRUE= ALBERTA_1_FALSE='#' else ALBERTA_1_TRUE='#' ALBERTA_1_FALSE= fi ac_config_files="$ac_config_files alberta/src/alberta_1d/Makefile" ac_config_files="$ac_config_files alberta/src/alberta_1d_debug/Makefile" # Check whether --enable-alberta-2 was given. if test "${enable_alberta_2+set}" = set; then enableval=$enable_alberta_2; case "$enableval" in yes) ALBERTA_2=1 ;; no) ALBERTA_2=0 ;; *) { { echo "$as_me:$LINENO: error: \"--disable-alberta-2\" does not take an argument." >&5 echo "$as_me: error: \"--disable-alberta-2\" does not take an argument." >&2;} { (exit 1); exit 1; }; } ;; esac else ALBERTA_2=1 fi if test "$ALBERTA_2" -eq 1; then ALBERTA_2_TRUE= ALBERTA_2_FALSE='#' else ALBERTA_2_TRUE='#' ALBERTA_2_FALSE= fi ac_config_files="$ac_config_files alberta/src/alberta_2d/Makefile" ac_config_files="$ac_config_files alberta/src/alberta_2d_debug/Makefile" # Check whether --enable-alberta-3 was given. if test "${enable_alberta_3+set}" = set; then enableval=$enable_alberta_3; case "$enableval" in yes) ALBERTA_3=1 ;; no) ALBERTA_3=0 ;; *) { { echo "$as_me:$LINENO: error: \"--disable-alberta-3\" does not take an argument." >&5 echo "$as_me: error: \"--disable-alberta-3\" does not take an argument." >&2;} { (exit 1); exit 1; }; } ;; esac else ALBERTA_3=1 fi if test "$ALBERTA_3" -eq 1; then ALBERTA_3_TRUE= ALBERTA_3_FALSE='#' else ALBERTA_3_TRUE='#' ALBERTA_3_FALSE= fi ac_config_files="$ac_config_files alberta/src/alberta_3d/Makefile" ac_config_files="$ac_config_files alberta/src/alberta_3d_debug/Makefile" # # flush everything to disk # cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_BLAS_TRUE}" && test -z "${HAVE_BLAS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_BLAS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_BLAS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_OPENGL_TRUE}" && test -z "${HAVE_OPENGL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_OPENGL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_OPENGL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_GLTOOLS_TRUE}" && test -z "${HAVE_GLTOOLS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_GLTOOLS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_GLTOOLS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_DX_TRUE}" && test -z "${HAVE_DX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_DX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_DX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_GRAPE_TRUE}" && test -z "${HAVE_GRAPE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_GRAPE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_GRAPE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GRAPE_TRUE}" && test -z "${GRAPE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GRAPE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GRAPE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_SILO_TRUE}" && test -z "${HAVE_SILO_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_SILO\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_SILO\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GEOMVIEW_TRUE}" && test -z "${GEOMVIEW_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GEOMVIEW\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GEOMVIEW\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ALBERTA_DEBUG_TRUE}" && test -z "${ALBERTA_DEBUG_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ALBERTA_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ALBERTA_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${INSTALL_LIBTOOL_TRUE}" && test -z "${INSTALL_LIBTOOL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"INSTALL_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ALBERTA_1_TRUE}" && test -z "${ALBERTA_1_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ALBERTA_1\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ALBERTA_1\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ALBERTA_2_TRUE}" && test -z "${ALBERTA_2_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ALBERTA_2\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ALBERTA_2\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ALBERTA_3_TRUE}" && test -z "${ALBERTA_3_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ALBERTA_3\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ALBERTA_3\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by alberta $as_me 2.0.1, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ alberta config.status 2.0.1 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "gnu-compat/Makefile") CONFIG_FILES="$CONFIG_FILES gnu-compat/Makefile" ;; "alberta_util/Makefile") CONFIG_FILES="$CONFIG_FILES alberta_util/Makefile" ;; "alberta_util/src/Makefile") CONFIG_FILES="$CONFIG_FILES alberta_util/src/Makefile" ;; "alberta_util/src/alberta_util_inlines.h.in") CONFIG_FILES="$CONFIG_FILES alberta_util/src/alberta_util_inlines.h.in" ;; "add_ons/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/Makefile" ;; "add_ons/geomview/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/geomview/Makefile" ;; "add_ons/grape/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/grape/Makefile" ;; "add_ons/grape/mesh/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/grape/mesh/Makefile" ;; "add_ons/grape/mesh/2d/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/grape/mesh/2d/Makefile" ;; "add_ons/grape/mesh/3d/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/grape/mesh/3d/Makefile" ;; "add_ons/meshtv/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/meshtv/Makefile" ;; "add_ons/meshtv/1d/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/meshtv/1d/Makefile" ;; "add_ons/meshtv/2d/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/meshtv/2d/Makefile" ;; "add_ons/meshtv/3d/Makefile") CONFIG_FILES="$CONFIG_FILES add_ons/meshtv/3d/Makefile" ;; "demo/src/Makefile") CONFIG_FILES="$CONFIG_FILES demo/src/Makefile" ;; "demo/src/1d/Makefile") CONFIG_FILES="$CONFIG_FILES demo/src/1d/Makefile" ;; "demo/src/2d/Makefile") CONFIG_FILES="$CONFIG_FILES demo/src/2d/Makefile" ;; "demo/src/3d/Makefile") CONFIG_FILES="$CONFIG_FILES demo/src/3d/Makefile" ;; "alberta/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/Makefile" ;; "alberta/src/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/Makefile" ;; "alberta/src/Common/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/Common/Makefile" ;; "alberta/src/Common/Makefile.alberta") CONFIG_FILES="$CONFIG_FILES alberta/src/Common/Makefile.alberta" ;; "demo") CONFIG_COMMANDS="$CONFIG_COMMANDS demo" ;; "alberta_util/src/alberta_util_inlines.h") CONFIG_COMMANDS="$CONFIG_COMMANDS alberta_util/src/alberta_util_inlines.h" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "alberta/src/alberta_1d/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/alberta_1d/Makefile" ;; "alberta/src/alberta_1d_debug/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/alberta_1d_debug/Makefile" ;; "alberta/src/alberta_2d/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/alberta_2d/Makefile" ;; "alberta/src/alberta_2d_debug/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/alberta_2d_debug/Makefile" ;; "alberta/src/alberta_3d/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/alberta_3d/Makefile" ;; "alberta/src/alberta_3d_debug/Makefile") CONFIG_FILES="$CONFIG_FILES alberta/src/alberta_3d_debug/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim LN_S!$LN_S$ac_delim GZIP_PROGRAM!$GZIP_PROGRAM$ac_delim TAR_PROGRAM!$TAR_PROGRAM$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim FLIBS!$FLIBS$ac_delim DNRM2_F77_FUNC!$DNRM2_F77_FUNC$ac_delim DAXPY_F77_FUNC!$DAXPY_F77_FUNC$ac_delim DEXPY_F77_FUNC!$DEXPY_F77_FUNC$ac_delim DMXPY_F77_FUNC!$DMXPY_F77_FUNC$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF DCOPY_F77_FUNC!$DCOPY_F77_FUNC$ac_delim DDOT_F77_FUNC!$DDOT_F77_FUNC$ac_delim DSCAL_F77_FUNC!$DSCAL_F77_FUNC$ac_delim DSWAP_F77_FUNC!$DSWAP_F77_FUNC$ac_delim DXPAY_F77_FUNC!$DXPAY_F77_FUNC$ac_delim DRANDN_F77_FUNC!$DRANDN_F77_FUNC$ac_delim SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim DSYMUTIL!$DSYMUTIL$ac_delim NMEDIT!$NMEDIT$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CXXCPP!$CXXCPP$ac_delim LIBTOOL!$LIBTOOL$ac_delim ALBERTA_DEBUG_CFLAGS!$ALBERTA_DEBUG_CFLAGS$ac_delim ALBERTA_OPTIMIZE_CFLAGS!$ALBERTA_OPTIMIZE_CFLAGS$ac_delim LIBOBJS!$LIBOBJS$ac_delim GNUCOMPAT_INCLUDE_PATH!$GNUCOMPAT_INCLUDE_PATH$ac_delim expanded_prefix!$expanded_prefix$ac_delim expanded_exec_prefix!$expanded_exec_prefix$ac_delim HAVE_BLAS_TRUE!$HAVE_BLAS_TRUE$ac_delim HAVE_BLAS_FALSE!$HAVE_BLAS_FALSE$ac_delim BLAS_INCLUDE_PATH!$BLAS_INCLUDE_PATH$ac_delim BLAS_LIB_PATH!$BLAS_LIB_PATH$ac_delim BLAS_INCLUDE!$BLAS_INCLUDE$ac_delim BLAS_LIB!$BLAS_LIB$ac_delim BLAS_ALL_LIB!$BLAS_ALL_LIB$ac_delim BLAS_NAME!$BLAS_NAME$ac_delim XMKMF!$XMKMF$ac_delim X_CFLAGS!$X_CFLAGS$ac_delim X_PRE_LIBS!$X_PRE_LIBS$ac_delim X_LIBS!$X_LIBS$ac_delim X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim X_ALL_LIBS!$X_ALL_LIBS$ac_delim HAVE_OPENGL_TRUE!$HAVE_OPENGL_TRUE$ac_delim HAVE_OPENGL_FALSE!$HAVE_OPENGL_FALSE$ac_delim OPENGL_INCLUDE_PATH!$OPENGL_INCLUDE_PATH$ac_delim OPENGL_LIB_PATH!$OPENGL_LIB_PATH$ac_delim OPENGL_INCLUDE!$OPENGL_INCLUDE$ac_delim OPENGL_LIB!$OPENGL_LIB$ac_delim OPENGL_ALL_LIB!$OPENGL_ALL_LIB$ac_delim OPENGL_NAME!$OPENGL_NAME$ac_delim HAVE_GLTOOLS_TRUE!$HAVE_GLTOOLS_TRUE$ac_delim HAVE_GLTOOLS_FALSE!$HAVE_GLTOOLS_FALSE$ac_delim GLTOOLS_INCLUDE_PATH!$GLTOOLS_INCLUDE_PATH$ac_delim GLTOOLS_LIB_PATH!$GLTOOLS_LIB_PATH$ac_delim GLTOOLS_INCLUDE!$GLTOOLS_INCLUDE$ac_delim GLTOOLS_LIB!$GLTOOLS_LIB$ac_delim GLTOOLS_ALL_LIB!$GLTOOLS_ALL_LIB$ac_delim GLTOOLS_NAME!$GLTOOLS_NAME$ac_delim HAVE_DX_TRUE!$HAVE_DX_TRUE$ac_delim HAVE_DX_FALSE!$HAVE_DX_FALSE$ac_delim DX_INCLUDE_PATH!$DX_INCLUDE_PATH$ac_delim DX_LIB_PATH!$DX_LIB_PATH$ac_delim DX_INCLUDE!$DX_INCLUDE$ac_delim DX_LIB!$DX_LIB$ac_delim DX_ALL_LIB!$DX_ALL_LIB$ac_delim DX_NAME!$DX_NAME$ac_delim HAVE_GRAPE_TRUE!$HAVE_GRAPE_TRUE$ac_delim HAVE_GRAPE_FALSE!$HAVE_GRAPE_FALSE$ac_delim GRAPE_INCLUDE_PATH!$GRAPE_INCLUDE_PATH$ac_delim GRAPE_LIB_PATH!$GRAPE_LIB_PATH$ac_delim GRAPE_INCLUDE!$GRAPE_INCLUDE$ac_delim GRAPE_LIB!$GRAPE_LIB$ac_delim GRAPE_ALL_LIB!$GRAPE_ALL_LIB$ac_delim GRAPE_NAME!$GRAPE_NAME$ac_delim GRAPE_TRUE!$GRAPE_TRUE$ac_delim GRAPE_FALSE!$GRAPE_FALSE$ac_delim ALBERTA_DEBUG!$ALBERTA_DEBUG$ac_delim ALBERTA_LIB_PATH!$ALBERTA_LIB_PATH$ac_delim ALBERTA_INCLUDE_PATH!$ALBERTA_INCLUDE_PATH$ac_delim ALBERTA_LIBS_1!$ALBERTA_LIBS_1$ac_delim ALBERTA_LIBS_2!$ALBERTA_LIBS_2$ac_delim ALBERTA_LIBS_3!$ALBERTA_LIBS_3$ac_delim HAVE_SILO_TRUE!$HAVE_SILO_TRUE$ac_delim HAVE_SILO_FALSE!$HAVE_SILO_FALSE$ac_delim SILO_INCLUDE_PATH!$SILO_INCLUDE_PATH$ac_delim SILO_LIB_PATH!$SILO_LIB_PATH$ac_delim SILO_INCLUDE!$SILO_INCLUDE$ac_delim SILO_LIB!$SILO_LIB$ac_delim SILO_ALL_LIB!$SILO_ALL_LIB$ac_delim SILO_NAME!$SILO_NAME$ac_delim GEOMVIEW_TRUE!$GEOMVIEW_TRUE$ac_delim GEOMVIEW_FALSE!$GEOMVIEW_FALSE$ac_delim ALBERTA_DEBUG_TRUE!$ALBERTA_DEBUG_TRUE$ac_delim ALBERTA_DEBUG_FALSE!$ALBERTA_DEBUG_FALSE$ac_delim INSTALL_LIBTOOL!$INSTALL_LIBTOOL$ac_delim INSTALL_LIBTOOL_TRUE!$INSTALL_LIBTOOL_TRUE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF INSTALL_LIBTOOL_FALSE!$INSTALL_LIBTOOL_FALSE$ac_delim ALBERTA_1!$ALBERTA_1$ac_delim ALBERTA_1_TRUE!$ALBERTA_1_TRUE$ac_delim ALBERTA_1_FALSE!$ALBERTA_1_FALSE$ac_delim ALBERTA_2!$ALBERTA_2$ac_delim ALBERTA_2_TRUE!$ALBERTA_2_TRUE$ac_delim ALBERTA_2_FALSE!$ALBERTA_2_FALSE$ac_delim ALBERTA_3!$ALBERTA_3$ac_delim ALBERTA_3_TRUE!$ALBERTA_3_TRUE$ac_delim ALBERTA_3_FALSE!$ALBERTA_3_FALSE$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 11; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "demo":C) if ! test "$srcdir" = \. ; then { echo "$as_me:$LINENO: Copying $srcdir/demo sources to current directory" >&5 echo "$as_me: Copying $srcdir/demo sources to current directory" >&6;} ( cd $srcdir && tar cf - demo ) | tar xf - fi ;; "alberta_util/src/alberta_util_inlines.h":C) if test -f alberta_util/src/alberta_util_inlines.h && \ cmp alberta_util/src/alberta_util_inlines.h alberta_util/src/alberta_util_inlines.h.in then { echo "$as_me:$LINENO: alberta_util/src/alberta_util_inlines.h is unchanged" >&5 echo "$as_me: alberta_util/src/alberta_util_inlines.h is unchanged" >&6;} else { echo "$as_me:$LINENO: Creating alberta_util/src/alberta_util_inlines.h" >&5 echo "$as_me: Creating alberta_util/src/alberta_util_inlines.h" >&6;} cp \ alberta_util/src/alberta_util_inlines.h.in \ alberta_util/src/alberta_util_inlines.h fi ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi alberta-2.0.1/AUTHORS0000644000042300001440000000155210676723573011130 00000000000000ALBERTA: an Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques http://www.mathematik.uni-freiburg.de/IAM/ALBERTA authors: Alfred Schmidt Zentrum fuer Technomathematik Fachbereich 3 Universitaet Bremen Germany schmidt@math.uni-bremen.de Permanent address: Institut f"ur Angewandte Mathematik Albert-Ludwigs-Universit"at Freiburg Germany Kunibert G. Siebert Institut f"ur Angewandte Mathematik Albert-Ludwigs-Universit"at Freiburg Germany kunibert@mathematik.uni-freiburg.de (c) by A. Schmidt and K.G. Siebert (1996-2001) alberta-2.0.1/COPYING0000644000042300001440000010451311067145727011106 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . alberta-2.0.1/ChangeLog0000644000042300001440000072306310676723573011642 000000000000002004-03-24 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Set version to 1.3-alpha to reflect Dani's merge of the BM-branch. 2004-03-24 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c: write_macro now calculates and writes neighborhood relationships. (Suggested by Oli) * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c: write_macro now also computes and writes neighborhood relationships. (Suggested by Oli) * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c: added "sort_face_indices()" * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in: Changed a few targets and fixed a buglet in gltools.c. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in: Changed some targets and fixed a buglet in gltools.c * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta_dow_inlines.h: Had to re-add this file (still not sure what went wrong before). * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_dowb.c: Had to re-add these files (still not sure what went wrong before). 2004-03-24 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c: inserted sort_face_indices for 1d * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c: The Lagrange grid is now memorized for each DOF_REAL(_D)_VEC and used again on the next call. 2004-03-24 Daniel Koester * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Incorporated DOF_DOWB_MATRIX codes. New release branch for ALBERTA 1.2 without block matrices was created before this step. 2004-03-24 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c: write_macro now calculates and writes neighborhood relationships. (Suggested by Oli) * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c: write_macro now also computes and writes neighborhood relationships. (Suggested by Oli) * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c: added "sort_face_indices()" * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in: Changed a few targets and fixed a buglet in gltools.c. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in: Changed some targets and fixed a buglet in gltools.c * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta_dow_inlines.h: Had to re-add this file (still not sure what went wrong before). * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_dowb.c: Had to re-add these files (still not sure what went wrong before). 2004-03-24 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c: inserted sort_face_indices for 1d * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c: The Lagrange grid is now memorized for each DOF_REAL(_D)_VEC and used again on the next call. 2004-03-24 Daniel Koester * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Incorporated DOF_DOWB_MATRIX codes. New release branch for ALBERTA 1.2 without block matrices was created before this step. 2004-03-19 Alfred Schmidt * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/HB_precon.c: removed exit_HB_precon when level < 2 2004-03-18 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Forgot to bump version to ...-pre8 2004-03-17 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta_dow_inlines.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/preface.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Merge from 1.2-pre8. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Bump version to 1.2-pre8. * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Update. 2004-03-04 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h: changed bug in definition of SCAL_DOW 2004-03-04 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h: changed bug in definition of SCAL_DOW 2004-02-13 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/testbla: und wech damit * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/testbla: testing.... * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c: Changed name and position of "cycles" to 2d/macro.c * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/macro.c: Changed name and position of "cycles" 2004-02-13 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h: changed the order of arguments for graph_line() (optional values last) and added function graph_point(). * /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS: Added news about the change in get_face_normal() * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex: tried to get links to Data types, symbolic constants etc in the bookmarks, not working up to now, added write_macro_{bin,xdr} to function section * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/preface.tex: Change date from October to December * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex: Reformulated paragraph about time-space adaptive method * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/eval-impl.tex: Changed definition of get_face_normal()... * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/defs.tex: redefined \hyperpage for compatibility with LaTeX * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex: Changed title * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c: changed prototype of get_face_normal(coord, side, normal) to get_face_normal(el_info, side, normal) and the normal is now the outer unit normal and no longer the inner unit normal 2004-02-12 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/macro.c: forgot to initialize i,j (argh) * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c: Added a call to new function "get_orientation" in 3D case. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/macro.c: Transferred calculation of macro element orientation from traverse_r to macro.c * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c: Transferred calculation of macro element orientation to 3d/macro.c, where it belongs. 2004-02-12 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_d.c: file oem_solve_d.c in mat_vec_d: size of dof_x and dof_y was set to dim but it is dim/DIM. 2004-02-12 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c: Kunibert found a bug in free_leaf_data... * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Updated my email address and corrected a few typos 2004-02-12 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c: element.c (all dimensions) in function world_to_coord:\n outside is no more lambda<-1.E-5 but adet*lambda<-1.E-15 2004-02-06 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c: removed bug in fill_orientation * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h: added graph_point() routine 2004-02-03 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/trav_xy.c: find_el_at_pt() was _severly_ broken. One MUST NOT return the address of a local variable to the caller of a function. 2004-01-29 Robert Kloefkorn * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c: Function free_element changed. Removed MSG("not imple.....) because this method is not used, as we are acting always on leaf level. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c: Habe die Funktionen fake_child und fake_select eingefuehrt, da es nicht gereicht hat, diese NULL zu setzen, da an manchen Stellen in Grape diese Methode einfach aufgerufen werde, ohne zu checken, ob sie existieren. Jetzt existieren sie, geben aber immer NULL zurueck. So laeuft eben in GRAPE. Hack mit Hack bekaempfen, bis man irgendwann an Herzversagen stirbt. 2004-01-26 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/admin/m4/albert-check.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-albert-qgl.m4, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_mittel.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.1, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.34kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.44kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.krumm2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.neum, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt-easy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/femtest.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/newton.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-concept.tex: albert->alberta and branch-update. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Block-matrix version suffix. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/AUTHORS, /net/sauron/graid/ALBERT_CVS/admin/COPYING, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog, /net/sauron/graid/ALBERT_CVS/admin/INSTALL, /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/admin/depcomp, /net/sauron/graid/ALBERT_CVS/admin/install-sh, /net/sauron/graid/ALBERT_CVS/admin/missing, /net/sauron/graid/ALBERT_CVS/admin/mkinstalldirs, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Makefile.am, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/m4/check-qt.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/set-prefix.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/type-sizes.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dnrm2.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dscal.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dset.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dswap.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/README, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cblas.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/daxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dcopy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ddot.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h, /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/INSTALL, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/Makefile.am: albert->alberta and branch-update. * /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am: albert->alberta * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta_dow_inlines.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_dowb.c: Initial revision. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta_dow_inlines.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_dowb.c: New file. 2004-01-14 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Add a comment. 2004-01-09 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Link with libgr before linking with gltools; both define the global symbol "arrow". Fools. 2004-01-07 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/README: Fixed some typos. * /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/admin/generate-alberta-automakefiles.sh: Substitute OPTIMISE by OPTIMIZE 2003-12-05 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Dump to pre7. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Make GZIP_PROGRAM and TAR_PROGRAM precious. * /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am: Remove standard BLAS functions. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Use TAR_PROGRAM and GZIP_PROGRAM instead of GZIP and TAR. 2003-12-04 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/.cvsignore: Add AucTeX stuff. 2003-12-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am.template: No need to link against X-libs now that gltools was removed from LIBS. NOTA BENE: linking a shared library against a non-shared library is not portable. * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4: Fix Darwin checks. * /net/sauron/graid/ALBERT_CVS/admin/m4/fortran.m4: Initial revision. * /net/sauron/graid/ALBERT_CVS/ALBERTA/Makefile.am: The Documentation has to be bought as book from Springer. Mmmh. Software without documentation ... * /net/sauron/graid/ALBERT_CVS/ALBERTA/Makefile.am: Make vclean before rebuilding the documentation. * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex: Use the tocbibind package to create contentslines for bibliography and index, otherwise hyperref breaks. 2003-12-01 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Don't include the Makefile.in's into the Demo tarball. * /net/sauron/graid/ALBERT_CVS/admin/README: Add note about compatibility between F77 Compiler an blas. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Prettyfy some messages. * /net/sauron/graid/ALBERT_CVS/admin/m4/alberta-dims.m4: really include all ALBERTA versions. * /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am: Use OPTIMISE_CFLAGS everywhere. * /net/sauron/graid/ALBERT_CVS/ALBERTA/Makefile.am: Fix pdf rule. * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/.cvsignore: Add alberta.pdf. * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Makefile, /net/sauron/graid/ALBERT_CVS/ALBERTA/Makefile.am: Include alberta.pdf into the distribution. * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in: Need the prefix from configure. Substitute ALBERTA_DEBUG_CFLAGS and ALBERTA_OPTIMISE_CFLAGS. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in: Forgot to add gltools. Set prefix and exec_prefix from configure. * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Fix some erroneous remarks introduced previously by myself. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Remove generated demo subdirectory with "make distclean". * /net/sauron/graid/ALBERT_CVS/admin/README: Mention location of ALBERTA web-page and ALBERTA manual right at the beginning, because this is The Right Thing (tm). * /net/sauron/graid/ALBERT_CVS/admin/README: Add some blas-wisdom. Start the file with a pointer to the web-page. * /net/sauron/graid/ALBERT_CVS/admin/NEWS: Mention the mailing-list. * /net/sauron/graid/ALBERT_CVS/admin/m4/set-prefix.m4: Provide expanded prefix and exec_prefix versions (named expanded_SOMETHING). * /net/sauron/graid/ALBERT_CVS/admin/m4/plotansi.m4: Only generate PLOT_for_all.c from PLOT_for_all.c.in when it is really needed. * /net/sauron/graid/ALBERT_CVS/admin/m4/alberta-dims.m4: Include all Makefile's into AC_CONFIG_FILES(), otherwise "make distclean" doesn't work anymore. * /net/sauron/graid/ALBERT_CVS/SOLVER/src/dcopy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ddot.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dscal.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dswap.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay.c: Mangled Fortran names are uppercase preprocessor macros, not lowercase. * /net/sauron/graid/ALBERT_CVS/admin/m4/plotansi.m4: Use PLOT_for_all on SGI. * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am: PLOT_for_all.c is nodist_... * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Simplify for brain-dead make programs. * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4: On Darwin, check whether -framework works if -l fails. * /net/sauron/graid/ALBERT_CVS/admin/m4/f77mangle.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/frameworks.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/grapeiface.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/plotansi.m4: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Strip of some larger passages to m4/plotansi.m4 and m4/grape.m4 * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Move automakefile generation to external shell-script. * /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Ignore distdir. * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Update. * /net/sauron/graid/ALBERT_CVS/admin/generate-alberta-automakefiles.sh: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/README: Update from ALBERT to ALBERTA. Try to be more detailed about setting of compiler-flags. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am.template: Use AM_CFLAGS and be a little bit more friendly to non-GNU make programs. * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_all.c.in: Initial revision, cloned from PLOT_for_sun.c * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/.cvsignore: Add PLOT_for_all.c * /net/sauron/graid/ALBERT_CVS/SOLVER/src/cblas.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/daxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dcopy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ddot.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dnrm2.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dscal.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dset.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dswap.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay.c: Use autoconf generated F77 name-mangling. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/Makefile.am.include: Remove duplicates. 2003-11-29 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/README: Slight fixes. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Run gzip with --force * /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Add auto-generated demo-package. * /net/sauron/graid/ALBERT_CVS/admin/COPYING: Exchange with ALBERTA license. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in: Fix gltools conditional * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/.cvsignore: Add Makefile.am * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: New rule to generate Makefile.am's for all ALBERTA libraries. (maintainer-mode only) * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Hacks to disable C++ stuff. * /net/sauron/graid/ALBERT_CVS/admin/mkinstalldirs, /net/sauron/graid/ALBERT_CVS/admin/missing, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/INSTALL, /net/sauron/graid/ALBERT_CVS/admin/install-sh, /net/sauron/graid/ALBERT_CVS/admin/depcomp: Update. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am.template: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/m4/libtool.m4: Initial revisions. * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4: Gargh. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/Makefile.am.include, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/Makefile.am.include: Initial revision. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/Makefile.am: Nowadays these are auto-generated. 2003-11-28 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Polish 'em up. * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in: Update to reflect changes in Makefile.alberta. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am: Also install Makefile.alberta in PREFIX/share/alberta/ * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in: Fix some (formal) bugs (includedir etc.) * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Check for tar and gzip and copy DEMO/-directory in case of a VPATH build. * /net/sauron/graid/ALBERT_CVS/admin/README: Update to reflect changes in configure. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Demo-tarball and libtool.alberta. * /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Add libtool.alberta * /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am: Use $(CC) for linking, but add $(FLIBS) to LIBADD, otherwise the stuff breaks on Darwin (MacOS X). * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Makefile.am: Disable Grape interface if ALBERTA22 and ALBERTA33 are disabled. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Makefile.am: Disable building of unwanted libraries. Needs automake-1.7. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA13_11/Makefile.am: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Conditionally enable/disable building of specific libraries (depending on dimensions and el_index and debugging). Default: only build 11/22/33 libraries without EL_INDEX but with debugging. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: automake-1.7 can cope with SUBDIRS += :) * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4: Add an automake conditional. * /net/sauron/graid/ALBERT_CVS/admin/m4/alberta-dims.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/simple-enable-flag.m4: Initial revision. 2003-11-28 Alfred Schmidt * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/traverse-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/preface.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/examples.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/intro.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-impl.tex: DOC Ueberarbeitung von Alfred, 28.11.03 eingecheckt 2003-11-27 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Stuff compiles again. Unify options for various packages. Still to do: optionally disable debugging libraries, make compilation of DIM != DOW an option. Tune Demo package. Solutions well known, just do it :) * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c: Add missing iteration variable. * /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am: Assure non-empty archive (dummy.c). * /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/dummy.c: Initial revision. * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/Makefile.am: CFLAGS issues (automake warnings). * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/graph_none.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h: Proto-type issues. 2003-11-26 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Start to canonicalize config options. WARNING: THE PACKAGE WILL PROBABLY NOT COMPILE AT THIS STAGE. 2003-11-03 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: ALBERT_DEBUG_CFLAGS 2003-10-15 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h: added SCAL_DOW macro removed entry leaf_data_block_info from leaf_data_structre, is now added by the mesh_mem_info structure added ALBERT and ALBERTA colors added the argument linewidth to graph_line() * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c: cleaned up some stuff like default colors, removed NO_WINDOW, not needed anymor, added the argument linewidth to graph_line() * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/traverse_r.c: removed one bug in testing flags; FILL_NEIGH is now possible without FILL_COORDS * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c: removed leaf_data_mem_info pointer from leaf_data_structure, is now handled v via mem_info * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_s.c: cleaned up some stuff related to precon in oem_solve_s * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Makefile: changed target full_tgz to include .obj and .pdf files * /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/divers.c: generate_filename() now expands ~ into home directory * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro1d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro1d.obj: Standard macro triangulation in 1d * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro1d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/nonlin.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/preface.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/traverse-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/util-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Makefile, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/assemble-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/bas-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/est-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-impl.tex: Re-editing of the implementation part by Kunibert 2003-10-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/traverse_nr_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/traverse_r_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/graph_none.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/adapt.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/bas_fct_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/check.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/coarsen_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/face_quad_fast.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/face_quad_fast.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/l2scp.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/level_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/AUTHORS, /net/sauron/graid/ALBERT_CVS/ALBERTA/COPYING, /net/sauron/graid/ALBERT_CVS/ALBERTA/ChangeLog, /net/sauron/graid/ALBERT_CVS/ALBERTA/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERTA/README, /net/sauron/graid/ALBERT_CVS/ALBERTA/THANKS, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/traverse_r.c: Some cosmetics regarding the change from ALBERT to ALBERTA * /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS: Listed changes in data structures and functions of the versions ALBERT-1.0 and ALBERTA-1.2 * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/files.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/intro.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/nonlin.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/notation.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/preface.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/util-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/assemble-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/bas-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/est-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/examples.tex: Kuni's Ueberarbeitung von Vorwort, Kapitel 1 und Kapitel 2 abgeschlossen. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c: changed if (theta < 0.0) into if (theta < 0.5) in main() 2003-10-01 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c: changed scaling by fac = 1.e-3 to be done for all theta < 0.5 * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/alberta.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt-easy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/femtest.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/newton.c: Removed old files of model implementation * /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS, /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/INSTALL, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS: Updated default files * /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/msg.c, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/alberta_util.h, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/alloc.c: some cosmetics after renaming ALBERT->ALBERTA and print_parameters() is now in alberta_util.h * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat: changed parameter file to be consistent with Figures 2.4 and 2.5 of the book * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile.in: changed command clean to remove all executables too. 2003-09-30 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c: removed a bug in heat.c * /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tau-3d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tria.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tria_dof.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/trias_forbidden.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+tree2.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh_node.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/n_dof-2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/n_dof-3d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-grid2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-grid3d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-sol2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-sol3d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/param_bound.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_center.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_edge.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_face.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_vertex.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/plus.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/quadratic_dof.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/rect.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_1simplex.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_e.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_gen.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_v.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tria_v.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_atomic_2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_atomic_3d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_recursive_2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/regular_2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/standard.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/standard_refined.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tau-2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/bary.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/circ.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/coarse_atomic_2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/coarse_atomic_3d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/cubic_orient.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/edge_tetra.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/edge_tria.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ellipt_mesh.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ellipt_uh.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat3d_ntria.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat3d_tau.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat_ntria.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat_tau.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/linear_dof.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro2d.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro34.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+tree1.pdf, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/bas-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/examples.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/files.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/intro.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/nonlin.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/preface.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/traverse-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/util-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.bib: conversion from ALBERT to ALBERTA, description of the model problems and a new preface 2003-09-26 Robert Kloefkorn * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c: Fixed bug for the 2d case. Now 2d Data are plain. Remember hmesh is always 3d so if you have 2d Data set the last component to zero. 2003-09-11 Alfred Schmidt * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c: added gltools_disp_est etc. in gltools.c 2003-09-10 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Bump version to pre3 * /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/ALBERTA12_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.albert.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.alberta.in, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/alberta.h, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/alberta_util.h, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/alberta.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/alberta_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/alberta_movi.c, /net/sauron/graid/ALBERT_CVS/admin/m4/albert-check.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/alberta-check.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-albert-qgl.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-alberta-qgl.m4, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/albert.bib, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/albert.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/alberta.bib, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/alloc.c, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/msg.c, /net/sauron/graid/ALBERT_CVS/ALBERTA_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/bas_fct_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/check.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/coarsen_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/face_quad_fast.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/face_quad_fast.h, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/l2scp.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/level_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/traverse_nr_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/traverse_r_common.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/adapt.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/graph_none.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tau-2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tau-3d.agr, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tau-3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tria.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tria_dof.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tria_dof.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/trias_forbidden.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/albert.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/albert.gif, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/albert.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/alberta.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/alberta.jpg, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/alberta.rgb, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Logo/alberta.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERTA/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_edge.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_face.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_vertex.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patches.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/plus.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/quadratic_dof.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/rect.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_1simplex.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_1simplex.fig, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_1simplex.png, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_e.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_e.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_gen.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_gen.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_v.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tetra_v.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ref_tria_v.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_atomic_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_atomic_2d.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_atomic_3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_atomic_3d.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/refine_recursive_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/regular_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/standard.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/standard.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/standard_refined.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/tau-2d.agr, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/n_dof-2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/n_dof-3d.agr, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/n_dof-3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-grid2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-grid3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-sol2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/nl-sol3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/param_bound.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/param_bound.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/patch_center.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat3d_ntria.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat3d_tau.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat_ntria.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/heat_tau.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/linear_dof.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/linear_dof.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro2d.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/macro34.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+tree.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+tree1.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+tree1.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+tree2.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh+trees.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh_node.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/mesh_node.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/n_dof-2d.agr, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/bary.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/circ.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/coarse_atomic_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/coarse_atomic_2d.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/coarse_atomic_3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/coarse_atomic_3d.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/cubic_orient.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/cubic_orient.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/edge_tetra.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/edge_tetra.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/edge_tria.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/edge_tria.sc, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ellipt_mesh.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/EPS/ellipt_uh.eps, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/traverse-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/util-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/assemble-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/bas-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/bas-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/dof-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/est-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/examples.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/files.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/intro.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/mesh-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/nonlin.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/notation.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/rc-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/AUTHORS, /net/sauron/graid/ALBERT_CVS/ALBERTA/COPYING, /net/sauron/graid/ALBERT_CVS/ALBERTA/ChangeLog, /net/sauron/graid/ALBERT_CVS/ALBERTA/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERTA/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERTA/NEWS, /net/sauron/graid/ALBERT_CVS/ALBERTA/README, /net/sauron/graid/ALBERT_CVS/ALBERTA/THANKS, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/Makefile, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERTA/doc/adapt-impl.tex: ALBERT becomes female. * /net/sauron/graid/ALBERT_CVS/admin/changesex.sh: Initial revision. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/femtest.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c, /net/sauron/graid/ALBERT_CVS/SOLVER/README, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/m4/albert-check.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-albert-qgl.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/check-qt.m4, /net/sauron/graid/ALBERT_CVS/admin/m4/type-sizes.m4, /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt-easy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/AUTHORS, /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: First step in ALBERT becoming femail. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Set debugging CFLAGS a little bit more intelligently. 2003-09-10 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c: Changes of heat.c and heat.dat for the Version 1.2 2003-09-09 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c: Removed preserve_coarse_dofs in ellipt.c and modified ellipt.dat matching the documentation. 2003-08-18 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4: Make the header file an option. 2003-08-07 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Update. 2003-08-06 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c: When using a preconditioner terminate when the real residuum is below the tolerance. "delta" only holds the residuum of P^{-1} (A x - b). 2003-08-05 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c: Only modify previous behaviour if precon != NULL. * /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c: Stop when _real_ residuum is reached. The former behaviour was to stop when the _preconditioned_ residuum was satisfying the prescribed tolerance. 2003-08-04 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.am: Install face_quad_fast.h * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Fix c++ enum/typedef issue. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Fix a typo. 2003-08-01 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/face_quad_fast.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/face_quad_fast.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/albert.bib, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/examples.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Merge from main-trunk. * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c: marking(): only use global refinement if adapt->err_sum > adapt->tolerance. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_0.c: struct bas_fcts {}: new component "bary", array with barycentric coordinates of maxima of the basis functions (i.e. the Lagrange-nodes for Lagrange basis functions). 2003-08-01 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c: marking(): only use global refinement if adapt->err_sum > adapt->tolerance. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_0.c: struct bas_fcts {}: new component "bary", array with barycentric coordinates of maxima of the basis functions (i.e. the Lagrange-nodes for Lagrange basis functions). 2003-07-30 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Fix a bug in print_dof_dowb_matrix() is case of DOWBM_FULL. 2003-07-25 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/struct-func.tex: Small changes in the prototypes of the graphic routines, added newton_br() and modified the list of functions accordingly * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/examples.tex: Starting to work on a revised version of the examples * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/albert.bib: added referenc to Bank and Holst for a Newton method 2003-07-18 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/face_quad_fast.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/face_quad_fast.c: Add face_quad_fast for 2d. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: "#if 0" face_quad_fast structure. 2003-07-17 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c: get_quad_fast(): fix error message if quad->dim != DIM. 2003-07-16 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in: Add ellipt_dowb. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c: Implement non-symmetric test-problem. * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt_dowb.dat: Play around with solvers etc. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c: oem_solve_s(), oem_solve_d(): init_precon() may fail and has to report this to the calling function. init_precon() now return true on success and false on error. Solves SIGSEGV problem with HB-precon without refined mesh. Other method would be to exit the program, but the previous behaviour was no good. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c: Argh, init_HB_BPX_precon() should return __ true __ if successful :( * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c: oem_solve_s(), oem_solve_d(): init_precon() may fail and has to report this to the calling function. init_precon() now return true on success and false on error. Solves SIGSEGV problem with HB-precon without refined mesh. Other method would be to exit the program, but the previous behaviour was no good. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c: Add dowb versions. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Use EMIT_BODY_SWITCH() multi-plexer. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: MDIV() for preconditioners, scale by inverse of diagonal. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Add proto-types. * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Merge from main-trunk. * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore: Add albert.ps.gz * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c: Pass matrix-type to pr->A() to fake non-optimized matrices for testing purposes. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c: Pass matrix-type to A_diag() to fake non-optimized matrices for testing purposes. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.h: Pass matrix-type to pr->A() to fake non-optimized matrices for testing purposes. * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt_dowb.dat: New parameter "A blocktype" to fake non-symmetric or even full matrices, for testing purposes. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Fix print_dof_dowb_matrix() for symmtric case. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Fix AXEY <-> AXPY typo in SMCOPY_DOW(). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Reorder DOWBM flags, cosmetics. 2003-07-15 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c: Chain-rule issue :( * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c: Argh. Brace issue :( * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt_dowb.dat: New file. * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt_dowb.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c: graphics_d() version, DOF_DOWB_MATRIX code close to working, but not quite. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: Diagonal version of DOWB matrices seem to work, but not sure. 2003-07-14 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.h: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Proto-type for fill_dowb_matrix_info(). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator_dowb.c: Line-breaking. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Fix a typo. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c: Implement LALt for general A. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.h: Fix a comment. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am: Add oem_solve_dowb.c * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_dowb.c: Initial revision. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_dowb.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Use entry.{full,symm,diag} instead of en.try{_s,_d}. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Forgot a const in SMV_DOW(). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Fix a typo. * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.h: Compiles, but need more hacking before it works. Need to hack oem_solve(), too. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c: New file. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.h: Renamed. * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/.cvsignore: Add more cruft. * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/.cvsignore: Added more cruft. 2003-07-13 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore: Ignore a couple of auxiliary TeX files. 2003-07-11 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.h, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.h: Initial revision, NOT WORKING. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb.h, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_dowb_problem.h: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am: Add estimator_dowb.c * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.am: Add albert_dow_inlines to include_HEADERS. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator_dowb.c: ellipt_est_d() and heat_est_d() implemented, for DOF_DOWB_MATRIX testing. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Forgot to attach some consts to some function parameters. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c: When computing the second derivatives one should take into account that the Hessian w.r.t. to the barycentric coordinates as well as the Hessian of u_h is symmetric. 2003-07-10 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator_dowb.c: Further progress in porting estimator.c to DOWB case, much needs to be done, still. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c: When computing the second derivatives one should take into account that the Hessian w.r.t. to the barycentric coordinates as well as the Hessian of u_h is symmetric. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator_dowb.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator_dowb.c: Started implementing the estimators for DOWB problems, will use it to test the block-matrix stuff. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: Hacked to optimize for symmetric and diagonal DOWxDOW matrices (heavy use of concatenation operator in the preprocessor). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Fix some simple bugs. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Don't bail out if unsetenv is not found. 2003-07-09 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/rc-concept.tex: Kleine Korrekturen durch Ueberarbeitung vom Skript Numerik III 2003-07-08 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Start implementing symmetric case. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Set versions to 1.2-pre1-bm. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: SGI seemingly does not have unsetenv(). FIXME: how to unset environment variables on SGI without tweaking environ yourself. * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Update. * /net/sauron/graid/ALBERT_CVS/admin/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/COPYING, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/README, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.h, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt1.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/malloc.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT2d.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_open.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTlog.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Makefile, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/admin/rcs2log, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/config.guess, /net/sauron/graid/ALBERT_CVS/admin/config.sub, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Merge from main trunk up to ALBERT_1_2_PRE_1. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Don't use -L$x_libraries 'cause $x_libraries can be empty, -L without argument confuses the linker or resets the search path for libraries. Instead, use AC_PATH_XTRA and $X_LIBS. 2003-07-07 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Update. State of ALBERT_1_2_PRE_1 tag. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Use a really dirty hack to make libtool work with icc. libtool is _really_ brain-damaged w.r.t. to fortran. 2003-07-08 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/COPYING, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/README, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.h, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt1.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/malloc.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT2d.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_open.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTlog.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Makefile, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/admin/rcs2log, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/config.guess, /net/sauron/graid/ALBERT_CVS/admin/config.sub, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Merge from main trunk up to ALBERT_1_2_PRE_1. * Tag with ALBERT_1_2_PRE_1 * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Don't use -L$x_libraries 'cause $x_libraries can be empty, -L without argument confuses the linker or resets the search path for libraries. Instead, use AC_PATH_XTRA and $X_LIBS. 2003-07-07 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Update. State of ALBERT_1_2_PRE_1 tag. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Use a really dirty hack to make libtool work with icc. libtool is _really_ brain-damaged w.r.t. to fortran. * /net/sauron/graid/ALBERT_CVS/ALBERT/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Target for albert.ps moved to where it belongs: ALBERT/Makefile.am. * /net/sauron/graid/ALBERT_CVS/admin/config.sub, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh, /net/sauron/graid/ALBERT_CVS/admin/config.guess: Update to libtool-1.5. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Use libalbertgnucompat.la, not .a * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Add ALBERT_UTIL to include-directories for GRAPE-stuff. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: -LPATH should precede -lLIB. * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Makefile, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Use AM_MAINTAINER_MODE, automatically create documentation with "make dist". * /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/COPYING, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/README, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.h, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt1.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/malloc.c: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Provide getopt_long() in gnu-compat/ in case it should be missing. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am: Link with $(top_builddir)/gnu-compat/libalbertgnucompat.la in case standard library functions are missing (i.e. getopt_long()). * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c: Use argv[0] not "argv[0]" :) * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c: Update the help-text to account for changed option handling (i.e. mention the long-options). FIXME. Proof-read for typos. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: Use ALBERT_DEFUNUSED() 'cause it's the actual function definition. 2003-07-07 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Use a really dirty hack to make libtool work with icc. libtool is _really_ brain-damaged w.r.t. to fortran. * /net/sauron/graid/ALBERT_CVS/ALBERT/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Target for albert.ps moved to where it belongs: ALBERT/Makefile.am. * /net/sauron/graid/ALBERT_CVS/admin/config.sub, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh, /net/sauron/graid/ALBERT_CVS/admin/config.guess: Update to libtool-1.5. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Use libalbertgnucompat.la, not .a * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Add ALBERT_UTIL to include-directories for GRAPE-stuff. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: -LPATH should precede -lLIB. * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Makefile, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Use AM_MAINTAINER_MODE, automatically create documentation with "make dist". * /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/COPYING, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/README, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt.h, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/getopt1.c, /net/sauron/graid/ALBERT_CVS/admin/gnu-compat/malloc.c: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Provide getopt_long() in gnu-compat/ in case it should be missing. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am: Link with $(top_builddir)/gnu-compat/libalbertgnucompat.la in case standard library functions are missing (i.e. getopt_long()). * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c: Use argv[0] not "argv[0]" :) * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c: Update the help-text to account for changed option handling (i.e. mention the long-options). FIXME. Proof-read for typos. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: Use ALBERT_DEFUNUSED() 'cause it's the actual function definition. 2003-07-04 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT2d.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_open.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTlog.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c: Get rid of most of the compiler warnings produced by gcc, only few remain. Use __attribute__((unused)) for potentially unused functions. Wrap this into an ALBERT_UNUSED() macro which is a no-op if __GNUC__ is not defined. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Include more F77 autoconf macros. Should be used one day to make Fortran stuff more portable ... Quick hack for icc. For rpath settings, icc needs -Wl which is -- unluckily -- not properly detected by configure. So just hardcode -Wl when `basename $CC` = icc. * /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Add bin/, lib/ and include/. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c: Use --Bar instead of --timeBar so --time-step can be abbreviated by --time. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c: Use getopt_long() instead of home-brew option parsing. Need to add a test for this to configure.ac, though. However, that can be cloned from standard GNU packages. * /net/sauron/graid/ALBERT_CVS/admin/NEWS: Dummy contents. * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Update. NOTE: the ChangeLog contains the changes on the main-trunk as well as the changes on any branch. * /net/sauron/graid/ALBERT_CVS/admin/rcs2log: Initial revision. 2003-07-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c: Get rid of a compiler warning (const issue). * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/test, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h, /net/sauron/graid/ALBERT_CVS/SOLVER/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/COPYING, /net/sauron/graid/ALBERT_CVS/SOLVER/ChangeLog, /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/gmres.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-2.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-34circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-44circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-neum.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-1.amc, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Merge from main-trunk. 2003-07-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c: Removed warnings produced by gcc with fullwarn, added gltools functions for displaying on meshes with a displacement vector to albert.h, renamed gltools_mesh_disp() into gltools_disp_mesh() for sake of conformity * /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h: Removed warnings produced by gcc with fullwarn 2003-07-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/hello.txt: Deleted test file hello.txt 2003-07-02 Robert Kloefkorn * /net/sauron/graid/ALBERT_CVS/admin/hello.txt: *** empty log message *** 2003-07-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Added some missing _DOW() suffixes and SCAL_DOW() -> AX_DOW() issues. * /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS: Test. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/test: Initial revision. 2003-07-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/COPYING, /net/sauron/graid/ALBERT_CVS/SOLVER/ChangeLog, /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/gmres.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c: Added pointer to a function for evaluating a scalarproduct to the oem_data structure and changed affiliation * /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c: New Newton Method with step size control by Bank and Rose 2003-07-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c: Get rid of a compiler warning (const issue). * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/test, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h, /net/sauron/graid/ALBERT_CVS/SOLVER/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/COPYING, /net/sauron/graid/ALBERT_CVS/SOLVER/ChangeLog, /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/gmres.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-2.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-34circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-44circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-neum.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-1.amc, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Merge from main-trunk. 2003-07-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c: Removed warnings produced by gcc with fullwarn, added gltools functions for displaying on meshes with a displacement vector to albert.h, renamed gltools_mesh_disp() into gltools_disp_mesh() for sake of conformity * /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h: Removed warnings produced by gcc with fullwarn 2003-07-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/hello.txt: Deleted test file hello.txt 2003-07-02 Robert Kloefkorn * /net/sauron/graid/ALBERT_CVS/admin/hello.txt: *** empty log message *** 2003-07-02 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Added some missing _DOW() suffixes and SCAL_DOW() -> AX_DOW() issues. * /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS: Test. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/test: Initial revision. 2003-07-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/COPYING, /net/sauron/graid/ALBERT_CVS/SOLVER/ChangeLog, /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/gmres.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c: Added pointer to a function for evaluating a scalarproduct to the oem_data structure and changed affiliation * /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_br.c: New Newton Method with step size control by Bank and Rose 2003-07-01 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS: updated A-Z files * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_mittel.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-2.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-34circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-44circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-circ.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-neum.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.1, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.34kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.44kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.krumm2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.neum, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro-1.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro-big.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro.amc, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/heat.dat: adapted to version 1.2 of ALBERT, adjusted all parameter files, and renamed macro triangulation files * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c: introduced a flag use_get_bound in get_HB/BPX_precon() removed pointers to a boundary vector and precon structure in the argument list of oem_solve_s/d() * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c: removed some messages 2003-07-01 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: Many casts to (REAL_D *) instead of (const REAL_D *). Revisited. Hopefully the values are computed correctly now. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Some casts to (REAL_D *) instead of (const REAL_D *) * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Don't use const with 2D arrays, just does _not_ work with C. Surprisingly, it works with C++ !? * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am: assemble_dowb.c was added twice. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: Move DOW inlines to a separate file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_dow_inlines.h: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Move DOW inlines to a separate file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: Add my address to the copyright notice for _this_ file. 2003-06-30 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am: Add assemble_dowb.c. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: Fix some typos (forgot _DOW suffix, had a REAL_D_... prefix ...). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: First attemp to support matrix assembling for DOF_DOWB_MATRIXes. DOWxDOW matrix operations maybe need some optimizations. For now, M..._DOW() inline functions are use, but not sure whether this is good. Ok, loop unrolling can be performed by the C compiler because he knows about DIM_OF_WORLD. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am: add assemble_dowb.c * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble.c: Make it slightly more readable by defining symbolic constants for the flags for the seletion of the assemble routines. Use 0x... notation for flag values. Use "|=" and "|" rather than "+=" for operation on flags (is more readable that way, IMHO). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Define EL_DOWB_MATRIX_INFO and DOWB_OPERATOR_INFO in preparation for assembling DOWB matrices. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Fix a typo (DIST2 -> DST2) * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_bdow.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_dowb.c: Renamed. * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: June 30th state. 2003-06-30 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c: small PostScript corrections 2003-06-30 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c: Fix -- intentional -- assignment to RO location (pointer cast and ptr reference). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_bdow.c: Initial revision, just the same as assemble.c ATM. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble_bdow.c: New file. 2003-06-27 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Memory management for DOF_DOWB_MATRIXes. Untested. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c: Get rid of a compiler warning ("assingment to read only member orientation"). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: dof_gemv_d() had a copy-and-paste bug in transpose mode, the y-vector was zeroed, which is correct for dof_mv_d() but all wrong for gemv. * /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Add bin/ lib/ and include/ * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c: Started adding DOF_DOWB_MATRIX support, unfinished yet. This means, the stuff will compile but not link due to undefined symbols. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: DOF_DOWB_MATRIX support finished w.r.t. _this_ file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Add a couple of _DOW() inlines, make the code much more readable. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Set ALBERT_INCLUDE_PATH to the _local_ location of albert.h * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Forgot to define inline function MTV_DOW(). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Fix typos (DOW_SET <-> SET_DOW) * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Set ALBERT_INCLUDE_PATH to the _local_ location of albert.h * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Restoring the default CPPFLAGS was kind of borken. 2003-06-26 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Require AC_SET_PREFIX() again (needed for -rpath). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: New function: dof_mv_dowb(), matrix vector product for DOF_DOWB_MATRICEs. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: User inlines rather than macros for ..._DOW() stuff. Define a DOF_DOWB_MATRIX and DOWB_MATRIX_ROW data types for DOWxDOW block-matrices. Allow diagonal blocks (DOWB_MATRIX_ROW_D). * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Fix Makefile, still referenced mesh_interface_common.h (<- .h) * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: require AC_SET_PREFIX(). * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/.cvsignore, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/.cvsignore, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/SOLVER/.cvsignore, /net/sauron/graid/ALBERT_CVS/SOLVER/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/.cvsignore, /net/sauron/graid/ALBERT_CVS/BLAS/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/.cvsignore, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Add some more cruft, generated when building inside the source-tree. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Don't require AC_SET_PREFIX(). 2003-06-25 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Reworked a little bit after communication with Dani. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Add all .m4 files in ./m4/ (make complains otherwise after "make dist"). * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Tell people where to get help with CVS. * /net/sauron/graid/ALBERT_CVS/admin/ChangeLog: Let rcs2log auto-generate this file. While this could be excluded from the CVS (because it could be re-generated) I thought it would be a good idea to keep it inside. Hard-disk space has become cheap lately ... * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Typo fixed. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: _properly_ use AC_HELP_STRING() for nicer formatting in AC_ARG_WITH and friends. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: User AC_HELP_STRING() for nicer formatting in AC_ARG_WITH and friends. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Take care of automake-1.6 caveats; set rpath so that the programs are really linked with the albert libraries from _this_ package, and not with other versions which might be installed in the search-path of the dynamic linker. * /net/sauron/graid/ALBERT_CVS/GRAPE/.cvsignore: Initial revision, add Makefile.in. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Add GRAPE settings. It is done in a way that the stand-alone package AlbertMovi and the ALBERT distribution share the same source and Makefile.am's. * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Add GRAPE to SUBDIRS if conditional GRAPE is true. * /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: Add some more blah. Document the presence of the GRAPE interface in README, give a hint to use admin-utils/cvs.sh in MAINTENANCE. * /net/sauron/graid/ALBERT_CVS/GRAPE/Makefile.am: Initial revision. * /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Add more auto-generated files. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c: Get rid of a compiler warning. * /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cblas.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/info.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h: Protect headers against C++ with the famous #ifdef __cplusplus extern "C" { #endif construct. Changed some of the multiple-inclusion safeguards to be somewhat longer (e.g. _NLS_H_). * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am: Fix VPATH builds. "-I..." statements _always_ should be relative to the Makefile variables $(srcdir) or $(top_srcdir). Otherwise VPATH builds will fail. VPATH build come in handy when compiling for different architectures from a single source directory. Or when the source is located on a RO medium (creeping featurism). * /net/sauron/graid/ALBERT_CVS/SOLVER/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/.cvsignore, /net/sauron/graid/ALBERT_CVS/BLAS/.cvsignore, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/.cvsignore, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/SOLVER/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/.cvsignore, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/.cvsignore, /net/sauron/graid/ALBERT_CVS/admin/.cvsignore: Initial revision, let CVS ignore Makefile.in's and a couple of other auto-generated files. * /net/sauron/graid/ALBERT_CVS/admin/config.h.in, /net/sauron/graid/ALBERT_CVS/admin/aclocal.m4: This file is auto-generated, hence _not_ kept in the CVS. 2003-06-24 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/.cvsignore: Initial revision. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/mesh_interface.c: Import Kuni's sources, but leave dindex at zero. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.h, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.c: Renamed. Use Kuni's version. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/memm3.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/memm2.c: Initial revision. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/grape_elast.c: not needed. 2003-06-22 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-albert-qgl.m4, /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Optional packages can be disabled with one switch. 2003-06-20 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/mesh_interface.c: initialize dindex to _zero_, not to one. It breaks display of Levelsets otherwise. 2003-06-18 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-albert-qgl.m4: Need to link against the ALBERT libs, of course. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Convert - to _ in variable names. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-albert-qgl.m4: Initial revision. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-qt.m4: Make QGL optional. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-qt.m4: Initial revision. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Convert "-" signs to "_". 2003-06-16 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/.cvsignore: Add more auto-cruft. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Need automake-1.7.2, at least. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am: Install as ...22 or ...33 * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/.cvsignore: Makefile.in 2003-06-14 Claus-Justus Heine * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/.cvsignore, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/.cvsignore: Initial revision. * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/grape_elast.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.h, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/tsc_timebar.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Makefile.am: * /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/grape_elast.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/2d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/3d/mesh_interface.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_grape.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/albert_movi.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/mesh_interface_common.h, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Common/tsc_timebar.c, /net/sauron/graid/ALBERT_CVS/GRAPE/mesh/Makefile.am: New file. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Fix libdir and includedir reference. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4: Reorganize using AC_REQUIRE. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4: AC_CHECK_PKG renamed to ALBERT_CHECK_PKG. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Use $1_LIB_PATH and $1_INCLUDE_PATH to be a little bit more consistent with stock ALBERT. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Defaults default to libdir and includedir * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Rename AC_CHECK_PACKAGE to ALBERT_CHECK_PACKAGE. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4: Check for additional libraries and make it work with the cache. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4: Fix a typo. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4: Documentation. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4: Check for albert.h * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/type-sizes.m4: Initial revision. * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4, /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/set-prefix.m4: ALBERT-DEMO mit autoconf * /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/albert-check.m4, /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/check-package.m4, /net/sauron/graid/ALBERT_CVS/AlbertMovie/m4/set-prefix.m4: New file. 2003-05-12 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Aenderung am 12.05.2003 durch Oliver Kriessl: In Routine add_element_mat zwei TEST_EXIT's entfernt, von denen der erste ueberfluessig und der zweite fehlerhaft war: bei Erzeugen eines neuen Matrixeintrags und einem negativen Faktor (sign<0) Abbruch des Programms mit unverstaendlicher Fehlermeldung. Negativer Faktor fuer einen Elementmatrix ist aber nach Doku ausdruecklich vorgesehen. Fehler trat nicht auf, wenn vorher bereits eine Elementmatrix auf dem selben Element mit positivem Vorzeichen addiert wurde. Deshalb blieb der Fehler wohl auch so lange unentdeckt! 2003-05-09 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Changed "MesaGL" to "GL" since the latter seems obsolete for Linux... 2003-04-10 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/Makefile.am: starting support for doc -- albert.ps automatically included in distribution * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: First steps toward albert-1.2 2003-04-09 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/msg.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/alloc.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c: Changing affiliation of Alfred and me * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_nr_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_r_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2scp.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/level_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/bas_fct_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/check.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/coarsen_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/graph_none.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/element.c: * changes in macro_common.c and albert.h: alloc_macro_data(), free_macro_data(), and macro_data2mesh() now public * find_el_info_at_pt --> find_el_at_pt * struct quad is now struct quadrature for compatibility with C++ * new addresses added * in struct multi_grid_info changed restrict --> mg_restrict (will be a keyword in C) prolongate --> mg_prolongate resid --> mg_resid * non-recursive traverse routines now working on const EL_INFO * * PRECON data structure modified: new entry void *precon_data; type of init_precon, now void and only argyment is precon_data; * syntax of get_*_precon_[sd] changed accordingly * oem_solve_[sd] have an additional optional argument PRECON * * In 1d lagrange elements up to order 4 are available now * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/rc-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/traverse-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/util-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/nonlin.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/est-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/intro.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/mesh-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/bas-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/bas-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/dof-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/assemble-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/adapt-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/adapt-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/albert.bib, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/albert.tex: commit after working period in Cambridge; moved Chapter 3 -> Chapter 2; and Chapter 2 -> Chapter 3; work on new Chapter 3 nearly completed; check of data structures with albert.h done by Alfred. New changes of data structures resultin in Version 1.2 already included. * /net/sauron/graid/ALBERT_CVS/ALBERT/THANKS, /net/sauron/graid/ALBERT_CVS/ALBERT/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERT/ChangeLog, /net/sauron/graid/ALBERT_CVS/ALBERT/COPYING, /net/sauron/graid/ALBERT_CVS/ALBERT/AUTHORS: Updated affilliations and thanks... 2003-04-07 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: No longer using libtool to compile objects... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: Added Deletion of ".libs" directories to target clean. Fixed target cleano. 2003-04-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/alberta.jpg, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/alberta.rgb, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/alberta.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/tria_dof.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/tria_dof.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/trias_forbidden.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/albert.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/albert.gif, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/albert.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Logo/alberta.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/refine_atomic_3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/refine_atomic_3d.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/refine_recursive_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/regular_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/standard.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/standard.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/standard_refined.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/tria.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tetra_v.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tetra_v.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tria_v.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/refine_atomic_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/refine_atomic_2d.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tetra_gen.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/patches.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/plus.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/quadratic_dof.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/rect.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tetra_e.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tetra_e.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ref_tetra_gen.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/param_bound.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/param_bound.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/patch_center.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/patch_edge.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/patch_face.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/patch_vertex.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/nl-sol3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/nl-sol2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/nl-grid3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh+trees.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh_node.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh_node.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/nl-grid2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/linear_dof.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/macro2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/macro2d.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/macro34.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh+tree.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh+tree1.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh+tree1.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/mesh+tree2.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/heat3d_ntria.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/heat3d_tau.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/heat_ntria.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/heat_tau.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/linear_dof.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ellipt_uh.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/edge_tria.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/ellipt_mesh.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/coarse_atomic_3d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/coarse_atomic_3d.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/cubic_orient.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/cubic_orient.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/edge_tetra.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/edge_tetra.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/edge_tria.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/bary.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/circ.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/coarse_atomic_2d.eps, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/EPS/coarse_atomic_2d.sc, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/albert.bib, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Makefile: added ShowCase and .eps files for the documentation, small changes in the Makefile 2003-03-21 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/doc/mesh-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/nonlin.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/notation.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/rc-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/rc-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/solve-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/struct-func.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/traverse-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/util-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/defs.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/dof-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/dof-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/est-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/eval-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/examples.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/files.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/graph-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/heat.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/intro.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/mesh-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/Makefile, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/adapt-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/adapt-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/albert.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/assemble-impl.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/bas-concept.tex, /net/sauron/graid/ALBERT_CVS/ALBERT/doc/bas-impl.tex: ALBERT-Doku in den CVS-Baum importiert. Wird bald als Modul auszuchecken sein... 2003-03-17 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Changed order of library checks for non-Linux compilation * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Added check for "-ldl" library, which seemed necessary to create standalone binaries. configure will not complain if it is missing. * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in: Added documentation of libtool "-all-static" flag to create independent binaries. 2003-02-26 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Changed order of lib checks for LINUX-platforms. Order should be right-to-left, i.e. least-dependent to most-dependent. 2003-02-14 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c: Fixed bug found by Oli related to leaf_data_size. 2003-02-14 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c: Aenderung am 07.02.03 durch Oliver Kriessl: Support fuer parametrische Elemente aufgenommen. 2003-02-04 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c: Aenderung am 04.02.03 durch Oliver Kriessl: Fehler in lagrange_1.c fuer parametrische Elemente behoben. In lagrange_[2-4].c ERROR_EXIT fuer Parametrische Elemente ergaenzt. 2003-02-04 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_01/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_11/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_01/Makefile.am: Adding support for new directories with el_index=1 2003-02-04 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/graphXO.c: Aenderung am 04.02.03 durch Oliver Kriessl: Fehler behoben in der Behandlung der Dimension. Fuer DIM!=DIM_OF_WORLD ist nun in 1d nur noch gltools-Grafik moeglich! 2003-02-03 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/graphXO.c: Aenderung am 03.02.2003 durch Oliver Kriessl: In den Routinen graph_mesh, graph_drv und graph_estimate wurde der Support fuer parametrische Elemente eingebaut. Bemerkung: Die Routinen graph_drv und graph_estimate funktionieren nur sinnvoll mit DIM == DIM_OF_WORLD. Wenn parametrische Elemente verwendet werden, wird deshalb eine Warnung ausgegeben, wenn sich die Dimensionen unter- scheiden. Ist DIM_OF_WORLD groesser als DIM werden die zusaetzlichen Koordinaten in diesen Routinen einfach weggelassen! 2002-12-17 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/msg.c: fixed ugly WAIT routine (added newline) 2002-12-05 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c: Another nasty bug found in read_dof_real*_vec concerning filenames... 2002-12-04 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/README: Some changes due to new configure option --enable-el_index * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Changes due to new configuration option --enable-el_index, meaning that EL_INDEX=1-library versions of ALBERT are to be built. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: Changes due to new configuration option: --enable-el_index: Here: special handling if user wishes to use ALBERT??_?1 library (meaning that EL_INDEX=1) * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am: Changes due to new configuration option: --enable-el_index: Here: el_index=0 by default * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Makefile.am: Changes due to new configuration option: --enable-el_index: Here: new SUBDIRs 2002-11-27 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c: Problems with read_mesh[xdr].c: Could not read mesh due to a call of get_dof_*_vec with nil fe_space argument. Since read_mesh[xdr].c tries to guess an appropriate fe_space (or even create a new one), I fixed this problem in memory.c by introducing "unconnected" dof_?_vec storage analogous to the method used to store "unconnected" matrices. 2002-11-11 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: now checking for libGL if libMesaGL not found (Linux-case) * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: it is better to specify absolute path for "gltools". Changed configure.ac to disply corresponding message when using configure --help * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am: added _LIBADD entries to fix trouble with finding X-libs * /net/sauron/graid/ALBERT_CVS/BLAS/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am: trouble with x-libs, see above... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am: Changes due to trouble with x-libs, see above... * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/Makefile.am: added LIBADD variable entries after problems with finding X-libraries 2002-08-07 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: fixed buggy boundary assignmentfixed buggy boundary assignment.. * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: changed default library installation mode: will now install static and shared by default. * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in: documented "-shared" and "-static" flags for libtool. * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in: documented "-shared" and "-static" libtool flags. * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in: documented -shared and -static flags for libtool. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: added support for LDFLAGS while linking 2002-08-06 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Force abort if GL-headers are missing. Quick and dirty solution - user might not want graphical output for ALBERT! * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: Bug fixed: Location of libtool should be @abs_top_builddir@ and not @prefix@, since a libtool created by the package is not installed. 2002-07-24 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am: Sourcefile "trav_xy.c" added. Aenderung am 24.07.02 durch Oli durchgefuehrt * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c: 1d-Support added! Aenderung durchgefuehrt am 24.07.02 durch Oli in Absprache mit Kuni. 2002-07-24 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h: changed preprocessor condition for "ABS" * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: little bug concerning macro ALBERT_VERSION * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am: forgot ALBERT_UTIL include for source-files 2002-07-23 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/BLAS/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/alloc.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/iamtools.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/msg.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/util.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am: fixed ALBERT_UTIL, and several Makefile.am's 2002-07-23 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/element.c: Fehler in world_to_coord behoben (falsche Variable). Aenderung durchgefuehrt am 23.07.02 durch Oli. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/element.c: In Routine world_to_coord ERROR durch ERROR_EXIT ersetzt, falls degeneriertes Element. Aenderung durchgefuehrt am 23.07.02 durch Oli in Absprache mit Kuni. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c: In Routine world_to_coord ERROR durch ERROR_EXIT ersetzt, falls degeneriertes Element vorliegt. Aenderung am 23.07.02 durch Oli durchgefuehrt und mit Kuni abgesprochen! * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/element.c: Routinen world_to_coord, coord_to_world und get_face_normal fuer den 1d-Fall ergaenzt. Aenderung am 23.07.02 durchgefuehrt von Oli. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/write_mesh_ps.c: Dateien level.c und write_mesh_ps.c aus 1d-Verzeichnis entfernt, da beide nur in 2d/3d bzw. in 2d verfuegbar! Aenderung durchgefuehrt am 23.07.02 durch Oli. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c: Routinen world_to_coord und coord_to_world ergaenzt: Routine world_to_coord kam aus File trav_xy.c. Routine coord_to_world kam aus File eval.c. Aenderung am 23.07.02 von Oli auf Anweisung von Kuni durchgefuehrt. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c: Routine coord_to_world in dimensionsabhaengigen Datei element.c verschoben. Aenderung am 23.07.02 durch Oli auf Anweisung von Kuni. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c: Routine world_to_coord in dimensionabhaengige Files element.c vorschoben! Aenderung am 23.07.02 durch Oli auf Anweisung von Kuni. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c: Funktion get_transformed_el_mat entfernt! Aenderung am 23.07.02 durch Oli auf Anweisung von Kuni. 2002-07-23 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am: added level.c * /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am: added level.c and write_mesh.c * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am: trav_xy.c for 2/3d added 2002-07-05 Daniel Koester * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT33_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT12_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT22_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_0/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT23_1/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/ALBERT11_0/Makefile.am: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/admin/config.guess, /net/sauron/graid/ALBERT_CVS/admin/config.sub: Other administrative files needed by autoconf. * /net/sauron/graid/ALBERT_CVS/admin/aclocal.m4: Please use "aclocal" to recreate this file when changing versions of automake or autoconf. * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/compile, /net/sauron/graid/ALBERT_CVS/admin/depcomp, /net/sauron/graid/ALBERT_CVS/admin/install-sh, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh, /net/sauron/graid/ALBERT_CVS/admin/missing, /net/sauron/graid/ALBERT_CVS/admin/mkinstalldirs: These files are necessary, if maintainer choses to check out a complete version. When changing version of automake, please do a "libtoolize" to update these! * /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile.in: corrected bug in deleting *.lo files. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: removed "OFLAGS", use "CFLAGS" instead... 2002-07-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c: added newline character to error messages 2002-06-25 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in: Einige Aenderungen in der Organisation * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: habe get_rc_list in albert.h aufgenommen (konnte sonst nicht kompilieren) Andere Moeglichkeit: nicht in albert.h , aber extern deklarieren? 2002-06-24 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: Added X libs to link line 2002-06-17 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE: some support for sparc-sun-SunOS 2002-06-13 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/config.h.in, /net/sauron/graid/ALBERT_CVS/admin/configure.ac: Added some SUN support (-lnsl for xdr-routines) * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in: Had to change order of libraries: -lcsolver before -lblas for SUNs (No system blaslib there) * /net/sauron/graid/ALBERT_CVS/admin/COPYING, /net/sauron/graid/ALBERT_CVS/admin/INSTALL, /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/config.h.in, /net/sauron/graid/ALBERT_CVS/admin/configure.ac, /net/sauron/graid/ALBERT_CVS/admin/configure.in, /net/sauron/graid/ALBERT_CVS/admin/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Makefile.am: First halfway working distribution ! 2002-06-11 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.sub: encountered problems on suns with $(special_defs), changed that * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am: stupid typo. * /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.in: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am: @static_libraries@ thrown out * /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile.in: seemed better for compliance... * /net/sauron/graid/ALBERT_CVS/BLAS/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.am: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh, /net/sauron/graid/ALBERT_CVS/admin/missing, /net/sauron/graid/ALBERT_CVS/admin/mkinstalldirs, /net/sauron/graid/ALBERT_CVS/admin/configure, /net/sauron/graid/ALBERT_CVS/admin/configure.in, /net/sauron/graid/ALBERT_CVS/admin/install-sh, /net/sauron/graid/ALBERT_CVS/admin/MAINTENANCE, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/acinclude.m4, /net/sauron/graid/ALBERT_CVS/admin/aclocal.m4, /net/sauron/graid/ALBERT_CVS/admin/config.guess, /net/sauron/graid/ALBERT_CVS/admin/config.sub: cleaned up a bit, all other files are system files * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am: Delete all CVS directories in distribution * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/admin/configure.in, /net/sauron/graid/ALBERT_CVS/admin/ltconfig: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Makefile.am: seemed necessary to add EXTRA_DIST=Common to Makefile.am * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_sun.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT.h, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_open.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT2d.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/Makefile.am: *** empty log message *** 2002-06-10 Daniel Koester * /net/sauron/graid/ALBERT_CVS/admin/configure.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/cg.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.am: Standard settings seems to work at last... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c: Changed USE_OPENGL to HAVE_GL, which is supplied by autoconf * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/bas_fct_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.am: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/stiff.c: no longer needed... * /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/configure.in: *** empty log message *** * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am: First changes... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Makefile.am: Forgot this file... * /net/sauron/graid/ALBERT_CVS/SOLVER/src/Makefile.am, /net/sauron/graid/ALBERT_CVS/SOLVER/Makefile.am: Added Makefile.am's * /net/sauron/graid/ALBERT_CVS/BLAS/srotm.f, /net/sauron/graid/ALBERT_CVS/BLAS/srotmg.f, /net/sauron/graid/ALBERT_CVS/BLAS/sscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/sswap.f, /net/sauron/graid/ALBERT_CVS/BLAS/zaxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/zcopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdotc.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdotu.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdrot.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/zrotg.f, /net/sauron/graid/ALBERT_CVS/BLAS/zscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/zswap.f: New file. * /net/sauron/graid/ALBERT_CVS/BLAS/srotm.f, /net/sauron/graid/ALBERT_CVS/BLAS/srotmg.f, /net/sauron/graid/ALBERT_CVS/BLAS/sscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/sswap.f, /net/sauron/graid/ALBERT_CVS/BLAS/zaxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/zcopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdotc.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdotu.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdrot.f, /net/sauron/graid/ALBERT_CVS/BLAS/zdscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/zrotg.f, /net/sauron/graid/ALBERT_CVS/BLAS/zscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/zswap.f: Our own BLAS library * /net/sauron/graid/ALBERT_CVS/BLAS/Makefile.am, /net/sauron/graid/ALBERT_CVS/BLAS/caxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/ccopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/cdotc.f, /net/sauron/graid/ALBERT_CVS/BLAS/cdotu.f, /net/sauron/graid/ALBERT_CVS/BLAS/crotg.f, /net/sauron/graid/ALBERT_CVS/BLAS/cscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/csrot.f, /net/sauron/graid/ALBERT_CVS/BLAS/csscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/cswap.f, /net/sauron/graid/ALBERT_CVS/BLAS/dasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/daxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/dcabs1.f, /net/sauron/graid/ALBERT_CVS/BLAS/dcopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/ddot.f, /net/sauron/graid/ALBERT_CVS/BLAS/dnrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/drot.f, /net/sauron/graid/ALBERT_CVS/BLAS/drotg.f, /net/sauron/graid/ALBERT_CVS/BLAS/drotm.f, /net/sauron/graid/ALBERT_CVS/BLAS/drotmg.f, /net/sauron/graid/ALBERT_CVS/BLAS/dscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/dset.f, /net/sauron/graid/ALBERT_CVS/BLAS/dswap.f, /net/sauron/graid/ALBERT_CVS/BLAS/dzasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/dznrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/icamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/idamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/isamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/izamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/sasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/saxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/scasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/scnrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/scopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/sdot.f, /net/sauron/graid/ALBERT_CVS/BLAS/snrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/srot.f, /net/sauron/graid/ALBERT_CVS/BLAS/srotg.f: New file. * /net/sauron/graid/ALBERT_CVS/BLAS/Makefile.am, /net/sauron/graid/ALBERT_CVS/BLAS/caxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/ccopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/cdotc.f, /net/sauron/graid/ALBERT_CVS/BLAS/cdotu.f, /net/sauron/graid/ALBERT_CVS/BLAS/crotg.f, /net/sauron/graid/ALBERT_CVS/BLAS/cscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/csrot.f, /net/sauron/graid/ALBERT_CVS/BLAS/csscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/cswap.f, /net/sauron/graid/ALBERT_CVS/BLAS/dasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/daxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/dcabs1.f, /net/sauron/graid/ALBERT_CVS/BLAS/dcopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/ddot.f, /net/sauron/graid/ALBERT_CVS/BLAS/dnrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/drot.f, /net/sauron/graid/ALBERT_CVS/BLAS/drotg.f, /net/sauron/graid/ALBERT_CVS/BLAS/drotm.f, /net/sauron/graid/ALBERT_CVS/BLAS/drotmg.f, /net/sauron/graid/ALBERT_CVS/BLAS/dscal.f, /net/sauron/graid/ALBERT_CVS/BLAS/dset.f, /net/sauron/graid/ALBERT_CVS/BLAS/dswap.f, /net/sauron/graid/ALBERT_CVS/BLAS/dzasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/dznrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/icamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/idamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/isamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/izamax.f, /net/sauron/graid/ALBERT_CVS/BLAS/sasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/saxpy.f, /net/sauron/graid/ALBERT_CVS/BLAS/scasum.f, /net/sauron/graid/ALBERT_CVS/BLAS/scnrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/scopy.f, /net/sauron/graid/ALBERT_CVS/BLAS/sdot.f, /net/sauron/graid/ALBERT_CVS/BLAS/snrm2.f, /net/sauron/graid/ALBERT_CVS/BLAS/srot.f, /net/sauron/graid/ALBERT_CVS/BLAS/srotg.f: Our own BLAS library * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile.in, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile.in: Adapting DEMO for distribution... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.albert.in, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Added Makefile.am and Makefile.albert.in * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/Makefile.sub, /net/sauron/graid/ALBERT_CVS/ALBERT/Makefile.am: Added Makefile.am's * /net/sauron/graid/ALBERT_CVS/admin/missing, /net/sauron/graid/ALBERT_CVS/admin/mkinstalldirs: Administration files * /net/sauron/graid/ALBERT_CVS/admin/missing, /net/sauron/graid/ALBERT_CVS/admin/mkinstalldirs: New file. * /net/sauron/graid/ALBERT_CVS/admin/configure, /net/sauron/graid/ALBERT_CVS/admin/configure.in, /net/sauron/graid/ALBERT_CVS/admin/install-sh, /net/sauron/graid/ALBERT_CVS/admin/ltconfig, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh: Administration files * /net/sauron/graid/ALBERT_CVS/admin/configure, /net/sauron/graid/ALBERT_CVS/admin/configure.in, /net/sauron/graid/ALBERT_CVS/admin/install-sh, /net/sauron/graid/ALBERT_CVS/admin/ltconfig, /net/sauron/graid/ALBERT_CVS/admin/ltmain.sh: New file. * /net/sauron/graid/ALBERT_CVS/admin/AUTHORS, /net/sauron/graid/ALBERT_CVS/admin/COPYING, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog, /net/sauron/graid/ALBERT_CVS/admin/INSTALL, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/acinclude.m4, /net/sauron/graid/ALBERT_CVS/admin/aclocal.m4, /net/sauron/graid/ALBERT_CVS/admin/config.guess, /net/sauron/graid/ALBERT_CVS/admin/config.sub: Administration files * /net/sauron/graid/ALBERT_CVS/admin/AUTHORS, /net/sauron/graid/ALBERT_CVS/admin/COPYING, /net/sauron/graid/ALBERT_CVS/admin/ChangeLog, /net/sauron/graid/ALBERT_CVS/admin/INSTALL, /net/sauron/graid/ALBERT_CVS/admin/Makefile.am, /net/sauron/graid/ALBERT_CVS/admin/NEWS, /net/sauron/graid/ALBERT_CVS/admin/README, /net/sauron/graid/ALBERT_CVS/admin/acinclude.m4, /net/sauron/graid/ALBERT_CVS/admin/aclocal.m4, /net/sauron/graid/ALBERT_CVS/admin/config.guess, /net/sauron/graid/ALBERT_CVS/admin/config.sub: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/alloc.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/msg.c: IAMTOOLS sources * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/alloc.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/divers.c, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/msg.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/iamtools.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c: IAMTOOLS sources * /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/Makefile.am, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/iamtools.h, /net/sauron/graid/ALBERT_CVS/ALBERT_UTIL/parameters.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/orthres.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sp_cg.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/multigrid.c: removed old files; not longer needed * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/solver.c: solver.c herausgeworfen 2002-06-06 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2skp.c: This file is beeing moved into l2scp.c * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c: The implicit time strategy now allows no adaptation of the grid, too * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_r.c: Removed a bug in fill_macro_info for a curved boundary * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c: Changed search for a visual during opening of an OPENGL window 2002-02-28 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c: In Zeile 427 MEM_ALLOC durch MEM_CALLOC ersetzt. Tut es laut Kuni. (Dani) 2002-02-05 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c: Einige Aenderungen von DOF_FREE_UNIT DOF_FREE_UNIT = char soll getestet werden, dafuer habe ich schon mal etwas Code in #if-Abfragen gesetzt. 2002-01-19 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: Einige Schoenheitskorrekturen 2002-01-17 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/multigrid.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: Weitreichende Aenderungen durch die Reform der Speicherverwaltung 2001-11-14 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Neue Routinen fuer xdr und binaere Ein/Ausgabe von macro-Dateien eingebaut. 2001-11-12 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: changed formating for writing of element type in write_albert_macro() 2001-11-08 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2skp.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2scp.c: falsche Fehlermeldung in L2s*p_fct_bas_d: ..."DOF_REAL_VEC" statt "DOF_REAL_D_VEC" 2001-10-29 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2scp.c: moved stack get_traverse_stack() after initial checks for avoiding memory leaks 2001-10-25 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c: changed macro_test(), up to now no check in 3d 2001-10-11 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/element.c: changed preprocessor directive for DIM != DIM_OF_WORLD in el_det() and world_to_coord(); done via the parametric structure in mesh 2001-10-09 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/graphXO.c: Added the function graph_estimate() in 1d for the visualization of the estimator in 1d 2001-10-08 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/coarsen.c: deallocation of el->new_coord moved to coarse_patch in 2d as it was in 3d; deallocation is now the same for 2d and 3d and is done after coarse_element * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: freed newdofs in macro_data2mesh because of memory leak * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/coarsen.c: Changed functions REAL get_real_d(void) ---> get_real_d(MESH *) void free_real_d(REAL *) ---> free_real_d(MESH *, REAL *) for new memory management. Hence, memory can be freed with the underlying mesh (if implemented...) 2001-10-04 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile: Added gmake as default make program to application makefiles 2001-08-03 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c: FIX: Bei zu kleinem LEAF_DATA wurde in free_leaf_data n falsch gesetzt. 2001-07-17 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c: fixed bug in memory.c if sizeof(LEAF_DATA) < sizeof(void *) 2001-07-03 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/level_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/traverse_nr.c: removed unused variables, etc. due to compiler warnings on SGI * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: global access to write_albert_macro * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: now, everything works fine with the new macro_data structure * /net/sauron/graid/ALBERT_CVS/ALBERT/AUTHORS, /net/sauron/graid/ALBERT_CVS/ALBERT/COPYING, /net/sauron/graid/ALBERT_CVS/ALBERT/ChangeLog, /net/sauron/graid/ALBERT_CVS/ALBERT/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERT/NEWS: updated copyright etc. 2001-07-02 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c: init_bdry only for DIM > 1 * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: el_type now only used for 3d * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble.c: changed macro definitions of btv and utAv for 1d compatibility * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c: changed default_boundary(MESH, S_CHAR) --> default_boundary(MESH, int) 2001-06-28 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c: removed misprint in gltools_est() * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: inserted function prototype for default_boundary() * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: inserted function declaration for write_albert_macro ... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h: moved macro_data into albert.h, and removed macro.h * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: included macro.h into albert.h with structure MACRO_DATA and new definition of test_macro * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: added new data types and moved macro.h into albert.h 2001-06-27 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c: inserted free_traverse_stack in gltools_est * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: inserted pointers for block-wise memory administration in struct mesh and struct dof_admin * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/level.c: changed header of PostScript driver 2001-05-23 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c: corrected initialization of A in estimate() 2001-05-08 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h: Schreib- und Leseroutinen aus macro*.c sollten auch hier hinein... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: vorerst letzter Entwicklungsstand... 2001-05-03 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_est.c: removed ellipt_est.c, is in the library already for a long time... * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro_big.stand: macro triangulation for [-1,1] * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Macro/macro.stand: macro triangulation for [0,1] * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/nonlin.dat: data file for nonlinear elliptic solver copied from 2d * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/heat.dat: data file for heat equation solver copied from 2d * /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/INIT/ellipt.dat: data file for elliptic solver copied from 2d * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c: changes due to 1d, some DIM_OF_WORLD loops added * /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/1d/Makefile: using virtual path for dependencies in ../Common directory * /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile: new rules for cleaning, tar and tgz files and backups * /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog: added performed changes * /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS: changed web-site 2001-04-05 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c: setzen von Randtypen fuer Kanten und Knoten scheint zu funktionieren... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: Orientierungs-check eingebaut 2001-03-29 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: habe macro_test implementiert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c: habe correct_cycles mit allen abhaengigen Prozeduren implementiert 2001-03-27 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h: write_macro() und abhaengige Funktionen fertig, macro.h erweitert * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c: *** empty log message *** 2001-03-26 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h: Neu: compute_neigh_fast, alles auf Basis von MACRO_DATA * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c: Routinen umgeschoben, mel_vertex in fill_boundary hat neuen Typ * /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: Routinen umgeschoben 2001-03-22 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: read_albert_macro und read_macro scheinen erstmal zu funktionieren... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h: Habe statt (* ?????)[] lieber **?????? als Format fuer die Matrizen genommen. 2001-03-20 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h: neuer Eintrag el_type angefuegt * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c: read_macro, read_albert_macro angepasst an neu MACRO_DATA-Struktur, ausserdem Aenderungen an macro_data2mesh. 2001-03-19 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c: macro_data2mesh fertig, einige Routinen aus aesthetischen Gruenden in die macro.c s abgeschoben... 2001-03-16 Daniel Koester * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c: Anfang der Entwicklung der neuen Macro-Struktur und dazugehoerige Routinen 2001-02-23 Oliver Kriessl * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/solver.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sp_cg.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_nr_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_r_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/grape_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2scp.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2skp.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/cg.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/check.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/coarsen_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/write_mesh_ps.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/grape.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/grape.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_4.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/1d/lagrange_0.c: Upgrade auf ALBERT-1.1 2001-02-22 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/SOLVER/src/ddot_.f: added file ddot_.f for using with purify * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c: changed interpol0 and interpol_d0, now compilable * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/util.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c: changed something... * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c: removed bugs in lagrange_0.c: interpol0 interpol_d0 inserted static before real_refine_inter * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c: removed bugs in lagrange_0.c: interpol0 interpol_d0, macro.c ??? * /net/sauron/graid/ALBERT_CVS/ALBERT/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERT/NEWS, /net/sauron/graid/ALBERT_CVS/ALBERT/README, /net/sauron/graid/ALBERT_CVS/ALBERT/AUTHORS, /net/sauron/graid/ALBERT_CVS/ALBERT/COPYING: new versions 2000-05-05 Kunibert G. Siebert * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt-easy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h: New file. * /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt-easy.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlsolve.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nonlin.h: initial import into CVS * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.1, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.34kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.44kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.krumm2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.neum, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_est.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/femtest.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/newton.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c: New file. * /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.1, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.34kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.44kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.kreis, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.krumm2, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.neum, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Macro/macro_big.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/3d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/albert.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/ellipt_est.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/femtest.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/graphics.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/heat.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/newton.c, /net/sauron/graid/ALBERT_CVS/DEMO/src/Common/nlprob.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/INSTALL, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_mittel.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile: New file. * /net/sauron/graid/ALBERT_CVS/DEMO/AUTHORS, /net/sauron/graid/ALBERT_CVS/DEMO/COPYING, /net/sauron/graid/ALBERT_CVS/DEMO/ChangeLog, /net/sauron/graid/ALBERT_CVS/DEMO/INSTALL, /net/sauron/graid/ALBERT_CVS/DEMO/NEWS, /net/sauron/graid/ALBERT_CVS/DEMO/README, /net/sauron/graid/ALBERT_CVS/DEMO/THANKS, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/ellipt.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/heat.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/INIT/nonlin.dat, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Macro/macro_mittel.stand, /net/sauron/graid/ALBERT_CVS/DEMO/src/2d/Makefile, /net/sauron/graid/ALBERT_CVS/DEMO/src/Makefile: initial import into CVS * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_ibm.c: New file. * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_ibm.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/AUTHORS, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/COPYING, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/ChangeLog, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/INSTALL, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/NEWS, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/README, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/THANKS, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT.h, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT2d.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_sun.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_tit.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_open.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTansi.h, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTlog.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/awtest.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/ctest.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/ctest2.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/grtest.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/hwtest.c: New file. * /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/AUTHORS, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/COPYING, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/ChangeLog, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/INSTALL, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/NEWS, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/README, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/THANKS, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT.h, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT2d.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_sun.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_for_tit.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOT_open.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTansi.h, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/PLOTlog.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/awtest.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/ctest.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/ctest2.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/grtest.c, /net/sauron/graid/ALBERT_CVS/PLOT_ANSI/src/hwtest.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/SOLVER/src/dcopy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/info.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h: New file. * /net/sauron/graid/ALBERT_CVS/SOLVER/src/dcopy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/info.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/nls.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/oem.h: initial import into CVS * /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cblas.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/daxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ddot.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy_.f, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy_.f, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dnrm2.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dscal.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dset.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dswap.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay_.f, /net/sauron/graid/ALBERT_CVS/SOLVER/src/gmres.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/info.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c: New file. * /net/sauron/graid/ALBERT_CVS/SOLVER/THANKS, /net/sauron/graid/ALBERT_CVS/SOLVER/src/banach.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/bicgstab.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cblas.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/cg.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/daxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ddot.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dexpy_.f, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dmxpy_.f, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dnrm2.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dscal.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dset.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dswap.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/dxpay_.f, /net/sauron/graid/ALBERT_CVS/SOLVER/src/gmres.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/info.h, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_ds.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/newton_fs.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/odir.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/ores.c, /net/sauron/graid/ALBERT_CVS/SOLVER/src/spcg.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/SOLVER/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/COPYING, /net/sauron/graid/ALBERT_CVS/SOLVER/ChangeLog, /net/sauron/graid/ALBERT_CVS/SOLVER/INSTALL, /net/sauron/graid/ALBERT_CVS/SOLVER/NEWS, /net/sauron/graid/ALBERT_CVS/SOLVER/README: New file. * /net/sauron/graid/ALBERT_CVS/SOLVER/AUTHORS, /net/sauron/graid/ALBERT_CVS/SOLVER/COPYING, /net/sauron/graid/ALBERT_CVS/SOLVER/ChangeLog, /net/sauron/graid/ALBERT_CVS/SOLVER/INSTALL, /net/sauron/graid/ALBERT_CVS/SOLVER/NEWS, /net/sauron/graid/ALBERT_CVS/SOLVER/README: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/level_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/multigrid.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_nr_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert_util.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/assemble.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/estimator.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/level_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/memory.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/multigrid.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_d.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/oem_solve_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_nr_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/check.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/coarsen_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/grape_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2scp.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/orthres.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/stiff.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_r_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/util.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/HB_precon.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG_s.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/albert.h, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/check.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/coarsen_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/dof_admin.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/error.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/eval.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/gltools.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/grape_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/l2scp.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/macro_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/numint.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/orthres.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/read_mesh_xdr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/sor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/ssor.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/stiff.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/trav_xy.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/traverse_r_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/util.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/MG.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/adapt.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/bas_fct.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/refine_common.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/Common/write_mesh_xdr.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_4.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_3.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/grape.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/graph_none.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_nr.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/graphXO.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_r.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/grape.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/graph_none.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/3d/traverse_nr.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_0.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_1.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_2.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_3.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/lagrange_4.c: initial import into CVS * /net/sauron/graid/ALBERT_CVS/ALBERT/AUTHORS, /net/sauron/graid/ALBERT_CVS/ALBERT/COPYING, /net/sauron/graid/ALBERT_CVS/ALBERT/ChangeLog, /net/sauron/graid/ALBERT_CVS/ALBERT/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERT/NEWS, /net/sauron/graid/ALBERT_CVS/ALBERT/README, /net/sauron/graid/ALBERT_CVS/ALBERT/THANKS, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/grape.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c: New file. * /net/sauron/graid/ALBERT_CVS/ALBERT/AUTHORS, /net/sauron/graid/ALBERT_CVS/ALBERT/COPYING, /net/sauron/graid/ALBERT_CVS/ALBERT/ChangeLog, /net/sauron/graid/ALBERT_CVS/ALBERT/INSTALL, /net/sauron/graid/ALBERT_CVS/ALBERT/NEWS, /net/sauron/graid/ALBERT_CVS/ALBERT/README, /net/sauron/graid/ALBERT_CVS/ALBERT/THANKS, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/coarsen.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/element.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/grape.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/level.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/macro.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/refine.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/traverse_nr.c, /net/sauron/graid/ALBERT_CVS/ALBERT/src/2d/write_mesh_ps.c: initial import into CVS alberta-2.0.1/INSTALL0000644000042300001440000002231010676723726011104 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. alberta-2.0.1/NEWS0000644000042300001440000000111510676723573010552 000000000000002003-12-01 ALBERTA 1.2 -- not yet released Renamed from ALBERT to ALBERTA (copyright issues) New features: - mixed methods - GRAPE interface Configuration - configure options are more consistent - it is possible to build only selected libraries - default CFLAGS are now -O3 (gcc) or -O (non-gcc), can be overridden by environment variables or on the command line - it is possible to specify an alternate blas-library Removed: - distributed BLAS library Support: - ALBERTA now has a mailing list at http://www.mathematik.uni-freiburg.de/IAM/ALBERTA/mailinglist.html alberta-2.0.1/config.guess0000755000042300001440000013063411030427333012360 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown if [ "${UNAME_SYSTEM}" = "Linux" ] ; then eval $set_cc_for_build cat << EOF > $dummy.c #include #ifdef __UCLIBC__ # ifdef __UCLIBC_CONFIG_VERSION__ LIBC=uclibc __UCLIBC_CONFIG_VERSION__ # else LIBC=uclibc # endif #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` fi # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo cris-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo frv-unknown-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" exit ;; esac # This should get integrated into the C code below, but now we hack if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: alberta-2.0.1/config.sub0000755000042300001440000010156511030427333012024 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx | dvp \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsEE* | ee | ps2) basic_machine=mips64r5900el-scei case $os in -linux*) ;; *) os=-elf ;; esac ;; iop) basic_machine=mipsel-scei os=-irx ;; dvp) basic_machine=dvp-scei os=-elf ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: alberta-2.0.1/depcomp0000755000042300001440000004224610676723721011435 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: alberta-2.0.1/install-sh0000755000042300001440000003160010676723720012053 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: alberta-2.0.1/ltmain.sh0000644000042300001440000061001710756636207011676 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.26 TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done # user sometimes does CC=-gcc so we need to match that to 'gcc' trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"` # and sometimes libtool has CC=-gcc but user does CC=gcc extendcc=${host}-${CC} # and sometimes libtool has CC=-gcc but user has CC=-gcc # (Gentoo-specific hack because we always export $CHOST) mungedcc=${CHOST-${host}}-${trimedcc} case "$@ " in "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*) tagname=CC break ;; "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$srcfile" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. # Make sure env LD_LIBRARY_PATH does not mess us up if test -n \"\${LD_LIBRARY_PATH+set}\"; then export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH fi " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: alberta-2.0.1/missing0000755000042300001440000002557710676723720011466 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: alberta-2.0.1/gnu-compat/0000777000042300001440000000000011067147342012200 500000000000000alberta-2.0.1/gnu-compat/README0000644000042300001440000000101410676723573013003 00000000000000This directory contains some OS-support function copied verbatim from the GNU C-library glibc. The files in this directory are covered by the GPL as included in the file COPYING. As the GPL states, mere aggregation of GPLed software with proprietary software in a distribution does _not_ mean that the entire aggregate is covered by the GPL. So the GPL does apply _only_ to files in this directory while the remaining part is coverd by the copyright conditions explained in detail in the top-level distribution directory. alberta-2.0.1/gnu-compat/getopt.h0000644000042300001440000001334710676723573013612 00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ alberta-2.0.1/gnu-compat/Makefile.am0000644000042300001440000000030210676723573014156 00000000000000EXTRADIST = README COPYING noinst_LTLIBRARIES = libalbertagnucompat.la noinst_HEADERS = getopt.h libalbertagnucompat_la_SOURCES = getopt.h dummy.c libalbertagnucompat_la_LIBADD = @LTLIBOBJS@ alberta-2.0.1/gnu-compat/Makefile.in0000644000042300001440000003745211067146151014171 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gnu-compat DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in COPYING getopt.c getopt1.c malloc.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libalbertagnucompat_la_DEPENDENCIES = @LTLIBOBJS@ am_libalbertagnucompat_la_OBJECTS = dummy.lo libalbertagnucompat_la_OBJECTS = $(am_libalbertagnucompat_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libalbertagnucompat_la_SOURCES) DIST_SOURCES = $(libalbertagnucompat_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRADIST = README COPYING noinst_LTLIBRARIES = libalbertagnucompat.la noinst_HEADERS = getopt.h libalbertagnucompat_la_SOURCES = getopt.h dummy.c libalbertagnucompat_la_LIBADD = @LTLIBOBJS@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gnu-compat/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu gnu-compat/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalbertagnucompat.la: $(libalbertagnucompat_la_OBJECTS) $(libalbertagnucompat_la_DEPENDENCIES) $(LINK) $(libalbertagnucompat_la_OBJECTS) $(libalbertagnucompat_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/gnu-compat/COPYING0000644000042300001440000004311010676723573013161 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. alberta-2.0.1/gnu-compat/getopt.c0000644000042300001440000007303710676723573013607 00000000000000/* Getopt for GNU. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. */ # if defined HAVE_LIBINTL_H || defined _LIBC # include # ifndef _ # define _(msgid) gettext (msgid) # endif # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ alberta-2.0.1/gnu-compat/getopt1.c0000644000042300001440000001070610676723573013662 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ alberta-2.0.1/gnu-compat/malloc.c0000644000042300001440000000215410676723573013544 00000000000000/* Work around bug on some systems where malloc (0) fails. Copyright (C) 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* written by Jim Meyering */ #if HAVE_CONFIG_H # include #endif #undef malloc #include char *malloc (); /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ char * rpl_malloc (size_t n) { if (n == 0) n = 1; return malloc (n); } alberta-2.0.1/gnu-compat/dummy.c0000644000042300001440000000003510676723573013424 00000000000000/* foo, or maybe even bar */ alberta-2.0.1/alberta_util/0000777000042300001440000000000011067147342012575 500000000000000alberta-2.0.1/alberta_util/Makefile.am0000644000042300001440000000001510676723601014544 00000000000000SUBDIRS = srcalberta-2.0.1/alberta_util/Makefile.in0000644000042300001440000004066611067146150014566 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = alberta_util DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in AUTHORS \ THANKS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta_util/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta_util/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta_util/AUTHORS0000644000042300001440000000027310676723601013566 00000000000000Author of the solvers. Kunibert G. Siebert Institut fuer Mathematik Universitaet Augsburg Universitaetsstr. 14 D-86159 Augsburg, Germany (c) by K.G. Siebert (2000-2003) alberta-2.0.1/alberta_util/THANKS0000644000042300001440000000031510676723601013426 00000000000000Thanks to: Claus-Justus Heine for starting to create tools for autoconfigure. Daniel Koester for finally creating these tools alberta-2.0.1/alberta_util/src/0000777000042300001440000000000011067147342013364 500000000000000alberta-2.0.1/alberta_util/src/alberta_util.h0000644000042300001440000005724410676724254016144 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: alberta_util.h */ /* */ /* description: public header file of the ALBERTA_UTIL package */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #ifndef _ALBERTA_UTIL_H_ #define _ALBERTA_UTIL_H_ #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #ifndef true #define true 1 #define false 0 #endif #ifndef nil #define nil NULL #endif #ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef ABS #define ABS(a) ((a) >= 0 ? (a) : -(a)) #endif #ifndef SQR #define SQR(a) ((a)*(a)) #endif #ifndef M_E #define M_E 2.7182818284590452354 #endif #ifndef M_LOG2E #define M_LOG2E 1.4426950408889634074 #endif #ifndef M_LOG10E #define M_LOG10E 0.43429448190325182765 #endif #ifndef M_LN2 #define M_LN2 0.69314718055994530942 #endif #ifndef M_LN10 #define M_LN10 2.30258509299404568402 #endif #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifndef M_PI_2 #define M_PI_2 1.57079632679489661923 #endif #ifndef M_PI_4 #define M_PI_4 0.78539816339744830962 #endif #ifndef M_1_PI #define M_1_PI 0.31830988618379067154 #endif #ifndef M_2_PI #define M_2_PI 0.63661977236758134308 #endif #ifndef M_2_SQRTPI #define M_2_SQRTPI 1.12837916709551257390 #endif #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 #endif #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 #endif /*--------------------------------------------------------------------------*/ /* Definition of basic data types */ /*--------------------------------------------------------------------------*/ #ifndef REAL_DEFINED #define REAL_DEFINED #define USE_DOUBLE_AS_REAL 1 #if USE_DOUBLE_AS_REAL typedef double REAL; #define REAL_MANT_DIG DBL_MANT_DIG #define REAL_EPSILON DBL_EPSILON #define REAL_DIG DBL_DIG #define REAL_MIN_EXP DBL_MIN_EXP #define REAL_MIN DBL_MIN #define REAL_MIN_10_EXP DBL_MIN_10_EXP #define REAL_MAX_EXP DBL_MAX_EXP #define REAL_MAX DBL_MAX #define REAL_MAX_10_EXP DBL_MAX_10_EXP #else /* USE_DOUBLE_AS_REAL */ typedef float REAL; #define REAL_MANT_DIG FLT_MANT_DIG #define REAL_EPSILON FLT_EPSILON #define REAL_DIG FLT_DIG #define REAL_MIN_EXP FLT_MIN_EXP #define REAL_MIN FLT_MIN #define REAL_MIN_10_EXP FLT_MIN_10_EXP #define REAL_MAX_EXP FLT_MAX_EXP #define REAL_MAX FLT_MAX #define REAL_MAX_10_EXP FLT_MAX_10_EXP #endif /* USE_DOUBLE_AS_REAL */ #ifndef LARGE #define LARGE REAL_MAX #endif #endif /* REAL_DEFINED */ #ifndef U_CHAR_DEFINED #define U_CHAR_DEFINED typedef unsigned char U_CHAR; typedef signed char S_CHAR; typedef unsigned long FLAGS; #endif #ifndef WORKSPACE_DEFINED #define WORKSPACE_DEFINED typedef struct workspace WORKSPACE; struct workspace { size_t size; void *work; }; #endif #ifndef VOID_LIST_ELEMENT_DEFINED #define VOID_LIST_ELEMENT_DEFINED typedef struct void_list_element VOID_LIST_ELEMENT; struct void_list_element { void *data; VOID_LIST_ELEMENT *next; }; VOID_LIST_ELEMENT *get_void_list_element(void); void free_void_list_element(VOID_LIST_ELEMENT *); #endif /*--------------------------------------------------------------------------*/ /* functions and macros for messages */ /*--------------------------------------------------------------------------*/ #ifdef __GNUC__ # define ALBERTA_UNUSED(proto) proto __attribute__((unused)) # define ALBERTA_DEFUNUSED(proto) ALBERTA_UNUSED(proto); proto # define ALBERTA_NORETURN(proto) proto __attribute__((noreturn)) # define ALBERTA_DEFNORETURN(proto) ALBERTA_NORETURN(proto); proto #else # define ALBERTA_UNUSED(proto) proto # define ALBERTA_DEFUNUSED(proto) proto # define ALBERTA_NORETURN(proto) proto # define ALBERTA_DEFNORETURN(proto) proto #endif /*--------------------------------------------------------------------------*/ /* Some of the printing functions are declared to return type int only for */ /* the purpose of defining the macros below without "if" statements! */ /*--------------------------------------------------------------------------*/ int print_msg(const char *format, ...); int print_error_msg(const char *format, ...); int print_error_msg_exit(const char *format, ...); int print_error_funcname(const char *name, const char *file, int line); void print_warn_msg(const char *format, ...); void print_warn_funcname(const char *name, const char *file, int line); int print_funcname(const char *name); void print_int_vec(const char *s, const int *vec, int no); void print_real_vec(const char *s, const REAL *vec, int no); void change_msg_out(FILE *fp); void open_msg_file(const char *filename, const char *type); void change_error_out(FILE *fp); void open_error_file(const char *filename, const char *type); const char *generate_filename(const char *, const char *, int); #define FUNCNAME(nn) static const char *funcName = nn #define ERROR print_error_funcname(funcName, __FILE__, __LINE__),\ print_error_msg #define ERROR_EXIT print_error_funcname(funcName, __FILE__, __LINE__),\ print_error_msg_exit #define WARNING print_warn_funcname(funcName, __FILE__, __LINE__),\ print_warn_msg #define TEST(test, ...) \ do { \ if (!(test)) { \ print_error_funcname(funcName, __FILE__, __LINE__); \ print_error_msg(__VA_ARGS__); \ } \ } while (0) #define TEST_EXIT(test, ...) \ do { \ if (!(test)) { \ print_error_funcname(funcName, __FILE__, __LINE__); \ print_error_msg_exit(__VA_ARGS__); \ } \ } while (0) /*--------------------------------------------------------------------------*/ /* Some testing macros useful while debugging. */ /*--------------------------------------------------------------------------*/ #if ALBERTA_DEBUG==1 #define DEBUG_TEST(test, ...) \ do { \ if (!(test)) { \ print_error_funcname(funcName, __FILE__, __LINE__); \ print_error_msg(__VA_ARGS__); \ } \ } while (0) #define DEBUG_TEST_EXIT(test, ...) \ do { \ if (!(test)) { \ print_error_funcname(funcName, __FILE__, __LINE__); \ print_error_msg_exit(__VA_ARGS__); \ } \ } while (0) #else #define DEBUG_TEST(test, ...) do { funcName = funcName; } while (0) #define DEBUG_TEST_EXIT(test, ...) do { funcName = funcName; } while (0) #endif #define MSG print_funcname(funcName), print_msg #define INFO(info,noinfo, ...)\ do { \ if (msg_info&&(MIN(msg_info,(info))>=(noinfo))) { \ print_funcname(funcName); print_msg(__VA_ARGS__); \ } \ } while (0) #define PRINT_INFO(info,noinfo, ...) \ do { \ if (msg_info&&(MIN(msg_info,(info))>=(noinfo))) { \ print_msg(__VA_ARGS__); \ } \ } while (0) #define PRINT_INT_VEC print_funcname(funcName), print_int_vec #define PRINT_REAL_VEC print_funcname(funcName), print_real_vec extern void alberta_wait(const char *, int); #define WAIT alberta_wait(funcName, msg_wait) #define WAIT_REALLY alberta_wait(funcName, 1) /*--------------------------------------------------------------------------*/ /* Definition of extern variables */ extern int msg_wait; /* declared in msg.c */ extern const char *funcName; /* declared in msg.c */ extern int msg_info; /* declared in msg.c */ /*--------------------------------------------------------------------------*/ /* Macros for memory allocation */ /*--------------------------------------------------------------------------*/ void *alberta_alloc(size_t, const char *, const char *,int); void *alberta_realloc(void *, size_t, size_t, const char *, const char *, int); void *alberta_calloc(size_t, size_t, const char *, const char *,int); void alberta_free(void *, size_t); void print_mem_use(void); void **alberta_matrix(size_t, size_t, size_t, const char *, const char *, int); void free_alberta_matrix(void **, size_t, size_t, size_t); WORKSPACE *get_workspace(size_t, const char *, const char *, int); #define GET_WORKSPACE(s) get_workspace(s,funcName,__FILE__,__LINE__) WORKSPACE *realloc_workspace(WORKSPACE *ws, size_t new_size, const char *fct, const char *file, int line); #define REALLOC_WORKSPACE(ws,size)\ (realloc_workspace(ws,size,funcName,__FILE__,__LINE__)) void clear_workspace(WORKSPACE *ws); #define CLEAR_WORKSPACE(ws) clear_workspace(ws) void free_workspace(WORKSPACE *ws); #define FREE_WORKSPACE(ws) free_workspace(ws) #define MEM_ALLOC(n,type)\ ((type*)alberta_alloc((n)*sizeof(type),funcName,__FILE__,__LINE__)) #define MEM_REALLOC(ptr,old_n,new_n,type)\ ((type*)alberta_realloc((void *)ptr,(old_n)*sizeof(type),\ (new_n)*sizeof(type),funcName,__FILE__,__LINE__)) #define MEM_CALLOC(n,type)\ ((type*)alberta_calloc((n), sizeof(type),funcName,__FILE__,__LINE__)) #define MEM_FREE(ptr,n,type) alberta_free((void *)ptr,(n)*sizeof(type)) #define MAT_ALLOC(nr,nc,type)\ ((type**)alberta_matrix((nr),(nc),sizeof(type),funcName,__FILE__, __LINE__)) #define MAT_FREE(ptr,nr,nc,type)\ free_alberta_matrix((void **)ptr,(nr),(nc),sizeof(type)) #define NAME(struct)\ ((struct) ? ((struct)->name ? (struct)->name : #struct "->name unknown") :\ #struct " pointer to nil") #define GET_STRUCT(struct, from)\ TEST_EXIT((from) && (struct = (from)->struct),\ (from) ? "GET_STRUCT: %s->%s == nil\n" : "GET_STRUCT: %s == nil%s\n",\ #from, (from) ? #struct : "") /*--------------------------------------------------------------------------*/ /* functions for handling parameters */ /*--------------------------------------------------------------------------*/ void add_parameter(int p, const char *key, const char *par); void Add_parameter(int p, const char *key, const char *par, const char *fname, const char *file, int line); #define ADD_PARAMETER(p,key,param)\ Add_parameter(p,key,param,funcName, __FILE__, __LINE__) void init_parameters(int p, const char *filename); void init_parameters_cpp(int p, const char *fn, const char *flags); int get_parameter(int flag, const char *key, const char *format, ...); int init_param_func_name(const char *, const char *, int call_line); #define GET_PARAMETER !init_param_func_name(funcName, __FILE__, __LINE__)?\ 0 : get_parameter void save_parameters(const char *file, int info); void print_parameters(void); /*--------------------------------------------------------------------------*/ /* generating filenames, general lists */ /*--------------------------------------------------------------------------*/ const char *generate_filename(const char *path, const char *fn, int ntime); VOID_LIST_ELEMENT *get_void_list_element(void); void free_void_list_element(VOID_LIST_ELEMENT *list); /*--------------------------------------------------------------------------*/ /* library of Orthogonal Error Methods */ /* */ /* most routines are the C-version of OFM-lib by Willy Doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--- data structures for orthogonal error methods -----------------------*/ /*--------------------------------------------------------------------------*/ typedef struct oem_data OEM_DATA; struct oem_data { int (*mat_vec)(void *, int, const REAL *, REAL *); void *mat_vec_data; int (*mat_vec_T)(void *, int, const REAL *, REAL *); void *mat_vec_T_data; void (*left_precon)(void *, int, REAL *); void *left_precon_data; void (*right_precon)(void *, int, REAL *); void *right_precon_data; REAL (*scp)(void *, int, const REAL *, const REAL *); void *scp_data; WORKSPACE *ws; REAL tolerance; int restart; int max_iter; int info; REAL initial_residual; REAL residual; }; /*--------------------------------------------------------------------------*/ /*-- implemented solvers -------------------------------------------------*/ /*--------------------------------------------------------------------------*/ int oem_bicgstab(OEM_DATA *, int, const REAL *, REAL *); int oem_cg(OEM_DATA *, int, const REAL *, REAL *); int oem_gmres(OEM_DATA *, int, const REAL *, REAL *); int oem_gmres_k(OEM_DATA *, int, const REAL *, REAL *); int oem_odir(OEM_DATA *, int, const REAL *, REAL *); int oem_ores(OEM_DATA *, int, const REAL *, REAL *); int oem_tfqmr(OEM_DATA *, int, const REAL *, REAL *); /*--------------------------------------------------------------------------*/ /* function call: */ /* oem_?(oem_data, dim, b, x); */ /* */ /* input: oem_data: above described data structure */ /* dim: dimension of the linear system */ /* b: vector storing the right hand side of the sytem */ /* x: vector stroing the initial guess */ /* */ /* output: x: solution of the linear system */ /* oem_data->residual: residual of the equation */ /* */ /* return value: number of iterations */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Solver for linear saddle point problem */ /*--------------------------------------------------------------------------*/ typedef struct oem_sp_data OEM_SP_DATA; struct oem_sp_data { int (*solve_Auf)(void *, int, const REAL *, REAL *); void *solve_Auf_data; /*-- solve A u = f in X ------------------*/ void (*B)(void *, REAL, int, const REAL *, int, REAL *); void *B_data; /*-- compute B p ---------------------------*/ void (*Bt)(void *, REAL, int, const REAL *, int, REAL *); void *Bt_data; /*-- compute B^* u -------------------------*/ int (*project)(void *, int, const REAL *, REAL *); void *project_data; /*-- project B^* u to Y -------------------*/ int (*precon)(void *, int, const REAL *, const REAL *, REAL *); void *precon_data; /*-- compute C r in Y ---------------------*/ WORKSPACE *ws; /*-- workspace ----------------------------*/ REAL tolerance; int restart; int max_iter; int info; REAL initial_residual; REAL residual; }; /*--------------------------------------------------------------------------*/ /*-- implemented solvers -------------------------------------------------*/ /*--------------------------------------------------------------------------*/ int oem_spcg(OEM_SP_DATA *, int, const REAL *, REAL *, int, const REAL *, REAL*); /*--------------------------------------------------------------------------*/ /* library of solvers for nonlinear systems */ /* */ /* some routines are the C-version of NGL-lib by Willy Doerfler */ /* http://www.mathematik.uni-kl.de/~doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut f"ur Angewandte Mathematik */ /* Albert-Ludwigs-Universit"at Freiburg */ /* Hermann-Herder-Str. 10 */ /* 79104 Freiburg */ /* Germany */ /* */ /* email: kunibert@mathematik.uni-freiburg.de */ /* */ /* (c) by K.G. Siebert (2000) */ /* */ /*--------------------------------------------------------------------------*/ typedef struct nls_data NLS_DATA; struct nls_data { void (*update)(void *, int, const REAL *, int, REAL *); void *update_data; int (*solve)(void *, int, const REAL *, REAL *); void *solve_data; REAL (*norm)(void *, int, const REAL *); void *norm_data; WORKSPACE *ws; REAL tolerance; int restart; int max_iter; int info; REAL initial_residual; REAL residual; }; /*--------------------------------------------------------------------------*/ /* functions: */ /*--------------------------------------------------------------------------*/ /* update: calculate F(x) and DF(x) */ /* call: */ /* update(update_data, dim, x, ud_DF, Fx) */ /* arguments: */ /* update_data: pointer to user data */ /* dim: dimension of the nonlinear system */ /* x: vector stroring the actual iterate */ /* ud_DF: ud_DF==1: update DF(x) */ /* Fx: Fx!=nil: update F(x) and store it in Fx */ /*--------------------------------------------------------------------------*/ /* solve: solve the linearized system DF(x) d = b for the correction */ /* call: */ /* solve(solve_data, dim, b, d) */ /* solve_data: pointer to user data */ /* dim: dimension of the nonlinear system */ /* x: vector stroring the actual iterate */ /* b: right hand side of the linearized system */ /* d: initial guess and solution of the system */ /* */ /* return value is the number of iterations used by an */ /* iterative solver */ /*--------------------------------------------------------------------------*/ /* norm: compute the norm of the residual */ /* if norm==nil, the Eucledian norm of the coefficient vector */ /* in R^dim is used. */ /* call: */ /* norm(norm_data, dim, d) */ /* norm_data: pointer to user data */ /* dim: dimension of the nonlinear system */ /* d: coefficient vector of the residual */ /* */ /* return value is the norm of the residual */ /*--------------------------------------------------------------------------*/ /* ws: workspace */ /*--------------------------------------------------------------------------*/ int nls_newton(NLS_DATA *, int, REAL *); int nls_newton_ds(NLS_DATA *, int, REAL *); int nls_newton_fs(NLS_DATA *, int, REAL *); int nls_newton_br(NLS_DATA *, REAL, int, REAL *); int nls_banach(NLS_DATA *, int, REAL *); /*--------------------------------------------------------------------------*/ /*-- inline wrappers to FORTRAN BLAS functions ---------------------------*/ /*--------------------------------------------------------------------------*/ #include "alberta_util_inlines.h" #ifdef __cplusplus } #endif #endif /* !_ALBERTA_UTIL_H_ */ alberta-2.0.1/alberta_util/src/alberta_util_inlines.h0000644000042300001440000001110510701404720017625 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: alberta_util_inline.h */ /* */ /* description: header for inline functions of the ALBERTA_UTIL package */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #ifndef _ALBERTA_UTIL_INLINE_H_ #define _ALBERTA_UTIL_INLINE_H_ #define DNRM2_F77 dnrm2_ #define DAXPY_F77 daxpy_ #define DEXPY_F77 dexpy_ #define DMXPY_F77 dmxpy_ #define DCOPY_F77 dcopy_ #define DDOT_F77 ddot_ #define DSCAL_F77 dscal_ #define DSWAP_F77 dswap_ #define DXPAY_F77 dxpay_ #define DRANDN_F77 drandn_ extern double DNRM2_F77(int *n, const double *x, int *ix); extern void DAXPY_F77(int *n, double *alpha, const double *x, int *ix, double *y, int *iy); extern void DEXPY_F77(int *n, const double *x, int *ix, double *y, int *iy); extern void DMXPY_F77(int *n, const double *x, int *ix, double *y, int *iy); extern void DCOPY_F77(int *n, const double *x, int *ix, double *y, int *iy); extern double DDOT_F77(int *n, const double *x, int *ix, const double *y, int *iy); extern void DSCAL_F77(int *n, double *alpha, double *x, int *ix); extern void DSWAP_F77(int *n, double *x, int *ix, double *y, int *iy); extern void DXPAY_F77(int *n, const double *x, int *ix, double *alpha, double *y, int *iy); extern void DRANDN_F77(int *n, double *x, int *ix); static inline double dnrm2(int n, const double *x, int ix) { return DNRM2_F77(&n, x, &ix); } static inline void daxpy(int n, double alpha, const double *x, int ix, double *y, int iy) { DAXPY_F77(&n, &alpha, x, &ix, y, &iy); return; } static inline void dexpy(int n, const double *x, int ix, double *y, int iy) { DEXPY_F77(&n, x, &ix, y, &iy); return; } static inline void dmxpy(int n, const double *x, int ix, double *y, int iy) { DMXPY_F77(&n, x, &ix, y, &iy); return; } static inline void dcopy(int n, const double *x, int ix, double *y, int iy) { DCOPY_F77(&n, x, &ix, y, &iy); return; } static inline double ddot(int n, const double *x, int ix, const double *y, int iy) { return DDOT_F77(&n, x, &ix, y, &iy); } static inline void dscal(int n, double alpha, double *x, int ix) { DSCAL_F77(&n, &alpha, x, &ix); return; } static inline void dswap(int n, double *x, int ix, double *y, int iy) { DSWAP_F77(&n, x, &ix, y, &iy); return; } static inline void dxpay(int n, const double *x, int ix, double alpha, double *y, int iy) { DXPAY_F77(&n, x, &ix, &alpha, y, &iy); return; } static inline void drandn(int n, double *x, int ix) { DRANDN_F77(&n, x, &ix); return; } static inline void dset(int n, double alpha, double *x, int ix) { int i, nix = n*ix; for (i = 0; i < nix; i += ix) x[i] = alpha; return; } #endif /* _ALBERTA_UTIL_INLINE_H_ */ alberta-2.0.1/alberta_util/src/Makefile.am0000644000042300001440000000165210676733204015343 00000000000000lib_LTLIBRARIES = libalberta_util.la libalberta_util_debug.la UTIL_SRC = alberta_util.h divers.c \ msg.c alloc.c parameters.c cg.c gmres.c newton_fs.c spcg.c \ dexpy_.f info.c banach.c odir.c bicgstab.c dmxpy_.f newton.c dxpay_.f \ newton_ds.c newton_br.c ores.c drandn_.f qmr.c libalberta_util_la_SOURCES = $(UTIL_SRC) libalberta_util_la_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) libalberta_util_debug_la_SOURCES = $(UTIL_SRC) libalberta_util_debug_la_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) F77LD = $(CCLD) # Why should we link againts libX at _this_ place? #libalberta_util_la_LIBADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) pkginclude_HEADERS = alberta_util.h alberta_util_inlines.h EXTRA_DIST = alberta_util_intern.h BUILT_SOURCES = alberta_util_inlines.h.in alberta_util_inlines.h alberta_util_inlines.h: alberta_util_inlines.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ distclean-local: -rm -f $(BUILT_SOURCES) alberta-2.0.1/alberta_util/src/Makefile.in0000644000042300001440000016535011067146151015354 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = alberta_util/src DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/alberta_util_inlines.h.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = alberta_util_inlines.h.in am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_util_la_LIBADD = am__objects_1 = libalberta_util_la-divers.lo libalberta_util_la-msg.lo \ libalberta_util_la-alloc.lo libalberta_util_la-parameters.lo \ libalberta_util_la-cg.lo libalberta_util_la-gmres.lo \ libalberta_util_la-newton_fs.lo libalberta_util_la-spcg.lo \ dexpy_.lo libalberta_util_la-info.lo \ libalberta_util_la-banach.lo libalberta_util_la-odir.lo \ libalberta_util_la-bicgstab.lo dmxpy_.lo \ libalberta_util_la-newton.lo dxpay_.lo \ libalberta_util_la-newton_ds.lo \ libalberta_util_la-newton_br.lo libalberta_util_la-ores.lo \ drandn_.lo libalberta_util_la-qmr.lo am_libalberta_util_la_OBJECTS = $(am__objects_1) libalberta_util_la_OBJECTS = $(am_libalberta_util_la_OBJECTS) libalberta_util_debug_la_LIBADD = am__objects_2 = libalberta_util_debug_la-divers.lo \ libalberta_util_debug_la-msg.lo \ libalberta_util_debug_la-alloc.lo \ libalberta_util_debug_la-parameters.lo \ libalberta_util_debug_la-cg.lo \ libalberta_util_debug_la-gmres.lo \ libalberta_util_debug_la-newton_fs.lo \ libalberta_util_debug_la-spcg.lo dexpy_.lo \ libalberta_util_debug_la-info.lo \ libalberta_util_debug_la-banach.lo \ libalberta_util_debug_la-odir.lo \ libalberta_util_debug_la-bicgstab.lo dmxpy_.lo \ libalberta_util_debug_la-newton.lo dxpay_.lo \ libalberta_util_debug_la-newton_ds.lo \ libalberta_util_debug_la-newton_br.lo \ libalberta_util_debug_la-ores.lo drandn_.lo \ libalberta_util_debug_la-qmr.lo am_libalberta_util_debug_la_OBJECTS = $(am__objects_2) libalberta_util_debug_la_OBJECTS = \ $(am_libalberta_util_debug_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libalberta_util_la_SOURCES) \ $(libalberta_util_debug_la_SOURCES) DIST_SOURCES = $(libalberta_util_la_SOURCES) \ $(libalberta_util_debug_la_SOURCES) pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libalberta_util.la libalberta_util_debug.la UTIL_SRC = alberta_util.h divers.c \ msg.c alloc.c parameters.c cg.c gmres.c newton_fs.c spcg.c \ dexpy_.f info.c banach.c odir.c bicgstab.c dmxpy_.f newton.c dxpay_.f \ newton_ds.c newton_br.c ores.c drandn_.f qmr.c libalberta_util_la_SOURCES = $(UTIL_SRC) libalberta_util_la_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) libalberta_util_debug_la_SOURCES = $(UTIL_SRC) libalberta_util_debug_la_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) F77LD = $(CCLD) # Why should we link againts libX at _this_ place? #libalberta_util_la_LIBADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) pkginclude_HEADERS = alberta_util.h alberta_util_inlines.h EXTRA_DIST = alberta_util_intern.h BUILT_SOURCES = alberta_util_inlines.h.in alberta_util_inlines.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .f .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta_util/src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta_util/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh alberta_util_inlines.h.in: $(top_builddir)/config.status $(srcdir)/alberta_util_inlines.h.in.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_util.la: $(libalberta_util_la_OBJECTS) $(libalberta_util_la_DEPENDENCIES) $(F77LINK) -rpath $(libdir) $(libalberta_util_la_OBJECTS) $(libalberta_util_la_LIBADD) $(LIBS) libalberta_util_debug.la: $(libalberta_util_debug_la_OBJECTS) $(libalberta_util_debug_la_DEPENDENCIES) $(F77LINK) -rpath $(libdir) $(libalberta_util_debug_la_OBJECTS) $(libalberta_util_debug_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-banach.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-bicgstab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-cg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-divers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-gmres.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-newton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-newton_br.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-newton_ds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-newton_fs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-odir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-ores.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-parameters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-qmr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_debug_la-spcg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-banach.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-bicgstab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-cg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-divers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-gmres.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-newton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-newton_br.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-newton_ds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-newton_fs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-odir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-ores.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-parameters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-qmr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalberta_util_la-spcg.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libalberta_util_la-divers.lo: divers.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-divers.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-divers.Tpo -c -o libalberta_util_la-divers.lo `test -f 'divers.c' || echo '$(srcdir)/'`divers.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-divers.Tpo $(DEPDIR)/libalberta_util_la-divers.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='divers.c' object='libalberta_util_la-divers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-divers.lo `test -f 'divers.c' || echo '$(srcdir)/'`divers.c libalberta_util_la-msg.lo: msg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-msg.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-msg.Tpo -c -o libalberta_util_la-msg.lo `test -f 'msg.c' || echo '$(srcdir)/'`msg.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-msg.Tpo $(DEPDIR)/libalberta_util_la-msg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg.c' object='libalberta_util_la-msg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-msg.lo `test -f 'msg.c' || echo '$(srcdir)/'`msg.c libalberta_util_la-alloc.lo: alloc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-alloc.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-alloc.Tpo -c -o libalberta_util_la-alloc.lo `test -f 'alloc.c' || echo '$(srcdir)/'`alloc.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-alloc.Tpo $(DEPDIR)/libalberta_util_la-alloc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alloc.c' object='libalberta_util_la-alloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-alloc.lo `test -f 'alloc.c' || echo '$(srcdir)/'`alloc.c libalberta_util_la-parameters.lo: parameters.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-parameters.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-parameters.Tpo -c -o libalberta_util_la-parameters.lo `test -f 'parameters.c' || echo '$(srcdir)/'`parameters.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-parameters.Tpo $(DEPDIR)/libalberta_util_la-parameters.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parameters.c' object='libalberta_util_la-parameters.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-parameters.lo `test -f 'parameters.c' || echo '$(srcdir)/'`parameters.c libalberta_util_la-cg.lo: cg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-cg.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-cg.Tpo -c -o libalberta_util_la-cg.lo `test -f 'cg.c' || echo '$(srcdir)/'`cg.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-cg.Tpo $(DEPDIR)/libalberta_util_la-cg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cg.c' object='libalberta_util_la-cg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-cg.lo `test -f 'cg.c' || echo '$(srcdir)/'`cg.c libalberta_util_la-gmres.lo: gmres.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-gmres.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-gmres.Tpo -c -o libalberta_util_la-gmres.lo `test -f 'gmres.c' || echo '$(srcdir)/'`gmres.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-gmres.Tpo $(DEPDIR)/libalberta_util_la-gmres.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmres.c' object='libalberta_util_la-gmres.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-gmres.lo `test -f 'gmres.c' || echo '$(srcdir)/'`gmres.c libalberta_util_la-newton_fs.lo: newton_fs.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-newton_fs.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-newton_fs.Tpo -c -o libalberta_util_la-newton_fs.lo `test -f 'newton_fs.c' || echo '$(srcdir)/'`newton_fs.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-newton_fs.Tpo $(DEPDIR)/libalberta_util_la-newton_fs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton_fs.c' object='libalberta_util_la-newton_fs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-newton_fs.lo `test -f 'newton_fs.c' || echo '$(srcdir)/'`newton_fs.c libalberta_util_la-spcg.lo: spcg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-spcg.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-spcg.Tpo -c -o libalberta_util_la-spcg.lo `test -f 'spcg.c' || echo '$(srcdir)/'`spcg.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-spcg.Tpo $(DEPDIR)/libalberta_util_la-spcg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spcg.c' object='libalberta_util_la-spcg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-spcg.lo `test -f 'spcg.c' || echo '$(srcdir)/'`spcg.c libalberta_util_la-info.lo: info.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-info.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-info.Tpo -c -o libalberta_util_la-info.lo `test -f 'info.c' || echo '$(srcdir)/'`info.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-info.Tpo $(DEPDIR)/libalberta_util_la-info.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='info.c' object='libalberta_util_la-info.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-info.lo `test -f 'info.c' || echo '$(srcdir)/'`info.c libalberta_util_la-banach.lo: banach.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-banach.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-banach.Tpo -c -o libalberta_util_la-banach.lo `test -f 'banach.c' || echo '$(srcdir)/'`banach.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-banach.Tpo $(DEPDIR)/libalberta_util_la-banach.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='banach.c' object='libalberta_util_la-banach.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-banach.lo `test -f 'banach.c' || echo '$(srcdir)/'`banach.c libalberta_util_la-odir.lo: odir.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-odir.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-odir.Tpo -c -o libalberta_util_la-odir.lo `test -f 'odir.c' || echo '$(srcdir)/'`odir.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-odir.Tpo $(DEPDIR)/libalberta_util_la-odir.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='odir.c' object='libalberta_util_la-odir.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-odir.lo `test -f 'odir.c' || echo '$(srcdir)/'`odir.c libalberta_util_la-bicgstab.lo: bicgstab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-bicgstab.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-bicgstab.Tpo -c -o libalberta_util_la-bicgstab.lo `test -f 'bicgstab.c' || echo '$(srcdir)/'`bicgstab.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-bicgstab.Tpo $(DEPDIR)/libalberta_util_la-bicgstab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bicgstab.c' object='libalberta_util_la-bicgstab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-bicgstab.lo `test -f 'bicgstab.c' || echo '$(srcdir)/'`bicgstab.c libalberta_util_la-newton.lo: newton.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-newton.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-newton.Tpo -c -o libalberta_util_la-newton.lo `test -f 'newton.c' || echo '$(srcdir)/'`newton.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-newton.Tpo $(DEPDIR)/libalberta_util_la-newton.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton.c' object='libalberta_util_la-newton.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-newton.lo `test -f 'newton.c' || echo '$(srcdir)/'`newton.c libalberta_util_la-newton_ds.lo: newton_ds.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-newton_ds.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-newton_ds.Tpo -c -o libalberta_util_la-newton_ds.lo `test -f 'newton_ds.c' || echo '$(srcdir)/'`newton_ds.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-newton_ds.Tpo $(DEPDIR)/libalberta_util_la-newton_ds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton_ds.c' object='libalberta_util_la-newton_ds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-newton_ds.lo `test -f 'newton_ds.c' || echo '$(srcdir)/'`newton_ds.c libalberta_util_la-newton_br.lo: newton_br.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-newton_br.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-newton_br.Tpo -c -o libalberta_util_la-newton_br.lo `test -f 'newton_br.c' || echo '$(srcdir)/'`newton_br.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-newton_br.Tpo $(DEPDIR)/libalberta_util_la-newton_br.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton_br.c' object='libalberta_util_la-newton_br.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-newton_br.lo `test -f 'newton_br.c' || echo '$(srcdir)/'`newton_br.c libalberta_util_la-ores.lo: ores.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-ores.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-ores.Tpo -c -o libalberta_util_la-ores.lo `test -f 'ores.c' || echo '$(srcdir)/'`ores.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-ores.Tpo $(DEPDIR)/libalberta_util_la-ores.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ores.c' object='libalberta_util_la-ores.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-ores.lo `test -f 'ores.c' || echo '$(srcdir)/'`ores.c libalberta_util_la-qmr.lo: qmr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -MT libalberta_util_la-qmr.lo -MD -MP -MF $(DEPDIR)/libalberta_util_la-qmr.Tpo -c -o libalberta_util_la-qmr.lo `test -f 'qmr.c' || echo '$(srcdir)/'`qmr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_la-qmr.Tpo $(DEPDIR)/libalberta_util_la-qmr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qmr.c' object='libalberta_util_la-qmr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_la-qmr.lo `test -f 'qmr.c' || echo '$(srcdir)/'`qmr.c libalberta_util_debug_la-divers.lo: divers.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-divers.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-divers.Tpo -c -o libalberta_util_debug_la-divers.lo `test -f 'divers.c' || echo '$(srcdir)/'`divers.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-divers.Tpo $(DEPDIR)/libalberta_util_debug_la-divers.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='divers.c' object='libalberta_util_debug_la-divers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-divers.lo `test -f 'divers.c' || echo '$(srcdir)/'`divers.c libalberta_util_debug_la-msg.lo: msg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-msg.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-msg.Tpo -c -o libalberta_util_debug_la-msg.lo `test -f 'msg.c' || echo '$(srcdir)/'`msg.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-msg.Tpo $(DEPDIR)/libalberta_util_debug_la-msg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg.c' object='libalberta_util_debug_la-msg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-msg.lo `test -f 'msg.c' || echo '$(srcdir)/'`msg.c libalberta_util_debug_la-alloc.lo: alloc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-alloc.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-alloc.Tpo -c -o libalberta_util_debug_la-alloc.lo `test -f 'alloc.c' || echo '$(srcdir)/'`alloc.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-alloc.Tpo $(DEPDIR)/libalberta_util_debug_la-alloc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alloc.c' object='libalberta_util_debug_la-alloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-alloc.lo `test -f 'alloc.c' || echo '$(srcdir)/'`alloc.c libalberta_util_debug_la-parameters.lo: parameters.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-parameters.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-parameters.Tpo -c -o libalberta_util_debug_la-parameters.lo `test -f 'parameters.c' || echo '$(srcdir)/'`parameters.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-parameters.Tpo $(DEPDIR)/libalberta_util_debug_la-parameters.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parameters.c' object='libalberta_util_debug_la-parameters.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-parameters.lo `test -f 'parameters.c' || echo '$(srcdir)/'`parameters.c libalberta_util_debug_la-cg.lo: cg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-cg.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-cg.Tpo -c -o libalberta_util_debug_la-cg.lo `test -f 'cg.c' || echo '$(srcdir)/'`cg.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-cg.Tpo $(DEPDIR)/libalberta_util_debug_la-cg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cg.c' object='libalberta_util_debug_la-cg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-cg.lo `test -f 'cg.c' || echo '$(srcdir)/'`cg.c libalberta_util_debug_la-gmres.lo: gmres.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-gmres.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-gmres.Tpo -c -o libalberta_util_debug_la-gmres.lo `test -f 'gmres.c' || echo '$(srcdir)/'`gmres.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-gmres.Tpo $(DEPDIR)/libalberta_util_debug_la-gmres.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmres.c' object='libalberta_util_debug_la-gmres.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-gmres.lo `test -f 'gmres.c' || echo '$(srcdir)/'`gmres.c libalberta_util_debug_la-newton_fs.lo: newton_fs.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-newton_fs.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-newton_fs.Tpo -c -o libalberta_util_debug_la-newton_fs.lo `test -f 'newton_fs.c' || echo '$(srcdir)/'`newton_fs.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-newton_fs.Tpo $(DEPDIR)/libalberta_util_debug_la-newton_fs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton_fs.c' object='libalberta_util_debug_la-newton_fs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-newton_fs.lo `test -f 'newton_fs.c' || echo '$(srcdir)/'`newton_fs.c libalberta_util_debug_la-spcg.lo: spcg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-spcg.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-spcg.Tpo -c -o libalberta_util_debug_la-spcg.lo `test -f 'spcg.c' || echo '$(srcdir)/'`spcg.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-spcg.Tpo $(DEPDIR)/libalberta_util_debug_la-spcg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spcg.c' object='libalberta_util_debug_la-spcg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-spcg.lo `test -f 'spcg.c' || echo '$(srcdir)/'`spcg.c libalberta_util_debug_la-info.lo: info.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-info.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-info.Tpo -c -o libalberta_util_debug_la-info.lo `test -f 'info.c' || echo '$(srcdir)/'`info.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-info.Tpo $(DEPDIR)/libalberta_util_debug_la-info.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='info.c' object='libalberta_util_debug_la-info.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-info.lo `test -f 'info.c' || echo '$(srcdir)/'`info.c libalberta_util_debug_la-banach.lo: banach.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-banach.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-banach.Tpo -c -o libalberta_util_debug_la-banach.lo `test -f 'banach.c' || echo '$(srcdir)/'`banach.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-banach.Tpo $(DEPDIR)/libalberta_util_debug_la-banach.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='banach.c' object='libalberta_util_debug_la-banach.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-banach.lo `test -f 'banach.c' || echo '$(srcdir)/'`banach.c libalberta_util_debug_la-odir.lo: odir.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-odir.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-odir.Tpo -c -o libalberta_util_debug_la-odir.lo `test -f 'odir.c' || echo '$(srcdir)/'`odir.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-odir.Tpo $(DEPDIR)/libalberta_util_debug_la-odir.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='odir.c' object='libalberta_util_debug_la-odir.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-odir.lo `test -f 'odir.c' || echo '$(srcdir)/'`odir.c libalberta_util_debug_la-bicgstab.lo: bicgstab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-bicgstab.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-bicgstab.Tpo -c -o libalberta_util_debug_la-bicgstab.lo `test -f 'bicgstab.c' || echo '$(srcdir)/'`bicgstab.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-bicgstab.Tpo $(DEPDIR)/libalberta_util_debug_la-bicgstab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bicgstab.c' object='libalberta_util_debug_la-bicgstab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-bicgstab.lo `test -f 'bicgstab.c' || echo '$(srcdir)/'`bicgstab.c libalberta_util_debug_la-newton.lo: newton.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-newton.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-newton.Tpo -c -o libalberta_util_debug_la-newton.lo `test -f 'newton.c' || echo '$(srcdir)/'`newton.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-newton.Tpo $(DEPDIR)/libalberta_util_debug_la-newton.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton.c' object='libalberta_util_debug_la-newton.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-newton.lo `test -f 'newton.c' || echo '$(srcdir)/'`newton.c libalberta_util_debug_la-newton_ds.lo: newton_ds.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-newton_ds.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-newton_ds.Tpo -c -o libalberta_util_debug_la-newton_ds.lo `test -f 'newton_ds.c' || echo '$(srcdir)/'`newton_ds.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-newton_ds.Tpo $(DEPDIR)/libalberta_util_debug_la-newton_ds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton_ds.c' object='libalberta_util_debug_la-newton_ds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-newton_ds.lo `test -f 'newton_ds.c' || echo '$(srcdir)/'`newton_ds.c libalberta_util_debug_la-newton_br.lo: newton_br.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-newton_br.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-newton_br.Tpo -c -o libalberta_util_debug_la-newton_br.lo `test -f 'newton_br.c' || echo '$(srcdir)/'`newton_br.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-newton_br.Tpo $(DEPDIR)/libalberta_util_debug_la-newton_br.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='newton_br.c' object='libalberta_util_debug_la-newton_br.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-newton_br.lo `test -f 'newton_br.c' || echo '$(srcdir)/'`newton_br.c libalberta_util_debug_la-ores.lo: ores.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-ores.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-ores.Tpo -c -o libalberta_util_debug_la-ores.lo `test -f 'ores.c' || echo '$(srcdir)/'`ores.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-ores.Tpo $(DEPDIR)/libalberta_util_debug_la-ores.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ores.c' object='libalberta_util_debug_la-ores.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-ores.lo `test -f 'ores.c' || echo '$(srcdir)/'`ores.c libalberta_util_debug_la-qmr.lo: qmr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -MT libalberta_util_debug_la-qmr.lo -MD -MP -MF $(DEPDIR)/libalberta_util_debug_la-qmr.Tpo -c -o libalberta_util_debug_la-qmr.lo `test -f 'qmr.c' || echo '$(srcdir)/'`qmr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libalberta_util_debug_la-qmr.Tpo $(DEPDIR)/libalberta_util_debug_la-qmr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qmr.c' object='libalberta_util_debug_la-qmr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libalberta_util_debug_la_CFLAGS) $(CFLAGS) -c -o libalberta_util_debug_la-qmr.lo `test -f 'qmr.c' || echo '$(srcdir)/'`qmr.c .f.o: $(F77COMPILE) -c -o $@ $< .f.obj: $(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .f.lo: $(LTF77COMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-local distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-local distclean-tags distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS alberta_util_inlines.h: alberta_util_inlines.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ distclean-local: -rm -f $(BUILT_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta_util/src/alberta_util_inlines.h.in.in0000644000042300001440000001125110676723601020656 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: alberta_util_inline.h */ /* */ /* description: header for inline functions of the ALBERTA_UTIL package */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #ifndef _ALBERTA_UTIL_INLINE_H_ #define _ALBERTA_UTIL_INLINE_H_ #define DNRM2_F77 @DNRM2_F77_FUNC@ #define DAXPY_F77 @DAXPY_F77_FUNC@ #define DEXPY_F77 @DEXPY_F77_FUNC@ #define DMXPY_F77 @DMXPY_F77_FUNC@ #define DCOPY_F77 @DCOPY_F77_FUNC@ #define DDOT_F77 @DDOT_F77_FUNC@ #define DSCAL_F77 @DSCAL_F77_FUNC@ #define DSWAP_F77 @DSWAP_F77_FUNC@ #define DXPAY_F77 @DXPAY_F77_FUNC@ #define DRANDN_F77 @DRANDN_F77_FUNC@ extern double DNRM2_F77(int *n, const double *x, int *ix); extern void DAXPY_F77(int *n, double *alpha, const double *x, int *ix, double *y, int *iy); extern void DEXPY_F77(int *n, const double *x, int *ix, double *y, int *iy); extern void DMXPY_F77(int *n, const double *x, int *ix, double *y, int *iy); extern void DCOPY_F77(int *n, const double *x, int *ix, double *y, int *iy); extern double DDOT_F77(int *n, const double *x, int *ix, const double *y, int *iy); extern void DSCAL_F77(int *n, double *alpha, double *x, int *ix); extern void DSWAP_F77(int *n, double *x, int *ix, double *y, int *iy); extern void DXPAY_F77(int *n, const double *x, int *ix, double *alpha, double *y, int *iy); extern void DRANDN_F77(int *n, double *x, int *ix); static inline double dnrm2(int n, const double *x, int ix) { return DNRM2_F77(&n, x, &ix); } static inline void daxpy(int n, double alpha, const double *x, int ix, double *y, int iy) { DAXPY_F77(&n, &alpha, x, &ix, y, &iy); return; } static inline void dexpy(int n, const double *x, int ix, double *y, int iy) { DEXPY_F77(&n, x, &ix, y, &iy); return; } static inline void dmxpy(int n, const double *x, int ix, double *y, int iy) { DMXPY_F77(&n, x, &ix, y, &iy); return; } static inline void dcopy(int n, const double *x, int ix, double *y, int iy) { DCOPY_F77(&n, x, &ix, y, &iy); return; } static inline double ddot(int n, const double *x, int ix, const double *y, int iy) { return DDOT_F77(&n, x, &ix, y, &iy); } static inline void dscal(int n, double alpha, double *x, int ix) { DSCAL_F77(&n, &alpha, x, &ix); return; } static inline void dswap(int n, double *x, int ix, double *y, int iy) { DSWAP_F77(&n, x, &ix, y, &iy); return; } static inline void dxpay(int n, const double *x, int ix, double alpha, double *y, int iy) { DXPAY_F77(&n, x, &ix, &alpha, y, &iy); return; } static inline void drandn(int n, double *x, int ix) { DRANDN_F77(&n, x, &ix); return; } static inline void dset(int n, double alpha, double *x, int ix) { int i, nix = n*ix; for (i = 0; i < nix; i += ix) x[i] = alpha; return; } #endif /* _ALBERTA_UTIL_INLINE_H_ */ alberta-2.0.1/alberta_util/src/divers.c0000644000042300001440000000745210676724254014760 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: divers.c */ /* */ /* description: generating filenames and handling of general lists */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" const char *generate_filename(const char *path, const char *fn, int ntime) { static char name[1024]; char *cp = name; *cp = 0; /*--- adjust path -------------------------------------------------------*/ if (path == nil || *path == '\0') strcpy(name, "./"); else if (*path == '~') { strcpy(name, getenv("HOME")); strcat(name, path+1); } else strcpy(name, path); while (*cp) cp++; cp--; if (*cp != '/') strcat(cp, "/"); /*--- append filename ---------------------------------------------------*/ strcat(cp, fn); /*--- finally append normalized iteration counter ------------------------*/ while (*cp) cp++; sprintf(cp, "%06d", ntime); return((const char *) name); } /*--------------------------------------------------------------------------*/ /* handling of general lists */ /*--------------------------------------------------------------------------*/ static VOID_LIST_ELEMENT *first_element = nil; VOID_LIST_ELEMENT *get_void_list_element(void) { VOID_LIST_ELEMENT *list; const int n_elements = 20; int i; if (!first_element) { first_element = MEM_ALLOC(n_elements, VOID_LIST_ELEMENT); for (i = 0; i < n_elements-1; i++) { first_element[i].data = nil; first_element[i].next = first_element+(i+1); } first_element[n_elements-1].data = nil; first_element[n_elements-1].next = nil; } list = first_element; first_element = list->next; list->next = nil; return(list); } void free_void_list_element(VOID_LIST_ELEMENT *list) { list->data = nil; list->next = first_element; first_element = list; return; } alberta-2.0.1/alberta_util/src/msg.c0000644000042300001440000001735710676724254014257 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: msg.c */ /* */ /* description: utilities for messages */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include #include #include #include "alberta_util.h" /*--------------------------------------------------------------------------*/ /* global variable funcName; used if no local funcName declared */ /*--------------------------------------------------------------------------*/ const char *funcName = nil; /*--------------------------------------------------------------------------*/ /* global variables for util.c */ /*--------------------------------------------------------------------------*/ /* static FILE *out_file = stdout, *error_file = stderr; */ static FILE *out_file = nil, *error_file = nil; static const char *old_func_name = nil; static char func_name[256]; void alberta_wait(const char *funcName, int wait) { if (wait) { char line[10]; MSG("wait for ...\n"); fgets(line, 9, stdin); } return; } void change_msg_out(FILE *fp) { FUNCNAME("change_msg_out"); if (fp) { if (out_file && out_file != stdout && out_file != stderr) fclose(out_file); out_file = fp; } else { ERROR("file pointer is pointer to nil;\n"); ERROR("use previous stream for messages furthermore\n"); } return; } void open_msg_file(const char *filename, const char *type) { FUNCNAME("open_msg_file"); FILE *fp; if (filename && (fp = fopen(filename, type))) { if (out_file && out_file != stdout && out_file != stderr) fclose(out_file); out_file = fp; } else { if (filename) ERROR("can not open %s;\n", filename); else ERROR("no filename specified;\n"); ERROR("use previous stream for messages furthermore\n"); } return; } void change_error_out(FILE *fp) { FUNCNAME("change_error_out"); if (fp) { if (error_file && error_file != stdout && error_file != stderr) fclose(error_file); error_file = fp; } else { ERROR("file pointer is pointer to nil;\n"); ERROR("use previous stream for errors furthermore\n"); } return; } void open_error_file(const char *filename, const char *type) { FUNCNAME("open_error_file"); FILE *fp; if (filename && (fp = fopen(filename, type))) { if (error_file && error_file != stdout && error_file != stderr) fclose(error_file); error_file = fp; } else { if (filename) ERROR("can not open %s;\n", filename); else ERROR("no filename specified;\n"); ERROR("use previous stream for errors furthermore\n"); } return; } int print_funcname(const char *funcname) { if (!out_file) out_file = stdout; if (funcname && old_func_name != funcname) { strcpy(func_name, funcname); strcat(func_name, ": "); } else if (!funcname) { strcpy(func_name, "*unknown function*"); } else { strcpy(func_name, ""); } fprintf(out_file, "%-20s", func_name); old_func_name = funcname; return 0; } int print_error_funcname(const char *funcname, const char *file, int line) { static int old_line = -1; if (!error_file) error_file = stderr; if (funcname && old_func_name != funcname) { strcpy(func_name, funcname); strcat(func_name, ": "); } else if (!funcname) { strcpy(func_name, "*unknown function*"); } else { strcpy(func_name, ""); } if (old_func_name != funcname) fprintf(error_file, "%-20sERROR in %s, line %d\n", func_name, file, line); else if (line - old_line > 5) fprintf(error_file, "%-20sERROR in %s, line %d\n", func_name, file, line); fprintf(error_file, "%-20s", ""); old_func_name = funcname; old_line = line; return 0; } int print_error_msg_exit(const char *format, ...) { va_list arg; if (!error_file) error_file = stderr; va_start(arg, format); vfprintf(error_file, format, arg); va_end(arg); abort(); return 0; } int print_error_msg(const char *format, ...) { va_list arg; if (!error_file) error_file = stderr; va_start(arg, format); vfprintf(error_file, format, arg); va_end(arg); return 0; } void print_warn_funcname(const char *funcname, const char *file, int line) { static int old_line = -1; if (!out_file) out_file = stdout; if (funcname && old_func_name != funcname) { strcpy(func_name, funcname); strcat(func_name, ": "); } else if (!funcname) { strcpy(func_name, "*unknown function*"); } else { strcpy(func_name, ""); } if (old_func_name != funcname) fprintf(out_file, "%-20sWARNING in %s, line %d\n", func_name,file,line); else if (line - old_line > 5) fprintf(out_file, "%-20sWARNING in %s, line %d\n", func_name,file,line); fprintf(out_file, "%-20s", ""); old_func_name = funcname; old_line = line; return; } void print_warn_msg(const char *format, ...) { va_list arg; if (!out_file) out_file = stdout; va_start(arg, format); vfprintf(out_file, format, arg); va_end(arg); return; } int print_msg(const char *format, ...) { va_list arg; if (!out_file) out_file = stdout; va_start(arg, format); vfprintf(out_file, format, arg); va_end(arg); return 0; } /*--------------------------------------------------------------------------*/ /* routines for writing int and REAl vectors to out_file */ /*--------------------------------------------------------------------------*/ void print_int_vec(const char *s, const int *vec, int no) { int i; print_msg("%s = (", s); for (i = 0; i < no; i++) print_msg("%d%s", vec[i], i < no-1 ? ", " : ")\n"); } void print_real_vec(const char *s, const REAL *vec, int no) { int i; print_msg("%s = (", s); for (i = 0; i < no; i++) print_msg("%.5lf%s", vec[i], i < no-1 ? ", " : ")\n"); } alberta-2.0.1/alberta_util/src/alloc.c0000644000042300001440000001537310676724254014557 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: alloc.c */ /* */ /* description: utilities for memory allocation */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include #include "alberta_util.h" /*--------------------------------------------------------------------------*/ /* routines for allocation/deallocation of memory. every (de)allocation is */ /* done via alberta_alloc(), alberta_realloc(), alberta_free() resp. */ /*--------------------------------------------------------------------------*/ static const char *size_as_string(double size) { static char sas[128]; if (size < 1024) sprintf(sas, "%d %s", (int) size, "B"); else if (size < 1048576) sprintf(sas, "%.2lf %s", size/1024.0, "KB"); else sprintf(sas, "%.2lf %s", size/1048576.0, "MB"); return(sas); } #define MALLOC(size) malloc(size) #define REALLOC(ptr, size) (ptr) ? realloc(ptr,size) : malloc(size) #define FREE(ptr,size) free(ptr) #define CALLOC(size,elsize) calloc(size,elsize) #define ALLOC_ERR(fct,file,line)\ if (fct && file) ERROR_EXIT("called by %s in %s, line %d\n",fct,file,line);\ else if (fct) ERROR_EXIT("called by %s, (unknown filename)\n", fct);\ else if (file) ERROR_EXIT("called in %s, line %d\n", file, line);\ else ERROR_EXIT("location unknown\n") static double size_used = 0.0; void *alberta_alloc(size_t size, const char *fct, const char *file, int line) { FUNCNAME("alberta_alloc"); void *mem; if (size <= 0) { ERROR("size == 0\n"); ALLOC_ERR(fct, file, line); } if (!(mem = MALLOC(size))) { ERROR("can not allocate %s\n", size_as_string(size)); ALLOC_ERR(fct, file, line); } size_used += (double)size; return(mem); } void *alberta_realloc(void *ptr, size_t old_size, size_t new_size, const char *fct, const char *file, int line) { FUNCNAME("alberta_realloc"); void *mem; if (new_size <= 0) { ERROR("size == 0\n"); ALLOC_ERR(fct, file, line); } if (!(mem = REALLOC(ptr,new_size))) { ERROR("can not allocate %s\n", size_as_string(new_size)); ALLOC_ERR(fct, file, line); } size_used += (double)new_size - (double)old_size; return(mem); } void *alberta_calloc(size_t size, size_t elsize, const char *fct, const char *file, int line) { FUNCNAME("alberta_calloc"); void *mem; if (size <= 0 || elsize <= 0) { ERROR("one of size = %d or data size = %d is zero\n", size, elsize); ALLOC_ERR(fct, file, line); } if (!(mem = CALLOC(size,elsize))) { ERROR("can not allocate %s\n", size_as_string(size*elsize)); ALLOC_ERR(fct, file, line); } size_used += (double)size * (double)elsize; return(mem); } void alberta_free(void *ptr, size_t size) { if (ptr) { FREE(ptr, size); size_used -= (double)size; } return; } void print_mem_use(void) { FUNCNAME("print_mem_use"); MSG("%s memory allocated\n", size_as_string(size_used)); return; } WORKSPACE *get_workspace(size_t size, const char *fct, const char *f, int l) { WORKSPACE *ws = (WORKSPACE *)alberta_alloc(sizeof(WORKSPACE), fct, f, l); ws->work = alberta_alloc(size, fct, f, l); ws->size = size; return(ws); } WORKSPACE *realloc_workspace(WORKSPACE *ws, size_t new_size, const char *fct, const char *file, int line) { WORKSPACE *workspace = ws; if (!workspace) { workspace = (WORKSPACE *)alberta_alloc(sizeof(WORKSPACE), fct, file, line); workspace->work = nil; } if (!workspace->work) { workspace->work = alberta_alloc(new_size, fct, file, line); workspace->size = new_size; } else if (workspace->size < new_size) { workspace->work = alberta_realloc(workspace->work, workspace->size, new_size, fct, file, line); workspace->size = new_size; } return(workspace); } void clear_workspace(WORKSPACE *ws) { if (!ws) return; alberta_free(ws->work, ws->size); ws->work = nil; ws->size = 0; return; } void free_workspace(WORKSPACE *ws) { if (!ws) return; alberta_free(ws->work, ws->size); MEM_FREE(ws, 1, WORKSPACE); return; } /*--------------------------------------------------------------------------*/ /* matrix (de-)allocation routines: */ /* free_matrix deallocates such a matrix */ /*--------------------------------------------------------------------------*/ void **alberta_matrix(size_t nr, size_t nc, size_t size, const char *fct, const char *file, int line) { int i; size_t row_length = nc*size; char **mat, *mrows; mat = (char **) alberta_alloc(nr*sizeof(char *), fct, file, line); mrows = (char *) alberta_alloc(nr*nc*size, fct, file, line); for(i = 0; i < nr; i++) mat[i] = mrows + i*row_length; return((void **)mat); } void free_alberta_matrix(void **ptr, size_t nr, size_t nc, size_t size) { alberta_free(ptr[0],nr*nc*size); alberta_free(ptr,nr*sizeof(char *)); return; } alberta-2.0.1/alberta_util/src/parameters.c0000644000042300001440000005273010676724254015626 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: parameters.c */ /* */ /* description: utilities for handling parameters */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include #include #include "alberta_util.h" /*--------------------------------------------------------------------------*/ /* utilities for parameters and parameter initialization */ /*--------------------------------------------------------------------------*/ #define COMMENT '%' #define N_KEY 100 #define N_CHAR 1000 #define LENGTH 256 static void read_parameters(const char *filename); struct param { char *key; char *parameters; const char *filename; const char *funcname; int line_no; }; static int cpp_read = 0; #define IS_BLANK_CHAR(s) (s==' '||s=='\t'||s =='\f'||s=='\r') static char *get_key(char *s, int n_line, const char *filename) { FUNCNAME("get_key"); static char key[LENGTH]; char fn[LENGTH], c; int i; if (cpp_read) { if (*s == '#') /* Praeprozessor line */ return(s); } while (*s && IS_BLANK_CHAR(*s)) s++; if (*s == COMMENT || *s == '\0' || *s == '\n') return(nil); if (*s == '#') { if (strstr(s, "#include") == s) /*--------------------------------------------------------------------------*/ /* another init file has to be included */ /*--------------------------------------------------------------------------*/ { s += strlen("#include"); while (*s && IS_BLANK_CHAR(*s)) s++; i = 0; switch (c = *s++) { case '<': c = '>'; case '\"': while(*s && *s != c && !IS_BLANK_CHAR(*s)) { if (i == LENGTH-1) { ERROR("filename more than %d characters.\n", i); ERROR("Skipping line %d of file %s\n", n_line, filename); return(nil); } fn[i++] = *s++; } if (*s != c) { ERROR("filename of include not terminated by %c\n", c); ERROR("skipping line %d of file %s\n", n_line, filename); return(nil); } fn[i] = '\0'; break; default: ERROR("no filename of include file found\n"); ERROR("skipping line %d of file %s\n", n_line, filename); return(nil); } read_parameters(fn); return(nil); } else { ERROR("# must not be the first character on a line; except #include\n"); return(nil); } } /*--------------------------------------------------------------------------*/ /* now get the key */ /*--------------------------------------------------------------------------*/ i = 0; while (*s && *s != ':') { if (*s == COMMENT) { ERROR("key must not contain '%c'.\n", COMMENT); ERROR("Skipping line %d of file %s\n", n_line, filename); return(nil); } if (i == LENGTH-1) { ERROR("key more than %d characters.\n", i); ERROR("Skipping line %d of file %s\n", n_line, filename); return(nil); } key[i++] = *s++; } key[i] = '\0'; if (*s != ':') { ERROR("key was not terminated by ':'.\n"); ERROR("Skipping line %d of file %s\n", n_line, filename); return(nil); } if (i == 0) { ERROR("use of ':' without key.\n"); ERROR("Skipping line %d of file %s\n", n_line, filename); return(nil); } return(key); } static char *get_par(char *key, char *s, int *nl, const char *fn, FILE *fp) { FUNCNAME("get_par"); static char parameter[2*LENGTH]; int i, ol = *nl; while (*s && *s++ != ':'); while (*s && IS_BLANK_CHAR(*s)) s++; i = 0; while (*s && *s != COMMENT && *s != '\n') { if (*s == '\\' && *(s+1) == '\n') { (*nl)++; if (fgets(s, LENGTH, fp) == nil) { ERROR("EOF reached while reading parameters of key %s\n", key); if (ol == *nl-1) ERROR("Skipping line %d of file %s\n", *nl, fn); else ERROR("Skipping lines %d-%d of file %s\n", ol, *nl, fn); return(nil); } } else { if (i == 2*LENGTH-1) { ERROR("parameter has more than %d characters.\n", i); if (ol == *nl) ERROR("Skipping line %d of file %s\n", *nl, fn); else ERROR("Skipping lines %d-%d of file %s\n", ol, *nl, fn); return(nil); } if (IS_BLANK_CHAR(*s)) { parameter[i++] = ' '; s++; while (*s && IS_BLANK_CHAR(*s)) s++; } else { parameter[i++] = *s++; } } } do { parameter[i--] = '\0'; } while (i && IS_BLANK_CHAR(parameter[i])); if (i == 0 && IS_BLANK_CHAR(parameter[0])) { ERROR("no parameter of key %s.\n", key); if (ol == *nl) ERROR("Skipping line %d of file %s\n", *nl, fn); else ERROR("Skipping lines %d-%d of file %s\n", ol, *nl, fn); return(nil); } return(parameter); } static int bin_search(struct param *param, const char *key, int n_keys) { int cond, left, right, mid; left = 0; right = n_keys-1; while (left <= right) { mid = (left+right)/2; if ((cond = strcmp(param[mid].key, key)) < 0) { left = mid + 1; } else if (cond > 0) { right = mid - 1; } else return(mid); } return(-1); } static struct param *all_param = nil; static int n_param = 0, max_param = 0; static char *buffer = nil; static unsigned buffer_size = 0, buffer_used = 0; static unsigned total_buffer_size = 0; static int param_info = 1; int msg_info = 10; int msg_wait = 1; static const char *get_actfile(const char *filename) { FUNCNAME("get_actfilename"); static char **filenames = nil; static size_t n_files = 0, max_files = 0; int i, size_f; char *actfile; for (i = 0; i < n_files; i++) if (!strcmp(filename,filenames[i])) break; if (i < n_files) { return((const char *) filenames[i]); } else { if (n_files == max_files) { filenames = MEM_REALLOC(filenames, max_files, max_files+10, char *); max_files += 10; } size_f = strlen(filename)+1; if (buffer_used + size_f >= buffer_size) { buffer_used = 0; buffer_size = N_CHAR; buffer = MEM_ALLOC(N_CHAR, char); } actfile = buffer+buffer_used; buffer_used += size_f; strncpy(actfile,filename,size_f); return((const char *) actfile); } } static void add_param(const char *key, const char *parameter, const char *actfile, int n_line, const char *fname) { FUNCNAME("add_param"); unsigned size_k, size_p; int i, j, scmp = 0; size_k = strlen(key)+1; size_p = strlen(parameter)+1; for (i = 0; i < n_param; i++) { if ((scmp = strcmp(all_param[i].key, key)) >= 0) break; } if (i < n_param && scmp == 0) { /*--------------------------------------------------------------------------*/ /* key does already exist: save new parameters */ /*--------------------------------------------------------------------------*/ if (strlen(all_param[i].parameters)+1 >= size_p) strcpy(all_param[i].parameters, parameter); else { if (buffer_used + size_p >= buffer_size) { buffer_used = 0; buffer_size = N_CHAR; buffer = MEM_ALLOC(N_CHAR, char); } all_param[i].parameters = buffer+buffer_used; buffer_used += size_p; total_buffer_size += size_p; strcpy(all_param[i].parameters, parameter); } all_param[i].filename = actfile; all_param[i].funcname = fname; all_param[i].line_no = n_line; return; } if (n_param == max_param) { all_param = MEM_REALLOC(all_param, max_param, max_param + N_KEY, struct param); max_param += N_KEY; } for (j = n_param; j > i; j--) all_param[j] = all_param[j-1]; if (buffer_used + size_k >= buffer_size) { if (buffer_used + size_p < buffer_size) { all_param[i].parameters = buffer+buffer_used; buffer_used += size_p; total_buffer_size += size_p; size_p = 0; strcpy(all_param[i].parameters, parameter); } buffer_used = 0; buffer_size = N_CHAR; buffer = MEM_ALLOC(N_CHAR, char); } all_param[i].key = buffer+buffer_used; buffer_used += size_k; total_buffer_size += size_k; strcpy(all_param[i].key, key); if (size_p) { if (buffer_used + size_p >= buffer_size) { buffer_used = 0; buffer_size = N_CHAR; buffer = MEM_ALLOC(N_CHAR, char); } all_param[i].parameters = buffer+buffer_used; buffer_used += size_p; total_buffer_size += size_p; strcpy(all_param[i].parameters, parameter); } all_param[i].filename = actfile; all_param[i].funcname = fname; all_param[i].line_no = n_line; n_param++; return; } static void read_parameters(const char *filename) { FUNCNAME("read_parameters"); FILE *init_file; char line[LENGTH]; int n_line = 0; char *key, *parameter; const char *actfile = nil; if (!(init_file = fopen(filename, "r"))) return; if (!cpp_read) { INFO(param_info,2,"reading from file %s\n", filename); actfile = get_actfile(filename); } while (fgets(line, LENGTH, init_file)) { n_line++; if (strlen(line) == LENGTH-1) { ERROR("line %d of file %s too long; skipping it\n", n_line, filename); continue; } key = get_key(line, n_line, filename); if (key == nil) continue; if (cpp_read && *key == '#') { char *s; sscanf(key, "#%d", &n_line); n_line--; while (*key && *key++ != '\"'); s = key; while (*s && *s != '\"') s++; *s = '\0'; actfile = get_actfile(key); continue; } parameter = get_par(key, line, &n_line, filename, init_file); if (!parameter) continue; add_param(key, parameter, actfile, n_line, nil); } fclose(init_file); return; } static void p_swap(struct param *param, int i, int j) { struct param tmp; tmp = param[i]; param[i] = param[j]; param[j] = tmp; return; } static void p_qsort(struct param *param, int left, int right) { int i, last; if (left >= right) return; p_swap(param, left, (left+right)/2); last = left; for (i = left+1; i <= right; i++) if (strcmp(param[i].key, param[left].key) < 0) p_swap(param, ++last, i); p_swap(param, left, last); p_qsort(param, left, last-1); p_qsort(param, last+1, right); return; } void print_parameters(void) { FUNCNAME("print_parameters"); int i; for (i = 0; i < n_param; i++) { MSG("%s: %s\n", all_param[i].key, all_param[i].parameters); if (all_param[i].funcname) { MSG("initialized by %s() on line %3d of file \"%s\"\n", all_param[i].funcname, all_param[i].line_no, all_param[i].filename); } else if (all_param[i].filename) { MSG("initialized on line %2d of file \"%s\"\n",all_param[i].line_no, all_param[i].filename); } else { MSG("can not locate initialization location\n"); } } } void save_parameters(const char *file, int info) { FILE *fp; int i; if (!(fp = fopen(file, "w"))) return; for (i = 0; i < n_param; i++) { fprintf(fp, "%s: %s\n", all_param[i].key, all_param[i].parameters); if (info) { if (all_param[i].funcname) { fprintf(fp, "%%initialized by %s() on line %3d of file \"%s\"\n", all_param[i].funcname, all_param[i].line_no, all_param[i].filename); } else if (all_param[i].filename) { fprintf(fp, "%%initialized on line %2d of file \"%s\"\n", all_param[i].line_no, all_param[i].filename); } } } fclose(fp); } void init_parameters(int p, const char *file_name) { FUNCNAME("init_parameters"); if (!file_name) return; read_parameters(file_name); GET_PARAMETER(0, "level of information", "%d", &msg_info); GET_PARAMETER(0, "WAIT", "%d", &msg_wait); GET_PARAMETER(0, "parameter information", "%d", ¶m_info); if (!msg_info) param_info = 0; if (p && msg_info) print_parameters(); return; } void add_parameter(int p, const char *key, const char *par) { Add_parameter(p, key, par, nil, nil, 0); } void Add_parameter(int p, const char *key, const char *par, const char *fname, const char *file, int line) { FUNCNAME("add_parameter"); if (!key || !par) return; add_param(key, par, file, line, fname); GET_PARAMETER(0, "level of information", "%d", &msg_info); GET_PARAMETER(0, "WAIT", "%d", &msg_wait); GET_PARAMETER(0, "parameter information", "%d", ¶m_info); if (!msg_info) param_info = 0; if (p && msg_info) print_parameters(); return; } #if 0 static const char *get_filename(const char *path_file) { const char *s = path_file; if (s) { while (*s) s++; /* goto end of string */ while (s > path_file && *s != '/') s--; if (*s == '/') s++; } return(s); } static int sys_test(const char *command, const char *file) { char line[1024]; if (!file || !command) return(0); sprintf(line, "%s %s > /dev/null", command, file); return(!system(line)); } #endif #include void init_parameters_cpp(int p, const char *fn, const char *flags) { FUNCNAME("init_parameters_cpp"); FILE *fp; #ifdef CPP int val; char tmp_file[LENGTH]; char call_cpp[3*LENGTH]; time_t act_time; #endif if (!fn) return; if (!(fp = fopen(fn, "r"))) { ERROR("can not read from file %s\n", fn); return; } if (fp) fclose(fp); #ifndef CPP ERROR("no cpp available; reading file %s without help of cpp\n", fn); init_parameters(p, fn); return; #else fp = nil; time(&act_time); if (sys_test("test -w", "/tmp")) /* you may write to /tmp */ { const char *file = get_filename(fn); sprintf(tmp_file, "/tmp/%s.cpp", file); if (sys_test("test -f", tmp_file)) /* file exists :-( */ { sprintf(tmp_file, "/tmp/%s.cpp.%d", file, (int) act_time); if (sys_test("test -f", tmp_file)) /* file exists :-( */ *tmp_file = 0; } } if (*tmp_file == 0) { sprintf(tmp_file, "%s.cpp", fn); if (sys_test("test -f", tmp_file)) { sprintf(tmp_file, "%s.cpp.%d", fn, (int) act_time); if (sys_test("test -f", tmp_file)) *tmp_file = 0; } } if (*tmp_file && (fp = fopen(tmp_file, "w"))) fclose(fp); else { ERROR("could not open temporary file for CPP\n"); ERROR("can not write to /tmp and files %s.cpp and\n", fn); ERROR_EXIT("%s.cpp.%d either exist or are not writable\n", fn, act_time); } sprintf(call_cpp, "%s %s %s > %s", CPP, flags, fn, tmp_file); /*--------------------------------------------------------------------------*/ /* invoke cpp: */ /*--------------------------------------------------------------------------*/ val = system(call_cpp); if (val) { MSG("val = %d\n", val); ERROR("error during cpp call; reading file %s without help of cpp\n", fn); WAIT; init_parameters(p, fn); return; } /*--------------------------------------------------------------------------*/ /* read parameters from temp file */ /*--------------------------------------------------------------------------*/ cpp_read = 1; read_parameters(tmp_file); cpp_read = 0; /*--------------------------------------------------------------------------*/ /* remove temp file */ /*--------------------------------------------------------------------------*/ sprintf(call_cpp, "/bin/rm %s", tmp_file); val = system(call_cpp); GET_PARAMETER(0, "level of information", "%d", &msg_info); GET_PARAMETER(0, "WAIT", "%d", &msg_wait); GET_PARAMETER(0, "parameter information", "%d", ¶m_info); if (!msg_info) param_info = 0; if (p && msg_info) print_parameters(); return; #endif } static char *get_next_word(char **s) { static char Val[2*LENGTH]; char *val = Val, *line; for (line = *s; *line && *line == ' '; line++); for (; *line && (*val = *line) != ' '; val++, line++); *s = line; *val = '\0'; return(Val); } static const char *param_call_fct = nil, *param_call_file = nil; static int param_call_line = 0; int init_param_func_name(const char *call_fct, const char *call_file, int call_line) { param_call_fct = call_fct; param_call_file = call_file; param_call_line = call_line; return(1); } int get_parameter(int info, const char *key, const char *format, ...) { const char *funcName, *func_name = "get_parameter"; int count, i, *ival; char *sval, *s, *word, *cval; const char *p; REAL *rval; U_CHAR *Uval; S_CHAR *Sval; double dval; va_list arg; funcName = param_call_fct != nil ? param_call_fct : func_name; if (param_info) { if (param_info > 1) info = MAX(info, param_info-1); } else info = 0; if (!all_param) { INFO(info,1,"no parameters defined\n"); return(0); } i = bin_search(all_param, key, n_param); if (i < 0) { if (funcName != func_name) { INFO(info,1,"initialization of parameter `%s'\n", key); INFO(info,1,"fails on line %d of file %s\n", param_call_line, param_call_file); } else INFO(info,1,"initialization of parameter `%s' fails\n", key); param_call_fct = nil; return(0); } va_start(arg, format); count = 0; INFO(info,2,"parameter `%s' initialized with: ", key); s = all_param[i].parameters; for (p = format; *p; p++) { if (*p != '%') continue; word = get_next_word(&s); if (!*word) { PRINT_INFO(info,2,"\n"); if (all_param[i].funcname) { INFO(info,4,"parameter initialized by %s()\n", all_param[i].funcname); INFO(info,4,"on line %d of file \"%s\"\n", all_param[i].line_no, all_param[i].filename); } else if (all_param[i].filename) { INFO(info,4, "parameter initialized on line %2d of init file \"%s\"\n", all_param[i].line_no, all_param[i].filename); } else { INFO(info,4,"location of initialization unknown\n"); } va_end(arg); param_call_fct = nil; return(count); } count++; switch(*++p) { case 'S': Sval = va_arg(arg, S_CHAR *); *Sval = (S_CHAR) atoi(word); PRINT_INFO(info,2,"%d ", *Sval); break; case 'U': Uval = va_arg(arg, U_CHAR *); *Uval = (U_CHAR) atoi(word); PRINT_INFO(info,2,"%d ", *Uval); break; case 'c': cval = va_arg(arg, char *); *cval = *word; PRINT_INFO(info,2,"%c ", *cval); break; case 's': sval = va_arg(arg, char *); strcpy(sval, word); PRINT_INFO(info,2,"%s ", sval); break; case 'd': ival = va_arg(arg, int *); *ival = atoi(word); PRINT_INFO(info,2,"%d ", *ival); break; case 'e': case 'f': case 'g': rval = va_arg(arg, REAL *); *rval = dval = atof(word); PRINT_INFO(info,2,"%lg ", dval); break; case '*': break; default: PRINT_INFO(info,2,"\n"); INFO(info,2, "unknow format specifier `%%%c', skipping initialization of %s\n", *p, key); } } PRINT_INFO(info,2,"\n"); if (funcName != func_name) { INFO(info,2,"on line %d of file %s\n", param_call_line, param_call_file); } if (all_param[i].funcname) { INFO(info,4,"parameter initialized by %s()\n", all_param[i].funcname); INFO(info,4,"on line %d of file \"%s\"\n", all_param[i].line_no, all_param[i].filename); } else if (all_param[i].filename) { INFO(info,4, "parameter initialized on line %2d of init file \"%s\"\n", all_param[i].line_no, all_param[i].filename); } else { INFO(info,4,"location of initialization unknown\n"); } va_end(arg); param_call_fct = nil; return(count); } alberta-2.0.1/alberta_util/src/cg.c0000644000042300001440000001115710676724254014052 00000000000000/*--------------------------------------------------------------------------*/ /* Solving a linear system with conjugate gradient algoritm */ /* Classification: cg(A,C,A) = OrthoDir_r(A,C,A) */ /* Matrix: symmetric and positve definite */ /* Workspace: 3*dim */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int oem_cg(OEM_DATA *oem, int dim, const REAL *b, REAL *x) { FUNCNAME("oem_cg"); REAL rho, hd_2, delta, gamma; REAL *d, *h, *r, *Cr, old_res = -1.0; int iter; int (*mv)(void *, int, const REAL *, REAL *) = oem->mat_vec; void *mvd = oem->mat_vec_data; void (*precon)(void *, int, REAL *) = oem->left_precon; void *pd = oem->left_precon_data; REAL (*scp)(void *, int, const REAL *, const REAL *) = oem->scp; void *sd = oem->scp_data; const REAL TOL = 1.e-30; WORKSPACE *ws = CHECK_WORKSPACE(3*dim, oem->ws); /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ r = (REAL *)ws->work; d = r + dim; h = d + dim; Cr = precon ? h : r; if ((scp ? sqrt((*scp)(sd, dim, b, b)) : dnrm2(dim, b, 1)) < TOL) { INFO(oem->info,2,"b == 0, x = 0 is the solution of the linear system\n"); dset(dim, 0.0, x, 1); oem->initial_residual = oem->residual = 0.0; return(0); } (*mv)(mvd, dim, x, r); daxpy(dim, -1.0, b, 1, r, 1); if (precon) { dcopy(dim, r, 1, Cr, 1); (*precon)(pd, dim, Cr); } /*--------------------------------------------------------------------------*/ /*--- check initial residual ---------------------------------------------*/ /*--------------------------------------------------------------------------*/ delta = scp ? (*scp)(sd, dim, r, Cr) : ddot(dim, r, 1, Cr, 1); START_INFO(oem); if (SOLVE_INFO(oem, 0, oem->initial_residual = sqrt(delta), &old_res, ws)) return(0); dcopy(dim, Cr, 1, d, 1); /*--------------------------------------------------------------------------*/ /*--- Iteration ----------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ for (iter = 1; iter <= oem->max_iter; iter++) { (*mv)(mvd, dim, d, h); /*--------------------------------------------------------------------------*/ /*--- descent parameter rho = delta/(h,d)_2 ------------------------------*/ /*--------------------------------------------------------------------------*/ hd_2 = scp ? (*scp)(sd, dim , h, d) : ddot(dim, h, 1, d, 1); if (ABS(hd_2) < TOL) { BREAK_INFO(oem, "(Ad,d)_2 = 0", iter, sqrt(delta), &old_res, ws); return(iter); } /*--------------------------------------------------------------------------*/ /*--- update x and r -----------------------------------------------------*/ /*--------------------------------------------------------------------------*/ rho = delta/hd_2; daxpy(dim, -rho, d, 1, x, 1); daxpy(dim, -rho, h, 1, r, 1); if (precon) { dcopy(dim, r, 1, Cr, 1); (*precon)(pd, dim, Cr); } gamma = 1.0/delta; delta = scp ? (*scp)(sd, dim, r, Cr) : ddot(dim, r, 1, Cr, 1); if (SOLVE_INFO(oem, iter, sqrt(delta), &old_res, ws)) return(iter); /*--------------------------------------------------------------------------*/ /*--- update of the descent direction ------------------------------------*/ /*--------------------------------------------------------------------------*/ gamma *= delta; dxpay(dim, Cr, 1, gamma, d, 1); } return(0); /* statement never reached!!! */ } alberta-2.0.1/alberta_util/src/gmres.c0000644000042300001440000004105410676724254014575 00000000000000/*--------------------------------------------------------------------------*/ /* Solving a linear system with GMRES */ /* Matrix: regular */ /* Restart: k = MIN(restart,dim) */ /* Workspace: ((k+2)*dim + k*(k+4))*sizeof(REAL) */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" static const REAL TOL = 1.e-25; static REAL householder_vec(int n, double sigma, REAL *u, REAL *x) { FUNCNAME("householder_vec"); int i; double beta; if (n <= 0) { MSG("ha ha\n"); return(0.0); } if (x[0] >= 0) { beta = sqrt(0.5/(sigma*(sigma + x[0]))); if (u) { u[0] = (x[0] + sigma)*beta; for (i = 1; i < n; i++) u[i] = x[i]*beta; } return(-sigma); } else { beta = sqrt(0.5/(sigma*(sigma - x[0]))); if (u) { u[0] = (x[0] - sigma)*beta; for (i = 1; i < n; i++) u[i] = x[i]*beta; } return(sigma); } } #if 0 static void Pm_v(REAL *v, REAL *um, int m, int n) { int i; double skp = 0.0; for (i = m; i < n; i++) skp += um[i]*v[i]; skp *= 2.0; for (i = m; i < n; i++) v[i] -= skp*um[i]; } #endif static void new_basisvec(int m, int n, int k, REAL *U, REAL *LR, REAL *v, REAL *b, REAL *y, void *mvd, int (*mv)(void *, int, const REAL *, REAL *), void *lpd, void (*lpc)(void *, int, REAL *), void *rpd, void (*rpc)(void *, int, REAL *)) { int i, j, l; /****************************************************************************/ /* first calculate y = 2 U_m^T e_m */ /****************************************************************************/ for (j = 0; j < m; j++) b[j] = 2.0*U[j*n+(m-1)]; /****************************************************************************/ /* now solve L_m^T y = b in R^m (upper triagonal system, diagonal == 1.0 */ /****************************************************************************/ y[m-1] = b[m-1]; for (j = m-2; j >= 0; j--) { double yj = b[j]; for (l = j + 1; l < m; l++) yj -= LR[l*k+j]*y[l]; y[j] = yj; } /****************************************************************************/ /* b = -U_m y + e_m */ /****************************************************************************/ for (i = 0; i < n; i++) { double bi = 0.0; for (j = 0; j < MIN(i+1,m); j++) bi += U[j*n+i]*y[j]; b[i] = -bi; } b[m-1] += 1.0; /****************************************************************************/ /* v = Ab */ /****************************************************************************/ if (rpc) (*rpc)(rpd, n, b); (*mv)(mvd, n, b, v); if (lpc) (*lpc)(lpd, n, v); /****************************************************************************/ /* b = 2 U_m^T v in R^m */ /****************************************************************************/ for (j = 0; j < m; j++) { double bj = 0.0; for (i = j; i < n; i++) bj += U[j*n+i]*v[i]; b[j] = 2.0*bj; } /****************************************************************************/ /* now solve L_m y = b in R^m (lower triagonal system, diagonal == 1.0 */ /****************************************************************************/ y[0] = b[0]; for (j = 1; j < m; j++) { double yj = b[j]; for (l = 0; l < j; l++) yj -= LR[j*k+l]*y[l]; y[j] = yj; } /****************************************************************************/ /* v = v - U_m y */ /****************************************************************************/ for (i = 0; i < n; i++) { double vi = 0.0; for (j = 0; j < MIN(i+1,m); j++) vi += U[j*n+i]*y[j]; v[i] -= vi; } return; } /*--------------------------------------------------------------------------*/ /* partitioning of the workspace: */ /* */ /* k = MIN(restart,n) */ /* workspace: ((k+2)*n + k*(k+4))*sizeof(double) */ /* we use the following partioning */ /* */ /* |---------------------- n -----------------------------------| */ /* ____________________________________________________________ */ /* |____________________________________________________________| r */ /* |____________________________________________________________| v */ /* |____________________________________________________________| u[0] */ /* |____________________________________________________________| . */ /* . */ /* . */ /* ____________________________________________________________ . */ /* |____________________________________________________________| u[k-2] */ /* |____________________________________________________________| u[k-1] */ /* |_________________________| 0 */ /* |_|_______________________| 1 upper triangular matrix + diogonal: */ /* |___|_____________________| 2 transformed Hessenberg R_k matrix; */ /* |_____|___________________| . */ /* . */ /* . lower triangluar matrix: matrix L_k */ /* _________________________ for the calculation of the (m+1)th */ /* |_____________________|___| k-2 column of Q_m = P_m ... P_1; diagonal */ /* |_______________________|_| k-1 elements L_k[i][i] = 1.0; not stored! */ /* |_________________________| Givens rotations: storing c and s */ /* |_________________________| */ /* |_________________________| additional workspace! */ /* */ /* |--------- k -------------| */ /*--------------------------------------------------------------------------*/ REAL gmres_k_residual_0 = 0.0; int oem_gmres_k(OEM_DATA *oem, int n, const REAL *b, REAL *x) { FUNCNAME("oem_gmres_k"); int i, j, l, m; REAL *v, *r, *um1,*LR, *U, (*givens)[2], *w, *y; double c, s, wm1, norm; int k = MAX(0,MIN(oem->restart,n)); int (*mv)(void *, int, const REAL *, REAL *) = oem->mat_vec; void *mvd = oem->mat_vec_data; void (*lpc)(void *, int, REAL *) = oem->left_precon; void *lpd = oem->left_precon_data; void (*rpc)(void *, int, REAL *) = oem->right_precon; void *rpd = oem->right_precon_data; WORKSPACE *ws = CHECK_WORKSPACE((k+1)*n + k*(k+4), oem->ws); /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ r = (REAL *)ws->work; v = r+n; U = v+n; LR = U+(k*n); givens = (double (*)[2]) (LR+(k*k)); w = (REAL *) (givens+k); y = w+k; /*--------------------------------------------------------------------------*/ /* Initialization */ /*--------------------------------------------------------------------------*/ (*mv)(mvd, n, x, r); for (i = 0; i < n; i++) r[i] = b[i] - r[i]; if (lpc) (*lpc)(lpd, n, r); gmres_k_residual_0 = oem->initial_residual = norm = dnrm2(n, r, 1); if (norm < oem->tolerance) { oem->residual = norm; free_oem_workspace(ws,oem); return(0); } /*--------------------------------------------------------------------------*/ /* construct k-dimensional Krylov space */ /*--------------------------------------------------------------------------*/ wm1 = householder_vec(n, norm, U, r); um1 = U; for (m = 0; m < k; m++) { w[m] = wm1; new_basisvec(m+1, n, k, U, LR, r, v, y, mvd, mv, lpd, lpc, rpd, rpc); if (m+1 < n) { norm = 0; for (i = m+1; i < n; i++) norm += r[i]*r[i]; norm = sqrt(norm); if (norm > TOL) { /****************************************************************************/ /* one of the last components of r is not zero; calculate Householder */ /* vector; if m < k-1, we need the Householder vector for the calculation */ /* of the next basis vector => store it; if m == k-1 we do not need this */ /* vector anymore => do not store it! */ /****************************************************************************/ if (m < k-1) { um1 = um1+n; r[m+1] = householder_vec(n-(m+1), norm, um1+(m+1), r+(m+1)); } else r[m+1] = householder_vec(n-(m+1), norm, nil, r+(m+1)); } } for (j = 0; j < m; j++) { double rj = r[j]; c = givens[j][0]; s = givens[j][1]; r[j] = c*rj + s*r[j+1]; r[j+1] = -s*rj + c*r[j+1]; } if (m+1 < n && ABS(r[m+1]) > TOL) { /****************************************************************************/ /* Find Givens rotation J_m such that, */ /* a) (J_m r)[i] = r[i], i < m, */ /* b) (J_m r)[m+1] = 0.0 */ /* => (J_m r)[m] = +- sqrt(r[m]^2 + r[m+1]^2) =: sigma */ /* */ /* */ /* |1 0 . . . . 0| */ /* |0 1 . . . . .| */ /* |. . .| c = r[m]/sigma */ /* J_m = |. . .| s = r[m+1]/sigma */ /* |. . .| */ /* |. c s| m */ /* |0 . . . . -s c| m+1 */ /* m m+1 */ /****************************************************************************/ double sigma, maxi; maxi = MAX(r[m], r[m+1]); c = r[m]/maxi; s = r[m+1]/maxi; sigma = maxi*sqrt(c*c + s*s); if (r[m] < 0) sigma = -sigma; givens[m][0] = c = r[m]/sigma; givens[m][1] = s = r[m+1]/sigma; r[m] = sigma; /* r[m+1] == 0 automatically! */ wm1 = -s*w[m]; /* |wm1| is the new residual! */ w[m] *= c; } else wm1 = 0.0; /****************************************************************************/ /* now, store the first m components of the column vector r in the the mth */ /* column of LR */ /****************************************************************************/ for (j = 0; j <= m; j++) LR[j*k+m] = r[j]; /****************************************************************************/ /* test, whether tolarance is reached or not */ /****************************************************************************/ if (ABS(wm1) < oem->tolerance) { m++; break; } /****************************************************************************/ /* tolerance not reached: calculate and store (m+1)th row of matrix L; */ /* this row is only needed for the computation of the (m+1)th column of */ /* the orthogonal matrix Q_m; this vector is the additional basis vector */ /* for the enlargement of the Krylov space; only needed for m < k-1 */ /* L[m+1][j] = _2 */ /* (m+1)th vector u = umi is allready stored at U+(m+1) */ /****************************************************************************/ if (m < k-1) { for (j = 0; j < m+1; j++) { double *uj = U+(j*n); double val = 0.0; for (i = m+1; i < n; i++) val += um1[i]*uj[i]; LR[(m+1)*k+j] = 2.0*val; } } } /****************************************************************************/ /* and now solve the upper triangular system */ /****************************************************************************/ y[m-1] = w[m-1]/LR[(m-1)*(k+1)]; /* = LR[(m-1)*k+(m-1)]! */ for (j = m-2; j >= 0; j--) { double yj = w[j]; for (l = j + 1; l < m; l++) yj -= LR[j*k+l]*y[l]; y[j] = yj/LR[j*(k+1)]; } /****************************************************************************/ /* calculate v = 2 U_m^T [e_0,....,e_m-1] y */ /****************************************************************************/ for (i = 0; i < m; i++) { double val = 0.0; for (j = i; j < m; j++) val += U[i*n+j]*y[j]; v[i] = 2.0*val; } /****************************************************************************/ /* now solve L_m^T w = v in R^m (upper triagonal system, diagonal == 1.0 */ /****************************************************************************/ w[m-1] = v[m-1]; for (j = m-2; j >= 0; j--) { double wj = v[j]; for (l = j + 1; l < m; l++) wj -= LR[l*k+j]*w[l]; w[j] = wj; } /****************************************************************************/ /* v = [e_0,....,e_m-1] y - U_m w */ /****************************************************************************/ for (i = 0; i < n; i++) { double vi = 0.0; for (j = 0; j < MIN(i+1,m); j++) vi += U[j*n+i]*w[j]; v[i] = -vi; } for (j = 0; j < m; j++) v[j] += y[j]; /****************************************************************************/ /* and now, make the update of u :-) */ /****************************************************************************/ if (rpc) (*rpc)(rpd, n, v); for (i = 0; i < n; i++) x[i] += v[i]; oem->residual = ABS(wm1); free_oem_workspace(ws, oem); return(m); } int oem_gmres(OEM_DATA *oem, int dim, const REAL *b, REAL *x) { FUNCNAME("oem_gmres"); int iter, k; REAL old_res = -1.0; WORKSPACE *ws; OEM_DATA data; if (dnrm2(dim, b, 1) < TOL) { INFO(oem->info,2,"b == 0, x = 0 is the solution of the linear system\n"); dset(dim, 0.0, x, 1); oem->initial_residual = oem->residual = 0.0; return(0); } if (oem->restart <= 0 || oem->restart > dim) k = MIN(10, dim); else k = oem->restart; ws = CHECK_WORKSPACE((k+2)*dim + k*(k+4), oem->ws); data = *oem; data.restart = k; data.ws = ws; START_INFO(oem); for (iter = 0; iter <= oem->max_iter; iter++) { k = oem_gmres_k(&data, dim, b, x); if (!iter) oem->initial_residual = data.initial_residual; oem->residual = data.residual; if (SOLVE_INFO(oem, iter, data.residual, &old_res, ws)) return(iter); TEST_EXIT(k != 0, "this must not happen\n"); } return(0); /* statement never reached!!! */ } alberta-2.0.1/alberta_util/src/newton_fs.c0000644000042300001440000001152610676724254015463 00000000000000/*--------------------------------------------------------------------------*/ /* solve nonlinear systems by a Newton method with step size control */ /* */ /* Workspace: 3*dim */ /* */ /* C-version of NGL-lib by Willy Doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int nls_newton_fs(NLS_DATA *data, int dim, REAL *x) { FUNCNAME("nls_newton_fs"); REAL *b, *d, *y; REAL err, err_old, tau; int iter, j, n, m, mmax, halved; int info = data->info; void (*update)(void *, int, const REAL *, int, REAL *) = data->update; void *ud = data->update_data; int (*solve)(void *, int, const REAL *, REAL *) = data->solve; void *sd = data->solve_data; REAL (*norm)(void *, int, const REAL *) = data->norm; void *nd = data->norm_data; WORKSPACE *ws = CHECK_WORKSPACE(3*dim, data->ws); /*--- Memory initialization ------------------------------------------------*/ b = (REAL *)ws->work; d = b+dim; y = d+dim; /*--------------------------------------------------------------------------*/ /*--- Newton initialization ------------------------------------------------*/ /*--------------------------------------------------------------------------*/ (*update)(ud, dim, x, 0, b); /*-- update F(x) -----------------*/ err = err_old = norm ? (*norm)(nd, dim, b) : dnrm2(dim, b, 1); data->initial_residual = err; INFO(info,2,"iter. | residual | red. | n | m |\n"); INFO(info,2,"%5d | %12.5le | -------- | ---- | -- |\n", 0, err); if ((data->residual = err) < data->tolerance) { INFO(info,4,"finished succesfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(0); } /*--- still initalization part ---------------------------------------------*/ mmax = MAX(2,MIN(data->restart,32)); m = 0; tau = 1.0; halved = true; /*--- start iterations -----------------------------------------------------*/ for (iter = 1; iter <= data->max_iter+1; iter++) { (*update)(ud, dim, x, 1, nil); /*-- update DF(x) -----------------*/ dset(dim, 0.0, d, 1); /*-- initial guess is zero --------*/ n = (*solve)(sd, dim, b, d); /*-- solve DF(x) d = b ------------*/ /*--- look for step size ---------------------------------------------------*/ if (!halved) { m = MAX(m-1,0); tau = tau < 0.5 ? 2.0*tau : 1.0; } for (j = 0; j <= mmax; j++) { /*--- aim: |F(u_k+\tau d)| \le (1-0.5\tau) |F(u)| --------------------------*/ dcopy(dim, x, 1, y, 1); /*-- y = x ------------------------*/ daxpy(dim, -tau, d, 1, y, 1); /*-- y -= tau*d -------------------*/ (*update)(ud, dim, y, 0, b); /*-- update F(y) ------------------*/ err = norm ? (*norm)(nd, dim, b) : dnrm2(dim, b, 1); if (err <= (1.0 - 0.5*tau)*err_old) { halved = j > 0; break; } else { if (m == mmax) break; m++; tau *= 0.5; } } dcopy(dim, y, 1, x, 1); /*-- x = y (update x!) ------------*/ if (err_old <= 0) INFO(info,2,"%5d | %12.5le | -------- | %4d | %2d |\n", iter, err, n, m); else INFO(info,2,"%5d | %12.5le | %8.2le | %4d | %2d |\n", iter, err, err/err_old, n, m); if ((data->residual = err) < data->tolerance && m == 0) { INFO(info,4,"finished successfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } else if (iter > data->max_iter) { if (info < 2) { INFO(info,1,"iter. %d, residual: %12.5le\n", iter, err); } INFO(info,1,"tolerance %le not reached\n", data->tolerance); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } err_old = err; } return(iter); /*--- statement never reached -----------------------------*/ } alberta-2.0.1/alberta_util/src/spcg.c0000644000042300001440000002515210676723601014410 00000000000000/*--------------------------------------------------------------------------*/ /* Solving a linear saddle point problem with a preconditioned conjugate */ /* gradient method */ /* Matrix: A symmetric and positve definite */ /* X and Y satisfy LBB condition with respect to B */ /* */ /* */ /* [A B] [u] [f] */ /* [ ] [ ] = [ ] in X x Y */ /* [B^* 0] [p] [g] */ /* */ /* Reformulation using the Schur-Complement operator T := B^* A^{-1} B */ /* */ /* */ /* <=> T p = B^* A^{-1} B p = B^* A^{-1} f - g in Y */ /* */ /* u is then given as u = A^{-1} f - A^{-1} B p */ /*--------------------------------------------------------------------------*/ /* Workspace: 3*dimY + 2*dimX */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" /*--------------------------------------------------------------------------*/ /*--- information output for solver --------------------------------------*/ /*--------------------------------------------------------------------------*/ static void spcg_start_info(const char *funcName, OEM_SP_DATA *data, int nAuf, int npj, int npc) { data->info = data->info > 6 ? 6 : data->info; INFO(data->info,6,"with tolerance %le", data->tolerance); if (data->restart > 0) PRINT_INFO(data->info,6," and restart %d\n", data->restart); else PRINT_INFO(data->info,6,"\n"); INFO(data->info,2," | residual | red. |"); if (nAuf >= 0) { PRINT_INFO(data->info,2," Au=f |"); } if (npj >= 0) { PRINT_INFO(data->info,2," B^*u |"); } if (npc >= 0) { PRINT_INFO(data->info,2," Cr |"); } PRINT_INFO(data->info,2,"\n"); return; } static void spcg_break_info(const char *funcName, OEM_SP_DATA *data, const char *reason, int iter, int nAuf, int npj, int npc, REAL res2, REAL *ores, WORKSPACE *ws) { REAL res = sqrt(res2); if (*ores && *ores > 0) { INFO(data->info,2,"%3d | %11.5le | %8.2le |", iter, res, res/(*ores)); } else { INFO(data->info,2,"%3d | %11.5le | |", iter); } if (nAuf >= 0) { PRINT_INFO(data->info,2," %4d |", nAuf); } if (npj >= 0) { PRINT_INFO(data->info,2," %4d |", npj); } if (npc >= 0) { PRINT_INFO(data->info,2," ---- |"); } PRINT_INFO(data->info,2,"\n"); INFO(data->info,2,"stop due to: %s\n", reason); data->residual = res; if (ws != data->ws) FREE_WORKSPACE(ws); return; } static int spcg_solve_info(const char *funcName, OEM_SP_DATA *data, int iter, int nAuf, int npj, int npc, REAL res2, REAL *ores, WORKSPACE *ws) { static int step[7] = {0, 0, 10, 5, 2, 1, 1}; REAL res = sqrt(res2); if (res <= data->tolerance || ((data->info>1) && (iter%step[data->info]== 0)) || iter == data->max_iter) { if (ores) { if (*ores > 0.0) { REAL red = res/(*ores); INFO(data->info,2,"%3d | %11.5le | %8.2le |", iter, res, red); } else { INFO(data->info,2,"%3d | %11.5le | -------- |", iter, res); } *ores = res; } else { INFO(data->info,2,"%2d | %11.5le |", iter, res); } if (nAuf >= 0) { PRINT_INFO(data->info,2," %4d |", nAuf); } if (npj >= 0) { PRINT_INFO(data->info,2," %4d |", npj); } if (npc >= 0) { PRINT_INFO(data->info,2," %4d |", npc); } PRINT_INFO(data->info,2,"\n"); } data->residual = res; if (iter == data->max_iter && res > data->tolerance) { INFO(data->info,1,"tolerance %le not reached after %d iterations\n", data->tolerance, iter); if (ws != data->ws) FREE_WORKSPACE(ws); return(1); } if (res <= data->tolerance) { INFO(data->info,6,"finished successfully with %d iterations\n",iter); if (ws != data->ws) FREE_WORKSPACE(ws); return(1); } return(0); } #define SPCG_START_INFO(d,n,k,l) spcg_start_info(funcName,d, n, k, l) #define SPCG_BREAK_INFO(d,s,i,n,k,l,r,o,w) \ spcg_break_info(funcName,d,s,i,n,k,l,r,o,w) #define SPCG_SOLVE_INFO(d,i,n,k,l,r,o,w) \ spcg_solve_info(funcName,d,i,n,k,l,r,o,w) int oem_spcg(OEM_SP_DATA *data, int dimX, const REAL *f, REAL *u, int dimY, const REAL *g, REAL *p) { FUNCNAME("oem_spcg"); REAL rho, Bdchi, delta, gamma; REAL *d, *r, *Cr, *chi, *Bp, *Bd, *g_Btu; REAL ores = -1.0; int iter, nAuf = -1, npj = -1, npc = -1; int (*Auf)(void *, int, const REAL *, REAL *) = data->solve_Auf; void *Auf_data = data->solve_Auf_data; void (*B)(void *, REAL, int, const REAL *, int, REAL *) = data->B; void *B_data = data->B_data; void (*Bt)(void *, REAL, int, const REAL *, int, REAL *) = data->Bt; void *Bt_data = data->Bt_data; int (*project)(void *, int, const REAL *, REAL *) = data->project; void *project_data = data->project_data; int (*precon)(void *, int, const REAL *, const REAL *, REAL *) = data->precon; void *precon_data = data->precon_data; int info = data->info; const REAL TOL = 1.e-30; size_t size = precon?3*dimY+dimX+MAX(dimX,dimY):2*dimY+dimX+MAX(dimX,dimY); WORKSPACE *ws = CHECK_WORKSPACE(size,data->ws); /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ d = (REAL *)ws->work; r = d + dimY; Cr = precon ? r+dimY : r; chi = Cr + dimY; Bp = Bd = chi + dimX; /*--- vectors storing B p, B d and B^t u ---*/ g_Btu = project ? Bp : r; delta = g ? dnrm2(dimY, g, 1) : 0.0; if (delta + dnrm2(dimX, f, 1) < TOL) { INFO(info,2,"f,g = 0 => u,p = 0 is the solution\n"); dset(dimX, 0.0, u, 1); dset(dimY, 0.0, p, 1); data->initial_residual = data->residual = 0.0; return(0); } /*--------------------------------------------------------------------------*/ /*--- Initialization ------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--- Bd = f - B p --------------------------------------------------------*/ dcopy(dimX, f, 1, Bp, 1); (*B)(B_data, -1.0, dimY, p, dimX, Bp); /*--- u = A^{-1} (f - Bp) -------------------------------------------------*/ nAuf = (*Auf)(Auf_data, dimX, Bp, u); /*--- r = -B^*u + g -------------------------------------------------------*/ if (g) { dcopy(dimY, g, 1, g_Btu, 1); } else { dset(dimY, 0.0, g_Btu, 1); } (*Bt)(Bt_data, -1.0, dimX, u, dimY, g_Btu); if (project) { dset(dimY, 0.0, r, 1); npj = (*project)(project_data, dimY, g_Btu, r); } /*--- preconditioning -----------------------------------------------------*/ if (precon) { dset(dimY, 0.0, Cr, 1); npc = (*precon)(precon_data, dimY, g_Btu, r, Cr); } /*--- check initial residual (r,r)_C = (r,Cr) = (g-B^*u,Cr) ------------*/ delta = ddot(dimY, Cr, 1, g_Btu, 1); data->initial_residual = sqrt(delta); SPCG_START_INFO(data, nAuf, npj, npc); if (SPCG_SOLVE_INFO(data, 0, nAuf, npj, npc, delta, &ores, ws)) return(0); /*--- decent direction ---------------------------------------------------*/ dcopy(dimY, Cr, 1, d, 1); /*--------------------------------------------------------------------------*/ /*--- Iteration ----------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ for (iter = 1; iter <= data->max_iter; iter++) { /*--- solve A chi = B d --------------------------------------------------*/ dset(dimX, 0.0, Bd, 1); (*B)(B_data, 1.0, dimY, d, dimX, Bd); dset(dimX, 0.0, chi, 1); nAuf = (*Auf)(Auf_data, dimX, Bd, chi); /*--- decent parameter rho = delta/(h,d) -------------------------------*/ Bdchi = ddot(dimX, Bd, 1, chi, 1); if (ABS(Bdchi) < TOL) { SPCG_BREAK_INFO(data, "(Td,d) = 0", iter, nAuf, npj, npc, delta, &ores, ws); return(iter); } /*--- update p and u -----------------------------------------------------*/ rho = delta/Bdchi; daxpy(dimY, -rho, d, 1, p, 1); daxpy(dimX, rho, chi, 1, u, 1); /*--- r = -B^*u + g -------------------------------------------------------*/ if (g) dcopy(dimY, g, 1, g_Btu, 1); else dset(dimY, 0.0, g_Btu, 1); (*Bt)(Bt_data, -1.0, dimX, u, dimY, g_Btu); if (project) { dset(dimY, 0.0, r, 1); npj = (*project)(project_data, dimY, g_Btu, r); } /*--- preconditioning -----------------------------------------------------*/ if (precon) { dset(dimY, 0.0, Cr, 1); npc = (*precon)(precon_data, dimY, g_Btu, r, Cr); } /*--- check initial residual (r,r)_C = (r,Cr) = (g-B^*u,Cr) ------------*/ gamma = 1.0/delta; delta = ddot(dimY, Cr, 1, g_Btu, 1); if (SPCG_SOLVE_INFO(data, iter, nAuf, npj, npc, delta, &ores, ws)) return(iter); /*--- update of the decent direction -------------------------------------*/ gamma *= delta; dxpay(dimY, Cr, 1, gamma, d, 1); } return(0); /* statement never reached!!! */ } alberta-2.0.1/alberta_util/src/dexpy_.f0000644000042300001440000000172010676723601014742 00000000000000 subroutine dexpy(n,dx,incx,dy,incy) implicit NONE real*8 dx(1),dy(1) integer i,incx,incy,ix,iy,m,mod,n if (n.le.0) return if (incx.eq.1.and.incy.eq.1) then c *** unrolled loop *** m= mod(n,4) if (m.eq.0) then m= 1 else do 1000 i=1,m dy(i)= dy(i)+dx(i) 1000 continue if (n.lt.4) then return end if m= m+1 end if do 1002 i=m,n,4 dy(i) = dy(i) +dx(i) dy(i+1)= dy(i+1)+dx(i+1) dy(i+2)= dy(i+2)+dx(i+2) dy(i+3)= dy(i+3)+dx(i+3) 1002 continue else ix= 1 iy= 1 if (incx.lt.0) ix= (-n+1)*incx+1 if (incy.lt.0) iy= (-n+1)*incy+1 do 1004 i=1,n dy(iy)= dy(iy)+dx(ix) ix = ix+incx iy = iy+incy 1004 continue end if return end alberta-2.0.1/alberta_util/src/info.c0000644000042300001440000000544710676723601014414 00000000000000#include "alberta_util.h" #include "alberta_util_intern.h" /*--------------------------------------------------------------------------*/ /*--- information output for linear solver -------------------------------*/ /*--------------------------------------------------------------------------*/ void start_info(const char *funcName, OEM_DATA *oem) { oem->info = oem->info > 10 ? 10 : oem->info; INFO(oem->info,6,"with tolerance %le", oem->tolerance); if (oem->restart > 0) PRINT_INFO(oem->info,6," and restart %d\n", oem->restart); else PRINT_INFO(oem->info,6,"\n"); INFO(oem->info,2,"iter. | residual | red.\n"); return; } void break_info(const char *funcName, OEM_DATA *oem, const char *reason, int iter, REAL res, REAL *ores, WORKSPACE *ws) { if (*ores && *ores > 0) INFO(oem->info,2,"%5d | %12.5le | %8.2le\n", iter, res, res/(*ores)); else INFO(oem->info,2,"%5d | %12.5le |\n", iter); INFO(oem->info,2,"stop due to: %s\n", reason); free_oem_workspace(ws, oem); oem->residual = res; } int solve_info(const char *funcName, OEM_DATA *oem, int iter, REAL res, REAL *ores, WORKSPACE *ws) { static int step[11] = {0, 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1}; if (res <= oem->tolerance || (oem->info && (iter%step[oem->info] == 0)) || iter == oem->max_iter) { if (*ores) { if (*ores > 0.0) { REAL red = res/(*ores); INFO(oem->info,2,"%5d | %12.5le | %8.2le\n", iter, res, red); } else { INFO(oem->info,2,"%5d | %12.5le | --------\n", iter, res); } *ores = res; } else { INFO(oem->info,2,"%5d | %12.5le |\n", iter, res); } } oem->residual = res; if (iter == oem->max_iter && res > oem->tolerance) { INFO(oem->info,1,"tolerance %le not reached after %d iterations\n", oem->tolerance, iter); free_oem_workspace(ws, oem); return(1); } if (res <= oem->tolerance) { INFO(oem->info,6,"finished successfully with %d iterations\n",iter); free_oem_workspace(ws, oem); return(1); } return(0); } /*--------------------------------------------------------------------------*/ /*--- checking of workspace, reallocation of workspace if neccesary ------*/ /*--------------------------------------------------------------------------*/ WORKSPACE *check_workspace(const char *funcName, const char *file, int line, size_t size, WORKSPACE *ws) { if (!ws) { ws = GET_WORKSPACE(size*sizeof(REAL)); } else if (size*sizeof(REAL) > ws->size) { WARNING("need workspace for %d REALs\n", size); WARNING("reallocating workspace of length %d\n", size*sizeof(REAL)); REALLOC_WORKSPACE(ws, size*sizeof(REAL)); } return(ws); } void free_oem_workspace(WORKSPACE *ws, OEM_DATA *oem) { if (ws != oem->ws) FREE_WORKSPACE(ws); return; } alberta-2.0.1/alberta_util/src/banach.c0000644000042300001440000000605110676724254014672 00000000000000/*--------------------------------------------------------------------------*/ /* Solve nonlinear systems by the Fixed-Point-Method */ /* */ /* Workspace: 2*dim */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int nls_banach(NLS_DATA *data, int dim, REAL *x) { FUNCNAME("nls_banach"); REAL *b, *d; REAL err = 0.0, err_old = -1.0; int iter, n; int info = data->info; void (*update)(void *, int, const REAL *, int, REAL *) = data->update; void *ud = data->update_data; int (*solve)(void *, int, const REAL *, REAL *) = data->solve; void *sd = data->solve_data; REAL (*norm)(void *, int, const REAL *) = data->norm; void *nd = data->norm_data; WORKSPACE *ws = CHECK_WORKSPACE(2*dim, data->ws); /*--- Memory initialization ------------------------------------------------*/ b = (REAL *)ws->work; d = b+dim; INFO(info,2,"iter. | residual | red. | n |\n"); for (iter = 1; iter <= data->max_iter; iter++) { /*--- Assemble DF(x) and F(x) ----------------------------------------------*/ (*update)(ud, dim, x, 1, b); /*--- Initial guess is zero ------------------------------------------------*/ dset(dim, 0.0, d, 1); /*--- solve linear system --------------------------------------------------*/ n = (*solve)(sd, dim, b, d); /*--- x = x - d ------------------------------------------------------------*/ daxpy(dim, -1.0, d, 1, x, 1); err = norm ? (*norm)(nd, dim, d) : dnrm2(dim, d, 1); if (err_old <= 0) INFO(info,2,"%5d | %12.5le | -------- | %4d |\n", iter, err, n); else INFO(info,2,"%5d | %12.5le | %8.2le | %4d |\n", iter, err, err/err_old, n); if ((data->residual = err) < data->tolerance) { INFO(info,4,"finished successfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } err_old = err; } if (info < 2) { INFO(info,1,"iter. %d, residual: %12.5le\n", iter, err); } INFO(info,1,"tolerance %le not reached\n", data->tolerance); if (ws != data->ws) FREE_WORKSPACE(ws); data->residual = err; return(iter); } alberta-2.0.1/alberta_util/src/odir.c0000644000042300001440000001314610676723601014411 00000000000000/*--------------------------------------------------------------------------*/ /* Solving a linear system with "OrhtoDir" */ /* Classification: OrthoDir_d(A,C,A) */ /* Variant: sigma= d.Ad/d.Ad_old */ /* Matrix: symmetric and positve */ /* Workspace: 5*dim */ /* */ /* C-version of OFM-lib by Willy Doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int oem_odir(OEM_DATA *oem, int dim, const REAL *b, REAL *x) { FUNCNAME("oem_odir"); REAL *Ad, *d, *d_old, *r, *h; REAL res, old_res = -1.0; REAL dad, dad_old, rd, alpha, gamma, sigma; int iter; int (*mv)(void *, int, const REAL *, REAL *) = oem->mat_vec; void *mvd = oem->mat_vec_data; void (*precon)(void *, int, REAL *) = oem->left_precon; void *pd = oem->left_precon_data; REAL (*scp)(void *, int, const REAL *, const REAL *) = oem->scp; void *sd = oem->scp_data; const REAL TOL = 1.e-30; WORKSPACE *ws = CHECK_WORKSPACE(6*dim, oem->ws); /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ Ad = (REAL *)ws->work; d = Ad+dim; d_old = d+dim; r = d_old+dim; h = r+dim; /*--------------------------------------------------------------------------*/ /*--- Initalization ------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ if ((scp ? sqrt((*scp)(sd, dim, b, b)) : dnrm2(dim, b, 1)) < TOL) { INFO(oem->info,2,"b == 0, x = 0 is the solution of the linear system\n"); dset(dim, 0.0, x, 1); oem->initial_residual = oem->residual = 0.0; return(0); } (*mv)(mvd, dim, x, r); daxpy(dim, -1.0, b, 1, r, 1); dcopy(dim, r, 1, h, 1); if (precon) (*precon)(pd, dim, h); dcopy(dim, h, 1, d, 1); dset(dim, 0.0, d_old, 1); dad_old = 1.0; /*--------------------------------------------------------------------------*/ /*--- check initial residual ---------------------------------------------*/ /*--------------------------------------------------------------------------*/ res = scp ? sqrt((*scp)(sd, dim, r, r)) : dnrm2(dim, r, 1); oem->initial_residual = res; START_INFO(oem); if (SOLVE_INFO(oem, 0, res, &old_res, ws)) return(0); /*--------------------------------------------------------------------------*/ /*--- Iteration ----------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ for (iter = 1; iter <= oem->max_iter; iter++) { /*--------------------------------------------------------------------------*/ /*--- calculate r.d, A.d and d.A.d ---------------------------------------*/ /*--------------------------------------------------------------------------*/ rd = scp ? (*scp)(sd, dim, r, d) : ddot(dim, r, 1, d, 1); (*mv)(mvd, dim, d, Ad); dad = scp ? (*scp)(sd, dim, d, Ad) : ddot(dim, d, 1, Ad, 1); if (ABS(dad) < TOL) { BREAK_INFO(oem, "(Ad,d)_2 = 0", iter, res, &old_res, ws); return(iter); } /*--------------------------------------------------------------------------*/ /*--- update x and calculate new r --------------------------------------*/ /*--------------------------------------------------------------------------*/ alpha = rd/dad; daxpy(dim, -alpha, d, 1, x, 1); daxpy(dim, -alpha, Ad, 1, r, 1); res = scp ? sqrt((*scp)(sd, dim, r, r)) : dnrm2(dim, r, 1); if (SOLVE_INFO(oem, iter, res, &old_res, ws)) return(iter); dcopy(dim, Ad, 1, h, 1); if (precon) (*precon)(pd, dim, h); /*--------------------------------------------------------------------------*/ /*--- calculate gamma and sigma ------------------------------------------*/ /*--------------------------------------------------------------------------*/ gamma = (scp ? (*scp)(sd, dim, h, Ad) : ddot(dim, h, 1, Ad, 1))/dad; sigma = dad/dad_old; /*--------------------------------------------------------------------------*/ /*--- compute new d and save old values ----------------------------------*/ /*--------------------------------------------------------------------------*/ dswap(dim, d, 1, d_old, 1); dscal(dim, -sigma, d, 1); daxpy(dim, -gamma, d_old, 1, d, 1); dexpy(dim, h, 1, d, 1); dad_old= dad; } return(0); /* statement never reached!!! */ } alberta-2.0.1/alberta_util/src/bicgstab.c0000644000042300001440000001422710676723601015233 00000000000000/*--------------------------------------------------------------------------*/ /* Stabilized BiCG method */ /* Classification: ??? */ /* Matrix: symmetric */ /* Workspace: 5*dim */ /* */ /* C-version of OFM-lib by Willy Doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int oem_bicgstab(OEM_DATA *oem, int dim, const REAL *b, REAL *x) { FUNCNAME("oem_bicgstab"); REAL *rstar, *d, *s, *CAd, *h, *t; REAL res, old_res = -1.0; REAL rh1, rh2, dad, alpha, ast, att, omega, beta; int iter; int (*mv)(void *, int, const REAL *, REAL *) = oem->mat_vec; void *mvd = oem->mat_vec_data; void (*precon)(void *, int, REAL *) = oem->left_precon; void *pd = oem->left_precon_data; REAL (*scp)(void *, int, const REAL *, const REAL *) = oem->scp; void *sd = oem->scp_data; const REAL TOL = 1.e-30; WORKSPACE *ws = CHECK_WORKSPACE(5*dim, oem->ws); /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ rstar = (REAL *)ws->work; d = rstar + dim; s = d + dim; CAd = s + dim; h = CAd + dim; t = h; /* !!! */ /*--------------------------------------------------------------------------*/ /*--- Initalization ------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ if ((scp ? sqrt((*scp)(sd, dim, b, b)) : dnrm2(dim, b, 1)) < TOL) { INFO(oem->info,2,"b == 0, x = 0 is the solution of the linear system\n"); dset(dim, 0.0, x, 1); oem->initial_residual = oem->residual = 0.0; return(0); } (*mv)(mvd, dim, x, h); daxpy(dim, -1.0, b, 1, h, 1); dcopy(dim, h, 1, rstar, 1); if (precon) (*precon)(pd, dim, h); /*--------------------------------------------------------------------------*/ /*--- check initial residual ---------------------------------------------*/ /*--------------------------------------------------------------------------*/ res = scp ? sqrt((*scp)(sd, dim, h, h)) : dnrm2(dim, h, 1); oem->initial_residual = res; START_INFO(oem); if (SOLVE_INFO(oem, 0, res, &old_res, ws)) return(0); dcopy(dim, h, 1, d, 1); rh1 = scp ? (*scp)(sd, dim, h, rstar) : ddot(dim, h, 1, rstar,1); /*--------------------------------------------------------------------------*/ /*--- Iteration ----------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ for (iter = 1; iter <= oem->max_iter; iter++) { /*--------------------------------------------------------------------------*/ /*--- calculate CA.d and CA.d*rstar --------------------------------------*/ /*--------------------------------------------------------------------------*/ (*mv)(mvd, dim, d, CAd); if (precon) (*precon)(pd, dim, CAd); dad = scp ? (*scp)(sd, dim, CAd, rstar) : ddot(dim, CAd, 1, rstar, 1); if (ABS(rh1) < TOL) { BREAK_INFO(oem, "(h,r^*)_2 = 0", iter, res, &old_res, ws); return(iter); } if (ABS(dad) < TOL) { BREAK_INFO(oem, "(Ad,d^*)_2 = 0", iter, res, &old_res, ws); return(iter); } /*-------------------------------------------------------------------------*/ /*--- update s and t ----------------------------------------------------*/ /*-------------------------------------------------------------------------*/ alpha = rh1/dad; dcopy(dim, h, 1, s, 1); daxpy(dim, -alpha, CAd, 1, s, 1); (*mv)(mvd, dim, s, t); if (precon) (*precon)(pd, dim, t); /*--------------------------------------------------------------------------*/ /*--- calculate omega ----------------------------------------------------*/ /*--------------------------------------------------------------------------*/ ast = scp ? (*scp)(sd, dim, s, t) : ddot(dim, s, 1, t, 1); att = scp ? (*scp)(sd, dim, t, t) : ddot(dim, t, 1, t, 1); if (ABS(ast) < TOL) { INFO(oem->info,4,"omega = 0\n"); ast = ast > 0 ? TOL : -TOL; } if (att < TOL) { INFO(oem->info,4,"t = 0\n"); att = TOL; } omega = ast/att; /*--------------------------------------------------------------------------*/ /*--- update x and calculate new h --------------------------------------*/ /*--------------------------------------------------------------------------*/ daxpy(dim, -alpha, d, 1, x, 1); daxpy(dim, -omega, s, 1, x, 1); dxpay(dim, s, 1, -omega, h, 1); /*--- t=h!!! ----------------------*/ res = scp ? sqrt((*scp)(sd, dim, h, h)) : dnrm2(dim, h, 1); if (SOLVE_INFO(oem, iter, res, &old_res, ws)) return(iter); rh2 = scp ? (*scp)(sd, dim, h, rstar) : ddot(dim, h, 1, rstar, 1); beta= (rh2/rh1)* (alpha/omega); daxpy(dim, -omega, CAd, 1, d, 1); dxpay(dim, h, 1, beta, d, 1); rh1 = rh2; } return(0); /*--- statement never reached!!! -------------------------*/ } alberta-2.0.1/alberta_util/src/dmxpy_.f0000644000042300001440000000172010676723601014752 00000000000000 subroutine dmxpy(n,dx,incx,dy,incy) implicit NONE real*8 dx(1),dy(1) integer i,incx,incy,ix,iy,m,mod,n if (n.le.0) return if (incx.eq.1.and.incy.eq.1) then c *** unrolled loop *** m= mod(n,4) if (m.eq.0) then m= 1 else do 1000 i=1,m dy(i)= dy(i)-dx(i) 1000 continue if (n.lt.4) then return end if m= m+1 end if do 1002 i=m,n,4 dy(i) = dy(i) -dx(i) dy(i+1)= dy(i+1)-dx(i+1) dy(i+2)= dy(i+2)-dx(i+2) dy(i+3)= dy(i+3)-dx(i+3) 1002 continue else ix= 1 iy= 1 if (incx.lt.0) ix= (-n+1)*incx+1 if (incy.lt.0) iy= (-n+1)*incy+1 do 1004 i=1,n dy(iy)= dy(iy)-dx(ix) ix = ix+incx iy = iy+incy 1004 continue end if return end alberta-2.0.1/alberta_util/src/newton.c0000644000042300001440000000613210676724254014770 00000000000000/*--------------------------------------------------------------------------*/ /* Solve nonlinear systems by the classical Newton method */ /* */ /* Workspace: 2*dim */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int nls_newton(NLS_DATA *data, int dim, REAL *x) { FUNCNAME("nls_newton"); REAL *b, *d; REAL err = 0.0, err_old = -1.0; int iter, n; int info = data->info; void (*update)(void *, int, const REAL *, int, REAL *) = data->update; void *ud = data->update_data; int (*solve)(void *, int, const REAL *, REAL *) = data->solve; void *sd = data->solve_data; REAL (*norm)(void *, int, const REAL *) = data->norm; void *nd = data->norm_data; WORKSPACE *ws = CHECK_WORKSPACE(2*dim, data->ws); /*--- Memory initialization ------------------------------------------------*/ b = (REAL *)ws->work; d = b+dim; INFO(info,2,"iter. | residual | red. | n |\n"); for (iter = 1; iter <= data->max_iter; iter++) { /*--- Assemble DF(x) and F(x) ----------------------------------------------*/ (*update)(ud, dim, x, 1, b); /*--- Initial guess is zero ------------------------------------------------*/ dset(dim, 0.0, d, 1); /*--- solve linear system --------------------------------------------------*/ n = (*solve)(sd, dim, b, d); /*--- x = x - d ------------------------------------------------------------*/ daxpy(dim, -1.0, d, 1, x, 1); err = norm ? (*norm)(nd, dim, d) : dnrm2(dim, d, 1); if (iter == 1) data->initial_residual = err; if (err_old <= 0) INFO(info,2,"%5d | %12.5le | -------- | %4d |\n", iter, err, n); else INFO(info,2,"%5d | %12.5le | %8.2le | %4d |\n", iter, err, err/err_old, n); if ((data->residual = err) < data->tolerance) { INFO(info,4,"finished successfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } err_old = err; } if (info < 2) { INFO(info,1,"iter. %d, residual: %12.5le\n", iter, err); } INFO(info,1,"tolerance %le not reached\n", data->tolerance); if (ws != data->ws) FREE_WORKSPACE(ws); data->residual = err; return(iter); } alberta-2.0.1/alberta_util/src/dxpay_.f0000644000042300001440000000210710676723601014736 00000000000000 subroutine dxpay(n,dx,incx,da,dy,incy) implicit NONE real*8 dx(1),dy(1),da integer i,incx,incy,ix,iy,m,mod,n if (n.le.0) return if (da.eq.0.d0) then call dcopy(n,dx,incx,dy,incy) return end if if (incx.eq.1.and.incy.eq.1) then c *** unrolled loop *** m= mod(n,4) if (m.eq.0) then m= 1 else do 1000 i=1,m dy(i)= da*dy(i)+dx(i) 1000 continue if (n.lt.4) then return end if m= m+1 end if do 1002 i=m,n,4 dy(i) = da*dy(i) +dx(i) dy(i+1)= da*dy(i+1)+dx(i+1) dy(i+2)= da*dy(i+2)+dx(i+2) dy(i+3)= da*dy(i+3)+dx(i+3) 1002 continue else ix= 1 iy= 1 if (incx.lt.0) ix= (-n+1)*incx+1 if (incy.lt.0) iy= (-n+1)*incy+1 do 1004 i=1,n dy(iy)= da*dy(iy)+dx(ix) ix = ix+incx iy = iy+incy 1004 continue end if return end alberta-2.0.1/alberta_util/src/newton_ds.c0000644000042300001440000001307510676724254015462 00000000000000/*--------------------------------------------------------------------------*/ /* solve nonlinear systems by a Newton method with step size control */ /* */ /* Workspace: 4*dim */ /* */ /* C-version of NGL-lib by Willy Doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int nls_newton_ds(NLS_DATA *data, int dim, REAL *x) { FUNCNAME("nls_newton_ds"); REAL *b, *d, *db, *y; REAL err = 0.0, err_old = -1.0; REAL atol, factor, tau; int iter, j, n, m, mmax, halved; int info = data->info; void (*update)(void *, int, const REAL *, int, REAL *) = data->update; void *ud = data->update_data; int (*solve)(void *, int, const REAL *, REAL *) = data->solve; void *sd = data->solve_data; REAL (*norm)(void *, int, const REAL *) = data->norm; void *nd = data->norm_data; WORKSPACE *ws = CHECK_WORKSPACE(4*dim, data->ws); /*--- Memory initialization ------------------------------------------------*/ b = (REAL *)ws->work; d = b+dim; db = d+dim; y = db+dim; /*--------------------------------------------------------------------------*/ /*--- Newton initialization ------------------------------------------------*/ /*--------------------------------------------------------------------------*/ (*update)(ud, dim, x, 1, b); /*--- Initial guess is zero ------------------------------------------------*/ dset(dim, 0.0, d, 1); /*--- solve linear system --------------------------------------------------*/ n = (*solve)(sd, dim, b, d); /*--- compute norm of |d| --------------------------------------------------*/ err = err_old = norm ? (*norm)(nd, dim, d) : dnrm2(dim, d, 1); data->initial_residual = err; INFO(info,2,"iter. | residual | red. | n | m |\n"); INFO(info,2,"%5d | %12.5le | -------- | %4d | -- |\n", 0, err, n); if ((data->residual = err) < data->tolerance) { INFO(info,4,"finished succesfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(0); } /*--- still initalization part ---------------------------------------------*/ mmax = MAX(2,MIN(data->restart,32)); m = 0; tau = 1.0; halved = true; atol = sqrt(10.0*data->tolerance); /*--- start iterations -----------------------------------------------------*/ for (iter = 1; iter <= data->max_iter+1; iter++) { /*--- look for step size ---------------------------------------------------*/ if (!halved) { m = MAX(m-1,0); tau = tau < 0.5 ? 2.0*tau : 1.0; } /*--- aim: |DF(u_k)^{-1} F(u_k+\tau d)| \le (1-0.5\tau) |d| ----------------*/ for (j = 0; j <= mmax; j++) { dcopy(dim, x, 1, y, 1); /*-- y = x -----------------------*/ daxpy(dim, -tau, d, 1, y, 1); /*-- y -= tau*d ------------------*/ (*update)(ud, dim, y, 0, b); /*-- update F(x) -----------------*/ dset(dim, 0.0, db, 1); /*-- initial guess is zero -------*/ n = (*solve)(sd, dim, b, db); /*-- simplified correct. ---------*/ err = norm ? (*norm)(nd, dim, db) : dnrm2(dim, db, 1); factor = 1.0 - 0.5*tau; if (err <= factor*err_old) { halved = j > 0; break; } else { if (m == mmax) break; m = m+1; tau *= 0.5; } } dcopy(dim, y, 1, x, 1); /*-- x = y ----------------------*/ if (err_old <= 0) INFO(info,2,"%5d | %12.5le | -------- | %4d | %2d |\n", iter, err, n, m); else INFO(info,2,"%5d | %12.5le | %8.2le | %4d | %2d |\n", iter, err, err/err_old, n, m); if ((data->residual = err) < data->tolerance && err < atol && m == 0) { dmxpy(dim, db, 1, x, 1); /*-- x -= db ---------------------*/ INFO(info,4,"finished successfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } else if (iter > data->max_iter) { dmxpy(dim, db, 1, x, 1); /*-- x -= db ---------------------*/ if (info < 2) { INFO(info,1,"iter. %d, residual: %12.5le\n", iter, err); } INFO(info,1,"tolerance %le not reached\n", data->tolerance); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } (*update)(ud, dim, x, 1, nil); /*-- update DF(x) -----------------*/ dset(dim, 0.0, d, 1); n = (*solve)(sd, dim, b, d); /*--- compute norm of |d| --------------------------------------------------*/ err_old = err; err = norm ? (*norm)(nd, dim, d) : dnrm2(dim, d, 1); } return(iter); /*--- statement never reached -----------------------------*/ } alberta-2.0.1/alberta_util/src/newton_br.c0000644000042300001440000001101510676724254015447 00000000000000/*--------------------------------------------------------------------------*/ /* solve nonlinear systems by a Newton method with step size control */ /* by Bank and Rose, Numer. Math. 37 (1981) pp. 279-295. */ /* */ /* Workspace: 4*dim */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2002-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int nls_newton_br(NLS_DATA *data, REAL delta, int dim, REAL *x) { FUNCNAME("nls_newton_br"); REAL *b, *d, *y; REAL err, err_old, tau, K; int iter, n, m, mmax; int info = data->info; void (*update)(void *, int, const REAL *, int, REAL *) = data->update; void *ud = data->update_data; int (*solve)(void *, int, const REAL *, REAL *) = data->solve; void *sd = data->solve_data; REAL (*norm)(void *, int, const REAL *) = data->norm; void *nd = data->norm_data; WORKSPACE *ws = CHECK_WORKSPACE(3*dim, data->ws); /*--- Memory initialization ------------------------------------------------*/ b = (REAL *)ws->work; d = b+dim; y = d+dim; /*--------------------------------------------------------------------------*/ /*--- Newton initialization ------------------------------------------------*/ /*--------------------------------------------------------------------------*/ (*update)(ud, dim, x, 0, b); /*-- update F(x) -----------------*/ err = err_old = norm ? (*norm)(nd, dim, b) : dnrm2(dim, b, 1); INFO(info,2,"iter. | residual | red. | n | m |\n"); INFO(info,2,"%5d | %12.5le | -------- | ---- | -- |\n", 0, err); if ((data->residual = err) < data->tolerance) { INFO(info,4,"finished succesfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(0); } /*--- still initalization part ---------------------------------------------*/ mmax = MAX(2,MIN(data->restart,32)); K = 0.0; /*--- start iterations -----------------------------------------------------*/ for (iter = 1; iter <= data->max_iter+1; iter++) { (*update)(ud, dim, x, 1, nil); /*-- update DF(x) -----------------*/ dset(dim, 0.0, d, 1); /*-- initial guess is zero --------*/ n = (*solve)(sd, dim, b, d); /*-- solve DF(x) d = b ------------*/ for (m = 0; m <= mmax; m++) { /*--- aim: |F(u_k+\tau d)| \le ???? --------------------------*/ tau = 1.0/(1.0 + K*err_old); dcopy(dim, x, 1, y, 1); /*-- y = x ------------------------*/ daxpy(dim, -tau, d, 1, y, 1); /*-- y -= tau*d -------------------*/ (*update)(ud, dim, y, 0, b); /*-- update F(y) ------------------*/ err = norm ? (*norm)(nd, dim, b) : dnrm2(dim, b, 1); if ((1.0 - err/err_old)/tau < delta) { K = (K == 0.0) ? 1.0 : 10.0*K; } else { K *= 0.1; break; } } dcopy(dim, y, 1, x, 1); /*-- x = y (update x!) ------------*/ if (err_old <= 0) INFO(info,2,"%5d | %12.5le | -------- | %4d | %2d |\n", iter, err, n, m); else INFO(info,2,"%5d | %12.5le | %8.2le | %4d | %2d |\n", iter, err, err/err_old, n, m); if ((data->residual = err) < data->tolerance) { INFO(info,4,"finished successfully\n"); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } else if (iter > data->max_iter) { if (info < 2) { INFO(info,1,"iter. %d, residual: %12.5le\n", iter, err); } INFO(info,1,"tolerance %le not reached\n", data->tolerance); if (ws != data->ws) FREE_WORKSPACE(ws); return(iter); } err_old = err; } return(iter); /*--- statement never reached -----------------------------*/ } alberta-2.0.1/alberta_util/src/ores.c0000644000042300001440000001151610676723601014423 00000000000000/*--------------------------------------------------------------------------*/ /* Solving a linear system with method of orthogonal directions */ /* Classification: OrthoDir_d(A^*A,C,A) */ /* Variant: sigma= Ad.Ad/Ad_old.Ad_old */ /* Matrix: symmetric */ /* Workspace: 7*dim */ /* */ /* C-version of OFM-lib by Willy Doerfler */ /* */ /* author: Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://scicomp.math.uni-augsburg.de/Siebert/ */ /* */ /* (c) by K.G. Siebert (2000-2003) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int oem_ores(OEM_DATA *oem, int dim, const REAL *b, REAL *x) { FUNCNAME("oem_ores"); REAL *Ad, *Ad_old, *Ah, *d, *d_old, *h, *r; REAL alpha, gamma, sigma; REAL daad, daad_old, rad, res, old_res = -1.0; int iter, dim2; int (*mv)(void *, int, const REAL *, REAL *) = oem->mat_vec; void *mvd = oem->mat_vec_data; void (*precon)(void *, int, REAL *) = oem->left_precon; void *pd = oem->left_precon_data; REAL (*scp)(void *, int, const REAL *, const REAL *) = oem->scp; void *sd = oem->scp_data; WORKSPACE *ws = CHECK_WORKSPACE(7*dim, oem->ws); /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ d = (REAL *)ws->work; Ad = d+dim; d_old = Ad+dim; Ad_old = d_old+dim; Ah = Ad_old+dim; r = Ah+dim; h = r+dim; /*--------------------------------------------------------------------------*/ /*--- Initalization ------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ dim2 = 2*dim; /* Important: sequence of vectors in memory for use of dim2!*/ (*mv)(mvd, dim, x, r); daxpy(dim, -1.0, b, 1, r, 1); dcopy(dim, r, 1, h, 1); if (precon) (*precon)(pd, dim, h); dcopy(dim, h, 1, d, 1); dset(dim2, 0.0, d_old, 1); /*--- d_old = 0 and Ad_old = 0 ---------------*/ (*mv)(mvd, dim, d, Ad); daad_old = 1.0; /*--------------------------------------------------------------------------*/ /*--- check initial residual ---------------------------------------------*/ /*--------------------------------------------------------------------------*/ res = scp ? sqrt((*scp)(sd, dim, r, r)) : dnrm2(dim, r, 1); oem->initial_residual = res; START_INFO(oem); if (SOLVE_INFO(oem, 0, res, &old_res, ws)) return(0); for (iter = 1; iter <= oem->max_iter; iter++) { /*--- compute r.Ad and d.A.A.d ---------------------------------------------*/ rad = scp ? (*scp)(sd, dim, r, Ad) : ddot(dim, r, 1, Ad, 1); daad = scp ? (*scp)(sd, dim, Ad, Ad) : ddot(dim, Ad, 1, Ad, 1); if (daad <= 1.e-30) { BREAK_INFO(oem, "(Ad,d)_2 = 0", iter, res, &old_res, ws); return(iter); } /*--- update u and r ------------------------------------------------------*/ alpha= rad/daad; daxpy(dim, -alpha, d, 1, x, 1); daxpy(dim, -alpha, Ad, 1, r, 1); res = scp ? sqrt((*scp)(sd, dim, r, r)) : dnrm2(dim, r, 1); if (SOLVE_INFO(oem, iter, res, &old_res, ws)) return(iter); dcopy(dim, Ad, 1, h, 1); if (precon) (*precon)(pd, dim, h); (*mv)(mvd, dim, h, Ah); gamma = (scp ? (*scp)(sd, dim, Ah, Ad) : ddot(dim, Ah, 1, Ad, 1))/daad; sigma = daad/daad_old; /*--- compute new d.Ad, save old values! ----------------------------------*/ dswap(dim2, d, 1, d_old, 1); /*--- d_old = d, Ad_old = Ad ------*/ dscal(dim2, -sigma, d, 1); /*--- d,Ad *= -sigma --------------*/ daxpy(dim2, -gamma, d_old, 1, d, 1); /*--- d,Ad -= gamma*d_old,Ad_old --*/ daxpy(dim, 1.0, h, 1, d, 1); daxpy(dim, 1.0, Ah, 1, Ad, 1); daad_old = daad; } return(0); /*--- statement never reached!!! ----------------------------*/ } alberta-2.0.1/alberta_util/src/drandn_.f0000644000042300001440000000334010676723601015057 00000000000000C********************************************************************** C SUBROUTINE DRANDN (N,DX,SEED) C C Purpose: C Fills the vector DX with random numbers between 0 and 1. If the C SEED is given, it should be odd and positive. The generator is a C fairly unsophisticated one, from Pearson's "Numerical methods in C engineering and science" book. C C Parameters: C N = the dimension of the vector (input). C DX = the vector to fill with random numbers (output). C SEED = the seed for the generator (input). C C Noel M. Nachtigal C April 23, 1993 C C********************************************************************** C INTRINSIC DBLE, IABS, MOD C INTEGER N, SEED DOUBLE PRECISION DX(N) C C Local variables. C INTEGER I, J C C Local variables that are saved from one call to the next. C DOUBLE PRECISION DMAX INTEGER IM, IMAX, IS SAVE DMAX, IM, IMAX, IS DATA IM/0/ C C Initialize the generator data. C IF (IM.EQ.0) THEN J = 0 IM = 1 DO 10 I = 1, 31 J = J + 1 IF (IM*2.LE.IM) GO TO 20 IM = IM * 2 10 CONTINUE 20 IMAX = (IM-1) * 2 + 1 DMAX = DBLE(IMAX) DO 30 I = 1, MOD(J,3) J = J - 1 IM = IM / 2 30 CONTINUE IM = IM + 5 IS = IABS(MOD(IM*30107,IMAX)) END IF C C Check whether we have a new seed. C IF (SEED.GT.0) IS = (SEED / 2) * 2 + 1 C C Here goes the rest. C DO 40 I = 1, N DX(I) = DBLE(IS) / DMAX IS = IABS(MOD(IM*IS,IMAX)) 40 CONTINUE C RETURN END C C********************************************************************** alberta-2.0.1/alberta_util/src/qmr.c0000644000042300001440000003107510676723600014253 00000000000000/*--------------------------------------------------------------------------*/ /* Transpose-free QMR-Solver (nonsymetric, non-positiv-definit) */ /* Classification: ??? */ /* */ /* author: Oliver Kriessl */ /* Lehrstuhl fuer Angewandte Analysis mit Schwerpunkt Numerik */ /* Universitaetsstrasse 14 */ /* D-86159 Augsburg */ /* */ /* http://www.math.uni-augsburg.de/~oli */ /* */ /* (c) by O.Kriessl (2005) */ /*--------------------------------------------------------------------------*/ #include "alberta_util.h" #include "alberta_util_intern.h" int oem_tfqmr(OEM_DATA *oem, int dim, const REAL *b, REAL *x) { FUNCNAME("oem_tfqmr"); static int tres = 0; const REAL TOL = 1.e-30; REAL *xt, *bt, *rt, *vn, *wn, *yn, *dn, *Ayn, *tmp, *ptmp; REAL *btmp, *upbt, *mult; REAL resn = 1.0, rho = 1.0, var = 0.0, eta = 0.0, tau; REAL alpha, beta, dcos, dtmp, unrm, uchk, old_res = -1.0; int iter, ierr = 0, flag = 0; int (*mv)(void *, int, const REAL *, REAL *) = oem->mat_vec; void *mvd = oem->mat_vec_data; void (*l_precon)(void *, int, REAL *) = oem->left_precon; void *l_pd = oem->left_precon_data; void (*r_precon)(void *, int, REAL *) = oem->right_precon; void *r_pd = oem->right_precon_data; WORKSPACE *ws = CHECK_WORKSPACE(11*dim, oem->ws); /*--------------------------------------------------------------------------*/ /*--- checking the inputs -----------------------------------------------*/ /*--------------------------------------------------------------------------*/ if (dim<0 || oem->max_iter<1) { printf("oem_tfqmr: bad inputs detected ... exiting!\n"); exit(-1); } if (oem->tolerance<=0.0) oem->tolerance = 1.0e-16; /*--------------------------------------------------------------------------*/ /*--- partitioning of the workspace --------------------------------------*/ /*--------------------------------------------------------------------------*/ xt = (REAL *)ws->work; bt = xt + dim; rt = bt + dim; vn = rt + dim; wn = vn + dim; yn = wn + dim; dn = yn + dim; Ayn = dn + dim; tmp = Ayn + dim; ptmp = tmp + dim; btmp = ptmp + dim; upbt = l_precon ? btmp : bt; /*--------------------------------------------------------------------------*/ /*--- Initalization ------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ if (dnrm2(dim, b, 1) < TOL) { INFO(oem->info,2,"b == 0, x = 0 is the solution of the linear system\n"); dset(dim, 0.0, x, 1); oem->initial_residual = oem->residual = 0.0; return(0); } (*mv)(mvd, dim, x, xt); dcopy(dim, b, 1, bt, 1); daxpy(dim, -1.0, xt, 1, bt, 1); if (l_precon) { dcopy(dim, bt, 1, upbt, 1); (*l_precon)(l_pd, dim, bt); } dset(dim, 0.0, xt, 1); dcopy(dim, bt, 1, wn, 1); drandn(dim, rt, 1); dset(dim, 0.0, vn, 1); dset(dim, 0.0, yn, 1); dset(dim, 0.0, Ayn, 1); tau = ddot(dim, bt, 1, bt, 1); /*--------------------------------------------------------------------------*/ /*--- check initial residual ---------------------------------------------*/ /*--------------------------------------------------------------------------*/ resn = sqrt(ddot(dim, bt, 1, upbt, 1)); START_INFO(oem); if (SOLVE_INFO(oem, 0, oem->initial_residual = resn, &old_res, ws)) return(0); /*--------------------------------------------------------------------------*/ /*--- Iteration ----------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ for (iter = 1; iter <= oem->max_iter; iter++) { flag = 0; /*--------------------------------------------------------------------------*/ /*--- Compute \beta_{n-1} and \rho_{n-1} ---------------------------------*/ /*--------------------------------------------------------------------------*/ dtmp = ddot(dim, rt, 1, wn, 1); beta = dtmp / rho; rho = dtmp; /*--------------------------------------------------------------------------*/ /*--- Compute \y_{2n-1}, v_{n-1}, and A y_{2n-1} -------------------------*/ /*--------------------------------------------------------------------------*/ dxpay(dim, Ayn, 1, beta, vn, 1); dxpay(dim, wn, 1, beta, yn, 1); mult = yn; if (r_precon) { dcopy(dim, yn, 1, ptmp, 1); (*r_precon)(r_pd, dim, ptmp); mult = ptmp; } (*mv)(mvd, dim, mult, tmp); if (l_precon) (*l_precon)(l_pd, dim, tmp); dxpay(dim, tmp, 1, beta, vn, 1); /*--------------------------------------------------------------------------*/ /*--- Compute \sigma{n-1} and check for breakdowns -----------------------*/ /*--------------------------------------------------------------------------*/ dtmp = ddot(dim, rt, 1, vn, 1); if (dtmp==0.0 || rho==0.0) { ierr = 8; break; } /*--------------------------------------------------------------------------*/ /*--- Compute \alpha_{n-1}, d_{2n-1} and w_{2n} --------------------------*/ /*--------------------------------------------------------------------------*/ alpha = rho / dtmp; dtmp = var * eta / alpha; dxpay(dim, yn, 1, dtmp, dn, 1); daxpy(dim, -alpha, tmp, 1, wn, 1); /*--------------------------------------------------------------------------*/ /*--- Compute \varepsilon_{2n-1}^2, \eta_{2n-1}^2, c_{2n-1}^2, and -------*/ /*--- \tau_{2n-1}^2 -------*/ /*--------------------------------------------------------------------------*/ dtmp = dnrm2(dim, wn, 1); dtmp = dtmp * dtmp; var = dtmp / tau; dcos = 1.0 / (1.0 + var); tau = dtmp * dcos; eta = alpha * dcos; /*--------------------------------------------------------------------------*/ /*--- Compute x_{2n-1} and the upper bound for its residual norm. --------*/ /*--------------------------------------------------------------------------*/ daxpy(dim, eta, dn, 1, xt, 1); /*--------------------------------------------------------------------------*/ /*--- Compute the residual norm upper bound. ------*/ /*--- If the scaled upper bound is within one order of magnitude of ------*/ /*--- the target convergence norm, compute the true residual norm. ------*/ /*--------------------------------------------------------------------------*/ unrm = sqrt(tau * (double)(2*iter)); uchk = unrm; if (tres!=0 || unrm<=10.0*oem->tolerance) { mult = xt; if (r_precon) { dcopy(dim, xt, 1, ptmp, 1); (*r_precon)(r_pd, dim, ptmp); mult = ptmp; } (*mv)(mvd, dim, mult, tmp); if (l_precon) { dcopy(dim, tmp, 1, ptmp, 1); dxpay(dim, upbt, 1, -1.0, ptmp, 1); (*l_precon)(l_pd, dim, tmp); dxpay(dim, bt, 1, -1.0, tmp, 1); resn = ddot(dim, tmp, 1, ptmp, 1); resn = sqrt(resn); } else { dxpay(dim, bt, 1, -1.0, tmp, 1); resn = dnrm2(dim, tmp, 1); } uchk = resn; flag = 1; } /*--------------------------------------------------------------------------*/ /*--- Check for convergence or termination. Stop if: ----*/ /*--- 1. algorithm converged; ----*/ /*--- 2. the residual norm upper bound is smaller than the computed ----*/ /*--- residual norm by a factor of at least 100. ----*/ /*--------------------------------------------------------------------------*/ if (resn <= oem->tolerance) { ierr = 0; break; } else if (100.0*unrmtolerance || iter>=oem->max_iter) { mult = xt; if (r_precon) { dcopy(dim, xt, 1, ptmp, 1); (*r_precon)(r_pd, dim, ptmp); mult = ptmp; } (*mv)(mvd, dim, mult, tmp); if (l_precon) { dcopy(dim, tmp, 1, ptmp, 1); dxpay(dim, upbt, 1, -1.0, ptmp, 1); (*l_precon)(l_pd, dim, tmp); dxpay(dim, bt, 1, -1.0, tmp, 1); resn = ddot(dim, tmp, 1, ptmp, 1); resn = sqrt(resn); } else { dxpay(dim, bt, 1, -1.0, tmp, 1); resn = dnrm2(dim, tmp, 1); } uchk = resn; flag = 1; } /*--------------------------------------------------------------------------*/ /*--- Check for convergence or termination. Stop if: ----*/ /*--- 1. algorithm converged; ----*/ /*--- 2. the residual norm upper bound is smaller than the computed ----*/ /*--- residual norm by a factor of at least 100; ----*/ /*--- 3. algorithm exceeded the iterations limit. ----*/ /*--------------------------------------------------------------------------*/ if (resn <= oem->tolerance) { ierr = 0; break; } else if (100.0*unrm=oem->max_iter) { ierr = 4; } } if (iter > oem->max_iter) iter--; /*--------------------------------------------------------------------------*/ /*--- save solution in x --------------------------------------------------*/ /*--------------------------------------------------------------------------*/ mult = xt; if (!r_precon) daxpy(dim, 1.0, xt, 1, x, 1); else if (flag && !l_precon) { daxpy(dim, 1.0, ptmp, 1, x, 1); mult = ptmp; } else { (*r_precon)(r_pd, dim, xt); daxpy(dim, 1.0, xt, 1, x, 1); } /*--------------------------------------------------------------------------*/ /*--- check final residual -----------------------------------------------*/ /*--------------------------------------------------------------------------*/ if (!flag) { (*mv)(mvd, dim, mult, tmp); if (l_precon) { dcopy(dim, tmp, 1, ptmp, 1); dxpay(dim, upbt, 1, -1.0, ptmp, 1); (*l_precon)(l_pd, dim, tmp); dxpay(dim, bt, 1, -1.0, tmp, 1); resn = ddot(dim, tmp, 1, ptmp, 1); resn = sqrt(resn); } else { dxpay(dim, b, 1, -1.0, tmp, 1); resn = dnrm2(dim, tmp, 1); } } if (!ierr) { SOLVE_INFO(oem, iter, resn, &old_res, ws); return(iter); } else if (ierr==4) { BREAK_INFO(oem,"The algorithm did not converge.", iter, resn, &old_res, ws); return(iter); } else if (ierr==8) { BREAK_INFO(oem,"The algorithm broke down.", iter, resn, &old_res, ws); return(iter); } else { BREAK_INFO(oem,"Unknown error code.", iter, resn, &old_res, ws); return(iter); } return(0); /* statement never reached!!! */ } alberta-2.0.1/alberta_util/src/alberta_util_intern.h0000644000042300001440000000620710676723601017507 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA_UTIL: tools for messages, memory allocation, parameters, etc. */ /* */ /* file: alberta_util_intern.h */ /* */ /* description: internal header file of the ALBERTA_UTIL package */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #ifndef _ALBERTA_UTIL_INTERN_H_ #define _ALBERTA_UTIL_INTERN_H_ #ifdef __cplusplus extern "C" { #endif /*--------------------------------------------------------------------------*/ /* functions for printing information (file info.c) */ /*--------------------------------------------------------------------------*/ void start_info(const char *, OEM_DATA *); void break_info(const char *, OEM_DATA *, const char *, int, REAL, REAL *, WORKSPACE *); int solve_info(const char *, OEM_DATA *, int, REAL, REAL *, WORKSPACE *); #define START_INFO(oem) start_info(funcName, oem) #define BREAK_INFO(oem,st,it,res,ores,ws)\ break_info(funcName,oem,st,it,res,ores,ws) #define SOLVE_INFO(oem,it,res,ores,ws) solve_info(funcName,oem,it,res,ores,ws) WORKSPACE *check_workspace(const char *, const char *, int, size_t, WORKSPACE *); void free_oem_workspace(WORKSPACE *ws, OEM_DATA *oem); #define CHECK_WORKSPACE(size,ws)\ check_workspace(funcName,__FILE__,__LINE__,size,ws) #ifdef __cplusplus } #endif #endif /* _ALBERTA_UTIL_INTERN_H_ */ alberta-2.0.1/alberta/0000777000042300001440000000000011067147342011540 500000000000000alberta-2.0.1/alberta/Makefile.am0000644000042300001440000000001610676723577013524 00000000000000SUBDIRS = src alberta-2.0.1/alberta/Makefile.in0000644000042300001440000004065411067146146013533 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = alberta DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in AUTHORS NEWS \ THANKS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/AUTHORS0000644000042300001440000000124110676723577012541 00000000000000ALBERTA: an Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. authors: Alfred Schmidt Zentrum fuer Technomathematik Fachbereich 3 Mathematik/Informatik Universitaet Bremen Bibliothekstr. 2 D-28359 Bremen, Germany Kunibert G. Siebert Institut fuer Mathematik Universitaet Augsburg Universitaetsstr. 14 D-86159 Augsburg, Germany http://www.mathematik.uni-freiburg.de/IAM/ALBERTA (c) by A. Schmidt and K.G. Siebert (1996-2003) alberta-2.0.1/alberta/NEWS0000644000042300001440000000551210676723577012175 00000000000000ALBERTA: an Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. We have tried to minimize the number of (backward) incompatibilities when improving ALBERT(A). Nevertheless, some incompatibilities occured, but it is easy to adapt sources from ALBERT-1.0 to ALBERTA-1.2. Most important changes when upgrading from ALBERT-1.0 to ALBERTA-1.2: - all strings "albert" have been changed into "alberta": * albert.h --> alberta.h * albert_util.h --> alberta_util.h * ALBERT_ALLOC --> ALBERTA_ALLOC etc. for a global change of albert into alberta (and ALBERT into ALBERTA) use the shell script albert2alberta which can be downloaded from http://www.mathematik.uni-freiburg.de/ALBERTA - ALBERTA-1.2 now is also available in 1d - the third argument of oem_solve_[sd], a pointer to a DOF_SCHAR_VEC with boundary types of DOFs, has been removed: oem_solve_s(matrix, f_h, nil, u_h, solver, tol, icon, restart, miter, info); --> oem_solve_s(matrix, f_h, u_h, solver, tol, icon, restart, miter, info); (taken from DEMO/src/Common/ellipt.c) - prototypes of traverse_{first,next,neighbour}(), have changed. Arguments and values EL_INFO * have been changed to const EL_INFO *. A variable declaration EL_INFO *el_info; for an el_info pointer used by the non-recursive traversal routines has to be changed to const EL_INFO *el_info; - The definition of the PRECON data structure has been redesigned. This does not affect the model problems but has to be adjusted when a new preconditioner has been implemented in ALBERT-1.0. Please refer to the book "ALBERTA: An Adaptive Finite Element Toolbox" or to the header file "alberta.h" - names of members in the MULTI_GRID_INFO data structure changed: * restrict --> mg_restrict (will become a keyword in C) * prolongate --> mg_prolongate * resid --> mg_resid - ALBERTA now supports the interface to gltools-2-4. The interface to gltools-2-3 is no longer supported - the name of the macro SET_VAL_DOW has changed into SET_DOW SET_VAL_DOW(a, x) --> SET_DOW(a, x) - the prototype of the function get_face_normal() changed from REAL get_face_normal(const REAL_D coord[N_VERTICES], int i, REAL *normal); --> REAL get_face_normal(const REAL_D *el_info, int i, REAL *normal); and now returns the *OUTER* unit normal (no longer the inner one). - in the definition of graph_line() the order of arguments is changed (optional values last...) void graph_line(GRAPH_WINDOW, const GRAPH_RGBCOLOR, float, const REAL [2], const REAL [2]); --> void graph_line(GRAPH_WINDOW, const REAL [2], const REAL [2], const GRAPH_RGBCOLOR, float); - new function void graph_point(GRAPH_WINDOW, const REAL [2], const GRAPH_RGBCOLOR, float); is now available alberta-2.0.1/alberta/THANKS0000644000042300001440000000117410676723577012411 00000000000000Starting first as a two-men-project, ALBERTA is evolving and now there are more people maintaining and extending it. We are grateful for a lot of substantial contributions coming from: Michael Fried, who was the first brave man besides us to use ALBERT, Claus-Justus Heine, Daniel K\"oster, and Oliver Kriessl. Daniel and Claus in particular set up the GNU configure tools for an easy, platform-independent installation of the software. We are indebted to the authors of the gltools, especially J\"urgen Fuhrmann, and also to the developers of GRAPE, especially Bernard Haasdonk, Robert Kl\"ofkorn, Mario Ohlberger, and Martin Rumpf. alberta-2.0.1/alberta/src/0000777000042300001440000000000011067147344012331 500000000000000alberta-2.0.1/alberta/src/Makefile.am0000644000042300001440000000126510676732134014307 00000000000000SUBDIRS = Common # DIM_OF_WORLD=1 if ALBERTA_1 SUBDIRS += alberta_1d if ALBERTA_DEBUG SUBDIRS += alberta_1d_debug endif endif # DIM_OF_WORLD=2 if ALBERTA_2 SUBDIRS += alberta_2d if ALBERTA_DEBUG SUBDIRS += alberta_2d_debug endif endif # DIM_OF_WORLD=3 if ALBERTA_3 SUBDIRS += alberta_3d if ALBERTA_DEBUG SUBDIRS += alberta_3d_debug endif endif # EXTRA_DIST does _not_ work properly with subdirs: automake likes to # copy them twice which cannot work with read-only sources. # # EXTRA_DIST = 0d 1d 2d 3d Common dist-hook: @echo Copying 0d, 1d, 2d and 3d to $(distdir) for i in 0 1 2 3 ; do \ mkdir -p $(distdir)/$${i}d ; \ cp -pR $(srcdir)/$${i}d/*.[ch] $(distdir)/$${i}d/ ; \ done alberta-2.0.1/alberta/src/Makefile.in0000644000042300001440000004263411067146147014323 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # DIM_OF_WORLD=1 @ALBERTA_1_TRUE@am__append_1 = alberta_1d @ALBERTA_1_TRUE@@ALBERTA_DEBUG_TRUE@am__append_2 = alberta_1d_debug # DIM_OF_WORLD=2 @ALBERTA_2_TRUE@am__append_3 = alberta_2d @ALBERTA_2_TRUE@@ALBERTA_DEBUG_TRUE@am__append_4 = alberta_2d_debug # DIM_OF_WORLD=3 @ALBERTA_3_TRUE@am__append_5 = alberta_3d @ALBERTA_3_TRUE@@ALBERTA_DEBUG_TRUE@am__append_6 = alberta_3d_debug subdir = alberta/src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = Common alberta_1d alberta_1d_debug alberta_2d \ alberta_2d_debug alberta_3d alberta_3d_debug DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = Common $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # EXTRA_DIST does _not_ work properly with subdirs: automake likes to # copy them twice which cannot work with read-only sources. # # EXTRA_DIST = 0d 1d 2d 3d Common dist-hook: @echo Copying 0d, 1d, 2d and 3d to $(distdir) for i in 0 1 2 3 ; do \ mkdir -p $(distdir)/$${i}d ; \ cp -pR $(srcdir)/$${i}d/*.[ch] $(distdir)/$${i}d/ ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/Common/0000777000042300001440000000000011067147343013560 500000000000000alberta-2.0.1/alberta/src/Common/alberta.h0000644000042300001440000031503610701404612015254 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: alberta.h */ /* */ /* */ /* description: public header file of the ALBERTA package */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2005) */ /* (c) by D. Koester (2002-2005) */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Global configuration header */ /*--------------------------------------------------------------------------*/ #ifdef HAVE_CONFIG_H /* only defined during build of ALBERTA libs */ #include #endif /*--------------------------------------------------------------------------*/ /* Header-File for ALBERTA utilities */ /*--------------------------------------------------------------------------*/ #ifndef _ALBERTA_H_ #define _ALBERTA_H_ #include "alberta_util.h" #ifdef __cplusplus extern "C" { #endif #define ALBERTA_VERSION "ALBERTA: Version 2.0" /*--------------------------------------------------------------------------*/ /* Definition of the space dimension and of parameters depending on the */ /* space dimension: */ /* */ /* DIM_OF_WORLD: space dimension */ /* */ /* The ?D-suffix signals different simplex dimensions (formerly ==DIM). */ /*--------------------------------------------------------------------------*/ #ifndef DIM_OF_WORLD # error DIM_OF_WORLD UNDEFINED #endif #ifndef ALBERTA_DEBUG #warning ALBERTA_DEBUG WAS NOT DEFINED! DEFAULTING TO 0. #define ALBERTA_DEBUG 0 #endif /* The master dimension limit */ #define DIM_MAX 3 /* Various constants for dimension dependent geometrical quantities */ #define N_VERTICES(DIM) ((DIM)+1) #define N_EDGES(DIM) ((DIM)*((DIM)+1)/2) #define N_WALLS(DIM) ((DIM)+1) /* number of codim 1 subsimplexes */ #define N_FACES(DIM) (((DIM) == 3) * N_WALLS(DIM)) #define N_NEIGH(DIM) (((DIM) != 0) * N_WALLS(DIM)) #define DIM_FAC(DIM) ((DIM) < 2 ? 1 : (DIM) == 2 ? 2 : 6) #define N_VERTICES_0D N_VERTICES(0) #define N_EDGES_0D N_EDGES(0) #define N_FACES_0D N_FACES(0) #define N_NEIGH_0D N_NEIGH(0) #define N_WALLS_0D N_WALLS(0) #define N_VERTICES_1D N_VERTICES(1) #define N_EDGES_1D N_EDGES(1) #define N_FACES_1D N_FACES(1) #define N_NEIGH_1D N_NEIGH(1) #define N_WALLS_1D N_WALLS(1) #define N_VERTICES_2D N_VERTICES(2) #define N_EDGES_2D N_EDGES(2) #define N_FACES_2D N_FACES(2) #define N_NEIGH_2D N_NEIGH(2) #define N_WALLS_2D N_WALLS(2) #define N_VERTICES_3D N_VERTICES(3) #define N_EDGES_3D N_EDGES(3) #define N_FACES_3D N_FACES(3) #define N_NEIGH_3D N_NEIGH(3) #define N_WALLS_3D N_WALLS(3) #define N_VERTICES_MAX N_VERTICES(DIM_MAX) #define N_EDGES_MAX N_EDGES(DIM_MAX) #define N_FACES_MAX N_FACES(DIM_MAX) #define N_NEIGH_MAX N_NEIGH(DIM_MAX) #define N_WALLS_MAX N_WALLS(DIM_MAX) /* N_LAMBDA is the maximal number of barycentric coordinates, formerly DIM+1 */ /* Barycentric coords are often initialized using constant values, therefore */ /* we set this to 4. */ #define N_LAMBDA 4 #define LAMBDA_MAX N_LAMBDA typedef REAL REAL_B[N_LAMBDA]; typedef REAL_B REAL_BB[N_LAMBDA]; typedef REAL REAL_D[DIM_OF_WORLD]; typedef REAL_D REAL_DD[DIM_OF_WORLD]; typedef REAL_D REAL_BD[N_LAMBDA]; typedef struct real_dds REAL_DDS; struct real_dds { REAL_D row0; REAL row1[DIM_OF_WORLD-1]; /* zero size array in case of DOW == 1 */ #if DIM_OF_WORLD > 1 REAL row2[DIM_OF_WORLD-2]; /* zero size array in case of DOW == 2 */ #else REAL row2[0]; #endif }; /*--------------------------------------------------------------------------*/ /* some useful macros depending on DIM_OF_WORLD */ /*--------------------------------------------------------------------------*/ #include "alberta_inlines.h" /*--------------------------------------------------------------------------*/ /* access to element index via element or element_info structure */ /*--------------------------------------------------------------------------*/ #if ALBERTA_DEBUG #define INDEX(el) ((el) ? (el)->index : -1) #else #define INDEX(el) -1 #endif /*--------------------------------------------------------------------------*/ /* access to leaf data (only for leaf elements) */ /*--------------------------------------------------------------------------*/ #define IS_LEAF_EL(el) (!(el)->child[0]) #define LEAF_DATA(el) ((void *)(el)->child[1]) /*--------------------------------------------------------------------------*/ /* boundary types */ /*--------------------------------------------------------------------------*/ #define INTERIOR 0 #define DIRICHLET 1 #define NEUMANN -1 #define IS_NEUMANN(bound) ((bound) <= NEUMANN) #define IS_DIRICHLET(bound) ((bound) >= DIRICHLET) #define IS_INTERIOR(bound) ((bound) == 0) /*--------------------------------------------------------------------------*/ /* node types (indices in n_dof[] vectors, e.g.) */ /*--------------------------------------------------------------------------*/ #define N_NODE_TYPES (DIM_MAX+1) #define VERTEX 0 #define CENTER 1 #define EDGE 2 #define FACE 3 /*--------------------------------------------------------------------------*/ /* basic types of the grid */ /*--------------------------------------------------------------------------*/ typedef signed int DOF; typedef struct el EL; typedef struct macro_el MACRO_EL; typedef struct el_info EL_INFO; typedef struct rc_list_el RC_LIST_EL; typedef struct mesh MESH; typedef struct parametric PARAMETRIC; typedef struct traverse_stack TRAVERSE_STACK; typedef struct adapt_stat ADAPT_STAT; typedef struct adapt_instat ADAPT_INSTAT; #ifndef DOF_ADMIN_DEF typedef struct dof_admin DOF_ADMIN; typedef struct dof_int_vec DOF_INT_VEC; typedef struct dof_dof_vec DOF_DOF_VEC; typedef struct dof_uchar_vec DOF_UCHAR_VEC; typedef struct dof_schar_vec DOF_SCHAR_VEC; typedef struct dof_real_vec DOF_REAL_VEC; typedef struct dof_real_d_vec DOF_REAL_D_VEC; typedef struct dof_ptr_vec DOF_PTR_VEC; typedef struct matrix_row MATRIX_ROW; typedef struct dof_matrix DOF_MATRIX; typedef struct dowb_matrix_row DOWB_MATRIX_ROW; typedef struct dof_dowb_matrix DOF_DOWB_MATRIX; #endif typedef struct bas_fcts BAS_FCTS; typedef struct fe_space FE_SPACE; typedef struct quadrature QUAD; typedef struct quadrature QUADRATURE; typedef struct quad_fast QUAD_FAST; typedef struct macro_data MACRO_DATA; typedef struct node_projection NODE_PROJECTION; typedef struct list_node LIST_NODE; typedef struct traverse_hook TRAVERSE_HOOK; typedef void (*TRAVERSE_HOOK_FCT)(const EL_INFO *el_info, void *hook_data); /* Traverse-hook node. See also add_traverse_hook(), * remove_traverse_hook(). Traverse-Hooks are special hooks * dynamically added and removed from the mesh. The hooks are run * during mesh-traversal prior to calling the element function. They * are intended to hide certain details from the application program, * e.g. to modify basis functions on a per-element basis * (hp-methods?). In principle, the init_element() of the PARAMETRIC * structure could go into a traverse hook. */ struct list_node { LIST_NODE *next; LIST_NODE *prev; }; #define LIST_ENTRY(node, type, nodename) \ ((type *)((ptrdiff_t)node - (ptrdiff_t)&((type *)0)->nodename)) struct traverse_hook { TRAVERSE_HOOK_FCT function; void *data; /* Per hook data. */ LIST_NODE node; /* doubly-linked list for efficient add and remove */ }; /*--------------------------------------------------------------------------*/ /* node projection descriptor: */ /* a function pointer which calculates the projected location of a new */ /* vertex resulting from refinement. */ /* curved boundary */ /* type: one of INTERIOR : DIRICHLET : NEUMANN */ /*--------------------------------------------------------------------------*/ struct node_projection { void (*func)(REAL_D old_coord, const EL_INFO *eli, const REAL_B lambda); }; /*--------------------------------------------------------------------------*/ /* one single element (triangle) of the grid: */ /*--------------------------------------------------------------------------*/ /* */ /* position of the nodes in 1d: */ /* */ /* 0 _____ 1 or 0 _____ 1 */ /* 2 */ /* */ /* child[0] child[1] */ /* refinement: 0 _____ 1 0 ___ 1 0 ___ 1 */ /* 2 2 */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* position of the nodes in 2d */ /* 2 2 2 2 */ /* /\ or /\ or /\ or /\ */ /* / \ 4/ \ 3 / \ 4/ \ 3 */ /* / \ / \ / 3 \ / 6 \ */ /* 0/______\1 0/______\1 0/______\1 0/______\1 */ /* 5 5 */ /* */ /* refinement: 2 child[0] 0 1 child[1] */ /* /\ /| |\ */ /* 4/ \ 3 --> 5/ |4 3| \ 5 */ /* / 6 \ /6 | |6 \ */ /* 0/______\1 1/___| |___\0 */ /* 5 3 2 2 4 */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* 3d refinement: vertex numbering after (Baensch +) Kossaczky */ /* */ /* edges: */ /* E0: between V0, V1 */ /* E1: between V0, V2 */ /* E2: between V0, V3 */ /* E3: between V1, V2 */ /* E4: between V1, V3 */ /* E5: between V2, V3 */ /* */ /* Always edge 0 (between vertices 0 and 1) is bisected. */ /* */ /* V1 */ /* -+ */ /* ----- || */ /* E0 ------ | | */ /* ------ | | E3 */ /* ------ | | */ /* ------ | | */ /* V0 +. . . . . . . . . . . . . . | . . . | */ /* --- (E1) | + V2 */ /* --- | / */ /* --- |E4 / */ /* --- | / */ /* E2 --- | / E5 */ /* --- | / */ /* --- | / */ /* ---|/ */ /* + */ /* V3 */ /* */ /*--------------------------------------------------------------------------*/ /* child: pointers to the two children of the element */ /* if (child[0]==child[1]==nil) element is a leaf of the */ /* tree */ /* dof: vector of pointers to dof vectors :-) */ /* new_coord: in case of curved boundary, coords of ref.edge midpoint */ /* index: global element index (only for test purposes) */ /* mark: element is a leaf: */ /* mark == 0 do not refine/coarsen */ /* mark > 0 refine (mark times) */ /* mark < 0 may be coarsened (mark times) */ /*--------------------------------------------------------------------------*/ struct el { EL *child[2]; DOF **dof; S_CHAR mark; REAL *new_coord; #if ALBERTA_DEBUG int index; #endif }; /*--------------------------------------------------------------------------*/ /* child_vertex_3d[el_type][child][i] = */ /* parent's local vertex index of new vertex i */ /* 4 stands for the newly generated vertex */ /*--------------------------------------------------------------------------*/ /* child_edge_3d[el_type][child][i] = */ /* parent's local edge index of new edge i */ /* new edge 2 is half of old edge 0, */ /* new edges 4,5 are really new edges, and value is different: */ /* child_edge_3d[][][4,5] = index of same edge in other child */ /*--------------------------------------------------------------------------*/ /* vertex_of_edge_?d[edge][i], i = 1,2 are the two vertices of edge */ /*--------------------------------------------------------------------------*/ extern int vertex_of_edge_2d[3][2]; /* defined in traverse_r.c */ extern int child_vertex_3d[3][2][4]; /* defined in traverse_r.c */ extern int child_edge_3d[3][2][6]; /* defined in traverse_r.c */ extern int vertex_of_edge_3d[6][2]; /* defined in traverse_r.c */ /*--------------------------------------------------------------------------*/ /* edge_of_dofs_3d[i][j]: gives the local index of edge with vertices i, j */ /*--------------------------------------------------------------------------*/ extern U_CHAR edge_of_dofs_3d[4][4]; /* defined in refine.c */ /*--------------------------------------------------------------------------*/ /* PARAMETRIC structure, entry in MESH structure */ /* description of parametric meshes and elements */ /*--------------------------------------------------------------------------*/ struct parametric { char *name; /* textual description analogous to BAS_FCTS. */ int (*init_element)(const EL_INFO *info, const PARAMETRIC *parametric); /* init_el = 0 : non-parametric element */ /* init_el = 1 : parametric element */ void (*coord_to_world)(const EL_INFO *info, const QUAD *quad, int n, const REAL lambda[][N_LAMBDA], REAL_D *world); int (*world_to_coord)(const EL_INFO *info, int n, const REAL_D world[], REAL lambda[][N_LAMBDA]); void (*det)(const EL_INFO *info, const QUAD *quad, int n, const REAL lambda[][N_LAMBDA], REAL dets[]); void (*grd_lambda)(const EL_INFO *info, const QUAD *quad, int n, const REAL lambda[][N_LAMBDA], REAL_D grd_lam[][N_LAMBDA], REAL dets[]); int not_all; /* true: some elements may be non-parametric */ int use_reference_mesh; /* true: standard routines coord_to_world, etc. */ /* may be used to get data about the reference */ /* triangulation. Set to "false" by default. */ /* private entries */ void (*inherit_parametric)(MESH *slave); void *data; }; /*--------------------------------------------------------------------------*/ /* additional information to elements during hierarchy traversal */ /*--------------------------------------------------------------------------*/ /* mesh: pointer to the mesh structure */ /* coord: world coordinates of the nodes */ /* parametric case is handled via dof_vector */ /* vertex_bound: boundary type of the vertices */ /* edge_bound: boundary type of the edges */ /* face_bound: boundary type of the faces */ /* projection: node projection function for the new vertex which would */ /* result from a refinement of the current element. */ /* neigh: pointer to the adjacent elements */ /* nil-pointer for a part of the boundary */ /* opp_coord: world coordinates of opposite vertices */ /* opp_vertex: local indices of opposite vertices */ /* orientation: orientation of the tetrahedron (+1|-1) (only 3d) */ /*--------------------------------------------------------------------------*/ struct el_info { MESH *mesh; REAL_D coord[N_VERTICES_MAX]; const MACRO_EL *macro_el; EL *el, *parent; FLAGS fill_flag; S_CHAR vertex_bound[N_VERTICES_MAX]; S_CHAR edge_bound[N_EDGES_MAX]; S_CHAR face_bound[N_FACES_MAX]; NODE_PROJECTION *active_projection; NODE_PROJECTION *projections[N_NEIGH_MAX + 1]; int level; EL *neigh[N_NEIGH_MAX]; U_CHAR opp_vertex[N_NEIGH_MAX]; U_CHAR el_type; REAL_D opp_coord[N_NEIGH_MAX]; S_CHAR orientation; }; /* A macro for accessing the boundary type of the i-th wall, * i.e. codim one sub-simplex. */ #define WALL_BOUND(eli, dim, i) \ ((dim) == 1 \ ? (eli)->vertex_bound[i] \ : ((dim) == 2 \ ? (eli)->edge_bound[i] \ : (eli)->face_bound[i])) /*--------------------------------------------------------------------------*/ /* RC_LIST_EL structure to describe a refinement/coarsening patch. */ /* el_info: contains information about the patch element. This is not*/ /* a pointer since EL_INFO structures are often overwritten */ /* during mesh traversal. */ /* no: index of the patch element in the patch. */ /* flag: for coarsening: true iff the coarsening edge of the */ /* patch element is the coarsening edge of the patch. */ /* neigh: neighbours to the right/left in the orientation of the */ /* edge, or nil pointer for a boundary face. (dim == 3 only)*/ /* opp_vertex: the opposite vertex of neigh[0/1]. (dim == 3 only) */ /*--------------------------------------------------------------------------*/ struct rc_list_el { EL_INFO el_info; int no; int flag; RC_LIST_EL *neigh[2]; int opp_vertex[2]; }; /*--------------------------------------------------------------------------*/ /* flags, which information should be present in the EL_INFO structure */ /*--------------------------------------------------------------------------*/ #define FILL_NOTHING 0x00L #define FILL_COORDS 0x01L #define FILL_BOUND 0x02L #define FILL_NEIGH 0x04L #define FILL_OPP_COORDS 0x08L #define FILL_ORIENTATION 0x10L #define FILL_EL_TYPE 0x20L #define FILL_PROJECTION 0x40L #define FILL_ANY(mesh) \ (0x01L|0x02L|0x04L|0x08L|0x10L|0x20L|0x40L|(mesh)->active_hooks) /* Hook-queue flags */ #define HOOK_QUEUE_OFFSET 24 enum hook_queue_enum { HOOK_QUEUE_0 = 0, BAS_FCTS_HOOK_QUEUE = HOOK_QUEUE_0, HOOK_QUEUE_1, HOOK_QUEUE_2, HOOK_QUEUE_3, HOOK_QUEUE_4, HOOK_QUEUE_5, HOOK_QUEUE_6, HOOK_QUEUE_7, }; /* Note: definition of enum must come before typedef for C++ compilation. */ typedef enum hook_queue_enum HOOK_QUEUE_ENUM; #define RUN_HOOKS_0 (1UL << HOOK_QUEUE_0) #define RUN_BAS_FCTS_HOOKS RUN_HOOKS_0 #define RUN_HOOKS_1 (1UL << HOOK_QUEUE_1) #define RUN_HOOKS_2 (1UL << HOOK_QUEUE_2) #define RUN_HOOKS_3 (1UL << HOOK_QUEUE_3) #define RUN_HOOKS_4 (1UL << HOOK_QUEUE_4) #define RUN_HOOKS_5 (1UL << HOOK_QUEUE_5) #define RUN_HOOKS_6 (1UL << HOOK_QUEUE_6) #define RUN_HOOKS_7 (1UL << HOOK_QUEUE_7) /*--------------------------------------------------------------------------*/ /* flags for mesh traversal */ /*--------------------------------------------------------------------------*/ #define CALL_EVERY_EL_PREORDER 0x0100L #define CALL_EVERY_EL_INORDER 0x0200L #define CALL_EVERY_EL_POSTORDER 0x0400L #define CALL_LEAF_EL 0x0800L #define CALL_LEAF_EL_LEVEL 0x1000L #define CALL_EL_LEVEL 0x2000L #define CALL_MG_LEVEL 0x4000L /* used in multigrid methods */ #define TEST_FLAG(flags, el_info) \ TEST_EXIT(!((((el_info)->fill_flag)^(flags)) & (flags)),\ "flag %d not set\n", (flags)) #if ALBERTA_DEBUG==1 # define DEBUG_TEST_FLAG(flags, el_info) \ if((((el_info)->fill_flag)^(flags)) & (flags)) \ print_error_funcname(funcName, __FILE__, __LINE__),\ print_error_msg_exit("flag %d not set\n", (flags)) #else # define DEBUG_TEST_FLAG(flags, el_info) do { funcName = funcName; } while (0) #endif /*--------------------------------------------------------------------------*/ /* one single element of the macro triangulation: */ /*--------------------------------------------------------------------------*/ /* el: pointer to the element data of the macro element */ /* coord: world coordinates of the nodes on the macro element */ /* vertex_bound: boundary type of the vertices */ /* edge_bound: boundary type of the edges */ /* face_bound: boundary type of the faces */ /* projection: possible node projection functions for all nodes [0] */ /* or for specific edges or faces (dim > 1), which will */ /* override entry [0]. */ /* index: unique global index of macro element */ /* neigh: pointer to the adjacent macro elements */ /* nil-pointer for a part of the boundary */ /* opp_vertex: local indices of opposite vertices */ /* el_type: type of corresponding element. */ /* orientation: orientation of corresponding element. */ /*--------------------------------------------------------------------------*/ struct macro_el { EL *el; REAL *coord[N_VERTICES_MAX]; S_CHAR vertex_bound[N_VERTICES_MAX]; S_CHAR edge_bound[N_EDGES_MAX]; S_CHAR face_bound[N_FACES_MAX]; NODE_PROJECTION *projection[N_NEIGH_MAX + 1]; int index; MACRO_EL *neigh[N_NEIGH_MAX]; S_CHAR opp_vertex[N_NEIGH_MAX]; U_CHAR el_type; S_CHAR orientation; }; /*--------------------------------------------------------------------------*/ /*--- index based storage of macro triangulations ---*/ /*--------------------------------------------------------------------------*/ struct macro_data { int dim; /* dimension of the elements */ int n_total_vertices; int n_macro_elements; REAL_D *coords; /* Length will be n_total_vertices */ int *mel_vertices; /* mel_vertices[i*n_vertices[dim]+j]: */ /* global index of jth vertex of element i */ int *neigh; /* neigh[i*n_neigh[dim]+j]: */ /* neighbour j of element i or -1 at boundaries */ S_CHAR *boundary; /* boundary[i*n_neigh[dim]+j]: */ /* boundary type of jth vertex/edge/face of element i */ /* WARNING: In 1D the local index 0 corresponds to vertex 1 & vice versa! */ /* (Consistent with macro_data.neigh) */ U_CHAR *el_type; /* el_type[i]: type of element i */ /* only used in 3d! */ }; #ifndef DOF_ADMIN_DEF #define DOF_ADMIN_DEF /*--------------------------------------------------------------------------*/ /* dof handling */ /*--------------------------------------------------------------------------*/ #define DOF_FREE_SIZE 32 #define DOF_UNIT_ALL_FREE 0xFFFFFFFF typedef unsigned int DOF_FREE_UNIT; extern DOF_FREE_UNIT dof_free_bit[DOF_FREE_SIZE]; /* in dof_admin.c */ #define FOR_ALL_DOFS(admin, todo) \ if ((admin)->hole_count == 0) { int dof; \ for (dof = 0; dof < (admin)->used_count; dof++) { todo; } } \ else { DOF_FREE_UNIT _dfu, *_dof_free = (admin)->dof_free; \ int _i, _ibit, dof=0; \ int _n= ((admin)->size_used + DOF_FREE_SIZE-1) / DOF_FREE_SIZE; \ for (_i = 0; _i < _n; _i++) { \ if ((_dfu = _dof_free[_i])) { \ if (_dfu == DOF_UNIT_ALL_FREE) dof += DOF_FREE_SIZE; \ else for (_ibit = 0; _ibit < DOF_FREE_SIZE; _ibit++) { \ if (!(_dfu & dof_free_bit[_ibit])) { todo; } dof++; } } \ else { \ for (_ibit = 0; _ibit < DOF_FREE_SIZE; _ibit++){ todo; dof++;}}}} #define FOR_ALL_FREE_DOFS(admin, todo) \ if ((admin)->hole_count == 0) { int dof; \ for (dof = (admin)->used_count; \ dof < (admin)->size; dof++) { todo; } } \ else { DOF_FREE_UNIT _dfu, *_dof_free = (admin)->dof_free; \ int _i, _ibit, dof=0; \ int _n= ((admin)->size + DOF_FREE_SIZE-1) / DOF_FREE_SIZE; \ for (_i = 0; _i < _n; _i++) { \ if ((_dfu = _dof_free[_i])) { \ if (_dfu == DOF_UNIT_ALL_FREE) \ for (_ibit = 0 ; _ibit < DOF_FREE_SIZE; _ibit++)\ { todo; dof++; } \ else for (_ibit = 0; _ibit < DOF_FREE_SIZE; _ibit++) { \ if (_dfu & dof_free_bit[_ibit]) { todo; } dof++; } } \ else dof += DOF_FREE_SIZE; }} struct dof_admin { MESH *mesh; const char *name; DOF_FREE_UNIT *dof_free; /* flag bit vector */ unsigned int dof_free_size;/* flag bit vector size */ unsigned int first_hole; /* index of first non-zero dof_free entry */ U_CHAR preserve_coarse_dofs; /* preserve non-leaf DOFs or not */ DOF size; /* allocated size of dof_list vector */ DOF used_count; /* number of used dof indices */ DOF hole_count; /* number of FREED dof indices (NOT size-used)*/ DOF size_used; /* > max. index of a used entry */ int n_dof[N_NODE_TYPES]; /* dofs from THIS dof_admin */ int n0_dof[N_NODE_TYPES]; /* dofs from previous dof_admins */ DOF_INT_VEC *dof_int_vec; /* linked list of int vectors */ DOF_DOF_VEC *dof_dof_vec; /* linked list of dof vectors */ DOF_DOF_VEC *int_dof_vec; /* linked list of dof vectors */ DOF_UCHAR_VEC *dof_uchar_vec; /* linked list of u_char vectors */ DOF_SCHAR_VEC *dof_schar_vec; /* linked list of s_char vectors */ DOF_REAL_VEC *dof_real_vec; /* linked list of real vectors */ DOF_REAL_D_VEC *dof_real_d_vec; /* linked list of real_d vectors */ DOF_PTR_VEC *dof_ptr_vec; /* linked list of void * vectors */ DOF_MATRIX *dof_matrix; /* linked list of matrices */ DOF_DOWB_MATRIX *dof_dowb_matrix; /* linked list of block matrices */ /*--------------------------------------------------------------------------*/ /*--- pointer for administration; don't touch! ---*/ /*--------------------------------------------------------------------------*/ void *mem_info; }; /*--------------------------------------------------------------------------*/ /* dof vector structures */ /*--------------------------------------------------------------------------*/ /* next: pointer to next structure containing vector of same type */ /* fe_space: pointer to fe_space structure */ /* refine_interpol: dof interpolation during refinement */ /* coarse_restrict: restriction of linear functionals evaluated on a finer */ /* grid and stored in dof vector to the coarser grid */ /* during coarsening */ /* or dof interpolation during coarsening */ /* size: allocated size of vector */ /* vec[]: vector entries (entry is used if dof index is used) */ /*--------------------------------------------------------------------------*/ struct dof_int_vec { DOF_INT_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; int *vec; void (*refine_interpol)(DOF_INT_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_INT_VEC *, RC_LIST_EL *, int n); /*--------------------------------------------------------------------------*/ /*--- pointer for administration; don't touch! ---*/ /*--------------------------------------------------------------------------*/ void *mem_info; }; struct dof_dof_vec { DOF_DOF_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; DOF *vec; void (*refine_interpol)(DOF_DOF_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_DOF_VEC *, RC_LIST_EL *, int n); void *mem_info; }; struct dof_uchar_vec { DOF_UCHAR_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; U_CHAR *vec; void (*refine_interpol)(DOF_UCHAR_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_UCHAR_VEC *, RC_LIST_EL *, int n); void *mem_info; }; struct dof_schar_vec { DOF_SCHAR_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; S_CHAR *vec; void (*refine_interpol)(DOF_SCHAR_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_SCHAR_VEC *, RC_LIST_EL *, int n); void *mem_info; }; struct dof_real_vec { DOF_REAL_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; REAL *vec; void (*refine_interpol)(DOF_REAL_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_REAL_VEC *, RC_LIST_EL *, int n); void *mem_info; }; struct dof_real_d_vec { DOF_REAL_D_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; REAL_D *vec; void (*refine_interpol)(DOF_REAL_D_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_REAL_D_VEC *, RC_LIST_EL *, int n); void *mem_info; }; struct dof_ptr_vec { DOF_PTR_VEC *next; const FE_SPACE *fe_space; const char *name; DOF size; void **vec; void (*refine_interpol)(DOF_PTR_VEC *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_PTR_VEC *, RC_LIST_EL *, int n); void *mem_info; }; /*--------------------------------------------------------------------------*/ /* sparse matrix with one row for each dof, */ /* entries are either REAL or REAL_DD */ /*--------------------------------------------------------------------------*/ /* next: pointer to next matrix (linked list in MESH) */ /* matrix_row[]: pointers to row structures (or nil if row index is unused)*/ /* size: currently allocated size of matrix_row[] */ /*--------------------------------------------------------------------------*/ struct dof_matrix { DOF_MATRIX *next; const FE_SPACE *row_fe_space; const FE_SPACE *col_fe_space; const char *name; MATRIX_ROW **matrix_row; /* lists of matrix entries */ DOF size; /* size of vector matrix_row */ void (*refine_interpol)(DOF_MATRIX *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_MATRIX *, RC_LIST_EL *, int n); void *mem_info; }; /* "flag" values for "type" component */ #define DOWBM_FULL (1 << 0) #define DOWBM_SYMM (1 << 1) #define DOWBM_DIAG (1 << 2) typedef enum dowbm_type { dowbm_full = DOWBM_FULL, dowbm_diag = DOWBM_DIAG, dowbm_symm = DOWBM_SYMM } DOWBM_TYPE; struct dof_dowb_matrix { DOF_DOWB_MATRIX *next; const FE_SPACE *row_fe_space; const FE_SPACE *col_fe_space; const char *name; DOWB_MATRIX_ROW **matrix_row; /* lists of matrix entries */ DOF size; /* size of vector matrix_row */ DOWBM_TYPE type; void (*refine_interpol)(DOF_DOWB_MATRIX *, RC_LIST_EL *, int n); void (*coarse_restrict)(DOF_DOWB_MATRIX *, RC_LIST_EL *, int n); void *mem_info; }; /*--------------------------------------------------------------------------*/ /* row structure for sparse matrix, with either REAL or REAL_DD entries. */ /*--------------------------------------------------------------------------*/ /* next: pointer to next structure containing entries of same row */ /* col[]: column indices of entries (if >= 0; else unused) */ /* entry[]: matrix entries */ /*--------------------------------------------------------------------------*/ #define ROW_LENGTH 9 struct matrix_row { MATRIX_ROW *next; DOF col[ROW_LENGTH]; /* column indices */ REAL entry[ROW_LENGTH]; /* matrix entries */ }; /* full featured blocks */ struct dowb_matrix_row { DOWB_MATRIX_ROW *next; DOF col[ROW_LENGTH]; /* column indices */ union { REAL_DD full[0]; /* full */ REAL_DDS symm[0]; /* symmetric, only upper triangle is stored */ REAL_D diag[0]; /* diagonal */ } entry; /* matrix entries */ }; /* shared by DOF_MATRIX and DOF_DOWB_MATRIX */ #define ENTRY_USED(col) ((col) >= 0) #define ENTRY_NOT_USED(col) ((col) < 0) #define UNUSED_ENTRY -1 #define NO_MORE_ENTRIES -2 #ifndef __CBLAS_H__ typedef enum { NoTranspose, Transpose, ConjugateTranspose } MatrixTranspose; #endif #endif /* DOF_ADMIN_DEF */ /*--------------------------------------------------------------------------*/ /* Here comes the MESH (giving access to the whole triangulation) */ /*--------------------------------------------------------------------------*/ struct mesh { const char *name; int dim; int n_vertices; int n_elements; int n_hier_elements; int n_edges; /* Only used for dim > 1 */ int n_faces; /* Only used for dim == 3 */ int max_edge_neigh; /* Only used for dim == 3 */ int n_macro_el; MACRO_EL *macro_els; REAL diam[DIM_OF_WORLD]; PARAMETRIC *parametric; DOF_ADMIN **dof_admin; int n_dof_admin; int n_dof_el; /* sum of all dofs from all admins */ int n_dof[N_NODE_TYPES]; /* sum of vertex/edge/... dofs from */ /* all admins */ int n_node_el; /* number of used nodes on each element */ int node[N_NODE_TYPES]; /* index of first vertex/edge/... node*/ int cookie; /* changed on each refine/coarsen. Use this to */ /* check consistency of meshes and DOF vectors when reading from files.*/ /*--------------------------------------------------------------------------*/ /*--- pointer for administration; don't touch! ---*/ /*--------------------------------------------------------------------------*/ void *mem_info; /* Linked list of hook functions to be run during mesh-traverse * before the per-element method is called. */ LIST_NODE traverse_hooks[8]; FLAGS active_hooks; }; /*--------------------------------------------------------------------------*/ /* stack data structure for non-recursive mesh traversal */ /*--------------------------------------------------------------------------*/ struct traverse_stack { MESH *traverse_mesh; int traverse_level; FLAGS traverse_fill_flag; const MACRO_EL *traverse_mel; int stack_size; int stack_used; EL_INFO *elinfo_stack; U_CHAR *info_stack; const MACRO_EL *save_traverse_mel; EL_INFO *save_elinfo_stack; U_CHAR *save_info_stack; int save_stack_used; int el_count; int marker; TRAVERSE_STACK *next; }; /*--------------------------------------------------------------------------*/ /*--- data structure for basis function representation ---*/ /*--------------------------------------------------------------------------*/ typedef REAL BAS_FCT(const REAL[N_LAMBDA]); typedef const REAL *GRD_BAS_FCT(const REAL[N_LAMBDA]); typedef const REAL (*D2_BAS_FCT(const REAL[N_LAMBDA]))[N_LAMBDA]; struct bas_fcts { char *name; /* textual description */ int dim; /* dimension of the corresponding mesh. */ int n_bas_fcts; /* number of basisfunctions on one el */ int degree; /* maximal degree of the basis functions */ const int n_dof[N_NODE_TYPES]; /* dofs from these bas_fcts */ void (*init_element)(const EL_INFO *, const FE_SPACE *, U_CHAR); BAS_FCT **phi; GRD_BAS_FCT **grd_phi; D2_BAS_FCT **D2_phi; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); /*************** entries must be set for interpolation ********************/ const REAL *(*interpol)(const EL_INFO *el_info, int n, const int *indices, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA]), REAL *coeff); const REAL_D *(*interpol_d)(const EL_INFO *el_info, int n, const int *indices, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA], REAL_D val), REAL_D *coeff); /******************** optional entries ***********************************/ const int *(*get_int_vec)(const EL *, const DOF_INT_VEC *, int *); const REAL *(*get_real_vec)(const EL *, const DOF_REAL_VEC *, REAL *); const REAL_D *(*get_real_d_vec)(const EL *, const DOF_REAL_D_VEC *, REAL_D *); const U_CHAR *(*get_uchar_vec)(const EL *, const DOF_UCHAR_VEC *, U_CHAR *); const S_CHAR *(*get_schar_vec)(const EL *, const DOF_SCHAR_VEC *, S_CHAR *); void (*real_refine_inter)(DOF_REAL_VEC *, RC_LIST_EL *, int); void (*real_coarse_inter)(DOF_REAL_VEC *, RC_LIST_EL *, int); void (*real_coarse_restr)(DOF_REAL_VEC *, RC_LIST_EL *, int); void (*real_d_refine_inter)(DOF_REAL_D_VEC *, RC_LIST_EL *, int); void (*real_d_coarse_inter)(DOF_REAL_D_VEC *, RC_LIST_EL *, int); void (*real_d_coarse_restr)(DOF_REAL_D_VEC *, RC_LIST_EL *, int); void *bas_fcts_data; }; /* Barycentric coordinates of Lagrange nodes. */ #define LAGRANGE_NODES(bfcts) ((const REAL_B *)(bfcts)->bas_fcts_data) /*--------------------------------------------------------------------------*/ /*--- FE spaces are a triple of DOFs and BAS_FCTs on a MESH ---*/ /*--------------------------------------------------------------------------*/ struct fe_space { const char *name; const DOF_ADMIN *admin; const BAS_FCTS *bas_fcts; MESH *mesh; }; /*--------------------------------------------------------------------------*/ /*--- data structures for numerical integration ---*/ /*--------------------------------------------------------------------------*/ struct quadrature { char *name; int degree; int dim; int n_points; const double **lambda; const double *w; }; #define MAX_N_QUAD_POINTS 64 /*--------------------------------------------------------------------------*/ /*--- data structure with precomputed values of basis functions at ---*/ /*--- quadrature nodes on the standard element ---*/ /*--------------------------------------------------------------------------*/ #define INIT_PHI 1 #define INIT_GRD_PHI 2 #define INIT_D2_PHI 4 struct quad_fast { const QUAD *quad; const BAS_FCTS *bas_fcts; int n_points; int n_bas_fcts; const double *w; U_CHAR init_flag; REAL **phi; REAL (**grd_phi)[N_LAMBDA]; REAL (**D2_phi)[N_LAMBDA][N_LAMBDA]; }; /*--------------------------------------------------------------------------*/ /*--- data structure for adaptive methods ---*/ /*--------------------------------------------------------------------------*/ struct adapt_stat { const char *name; REAL tolerance; REAL p; /* power in estimator norm */ int max_iteration; int info; REAL (*estimate)(MESH *mesh, ADAPT_STAT *adapt); REAL (*get_el_est)(EL *el); /* local error estimate */ REAL (*get_el_estc)(EL *el); /* local coarsening error estimate*/ U_CHAR (*marking)(MESH *mesh, ADAPT_STAT *adapt); void *est_info; /* estimator parameters */ REAL err_sum, err_max; /* sum and max of el_est */ void (*build_before_refine)(MESH *mesh, U_CHAR flag); void (*build_before_coarsen)(MESH *mesh, U_CHAR flag); void (*build_after_coarsen)(MESH *mesh, U_CHAR flag); void (*solve)(MESH *mesh); int refine_bisections; int coarsen_allowed; /* 0 : 1 */ int coarse_bisections; int strategy; /* 1=GR, 2=MS, 3=ES, 4=GERS */ REAL MS_gamma, MS_gamma_c; /* maximum strategy */ REAL ES_theta, ES_theta_c; /* equidistribution strategy */ REAL GERS_theta_star, GERS_nu, GERS_theta_c; /* willy's strategy */ }; struct adapt_instat { const char *name; ADAPT_STAT adapt_initial[1]; ADAPT_STAT adapt_space[1]; REAL time; REAL start_time, end_time; REAL timestep; void (*init_timestep)(MESH *mesh, ADAPT_INSTAT *adapt); void (*set_time)(MESH *mesh, ADAPT_INSTAT *adapt); void (*one_timestep)(MESH *mesh, ADAPT_INSTAT *adapt); REAL (*get_time_est)(MESH *mesh, ADAPT_INSTAT *adapt); void (*close_timestep)(MESH *mesh, ADAPT_INSTAT *adapt); int strategy; int max_iteration; REAL tolerance; REAL rel_initial_error; REAL rel_space_error; REAL rel_time_error; REAL time_theta_1; REAL time_theta_2; REAL time_delta_1; REAL time_delta_2; int info; }; #define MESH_REFINED 1 #define MESH_COARSENED 2 #define H1_NORM 1 #define L2_NORM 2 /*--------------------------------------------------------------------------*/ /*--- data structures for matrix and vector update ---*/ /*--------------------------------------------------------------------------*/ typedef struct el_matrix_info EL_MATRIX_INFO; struct el_matrix_info { int n_row; const DOF_ADMIN *row_admin; const DOF *(*get_row_dof)(const EL *,const DOF_ADMIN *, DOF *); int n_col; const DOF_ADMIN *col_admin; const DOF *(*get_col_dof)(const EL *,const DOF_ADMIN *, DOF *); const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); REAL factor; const REAL **(*el_matrix_fct)(const EL_INFO *, void *); void *fill_info; FLAGS fill_flag; }; typedef struct el_dowb_matrix_info EL_DOWB_MATRIX_INFO; struct el_dowb_matrix_info { int n_row; const DOF_ADMIN *row_admin; const DOF *(*get_row_dof)(const EL *,const DOF_ADMIN *, DOF *); int n_col; const DOF_ADMIN *col_admin; const DOF *(*get_col_dof)(const EL *,const DOF_ADMIN *, DOF *); const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); REAL factor; const void **(*el_matrix_fct)(const EL_INFO *, void *); void *fill_info; FLAGS fill_flag; DOWBM_TYPE type; /* dowbm_full, _symm or _diag */ }; typedef struct el_vec_info EL_VEC_INFO; struct el_vec_info { int n_dof; const DOF_ADMIN *admin; const DOF *(*get_dof)(const EL *,const DOF_ADMIN *, DOF *); const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); REAL factor; const REAL *(*el_vec_fct)(const EL_INFO *, void *); void *fill_info; FLAGS fill_flag; }; typedef struct el_vec_d_info EL_VEC_D_INFO; struct el_vec_d_info { int n_dof; const DOF_ADMIN *admin; const DOF *(*get_dof)(const EL *,const DOF_ADMIN *, DOF *); const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *); REAL factor; const REAL_D *(*el_vec_fct)(const EL_INFO *, void *); void *fill_info; FLAGS fill_flag; }; /*--------------------------------------------------------------------------*/ /*--- data structure about the differential operator for matrix assemblage */ /*--------------------------------------------------------------------------*/ typedef struct operator_info OPERATOR_INFO; struct operator_info { const FE_SPACE *row_fe_space; const FE_SPACE *col_fe_space; const QUAD *quad[3]; int (*init_element)(const EL_INFO *, const QUAD *[3], void *); const REAL (*(*LALt)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; int LALt_pw_const; int LALt_symmetric; const REAL *(*Lb0)(const EL_INFO *, const QUAD *, int, void *); int Lb0_pw_const; const REAL *(*Lb1)(const EL_INFO *, const QUAD *, int, void *); int Lb1_pw_const; int Lb0_Lb1_anti_symmetric; REAL (*c)(const EL_INFO *, const QUAD *, int, void *); int c_pw_const; int use_get_bound; void *user_data; FLAGS fill_flag; }; typedef struct dowb_operator_info DOWB_OPERATOR_INFO; struct dowb_operator_info { const FE_SPACE *row_fe_space; const FE_SPACE *col_fe_space; const QUAD *quad[3]; int (*init_element)(const EL_INFO *, const QUAD *[3], void *); union { const REAL_DD (*(*full)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL_DDS (*(*symm)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL_D (*(*diag)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; } LALt; int LALt_pw_const; int LALt_symmetric; union { const REAL_DD *(*full)(const EL_INFO *, const QUAD *, int, void *); const REAL_DDS *(*symm)(const EL_INFO *, const QUAD *, int, void *); const REAL_D *(*diag)(const EL_INFO *, const QUAD *, int, void *); } Lb0; int Lb0_pw_const; union { const REAL_DD *(*full)(const EL_INFO *, const QUAD *, int, void *); const REAL_DDS *(*symm)(const EL_INFO *, const QUAD *, int, void *); const REAL_D *(*diag)(const EL_INFO *, const QUAD *, int, void *); } Lb1; int Lb1_pw_const; int Lb0_Lb1_anti_symmetric; union { const REAL_D *(*full)(const EL_INFO *, const QUAD *, int, void *); const REAL_DDS *(*symm)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*diag)(const EL_INFO *, const QUAD *, int, void *); } c; int c_pw_const; int use_get_bound; void *user_data; FLAGS fill_flag; DOWBM_TYPE type; /* dowbm_full, _symm or _diag */ }; /*--------------------------------------------------------------------------*/ /* calculate element stiffness matrices by preevaluated integrals over the */ /* the reference element. */ /*--------------------------------------------------------------------------*/ typedef struct q11_psi_phi Q11_PSI_PHI; typedef struct q01_psi_phi Q01_PSI_PHI; typedef struct q10_psi_phi Q10_PSI_PHI; typedef struct q00_psi_phi Q00_PSI_PHI; struct q11_psi_phi { const BAS_FCTS *psi; const BAS_FCTS *phi; const QUAD *quad; const int **n_entries; const REAL ***values; const int ***k; const int ***l; }; struct q01_psi_phi { const BAS_FCTS *psi; const BAS_FCTS *phi; const QUAD *quad; const int **n_entries; const REAL ***values; const int ***l; }; struct q10_psi_phi { const BAS_FCTS *psi; const BAS_FCTS *phi; const QUAD *quad; const int **n_entries; const REAL ***values; const int ***k; }; struct q00_psi_phi { const BAS_FCTS *psi; const BAS_FCTS *phi; const QUAD *quad; const REAL **values; }; /*--------------------------------------------------------------------------*/ /* data type for preconditioning */ /*--------------------------------------------------------------------------*/ typedef struct precon PRECON; struct precon { void *precon_data; int (*init_precon)(void *precon_data); void (*precon)(void *precon_data, int n, REAL *vec); void (*exit_precon)(void *precon_data); }; const PRECON *get_diag_precon_s(const DOF_MATRIX *, const DOF_SCHAR_VEC *); const PRECON *get_diag_precon_d(const DOF_MATRIX *, const DOF_SCHAR_VEC *); const PRECON *get_diag_precon_dowb(const DOF_DOWB_MATRIX *, const DOF_SCHAR_VEC *); const PRECON *get_HB_precon_s(const FE_SPACE *, const DOF_SCHAR_VEC *, int, int); const PRECON *get_HB_precon_d(const FE_SPACE *, const DOF_SCHAR_VEC *, int, int); const PRECON *get_BPX_precon_s(const FE_SPACE *, const DOF_SCHAR_VEC *, int, int); const PRECON *get_BPX_precon_d(const FE_SPACE *, const DOF_SCHAR_VEC *, int, int); /*--------------------------------------------------------------------------*/ /* solver identification for interface to OEM-lib */ /*--------------------------------------------------------------------------*/ typedef enum {NoSolver, BiCGStab, CG, TfQMR, GMRes, ODir, ORes} OEM_SOLVER; /*--------------------------------------------------------------------------*/ /*--- abstract multigrid ---*/ /*--------------------------------------------------------------------------*/ typedef struct multi_grid_info MULTI_GRID_INFO; struct multi_grid_info { REAL tolerance; /* tol. for resid */ REAL exact_tolerance; /* tol. for exact_solver */ int cycle; /* 1=V-cycle, 2=W-cycle */ int n_pre_smooth, n_in_smooth; /* no of smoothing loops */ int n_post_smooth; /* no of smoothing loops */ int mg_levels; /* current no. of levels */ int exact_level; /* level for exact_solver */ int max_iter; /* max. no of MG iter's */ int info; int (*init_multi_grid)(MULTI_GRID_INFO *mg_info); void (*pre_smooth)(MULTI_GRID_INFO *mg_info, int level, int n); void (*in_smooth)(MULTI_GRID_INFO *mg_info, int level, int n); void (*post_smooth)(MULTI_GRID_INFO *mg_info, int level, int n); void (*mg_restrict)(MULTI_GRID_INFO *mg_info, int level); void (*mg_prolongate)(MULTI_GRID_INFO *mg_info, int level); void (*exact_solver)(MULTI_GRID_INFO *mg_info, int level); REAL (*mg_resid)(MULTI_GRID_INFO *mg_info, int level); void (*exit_multi_grid)(MULTI_GRID_INFO *mg_info); void *data; /* application dep. data */ }; int MG(MULTI_GRID_INFO *mg_info); /*--------------------------------------------------------------------------*/ /*--- concrete multigrid ---*/ /*--------------------------------------------------------------------------*/ typedef struct mg_s_info MG_S_INFO; struct mg_s_info { MULTI_GRID_INFO *mg_info; /* abstract MG info */ const FE_SPACE *fe_space; DOF_MATRIX *mat; const DOF_REAL_VEC *f; DOF_REAL_VEC *u; const DOF_SCHAR_VEC *bound; int smoother, exact_solver; REAL smooth_omega, exact_omega; int size; /* current size of vectors*/ DOF_MATRIX **matrix; /* one for each level */ REAL **f_h; /* one for each level */ REAL **u_h; /* one for each level */ REAL **r_h; /* one for each level */ int *dofs_per_level; /* count dofs per level */ int sort_size; /* size of sort vectors */ DOF *sort_dof; /* dofs in order of levels*/ DOF *(dof_parent[2]); /* (for linear elements) */ U_CHAR *dof_level; S_CHAR *sort_bound; /* sorted bound */ int sort_invers_size; /* size of inv. sort list */ int *sort_dof_invers; /* inverse sort list */ }; /*--------------------------------------------------------------------------*/ /* sort_dof[ sorted dof ] = unsorted dof */ /* sort_dof_invers[ unsorted dof ] = sorted dof */ /*--------------------------------------------------------------------------*/ /* file MG_s1.c DOF_sort routines *******************************************/ void MG_s_setup_levels(MG_S_INFO *mg_s_info); void MG_s_setup_mat_b(MG_S_INFO *mg_s_info, DOF_MATRIX *mat, const DOF_SCHAR_VEC *bound); void MG_s_dof_copy_to_sparse(MG_S_INFO *mg_s_info, const DOF_REAL_VEC *x, REAL *y); void MG_s_dof_copy_from_sparse(MG_S_INFO *mg_s_info, const REAL *x, DOF_REAL_VEC *y); void MG_s_reset_mat(MG_S_INFO *mg_s_info); void MG_s_sort_mat(MG_S_INFO *mg_s_info); void MG_s_free_mem(MG_S_INFO *mg_s_info); /* file MG_s2.c: DOF_sort independent routines ******************************/ void MG_s_restrict_mg_matrices(MG_S_INFO *mg_s_info); void MG_s_restrict(MULTI_GRID_INFO *mg_info, int mg_level); void MG_s_prolongate(MULTI_GRID_INFO *mg_info, int mg_level); REAL MG_s_resid(MULTI_GRID_INFO *mg_info, int mg_level); void MG_s_smoother(MULTI_GRID_INFO *mg_info, int mg_level, int n); void MG_s_exact_solver(MULTI_GRID_INFO *mg_info, int mg_level); void MG_s_gemv(MG_S_INFO *mg_s_info, int mg_level, MatrixTranspose transpose, REAL alpha, DOF_MATRIX *a, REAL *x, REAL beta, REAL *y); /* file MG_s.c: *************************************************************/ int mg_s(DOF_MATRIX *matrix, DOF_REAL_VEC *u, const DOF_REAL_VEC *f, const DOF_SCHAR_VEC *bound, REAL tol, int max_iter, int info, char *prefix); MG_S_INFO *mg_s_init(DOF_MATRIX *matrix, const DOF_SCHAR_VEC *bound, int info, char *prefix); int mg_s_solve(MG_S_INFO *mg_s_info, DOF_REAL_VEC *u, const DOF_REAL_VEC *f, REAL tol, int max_iter); void mg_s_exit(MG_S_INFO *mg_s_info); /*--------------------------------------------------------------------------*/ /* Graphic output Definitions */ /*--------------------------------------------------------------------------*/ typedef void * GRAPH_WINDOW; typedef float GRAPH_RGBCOLOR[3]; /** flags used by graph_mesh(): ****/ #define GRAPH_MESH_BOUNDARY 1 #define GRAPH_MESH_ELEMENT_MARK 2 #define GRAPH_MESH_VERTEX_DOF 4 #define GRAPH_MESH_ELEMENT_INDEX 8 /*--------------------------------------------------------------------------*/ /* very usefull macro definitons */ /*--------------------------------------------------------------------------*/ #define GET_MESH(dim,name,macro_data,init_node_proj) \ check_and_get_mesh((dim),DIM_OF_WORLD,ALBERTA_DEBUG, \ ALBERTA_VERSION,(name),(macro_data), \ (init_node_proj)) #define GET_DOF_VEC(ptr, dof_vec)\ TEST_EXIT((dof_vec) && ((ptr) = (dof_vec)->vec),\ "%s == nil\n", (dof_vec) ? NAME(dof_vec) : #dof_vec) /*--------------------------------------------------------------------------*/ /* defined in graphXO.c */ /*--------------------------------------------------------------------------*/ extern const GRAPH_RGBCOLOR rgb_black; extern const GRAPH_RGBCOLOR rgb_white; extern const GRAPH_RGBCOLOR rgb_red; extern const GRAPH_RGBCOLOR rgb_green; extern const GRAPH_RGBCOLOR rgb_blue; extern const GRAPH_RGBCOLOR rgb_yellow; extern const GRAPH_RGBCOLOR rgb_magenta; extern const GRAPH_RGBCOLOR rgb_cyan; extern const GRAPH_RGBCOLOR rgb_grey50; extern const GRAPH_RGBCOLOR rgb_albert; extern const GRAPH_RGBCOLOR rgb_alberta; /*--------------------------------------------------------------------------*/ /* used in wall_quad_fast.c */ /*--------------------------------------------------------------------------*/ /* We use sort_face_indices() & friends and build the tables for every * relative permutation possible. */ typedef struct wall_quad_fast WALL_QUAD_FAST; #define CARD_SN_MAX 6 /* this must be (N_LAMBDA-1)! */ struct wall_quad_fast { const QUAD *quad; int n_points; int n_bas_fcts; const REAL *w; REAL_B *lambda[CARD_SN_MAX][N_FACES_MAX]; U_CHAR init_flag; REAL **phi[CARD_SN_MAX][N_FACES_MAX]; WALL_QUAD_FAST *next; BAS_FCTS *bas_fcts; REAL_B **grd_phi[CARD_SN_MAX][N_FACES_MAX]; REAL_BB **D2_phi[CARD_SN_MAX][N_FACES_MAX]; }; /*--------------------------------------------------------------------------*/ /* functions supplied by ALBERTA */ /*--------------------------------------------------------------------------*/ /*** file coarsen.c *****************************************************/ extern U_CHAR coarsen(MESH *mesh); extern U_CHAR global_coarsen(MESH *mesh, int no); extern int get_max_level(MESH *mesh); /*** file dof_admin.c ***************************************************/ /*extern void add_bas_fcts_to_admin(DOF_ADMIN *admin, const BAS_FCTS *bas_fcts);*/ extern const DOF_ADMIN *get_vertex_admin(MESH *mesh); void add_element_matrix(DOF_MATRIX *, REAL, int, int, const DOF *, const DOF *, const REAL **, const S_CHAR *); void add_element_dowb_matrix(DOF_DOWB_MATRIX *, REAL, int, int, const DOF *, const DOF *, const void **, const S_CHAR *); void add_element_vec(DOF_REAL_VEC *, REAL, int, const DOF *, const REAL *, const S_CHAR *); void add_element_d_vec(DOF_REAL_D_VEC *, REAL, int, const DOF *, const REAL_D *, const S_CHAR *); extern void dof_compress(MESH *mesh); extern void clear_dof_matrix(DOF_MATRIX *matrix); extern void clear_dof_dowb_matrix(DOF_DOWB_MATRIX *matrix); extern void print_dof_matrix(const DOF_MATRIX *matrix); extern void print_dof_dowb_matrix(const DOF_DOWB_MATRIX *matrix); extern void print_dof_real_vec(const DOF_REAL_VEC *drv); extern void print_dof_real_d_vec(const DOF_REAL_D_VEC *drdv); extern void print_dof_ptr_vec(const DOF_PTR_VEC *dpv); extern void print_dof_int_vec(const DOF_INT_VEC *div); extern void print_dof_uchar_vec(const DOF_UCHAR_VEC *div); extern void print_dof_schar_vec(const DOF_SCHAR_VEC *div); /* BLAS 1 */ extern REAL dof_nrm2(const DOF_REAL_VEC *x); extern REAL dof_asum(const DOF_REAL_VEC *x); extern void dof_set(REAL alpha, DOF_REAL_VEC *x); extern void dof_scal(REAL alpha, DOF_REAL_VEC *x); extern REAL dof_dot(const DOF_REAL_VEC *x, const DOF_REAL_VEC *y); extern void dof_copy(const DOF_REAL_VEC *x, DOF_REAL_VEC *y); extern void dof_axpy(REAL alpha, const DOF_REAL_VEC *x, DOF_REAL_VEC *y); /* some non BLAS */ extern void dof_xpay(REAL alpha, const DOF_REAL_VEC *x, DOF_REAL_VEC *y); extern REAL dof_min(const DOF_REAL_VEC *x); extern REAL dof_max(const DOF_REAL_VEC *x); /* BLAS 2 */ extern void dof_gemv(MatrixTranspose transpose, REAL alpha, const DOF_MATRIX *a, const DOF_REAL_VEC *x, REAL beta, DOF_REAL_VEC *y); extern void dof_mv(MatrixTranspose transpose, const DOF_MATRIX *a, const DOF_REAL_VEC *x, DOF_REAL_VEC *y); /* now the same for REAL_D */ extern void dof_axpy_d(REAL alpha, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y); extern void dof_copy_d(const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y); extern REAL dof_dot_d(const DOF_REAL_D_VEC *x, const DOF_REAL_D_VEC *y); extern REAL dof_nrm2_d(const DOF_REAL_D_VEC *x); extern void dof_scal_d(REAL alpha, DOF_REAL_D_VEC *x); extern void dof_set_d(REAL alpha, DOF_REAL_D_VEC *x); extern void dof_xpay_d(REAL alpha, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y); extern REAL dof_min_d(const DOF_REAL_D_VEC *x); extern REAL dof_max_d(const DOF_REAL_D_VEC *x); /*--- BLAS 2 for REAL_D ---*/ extern void dof_mv_d(MatrixTranspose transpose, const DOF_MATRIX *a, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y); extern void dof_mv_dowb(MatrixTranspose transpose, const DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y); extern void dof_gemv_d(MatrixTranspose transpose, REAL alpha, const DOF_MATRIX *a, const DOF_REAL_D_VEC *x, REAL beta, DOF_REAL_D_VEC *y); extern void dof_gemv_dowb(MatrixTranspose transpose, REAL alpha, const DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *x, REAL beta, DOF_REAL_D_VEC *y); void update_matrix(DOF_MATRIX *dof_matrix, const EL_MATRIX_INFO *minfo); void update_dowb_matrix(DOF_DOWB_MATRIX *dof_matrix, const EL_DOWB_MATRIX_INFO *minfo); void update_real_vec(DOF_REAL_VEC *drv, const EL_VEC_INFO *vec_info); void update_real_d_vec(DOF_REAL_D_VEC *drdv, const EL_VEC_D_INFO *vecd_info); /*** file wall_quad_fast.c *********************************************/ extern const WALL_QUAD_FAST *get_wall_quad_fast(const BAS_FCTS *, const QUAD *, U_CHAR init_flag); /*** file macro.c *******************************************************/ extern void macro_test(MACRO_DATA *data, const char *new_filename); extern MACRO_DATA *read_macro(const char *name); extern MACRO_DATA *read_macro_bin(const char *name); extern MACRO_DATA *read_macro_xdr(const char *name); extern int write_macro(MESH *mesh, const char *name); extern int write_macro_bin(MESH *mesh, const char *name); extern int write_macro_xdr(MESH *mesh, const char *name); extern int write_macro_data(MACRO_DATA *data, const char *name); extern int write_macro_data_bin(MACRO_DATA *data, const char *name); extern int write_macro_data_xdr(MACRO_DATA *data, const char *name); extern MACRO_DATA *alloc_macro_data(int dim, int nv, int ne, FLAGS); extern void free_macro_data(MACRO_DATA *data); extern void compute_neigh_fast(MACRO_DATA *data); extern void dirichlet_boundary(MACRO_DATA *data); extern MACRO_DATA *mesh2macro_data(MESH *mesh); extern void macro_data2mesh(MESH *mesh, const MACRO_DATA *data, NODE_PROJECTION *(*n_proj)(MESH *,MACRO_EL *,int)); /*** file memory.c ******************************************************/ extern MESH *check_and_get_mesh(int dim, int dow, int neigh, const char *version, const char *name, const MACRO_DATA *macro_data, NODE_PROJECTION *(*init_node_proj) (MESH *, MACRO_EL *, int)); extern void add_traverse_hook(MESH *mesh, TRAVERSE_HOOK *hook, HOOK_QUEUE_ENUM queue); extern void remove_traverse_hook(MESH *mesh, TRAVERSE_HOOK *hook, HOOK_QUEUE_ENUM queue); extern void free_dof_admin(DOF_ADMIN *admin, MESH *mesh); extern void free_int_dof_vec(DOF_DOF_VEC *vec); extern void free_dof_int_vec(DOF_INT_VEC *vec); extern void free_dof_dof_vec(DOF_DOF_VEC *vec); extern void free_dof_matrix(DOF_MATRIX *mat); extern void free_dof_dowb_matrix(DOF_DOWB_MATRIX *mat); extern void free_dof_real_vec(DOF_REAL_VEC *vec); extern void free_dof_real_d_vec(DOF_REAL_D_VEC *vec); extern void free_dof_schar_vec(DOF_SCHAR_VEC *vec); extern void free_dof_uchar_vec(DOF_UCHAR_VEC *vec); extern void free_dof_ptr_vec(DOF_PTR_VEC *vec); extern void free_fe_space(FE_SPACE *fe_space); extern void free_real_d(MESH *mesh, REAL *ptr); extern void free_matrix_row(const FE_SPACE *, MATRIX_ROW *); extern void free_dowb_matrix_row(const FE_SPACE *, DOWBM_TYPE type, DOWB_MATRIX_ROW *); extern void free_element(EL *el, MESH *mesh); extern void free_rc_list(MESH *mesh, RC_LIST_EL *list); /* only for 3D */ extern void free_mesh(MESH *); extern void free_dof(DOF *dof, MESH *mesh, int position, const int is_coarse_dof); extern DOF *get_dof(MESH *mesh, int position); extern const FE_SPACE *get_fe_space(MESH *mesh, const char *name, const int ndof[N_NODE_TYPES], const BAS_FCTS *bas_fcts, const U_CHAR preserve_coarse_dofs); extern DOF_INT_VEC *get_dof_int_vec(const char *name, const FE_SPACE *); extern DOF_DOF_VEC *get_int_dof_vec(const char *name, const FE_SPACE *); extern DOF_DOF_VEC *get_dof_dof_vec(const char *name, const FE_SPACE *); extern DOF_MATRIX *get_dof_matrix(const char *name, const FE_SPACE *row_fe_space, const FE_SPACE *col_fe_space); extern DOF_DOWB_MATRIX *get_dof_dowb_matrix(const char *name, const FE_SPACE *row_fe_space, const FE_SPACE *col_fe_space, DOWBM_TYPE type); extern DOF_REAL_VEC *get_dof_real_vec(const char *name, const FE_SPACE *); extern DOF_REAL_D_VEC *get_dof_real_d_vec(const char *name, const FE_SPACE *); extern DOF_SCHAR_VEC *get_dof_schar_vec(const char *name, const FE_SPACE *); extern DOF_UCHAR_VEC *get_dof_uchar_vec(const char *name, const FE_SPACE *); extern DOF_PTR_VEC *get_dof_ptr_vec(const char *name, const FE_SPACE *); extern REAL *get_real_d(MESH *mesh); extern MATRIX_ROW *get_matrix_row(const FE_SPACE *); extern DOWB_MATRIX_ROW *get_dowb_matrix_row(const FE_SPACE *, DOWBM_TYPE type); extern EL *get_element(MESH *mesh); extern RC_LIST_EL *get_rc_list(MESH *mesh); /* only for 3D */ extern size_t init_leaf_data(MESH *mesh, size_t size, void (*refine_leaf_data)(EL *parent, EL *child[2]), void (*coarsen_leaf_data)(EL *parent, EL *child[2])); /*** file submesh.c ******************************************************/ extern MESH *get_submesh(MESH *master, const char *name, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), void *data); extern void unchain_submesh(MESH *slave); extern MESH *read_submesh(MESH *master, const char *slave_filename, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), NODE_PROJECTION *(*)(MESH *, MACRO_EL *, int), void *data); extern MESH *read_submesh_xdr(MESH *master, const char *slave_filename, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), NODE_PROJECTION *(*)(MESH *, MACRO_EL *, int), void *data); extern void trace_dof_real_vec(DOF_REAL_VEC *slave_vec, DOF_REAL_VEC *master_vec); extern void trace_dof_real_d_vec(DOF_REAL_D_VEC *slave_vec, DOF_REAL_D_VEC *master_vec); extern void get_slave_dof_mapping(const FE_SPACE *m_fe_space, DOF_INT_VEC *s_map); extern MESH *get_master(MESH *slave); extern DOF_PTR_VEC *get_master_binding(MESH *slave); extern DOF_PTR_VEC *get_slave_binding(MESH *slave); /*** file level.c ******************************************************/ extern REAL level_element_det_2d(const REAL_D coord[]); extern void level_coord_to_world_2d(const REAL_D coord[], const REAL_B lambda, REAL_D world); extern void level_coord_to_el_coord_2d(const REAL_B v_lambda[], const REAL_B lambda, REAL_B el_lambda); extern REAL level_element_det_3d(const REAL_D coord[]); extern void level_coord_to_world_3d(const REAL_D coord[], const REAL_B lambda, REAL_D world); extern void level_coord_to_el_coord_3d(const REAL_B v_lambda[], const REAL_B lambda, REAL_B el_lambda); extern int find_level(MESH *mesh, FLAGS fill_flag, const DOF_REAL_VEC *Level, REAL value, int (*init)(const EL_INFO *el_info, REAL v[], int N, int face, const REAL_B lambda[]), void (*cal)(const EL_INFO *el_info, REAL v[], int i, int face, const REAL_B lambda[], const REAL_D coord[])); extern void set_element_mark(MESH *mesh, FLAGS fill_flag, S_CHAR mark); /*** file numint.c ******************************************************/ const QUAD *get_quadrature(int dim, int degree); const QUAD *get_lumping_quadrature(int dim); void print_quadrature(const QUAD *quad); REAL integrate_std_simp(const QUAD *quad, REAL (*f)(const REAL *)); const REAL *f_at_qp(const QUAD*, REAL (*f)(const REAL [N_LAMBDA]), REAL*); int max_quad_points(void); const REAL_D *f_d_at_qp(const QUAD *quad, const REAL *(*f)(const REAL[N_LAMBDA]), REAL_D *vec); const REAL_D *grd_f_at_qp(const QUAD *, const REAL *(*)(const REAL [N_LAMBDA]), REAL_D *); const REAL_DD *grd_f_d_at_qp(const QUAD *, const REAL_D *(*)(const REAL [N_LAMBDA]), REAL_DD *); const QUAD_FAST *get_quad_fast(const BAS_FCTS *, const QUAD *, U_CHAR init_flag); /*** file refine.c ******************************************************/ extern U_CHAR refine(MESH *mesh); extern U_CHAR global_refine(MESH *mesh, int mark); /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*** file adapt.c *******************************************************/ extern void adapt_method_stat(MESH *mesh, ADAPT_STAT *adapt); extern void adapt_method_instat(MESH *mesh, ADAPT_INSTAT *adapt); extern int marking(MESH *mesh, ADAPT_STAT *adapt); extern ADAPT_INSTAT *get_adapt_instat(const int dim, const char *name, const char *prefix, int info, ADAPT_INSTAT *adapt_instat); extern ADAPT_STAT *get_adapt_stat(const int dim, const char *name, const char *prefix, int info, ADAPT_STAT *adapt_stat); /*** file assemble.c ****************************************************/ const EL_MATRIX_INFO *fill_matrix_info(const OPERATOR_INFO *, EL_MATRIX_INFO *); const Q00_PSI_PHI *get_q00_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad); const Q01_PSI_PHI *get_q01_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad); const Q10_PSI_PHI *get_q10_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad); const Q11_PSI_PHI *get_q11_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad); /*** file assemble_dowb.c ************************************************/ const EL_DOWB_MATRIX_INFO * fill_dowb_matrix_info(const DOWB_OPERATOR_INFO *operator_info, EL_DOWB_MATRIX_INFO *matrix_info); /*** file bas_fct.c *****************************************************/ extern const BAS_FCTS *get_bas_fcts(const char *name); extern const BAS_FCTS *get_discontinuous_lagrange(int dim, int degree); extern const BAS_FCTS *get_lagrange(int dim, int degree); extern int new_bas_fcts(const BAS_FCTS * bas_fcts); /*** file check.c *******************************************************/ extern void check_mesh(MESH *mesh); /*** file dof_admin.c ***************************************************/ extern void free_dof_index(DOF_ADMIN *admin, int dof); extern int get_dof_index(DOF_ADMIN *admin); extern void enlarge_dof_lists(DOF_ADMIN *admin, int minsize); extern void update_dof_matrix(DOF_MATRIX *, REAL, int, const REAL **, const DOF *, const S_CHAR *); extern void update_dof_dowb_matrix(DOF_DOWB_MATRIX *, REAL, int, const void **, const DOF *, const S_CHAR *); extern void update_dof_real_vec(DOF_REAL_VEC *, REAL, int, const REAL *, const DOF *, const S_CHAR *); extern void update_dof_real_d_vec(DOF_REAL_D_VEC *, REAL, int, const REAL_D *, const DOF *, const S_CHAR *); extern void test_dof_matrix(DOF_MATRIX *matrix); extern void test_dof_dowb_matrix(DOF_DOWB_MATRIX *matrix); /*** file element.c ***************************************************/ /* These routines are partially available as _?d-versions to avoid looking*/ /* up the dimension. This should be a small efficiency bonus. */ extern int *sorted_wall_indices(const int dim, int face, int permno); extern int wall_orientation(int dim, const EL *el, int face, int **vecp); extern int *sort_wall_indices(const int dim, const EL *el, int face, int *vec); /* Dimension dependent routines, 0d, just dummies in most cases. */ extern int *sorted_wall_indices_0d(int face, int permno); extern int wall_orientation_0d(const EL *el, int face, int **vec); extern int *sort_wall_indices_0d(const EL *el, int face, int *vec); extern int world_to_coord_0d(const EL_INFO *el_info, const REAL *, REAL_B); extern const REAL *coord_to_world_0d(const EL_INFO *, const REAL *, REAL_D); extern REAL el_det_0d(const EL_INFO *); extern REAL el_volume_0d(const EL_INFO *el_info); extern REAL el_grd_lambda_0d(const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]); extern REAL get_wall_normal_0d(const EL_INFO *, int , REAL *); /* Dimension dependent routines, 1d */ extern int *sorted_wall_indices_1d(int face, int permno); extern int wall_orientation_1d(const EL *el, int face, int **vec); extern int *sort_wall_indices_1d(const EL *el, int face, int *vec); extern int world_to_coord_1d(const EL_INFO *el_info, const REAL *, REAL_B); extern const REAL *coord_to_world_1d(const EL_INFO *, const REAL *, REAL_D); extern REAL el_det_1d(const EL_INFO *); extern REAL el_volume_1d(const EL_INFO *el_info); extern REAL el_grd_lambda_1d(const EL_INFO *, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]); extern REAL get_wall_normal_1d(const EL_INFO *, int , REAL *); #if DIM_OF_WORLD > 1 /* Dimension dependent routines, 2d */ extern int *sorted_wall_indices_2d(int face, int permno); extern int wall_orientation_2d(const EL *el, int face, int **vec); extern int *sort_wall_indices_2d(const EL *el, int face, int *vec); extern int world_to_coord_2d(const EL_INFO *el_info, const REAL *, REAL_B); extern const REAL *coord_to_world_2d(const EL_INFO *, const REAL *, REAL_D); extern REAL el_det_2d(const EL_INFO *); extern REAL el_volume_2d(const EL_INFO *el_info); extern REAL el_grd_lambda_2d(const EL_INFO *, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]); extern REAL get_wall_normal_2d(const EL_INFO *, int , REAL *); #if DIM_OF_WORLD > 2 /* Dimension dependent routines, 3d */ extern int *sorted_wall_indices_3d(int face, int permno); extern int wall_orientation_3d(const EL *el, int face, int **vec); extern int *sort_wall_indices_3d(const EL *el, int face, int *vec); extern int world_to_coord_3d(const EL_INFO *el_info, const REAL *, REAL_B); extern const REAL *coord_to_world_3d(const EL_INFO *, const REAL *, REAL_D); extern REAL el_det_3d(const EL_INFO *); extern REAL el_volume_3d(const EL_INFO *el_info); extern REAL el_grd_lambda_3d(const EL_INFO *, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]); extern REAL get_wall_normal_3d(const EL_INFO *, int , REAL *); #endif #endif /* Below we provide wrapper functions which distinguish the dimension * dependent routines by the co-dimension rather than by the dimension * of the underlying mesh. We start by defining a preprocessor macro * which spares us some typing and especially typos. * * In addition, we provide wrapper functions which decide by looking * at el_info->mesh->dim what to do. * */ #if DIM_OF_WORLD == 1 # define ALBERTA_CODIM_WRAPPER(ret, name, argtypes, argnames) \ static inline ret name argtypes \ { \ FUNCNAME(#name); \ \ switch (el_info->mesh->dim) { \ case 0: return name##_0d argnames; \ case 1: return name##_1d argnames; \ default: \ ERROR_EXIT("Illegal dim!\n"); \ return (ret)0; /* just to make the compiler happy */ \ } \ } # define ALBERTA_CODIM_ALIAS(ret, name, argtypes, argnames) \ static inline ret name##_0cd argtypes { return name##_1d argnames; } \ static inline ret name##_1cd argtypes { return name##_0d argnames; } /* Variants which start at DOW == 2 and thus are empty here */ # define ALBERTA_CODIM_ALIAS_2(ret, name, argtypes, argnames) # define ALBERTA_VOID_CODIM_ALIAS_2(name, argtypes, argnames) #elif DIM_OF_WORLD == 2 # define ALBERTA_CODIM_WRAPPER(ret, name, argtypes, argnames) \ static inline ret name argtypes \ { \ FUNCNAME(#name); \ \ switch (el_info->mesh->dim) { \ case 0: return name##_0d argnames; \ case 1: return name##_1d argnames; \ case 2: return name##_2d argnames; \ default: \ ERROR_EXIT("Illegal dim!\n"); \ return (ret)0; /* just to make the compiler happy ... */ \ } \ } # define ALBERTA_CODIM_ALIAS(ret, name, argtypes, argnames) \ static inline ret name##_0cd argtypes { return name##_2d argnames; } \ static inline ret name##_1cd argtypes { return name##_1d argnames; } \ static inline ret name##_2cd argtypes { return name##_0d argnames; } /* Variants which start at DOW == 2 */ # define ALBERTA_CODIM_ALIAS_2(ret, name, argtypes, argnames) \ static inline ret name##_0cd argtypes { return name##_2d argnames; } # define ALBERTA_VOID_CODIM_ALIAS_2(name, argtypes, argnames) \ static inline void name##_0cd argtypes { name##_2d argnames; } #elif DIM_OF_WORLD == 3 # define ALBERTA_CODIM_WRAPPER(ret, name, argtypes, argnames) \ static inline ret name argtypes \ { \ FUNCNAME(#name); \ \ switch (el_info->mesh->dim) { \ case 0: return name##_0d argnames; \ case 1: return name##_1d argnames; \ case 2: return name##_2d argnames; \ case 3: return name##_3d argnames; \ default: \ ERROR_EXIT("Illegal dim!\n"); \ return (ret)0; /* just to make the compiler happy ... */ \ } \ } # define ALBERTA_CODIM_ALIAS(ret, name, argtypes, argnames) \ static inline ret name##_0cd argtypes { return name##_3d argnames; } \ static inline ret name##_1cd argtypes { return name##_2d argnames; } \ static inline ret name##_2cd argtypes { return name##_1d argnames; } \ static inline ret name##_3cd argtypes { return name##_0d argnames; } /* Variants which start at DOW == 2 */ # define ALBERTA_CODIM_ALIAS_2(ret, name, argtypes, argnames) \ static inline ret name##_0cd argtypes { return name##_3d argnames; } \ static inline ret name##_1cd argtypes { return name##_2d argnames; } # define ALBERTA_VOID_CODIM_ALIAS_2(name, argtypes, argnames) \ static inline void name##_0cd argtypes { name##_3d argnames; } \ static inline void name##_1cd argtypes { name##_2d argnames; } #else # error Unsupported DIM_OF_WORLD #endif /* ..._Xcd() alias definitions */ ALBERTA_CODIM_ALIAS(int, world_to_coord, (const EL_INFO *el_info, const REAL *xy, REAL_B lambda), (el_info, xy, lambda)) ALBERTA_CODIM_ALIAS(const REAL *, coord_to_world, (const EL_INFO *el_info, const REAL *l, REAL_D w), (el_info, l, w)) ALBERTA_CODIM_ALIAS(REAL, el_volume, (const EL_INFO *el_info), (el_info)) ALBERTA_CODIM_ALIAS(REAL, el_det, (const EL_INFO *el_info), (el_info)) ALBERTA_CODIM_ALIAS(REAL, el_grd_lambda, (const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]), (el_info, grd_lam)) ALBERTA_CODIM_ALIAS(REAL, get_wall_normal, (const EL_INFO *el_info, int i0, REAL *normal), (el_info, i0, normal)) ALBERTA_CODIM_ALIAS(int *, sorted_wall_indices, (int face, int permno), (face, permno)) ALBERTA_CODIM_ALIAS(int, wall_orientation, (const EL *el, int face, int **vecp), (el, face, vecp)) ALBERTA_CODIM_ALIAS(int *, sort_wall_indices, (const EL *el, int face, int *vec), (el, face, vec)) /* Wrappers which look at el_info->mesh->dim */ ALBERTA_CODIM_WRAPPER(int, world_to_coord, (const EL_INFO *el_info, const REAL *x, REAL_B lambda), (el_info, x, lambda)) ALBERTA_CODIM_WRAPPER(const REAL *, coord_to_world, (const EL_INFO *el_info, const REAL *lambda, REAL_D x), (el_info, lambda, x)) ALBERTA_CODIM_WRAPPER(REAL, el_volume, (const EL_INFO *el_info), (el_info)) ALBERTA_CODIM_WRAPPER(REAL, el_det, (const EL_INFO *el_info), (el_info)) ALBERTA_CODIM_WRAPPER(REAL, el_grd_lambda, (const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]), (el_info, grd_lam)) ALBERTA_CODIM_WRAPPER(REAL, get_wall_normal, (const EL_INFO *el_info, int i0, REAL *normal), (el_info, i0, normal)) /* Some special wrapper functions, used for some stuff defined in * level.c */ ALBERTA_CODIM_ALIAS_2(REAL, level_element_det, (const REAL_D coord[]), (coord)) ALBERTA_VOID_CODIM_ALIAS_2(level_coord_to_world, (const REAL_D coord[], const REAL_B lambda, REAL_D world), (coord, lambda, world)) ALBERTA_VOID_CODIM_ALIAS_2(level_coord_to_el_coord, (const REAL_B v_lambda[], const REAL_B lambda, REAL_B el_lambda), (v_lambda, lambda, el_lambda)) /*** file estimator.c **************************************************/ #define INIT_UH 1 #define INIT_GRD_UH 2 REAL ellipt_est(const DOF_REAL_VEC *uh, ADAPT_STAT *adapt, REAL *(*rw_est)(EL *), REAL *(*rw_estc)(EL *), int degree, int norm, REAL C[3], const REAL_DD A, REAL (*f)(const EL_INFO *,const QUAD *,int,REAL,const REAL_D), FLAGS f_flag); REAL heat_est(const DOF_REAL_VEC *uh, ADAPT_INSTAT *adapt, REAL *(*rw_est)(EL *), REAL *(*rw_estc)(EL *), int degree, REAL C[4], const DOF_REAL_VEC *uh_old, const REAL_DD A, REAL (*f)(const EL_INFO *, const QUAD *, int iq, REAL t, REAL u, const REAL_D grd_u), FLAGS f_flag); /*** file estimator_dowb.c ************************************************/ REAL ellipt_est_d(const DOF_REAL_D_VEC *uh, ADAPT_STAT *adapt, REAL *(*rw_est)(EL *), REAL *(*rw_estc)(EL *), int degree, int norm, REAL C[3], const REAL_DD A[DIM_OF_WORLD][DIM_OF_WORLD], const REAL *(*f)(const EL_INFO *, const QUAD *, int qp, const REAL_D uh, const REAL_DD grd_uh, REAL_D res), FLAGS f_flag); REAL heat_est_d(const DOF_REAL_D_VEC *uh, ADAPT_INSTAT *adapt, REAL *(*rw_est)(EL *), REAL *(*rw_estc)(EL *), int degree, REAL C[4], const DOF_REAL_D_VEC *uh_old, const REAL_DD A[DIM_OF_WORLD][DIM_OF_WORLD], const REAL *(*f)(const EL_INFO *, const QUAD *, int iq, REAL t, const REAL_D u, const REAL_DD grd_u, REAL_D res), FLAGS f_flag); /*** file error.c *******************************************************/ REAL max_err_at_qp(REAL (*)(const REAL_D), const DOF_REAL_VEC *, const QUAD *); REAL max_err_d_at_qp(const REAL *(*)(const REAL_D, REAL_D), const DOF_REAL_D_VEC *, const QUAD *); REAL max_err_at_vert(REAL (*)(const REAL_D), const DOF_REAL_VEC *); REAL L2_err(REAL (*)(const REAL_D), const DOF_REAL_VEC *, const QUAD *, int, REAL *(*)(EL *), REAL *); REAL H1_err(const REAL *(*)(const REAL_D, REAL_D), const DOF_REAL_VEC *, const QUAD *, int, REAL *(*)(EL *), REAL *); REAL H1_err_d(const REAL_D *(*grd_u)(const REAL_D, REAL_DD), const DOF_REAL_D_VEC *uh, const QUAD *quad, int rel_err, REAL *(*rw_err_el)(EL *), REAL *max_h1_err2); REAL L2_err_d(const REAL *(*)(const REAL_D, REAL_D), const DOF_REAL_D_VEC *, const QUAD *, int, REAL *(*)(EL *), REAL *); /*** file eval.c ********************************************************/ REAL eval_uh(const REAL_B lambda, const REAL *uh_loc, const BAS_FCTS *b); REAL eval_uh_fast(const REAL *uh_loc, const REAL *phi_val, int n_bfcts); const REAL *eval_grd_uh(const REAL [N_LAMBDA], const REAL_D [N_LAMBDA], const REAL *, const BAS_FCTS *, REAL_D); const REAL *eval_grd_uh_fast(const REAL_D [N_LAMBDA], const REAL *, const REAL (*)[N_LAMBDA], int , REAL_D); const REAL_D *eval_D2_uh(const REAL [N_LAMBDA], const REAL_D [N_LAMBDA], const REAL *, const BAS_FCTS *, REAL_DD); const REAL_D *eval_D2_uh_fast(const REAL_D [N_LAMBDA], const REAL *, const REAL (*)[N_LAMBDA][N_LAMBDA], int, REAL_DD); const REAL *eval_uh_d(const REAL [N_LAMBDA], const REAL_D *, const BAS_FCTS *, REAL_D); const REAL *eval_uh_d_fast(const REAL_D *, const REAL *, int, REAL_D); const REAL_D *eval_grd_uh_d(const REAL [N_LAMBDA], const REAL_D [N_LAMBDA], const REAL_D *, const BAS_FCTS *, REAL_DD); const REAL_D *eval_grd_uh_d_fast(const REAL_D [N_LAMBDA], const REAL_D *, const REAL (*)[N_LAMBDA], int, REAL_DD); const REAL_DD *eval_D2_uh_d(const REAL [N_LAMBDA], const REAL_D [N_LAMBDA], const REAL_D *, const BAS_FCTS *, REAL_DD *); const REAL_DD *eval_D2_uh_d_fast(const REAL_D [N_LAMBDA], const REAL_D *, const REAL (*)[N_LAMBDA][N_LAMBDA], int, REAL_DD *); const REAL *uh_at_qp(const QUAD_FAST *, const REAL *uh_loc, REAL *vec); const REAL_D *grd_uh_at_qp(const QUAD_FAST *, const REAL_D grd_lambda[N_LAMBDA], const REAL *uh_loc, REAL_D *vec); const REAL_D *param_grd_uh_at_qp(const QUAD_FAST *fast, REAL_D Lambda[][N_LAMBDA], const REAL *uh_loc, REAL_D *vec); const REAL_DD *D2_uh_at_qp(const QUAD_FAST *, const REAL_D [N_LAMBDA], const REAL *, REAL_DD *); const REAL_D *uh_d_at_qp(const QUAD_FAST *fast, const REAL_D *uh_loc, REAL_D *vec); const REAL_DD *grd_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D grd_lambda[N_LAMBDA], const REAL_D *uh_loc, REAL_DD *vec); const REAL_DD *param_grd_uh_d_at_qp(const QUAD_FAST *fast, REAL_D Lambda[][N_LAMBDA], const REAL_D *uh_loc, REAL_DD *vec); const REAL_DD (*D2_uh_d_at_qp(const QUAD_FAST *, const REAL_D [N_LAMBDA], const REAL_D *, REAL_DD (*)[DIM_OF_WORLD]))[DIM_OF_WORLD]; REAL eval_div_uh_d(const REAL lambda[N_LAMBDA], const REAL_D grd_lambda[N_LAMBDA], const REAL_D *uh_loc, const BAS_FCTS *b); REAL eval_div_uh_d_fast(const REAL_D grd_lambda[N_LAMBDA], const REAL_D *uh_loc, const REAL (*grd_phi)[N_LAMBDA], int n_bas_fcts); const REAL *div_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, REAL *vec); const REAL *param_div_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[][N_LAMBDA], const REAL_D *uh_loc, REAL *vec); const REAL_DD *param_D2_uh_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[][N_LAMBDA], const REAL *uh_loc, REAL_DD *vec); const REAL_DD (*param_D2_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D grd_lam[][N_LAMBDA], const REAL_D *uh_loc, REAL_DD (*vec)[DIM_OF_WORLD]))[DIM_OF_WORLD]; REAL H1_norm_uh(const QUAD *quad, const DOF_REAL_VEC *u_h); REAL L2_norm_uh(const QUAD *quad, const DOF_REAL_VEC *u_h); REAL H1_norm_uh_d(const QUAD *quad, const DOF_REAL_D_VEC *u_h); REAL L2_norm_uh_d(const QUAD *quad, const DOF_REAL_D_VEC *u_h); extern void interpol(REAL (*fct)(const REAL_D), DOF_REAL_VEC *); extern void interpol_d(const REAL *(*)(const REAL_D, REAL_D), DOF_REAL_D_VEC *); /*** file graphXO.c ******************************************************/ GRAPH_WINDOW graph_open_window(const char *title, const char *geometry, REAL *world, MESH *mesh); void graph_close_window(GRAPH_WINDOW win); void graph_clear_window(GRAPH_WINDOW win, const GRAPH_RGBCOLOR c); void graph_mesh(GRAPH_WINDOW win, MESH *mesh, const GRAPH_RGBCOLOR c, FLAGS flag); void graph_drv(GRAPH_WINDOW win, const DOF_REAL_VEC *uh, REAL min, REAL max, int refine); void graph_drv_d(GRAPH_WINDOW win, const DOF_REAL_D_VEC *uh, REAL min, REAL max, int refine); void graph_el_est(GRAPH_WINDOW win, MESH *mesh, REAL (*get_el_est)(EL *el), REAL min, REAL max); void graph_point(GRAPH_WINDOW, const REAL [2], const GRAPH_RGBCOLOR, float); void graph_points(GRAPH_WINDOW win, int np, REAL (*p)[2], const GRAPH_RGBCOLOR c, float ps); void graph_line(GRAPH_WINDOW, const REAL [2], const REAL [2], const GRAPH_RGBCOLOR, float); void graph_fvalues_2d(GRAPH_WINDOW win, MESH *mesh, REAL(*fct)(const EL_INFO *el_info, const REAL *lambda), FLAGS flags, REAL min, REAL max, int refine); void graph_level_2d(GRAPH_WINDOW win, const DOF_REAL_VEC *v, REAL level, const GRAPH_RGBCOLOR c, int refine); void graph_levels_2d(GRAPH_WINDOW win, const DOF_REAL_VEC *v, int n, REAL const *levels, const GRAPH_RGBCOLOR *color, int refine); void graph_level_d_2d(GRAPH_WINDOW, const DOF_REAL_D_VEC *, REAL, const GRAPH_RGBCOLOR, int); void graph_levels_d_2d(GRAPH_WINDOW, const DOF_REAL_D_VEC *, int, const REAL *, const GRAPH_RGBCOLOR *, int); /* multigrid level display routines: */ void graph_mesh_mg_2d(GRAPH_WINDOW win, MESH *mesh, const GRAPH_RGBCOLOR c, FLAGS flags, int mg_level); void graph_values_mg_2d(GRAPH_WINDOW win, const DOF_REAL_VEC *v, REAL min, REAL max, int refine, int mg_level, const FE_SPACE *fe_space, const int *sort_dof_invers); /*** file l2scp.c *******************************************************/ void dirichlet_bound(REAL (*)(const REAL_D), DOF_REAL_VEC *, DOF_REAL_VEC *, DOF_SCHAR_VEC *); void L2scp_fct_bas(REAL (*f)(const REAL_D), const QUAD *, DOF_REAL_VEC *fh); void dirichlet_bound_d(const REAL *(*)(const REAL_D, REAL_D), DOF_REAL_D_VEC *, DOF_REAL_D_VEC *, DOF_SCHAR_VEC *); void L2scp_fct_bas_d(const REAL *(*f)(const REAL_D, REAL_D), const QUAD *, DOF_REAL_D_VEC *fhd); /*--- file oem_solve_s.c -------------------------------------------------*/ int oem_solve_s(const DOF_MATRIX *A, const DOF_REAL_VEC *f, DOF_REAL_VEC *u, OEM_SOLVER, REAL, int, int, int, int); int mat_vec_s(void *ud, int dim, const REAL *x, REAL *y); void *init_mat_vec_s(MatrixTranspose, const DOF_MATRIX *, const DOF_SCHAR_VEC *); void exit_mat_vec_s(void *); /*--- file oem_solve_d.c -------------------------------------------------*/ int oem_solve_d(const DOF_MATRIX *A, const DOF_REAL_D_VEC *f, DOF_REAL_D_VEC *u, OEM_SOLVER, REAL, int, int, int, int); int mat_vec_d(void *ud, int dim, const REAL *x, REAL *y); void *init_mat_vec_d(MatrixTranspose, const DOF_MATRIX *, const DOF_SCHAR_VEC *); void exit_mat_vec_d(void *); /*--- file oem_solve_dowb.c ----------------------------------------------*/ int oem_solve_dowb(const DOF_DOWB_MATRIX *A, const DOF_REAL_D_VEC *f, DOF_REAL_D_VEC *u, OEM_SOLVER, REAL, int, int, int, int); int mat_vec_dowb(void *ud, int dim, const REAL *x, REAL *y); void *init_mat_vec_dowb(MatrixTranspose, const DOF_DOWB_MATRIX *, const DOF_SCHAR_VEC *); void exit_mat_vec_dowb(void *); /*--- file parametric.c --------------------------------------------------*/ void use_lagrange_parametric(MESH *mesh, int degree, NODE_PROJECTION *n_proj, int strategy); DOF_REAL_D_VEC *get_lagrange_coords(MESH *mesh); DOF_UCHAR_VEC *get_lagrange_coord_flags(MESH *mesh); /*-- file sor.c ----------------------------------------------------------*/ int sor_dowb(DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *b, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info); int sor_d(DOF_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *b, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info); int sor_s(DOF_MATRIX *a, const DOF_REAL_VEC *f, const DOF_SCHAR_VEC *b, DOF_REAL_VEC *u, REAL omega, REAL tol, int max_iter, int info); /*** file ssor.c **********************************************************/ int ssor_dowb(DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *b, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info); int ssor_d(DOF_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *b, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info); int ssor_s(DOF_MATRIX *a, const DOF_REAL_VEC *f, const DOF_SCHAR_VEC *b, DOF_REAL_VEC *u, REAL omega, REAL tol, int max_iter, int info); /*** file traverse_r.c ***************************************************/ extern void mesh_traverse(MESH *mesh, int level, FLAGS fill_flag, void (*el_fct)(const EL_INFO *, void *data), void *data); extern void fill_macro_info(MESH *mesh, const MACRO_EL *mel, EL_INFO *elinfo); extern void fill_elinfo(int ichild, const EL_INFO *parent_info, EL_INFO *elinfo); /*** file traverse_nr.c ***************************************************/ extern TRAVERSE_STACK *get_traverse_stack(void); extern void free_traverse_stack(TRAVERSE_STACK *stack); extern const EL_INFO *traverse_first(TRAVERSE_STACK *stack, MESH *mesh, int level, FLAGS fill_flag); extern const EL_INFO *traverse_next(TRAVERSE_STACK *stack, const EL_INFO *); extern const EL_INFO *traverse_neighbour(TRAVERSE_STACK *stack, const EL_INFO *, int neighbour); extern const EL_INFO *traverse_parent(const TRAVERSE_STACK *stack, const EL_INFO *child); extern const EL_INFO *subtree_traverse_first(TRAVERSE_STACK *stack, const EL_INFO *local_root, int level, FLAGS fill_flag); #define TRAVERSE_START(mesh, stack, level, fill_flag, eli) \ if (((eli) = traverse_first(stack, mesh, level, fill_flag))) do #define TRAVERSE_STOP(stack, eli) \ while (((eli) = traverse_next(stack, eli))) /*--- file trav_xy.c -----------------------------------------------------*/ extern int find_el_at_pt(MESH *mesh, const REAL_D xy, EL_INFO **el_info_p, FLAGS flag, REAL bary[N_LAMBDA], const MACRO_EL *start_mel, const REAL_D xy0, REAL *sp); /*** file read_mesh.c *********************************************/ MESH *read_mesh(const char *fn, REAL *timeptr, NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int)); DOF_REAL_VEC *read_dof_real_vec(const char *, MESH *, FE_SPACE *); DOF_REAL_D_VEC *read_dof_real_d_vec(const char *, MESH *, FE_SPACE *); DOF_INT_VEC *read_dof_int_vec(const char *, MESH *, FE_SPACE *); DOF_SCHAR_VEC *read_dof_schar_vec(const char *, MESH *, FE_SPACE *); DOF_UCHAR_VEC *read_dof_uchar_vec(const char *, MESH *, FE_SPACE *); MESH *read_mesh_xdr(const char *, REAL *, NODE_PROJECTION *(*)(MESH *, MACRO_EL *, int)); DOF_REAL_VEC *read_dof_real_vec_xdr(const char *, MESH *, FE_SPACE *); DOF_REAL_D_VEC *read_dof_real_d_vec_xdr(const char *, MESH *, FE_SPACE *); DOF_INT_VEC *read_dof_int_vec_xdr(const char *, MESH *, FE_SPACE *); DOF_SCHAR_VEC *read_dof_schar_vec_xdr(const char *, MESH *, FE_SPACE *); DOF_UCHAR_VEC *read_dof_uchar_vec_xdr(const char *, MESH *, FE_SPACE *); /*** file write_mesh.c ********************************************/ int write_mesh(MESH *, const char *, REAL); int write_dof_real_vec(const DOF_REAL_VEC *, const char *); int write_dof_real_d_vec(const DOF_REAL_D_VEC *, const char *); int write_dof_int_vec(const DOF_INT_VEC *, const char *); int write_dof_schar_vec(const DOF_SCHAR_VEC *, const char *); int write_dof_uchar_vec(const DOF_UCHAR_VEC *, const char *); int write_mesh_xdr(MESH *, const char *, REAL); int write_dof_real_vec_xdr(const DOF_REAL_VEC *, const char *); int write_dof_real_d_vec_xdr(const DOF_REAL_D_VEC *, const char *); int write_dof_int_vec_xdr(const DOF_INT_VEC *, const char *); int write_dof_schar_vec_xdr(const DOF_SCHAR_VEC *, const char *); int write_dof_uchar_vec_xdr(const DOF_UCHAR_VEC *, const char *); int write_dof_matrix_pbm(const DOF_MATRIX *matrix, const char *filename); /*** file write_mesh_gmv.c ********************************************/ int write_mesh_gmv(MESH *mesh, const char *file_name, int write_ascii, int use_refined_grid, const int n_drv, DOF_REAL_VEC **drv_ptr, const int n_drdv, DOF_REAL_D_VEC **drdv_ptr, DOF_REAL_D_VEC *velocity, REAL sim_time); int write_dof_vec_gmv(MESH *mesh, const char *mesh_file, const char *file_name, int write_ascii, int use_refined_grid, const int n_drv, DOF_REAL_VEC **drv_ptr, const int n_drdv, DOF_REAL_D_VEC **drdv_ptr, DOF_REAL_D_VEC *velocity, REAL sim_time); /*-- file write_mesh_ps.c ------------------------------------------------*/ void write_mesh_ps(MESH *mesh, const char *filename, const char *title, const REAL x[2], const REAL y[2], int keepaspect, int draw_bound); /*--------------------------------------------------------------------------*/ /* interface for Lagrange elements for the gltools */ /* file gltools.c */ /*--------------------------------------------------------------------------*/ typedef void* GLTOOLS_WINDOW; GLTOOLS_WINDOW open_gltools_window(const char *, const char *, const REAL *, MESH *, int); void close_gltools_window(GLTOOLS_WINDOW); extern int gltools_get_next_dialog(void); extern void gltools_set_next_dialog(int dialog); void gltools_est(GLTOOLS_WINDOW, MESH *, REAL (*)(EL *), REAL, REAL); void gltools_disp_mesh(GLTOOLS_WINDOW, MESH *, int, const DOF_REAL_D_VEC *); void gltools_mesh(GLTOOLS_WINDOW win, MESH *, int); void gltools_disp_drv(GLTOOLS_WINDOW, const DOF_REAL_VEC *, REAL, REAL, const DOF_REAL_D_VEC *); void gltools_drv(GLTOOLS_WINDOW, const DOF_REAL_VEC *, REAL, REAL); void gltools_disp_drv_d(GLTOOLS_WINDOW, const DOF_REAL_D_VEC *, REAL, REAL, const DOF_REAL_D_VEC *); void gltools_drv_d(GLTOOLS_WINDOW, const DOF_REAL_D_VEC *, REAL, REAL); void gltools_disp_vec(GLTOOLS_WINDOW, const DOF_REAL_D_VEC *, REAL, REAL, const DOF_REAL_D_VEC *); void gltools_vec(GLTOOLS_WINDOW, const DOF_REAL_D_VEC *, REAL, REAL); /*--------------------------------------------------------------------------*/ /* interface for Lagrange elements for the dxtools */ /* file dxtools.c */ /*--------------------------------------------------------------------------*/ typedef struct dxtools_window DXTOOLS_WINDOW; extern DXTOOLS_WINDOW *open_dxtools_window(const char *title, const char *geometry); extern void close_dxtools_window(DXTOOLS_WINDOW *win); extern void dxtools_mesh(DXTOOLS_WINDOW *win, MESH *mesh); extern void dxtools_drv(DXTOOLS_WINDOW *win, const DOF_REAL_VEC *u); extern void dxtools_drdv(DXTOOLS_WINDOW *win, const DOF_REAL_D_VEC *u); #ifdef __cplusplus } #endif #endif /* !_ALBERTA_H_ */ alberta-2.0.1/alberta/src/Common/alberta_inlines.h0000644000042300001440000004575110676724253017022 00000000000000#ifndef _ALBERT_INLINES_H_ #define _ALBERT_INLINES_H_ /*--------------------------------------------------------------------------*/ /* ALBERT: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: albert_inlines.h */ /* */ /* */ /* description: Blas-like inline functions for REAL_Ds and REAL_DDs */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERT */ /* */ /* (c) by A. Schmidt, K.G. Siebert, C.-J. Heine (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include /* essentially a no-op when included from alberta.h */ #ifndef DIM_OF_WORLD # error Need to know the dimension of the World :) #endif /* multiple invocations of macro-arguments can be harmful, if the macro * argument is, e.g., a function-call. * * NOTE: as DIM_OF_WORLD is a constant, the C-compiler should unroll all * loops when compiling with optimizations, so there should be no need * for hand-unrolling, except in some simple 1D cases. * * Also, all modern compilers do function inlining, so the * function-call over-head is _not_ a problem. * * Note: the function may be nested, they return the address of the * _modified_ operand. So AXPY(a, AX(b, x), y) is valid. */ /* The following functions are defined here: * * AX(a, x) -- x *= a (alias SCAL_DOW is also defined) * AXEY(a, x, y) -- y = a x * AXPBY(a, x, b, y, z) -- z = a x + by * AXPBYP(a, x, b, y, z) -- z += a x + by * AXPY(a, x, y) -- y += a x * COPY(src, dst) -- dst := src * DIST(x, y) -- sqrt(DST2(x, y)) * DST2(x, y) -- SCP(x-y, x-y) * NRM2(x) -- SCP(x, x) * NORM(x) -- sqrt(NRM2(x)) * MTV(m, v, b) -- b += m^t v * MV(m, v, b) -- b += m v (m is a matrix) * MDIV(m, v, b) -- scale v by the inverse of the diagonal -> b * SCP(x, y) -- * SET(val, x) -- x[i] = val, i=1, ..., DOW * WEDGE(x, y, n) -- n = x /\ y in 3D * WEDGE(x, y) -- x0 * y1 - x1 * y0 in 2D * * The actual function named is generated by adding a _DOW() suffix. * * Prefix Version * none REAL_D * M REAL_DD * DM diagonal matrix, diagonal stored in REAL_D vector * SM symmetric matrix, data type REAL_DDS (albert.h) * * Further: * Macros EXPAND and FORMAT (with named pre- and suffixes) for easier * print-out of REAL_D and REAL_DD, use like this: * * printf("text"MFORMAT_DOW"more text\n", MEXPAND_DOW(m)); * */ #ifndef C_CONST_IS_BRAIN_DAMAGED # define C_CONST_IS_BRAIN_DAMAGED 1 #endif #if C_CONST_IS_BRAIN_DAMAGED # define CCIBD_CONST /* */ #else # define CCIBD_CONST const /* actually, this will never happen ... :( */ #endif #define SCAL_DOW(a, x) AX_DOW(a, x) static inline REAL *AX_DOW(REAL a, REAL_D x) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { x[i] *= a; } return x; } #define MSCAL_DOW(a, m) MAX_DOW(a, m) static inline REAL_D *MAX_DOW(REAL a, REAL_DD m) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { AX_DOW(a, m[i]); } return m; } #define DMSCAL_DOW(a, m) DMAX_DOW(a, m) #define DMAX_DOW(a, m) AX_DOW(a, m) #define SMSCAL_DOW(a, m) SMAX_DOW(a, m) static inline REAL_DDS *SMAX_DOW(REAL a, REAL_DDS *m) { int i; AX_DOW(a, m->row0); for (i = 0; i < DIM_OF_WORLD - 1; i++) { m->row1[i] *= a; } for (i = 0; i < DIM_OF_WORLD - 2; i++) { m->row2[i] *= a; } return m; } static inline REAL *AXEY_DOW(REAL a, const REAL_D x, REAL_D y) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { y[i] = a * x[i]; } return y; } static inline REAL_D *MAXEY_DOW(REAL a, CCIBD_CONST REAL_DD x, REAL_DD y) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { AXEY_DOW(a, x[i], y[i]); } return y; } #define DMAXEY_DOW(a, x, y) AXEY_DOW(a, x, y) static inline REAL_DDS *SMAXEY_DOW(REAL a, const REAL_DDS *x, REAL_DDS *y) { int i; AXEY_DOW(a, x->row0, y->row0); for (i = 0; i < DIM_OF_WORLD - 1; i++) { y->row1[i] = a*x->row1[i]; } for (i = 0; i < DIM_OF_WORLD - 2; i++) { y->row2[i] = a*x->row2[i]; } return y; } static inline REAL *AXPY_DOW(REAL a, const REAL_D x, REAL_D y) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { y[i] += a * x[i]; } return y; } static inline REAL_D *MAXPY_DOW(REAL a, CCIBD_CONST REAL_DD x, REAL_DD y) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { AXPY_DOW(a, x[i], y[i]); } return y; } /* same as above, but add the transposed matrix to y */ static inline REAL_D *MAXTPY_DOW(REAL a, CCIBD_CONST REAL_DD x, REAL_DD y) { int i, j; for (i = 0; i < DIM_OF_WORLD; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { y[i][j] += a*x[j][i]; } } return y; } #define DMAXPY_DOW(a, x, y) AXPY_DOW(a, x, y) #define DMAXTPY_DOW(a, x, y) AXPY_DOW(a, x, y) /* transpose of diagonal matrix :) */ static inline REAL_DDS *SMAXPY_DOW(REAL a, const REAL_DDS *x, REAL_DDS *y) { int i; AXPY_DOW(a, x->row0, y->row0); for (i = 0; i < DIM_OF_WORLD - 1; i++) { y->row1[i] += a*x->row1[i]; } for (i = 0; i < DIM_OF_WORLD - 2; i++) { y->row2[i] += a*x->row2[i]; } return y; } #define SMAXTPY_DOW(a, x, y) SMAXPY_DOW(a, x, y) /* transpose of symmetric matrix :) */ static inline REAL *AXPBY_DOW(REAL a, const REAL_D x, REAL b, const REAL_D y, REAL_D z) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { z[i] = b*y[i] + a * x[i]; } return z; } static inline REAL_D *MAXPBY_DOW(REAL a, CCIBD_CONST REAL_DD x, REAL b, CCIBD_CONST REAL_DD y, REAL_DD z) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { AXPBY_DOW(a, x[i], b, y[i], z[i]); } return z; } #define DMAXPBY_DOW(a, x, b, y, z) AXPBY_DOW(a, x, b, y, z) static inline REAL_DDS *SMAXPBY_DOW(REAL a, const REAL_DDS *x, REAL b, const REAL_DDS *y, REAL_DDS *z) { int i; AXPBY_DOW(a, x->row0, b, y->row0, z->row0); for (i = 0; i < DIM_OF_WORLD - 1; i++) { z->row1[i] = a*x->row1[i] + b*y->row1[i]; } for (i = 0; i < DIM_OF_WORLD - 2; i++) { z->row2[i] = a*x->row2[i] + b*y->row2[i]; } return z; } static inline REAL *AXPBYP_DOW(REAL a, const REAL_D x, REAL b, const REAL_D y, REAL_D z) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { z[i] += b*y[i] + a * x[i]; } return z; } static inline REAL_D *MAXPBYP_DOW(REAL a, CCIBD_CONST REAL_DD x, REAL b, CCIBD_CONST REAL_DD y, REAL_DD z) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { AXPBYP_DOW(a, x[i], b, y[i], z[i]); } return z; } #define DMAXPBYP_DOW(a, x, b, y, z) AXPBYP_DOW(a, x, b, y, z) static inline REAL_DDS *SMAXPBYP_DOW(REAL a, const REAL_DDS *x, REAL b, const REAL_DDS *y, REAL_DDS *z) { int i; AXPBYP_DOW(a, x->row0, b, y->row0, z->row0); for (i = 0; i < DIM_OF_WORLD - 1; i++) { z->row1[i] += a*x->row1[i] + b*y->row1[i]; } for (i = 0; i < DIM_OF_WORLD - 2; i++) { z->row2[i] += a*x->row2[i] + b*y->row2[i]; } return z; } static inline REAL *COPY_DOW(const REAL_D x, REAL_D y) { memcpy(y, x, sizeof(REAL_D)); return y; } static inline REAL_D *MCOPY_DOW(CCIBD_CONST REAL_DD x, REAL_DD y) { memcpy(y, x, sizeof(REAL_DD)); return y; } #define DMCOPY_DOW(src, dst) COPY_DOW(src, dst) static inline REAL_DDS *SMCOPY_DOW(CCIBD_CONST REAL_DDS *x, REAL_DDS *y) { memcpy(y, x, sizeof(REAL_DDS)); return y; } static inline REAL DST2_DOW(const REAL_D x, const REAL_D y) { # if DIM_OF_WORLD == 1 return SQR(ABS(x[0] - y[0])); # else int i; REAL accu; accu = SQR(x[0] - y[0]); for (i = 1; i < DIM_OF_WORLD; i++) { accu += SQR(x[i] - y[i]); } return accu; # endif } static inline REAL MDST2_DOW(CCIBD_CONST REAL_DD a, CCIBD_CONST REAL_DD b) { int i; REAL res = 0.0; for (i = 0; i < DIM_OF_WORLD; i++) { res += DST2_DOW(a[i], b[i]); } return res; } #define DMDST2_DOW(x, y) DST2_DOW(x, y) static inline REAL SMDST2_DOW(const REAL_DDS *a, const REAL_DDS *b) { int i; REAL res = 0.0; res = SQR(a->row0[0] - b->row0[0]); for (i = 1; i < DIM_OF_WORLD; i++) { res += 2.0*SQR(a->row0[i] - b->row0[i]); } #if DIM_OF_WORLD > 1 res += SQR(a->row1[0] - b->row1[0]); for (i = 1; i < DIM_OF_WORLD-1; i++) { res += 2.0*SQR(a->row1[i] - b->row1[i]); } #endif #if DIM_OF_WORLD > 2 res += SQR(a->row2[0] - b->row2[0]); for (i = 1; i < DIM_OF_WORLD-2; i++) { res += 2.0*SQR(a->row2[i] - b->row2[i]); } #endif return res; } static inline REAL NRM2_DOW(const REAL_D x) { int i; REAL accu; accu = SQR(x[0]); for (i = 1; i < DIM_OF_WORLD; i++) { accu += SQR(x[i]); } return accu; } static inline REAL MNRM2_DOW(CCIBD_CONST REAL_DD m) { int i; REAL res = 0.0; for (i = 0; i < DIM_OF_WORLD; i++) { res += NRM2_DOW(m[i]); } return res; } #define DMNRM2_DOW(m) NRM2_DOW(x) static inline REAL SMNRM2_DOW(const REAL_DDS *a) { int i; REAL res = 0.0; res = SQR(a->row0[0]); for (i = 1; i < DIM_OF_WORLD; i++) { res += 2.0*SQR(a->row0[i]); } #if DIM_OF_WORLD > 1 res += SQR(a->row1[0]); for (i = 1; i < DIM_OF_WORLD-1; i++) { res += 2.0*SQR(a->row1[i]); } #endif #if DIM_OF_WORLD > 2 res += SQR(a->row2[0]); for (i = 1; i < DIM_OF_WORLD-2; i++) { res += 2.0*SQR(a->row2[i]); } #endif return res; } static inline REAL SCP_DOW(const REAL_D x, const REAL_D y) { REAL res; int i; res = x[0] * y[0]; for (i = 1; i < DIM_OF_WORLD; i++) { res += x[i]*y[i]; } return res; } /* symmetric case, no need to load all values, should result in faster * code (less registers needed) */ static inline REAL *SMV_DOW(const REAL_DDS *m, const REAL_D v, REAL_D b) { b[0] += SCP_DOW(m->row0, v); #if DIM_OF_WORLD == 2 b[1] += m->row0[1]*v[0] + m->row1[0]*v[1]; #endif #if DIM_OF_WORLD == 3 b[1] += m->row0[1]*v[0] + m->row1[0]*v[1] + m->row1[1]*v[2]; b[2] += m->row0[2]*v[0] + m->row1[1]*v[1] + m->row2[0]*v[2]; #endif return b; } static inline REAL *MTV_DOW(CCIBD_CONST REAL_DD m, const REAL_D v, REAL_D b) { int i, j; for (i = 0; i < DIM_OF_WORLD; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { b[i] += m[j][i] * v[j]; } } return b; } #define SMTV_DOW(m, v, b) SMV_DOW(m, v, b) #define DMTV_DOW(m, v, b) DMV_DOW(m, v, b) static inline REAL *MDIV_DOW(CCIBD_CONST REAL_DD m, const REAL_D v, REAL_D b) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { b[i] = v[i] / m[i][i]; } return b; } static inline REAL *SMDIV_DOW(const REAL_DDS *m, const REAL_D v, REAL_D b) { b[0] = v[0] / m->row0[0]; #if DIM_OF_WORLD == 2 b[1] = v[1] / m->row1[0]; #endif #if DIM_OF_WORLD == 3 b[1] = v[2] / m->row2[0]; #endif return b; } static inline REAL *DMDIV_DOW(const REAL_D m, const REAL_D y, REAL_D r) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { r[i] = y[i] / m[i]; } return r; } static inline REAL *DMV_DOW(const REAL_D x, const REAL_D y, REAL_D r) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { r[i] += x[i]*y[i]; } return r; } static inline REAL *MV_DOW(CCIBD_CONST REAL_DD m, const REAL_D v, REAL_D b) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { b[i] += SCP_DOW(m[i], v); } return b; } static inline REAL *MGEMV_DOW(REAL a, CCIBD_CONST REAL_DD m, const REAL_D v, REAL beta, REAL_D b) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { b[i] = beta*b[i] + a * SCP_DOW(m[i], v); } return b; } static inline REAL *SMGEMV_DOW(REAL a, const REAL_DDS *m, const REAL_D v, REAL beta, REAL_D b) { b[0] = beta*b[0] + a*SCP_DOW(m->row0, v); #if DIM_OF_WORLD == 2 b[1] = beta*b[1] + a*(m->row0[1]*v[0] + m->row1[0]*v[1]); #endif #if DIM_OF_WORLD == 3 b[1] = beta*b[1] + a*(m->row0[1]*v[0] + m->row1[0]*v[1] + m->row1[1]*v[2]); b[2] = beta*b[2] + a*(m->row0[2]*v[0] + m->row1[1]*v[1] + m->row2[0]*v[2]); #endif return b; } static inline REAL *DMGEMV_DOW(REAL a, const REAL_D x, const REAL_D y, REAL beta, REAL_D r) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { r[i] = beta*r[i] + a*x[i]*y[i]; } return r; } static inline REAL MSCP_DOW(CCIBD_CONST REAL_DD x, CCIBD_CONST REAL_DD y) { REAL res; int i; res = SCP_DOW(x[0], y[0]); for (i = 1; i < DIM_OF_WORLD; i++) { res += SCP_DOW(x[i], y[i]); } return res; } #define DMSCP_DOW(x, y) SCP_DOW(x, y) static inline REAL SMSCP_DOW(const REAL_DDS *x, const REAL_DDS *y) { #if DIM_OF_WORLD > 1 int i; #endif REAL res; res = SCP_DOW(x->row0, y->row1); #if DIM_OF_WORLD > 1 res += x->row1[0]*y->row1[0]; for (i = 1; i < DIM_OF_WORLD - 1; i++) { res += 2.0*x->row1[i]*y->row1[i]; } #endif #if DIM_OF_WORLD > 2 res += x->row2[0]*y->row2[0]; for (i = 1; i < DIM_OF_WORLD - 2; i++) { res += 2.0*x->row2[i]*y->row2[i]; } #endif return res; } static inline REAL *SET_DOW(REAL val, REAL_D x) { int i; for (i = 0; i < DIM_OF_WORLD; i++) { x[i] = val; } return x; } static inline REAL_D *MSET_DOW(REAL val, REAL_DD m) { int i, j; for (i = 0; i < DIM_OF_WORLD; i++) { m[i][i] = val; for (j = i+1; j < DIM_OF_WORLD; j++) { m[j][i] = m[i][j] = 0.0; } } return m; } #define DMSET_DOW(val, m) SET_DOW(val, m) static inline REAL_DDS *SMSET_DOW(REAL val, REAL_DDS *m) { int i; m->row0[0] = val; for (i = 1; i < DIM_OF_WORLD; i++) { m->row0[i] = 0.0; } #if DIM_OF_WORLD > 1 m->row1[0] = val; for (i = 1; i < DIM_OF_WORLD - 1; i++) { m->row1[i] = val; } #endif #if DIM_OF_WORLD > 1 m->row2[0] = val; for (i = 1; i < DIM_OF_WORLD - 2; i++) { m->row2[i] = val; } #endif return m; } #if DIM_OF_WORLD == 2 static inline REAL WEDGE_DOW(const REAL_D a, const REAL_D b) { return a[0]*b[1] - a[1]*b[0]; } #endif #if DIM_OF_WORLD == 3 static inline REAL *WEDGE_DOW(const REAL_D a, const REAL_D b, REAL_D r) { r[0] = a[1]*b[2] - a[2]*b[1]; r[1] = a[2]*b[0] - a[0]*b[2]; r[2] = a[0]*b[1] - a[1]*b[0]; return r; } #endif #define MAT_SWITCH_TYPE(type, body_f, body_s, body_d) \ switch (type) { \ case dowbm_full: body_f; break; \ case dowbm_symm: body_s; break; \ case dowbm_diag: body_d; break; \ default: ERROR_EXIT("Unknown DOWBM_TYPE (%d)\n", type); \ } /* BODY(F, CAST, PRE, SUF) is supposed to be a "multiplex" macro where * BLAS routines are accessed via F##AXPY(..., CAST PRE var##SUF, ...) */ #define MAT_EMIT_BODY_SWITCH(type) \ MAT_SWITCH_TYPE(type, \ MAT_BODY(M, (REAL_D *),, full), \ MAT_BODY(SM, ,& , symm), \ MAT_BODY(DM, , , diag)) /* defines where only DOW == 1 plays a special role */ # if DIM_OF_WORLD == 1 # define DIST_DOW(x,y) ABS((x)[0]-(y)[0]) # define NORM_DOW(x) ABS((x)[0]) # define MNRM_DOW(m) ABS((m)[0][0]) # define DMNRM_DOW(m) NRM_DOW(m) # define SMNRM_DOW(m) ABS((m)->row0[0]) # define MDIST_DOW(a,b) ABS((a)[0][0] - (b)[0][0]) # define DMDIST_DOW(a,b) DIST_DOW(a, b) # define SDMDIST_DOW(a,b) ABS((a)->row0[0] - (b)->row0[0]) # else # define NORM_DOW(x) sqrt(NRM2_DOW(x)) # define DIST_DOW(x,y) sqrt(DST2_DOW(x, y)) # define MNORM_DOW(m) sqrt(MNRM2_DOW(m)) # define DMNORM_DOW(m) sqrt(DMNRM2_DOW(m)) # define SMNORM_DOW(m) sqrt(DMNRM2_DOW(m)) # define MDIST_DOW(a,b) sqrt(MDST2_DOW(a, b)) # define DMDIST_DOW(a,b) sqrt(DMDST2_DOW(a, b)) # define SMDIST_DOW(a,b) sqrt(SMDST2_DOW(a, b)) # endif /* defines different for all DOWs */ # if DIM_OF_WORLD == 1 # define REAL_DDS_ENT(a,i,j) (a).row0[0] # define EXPAND_DOW(x) (x)[0] # define FORMAT_DOW "%10.5le" # define MEXPAND_DOW(m) (m)[0][0] # define MFORMAT_DOW FORMAT_DOW # define SMEXPAND_DOW(m) (m)->row0[0] # define SMFORMAT_DOW FORMAT_DOW # define DMEXPAND_DOW(m) EXPAND_DOW(m) # define DMFORMAT_DOW FORMAT_DOW # elif DIM_OF_WORLD == 2 # define REAL_DDS_ENT(a,i,j) ((i) == 0 ? (a).row0[j] : (a).row1[j-1]) # define EXPAND_DOW(x) (x)[0], (x)[1] # define FORMAT_DOW "[%10.5le, %10.5le]" # define MEXPAND_DOW(m) (m)[0][0], (m)[0][1], (m)[1][0], (m)[1][1] # define MFORMAT_DOW "["FORMAT_DOW", "FORMAT_DOW"]" # define DMEXPAND_DOW(m) EXPAND_DOW(m) # define DMFORMAT_DOW FORMAT_DOW # define SMEXPAND_DOW(m) (m)->row0[0], (m)->row0[1], (m)->row0[1], (m)->row1[0] # define SMFORMAT_DOW MFORMAT_DOW # elif DIM_OF_WORLD == 3 # define REAL_DDS_ENT(a,i,j) \ ((i) == 0 ? (a).row0[j] : ((i) == 1 ? (a).row1[j-1] : (a).row2[0])) # define EXPAND_DOW(x) (x)[0], (x)[1], (x)[2] # define FORMAT_DOW "[%10.5le, %10.5le, %10.5le]" # define MEXPAND_DOW(m) \ (m)[0][0], (m)[0][1], (m)[0][2], \ (m)[1][0], (m)[1][1], (m)[1][2], \ (m)[2][0], (m)[2][1], (m)[2][2] # define MFORMAT_DOW "["FORMAT_DOW", "FORMAT_DOW", "FORMAT_DOW"]" # define DMEXPAND_DOW(m) EXPAND_DOW(m) # define DMFORMAT_DOW FORMAT_DOW # define SMEXPAND_DOW(m) \ (m)->row0[0], (m)->row0[1], (m)->row0[2], \ (m)->row0[1], (m)->row1[0], (m)->row1[1], \ (m)->row0[2], (m)->row1[1], (m)->row2[0] # define SMFORMAT_DOW MFORMAT_DOW # endif #endif /* _ALBERT_INLINES_H_ */ alberta-2.0.1/alberta/src/Common/Makefile.alberta.in0000644000042300001440000000721210676732100017150 00000000000000# Hey, Emacs, we're -*- makefile -*- mode! ######################################################################## # master Makefile, included by application Makefiles # # Daniel Koester # ######################################################################## ######################################################################## # Shell to use (for running libtool, e.g.) # ######################################################################## SHELL = @SHELL@ ######################################################################## # C and FORTRAN compilers and loader # ######################################################################## CC = @CC@ FC = @F77@ LD = @CC@ ######################################################################## # prefix and exec_prefix # ######################################################################## prefix = @prefix@ exec_prefix = @exec_prefix@ ######################################################################## # used libraries and define flags # ######################################################################## BLAS_LIB = @BLAS_ALL_LIB@ ifndef ALBERTA_DEBUG ALBERTA_DEBUG=0 endif DFLAGS = -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) @HAVE_GLTOOLS_TRUE@DFLAGS += -DHAVE_LIBGLTOOLS=1 @HAVE_DX_TRUE@DFLAGS += -DHAVE_DXTOOLS=1 UTIL_LIB = -l@PACKAGE@_util EXTRA_LIBS = @GLTOOLS_LIB@ @DX_ALL_LIB@ @OPENGL_LIB@ @X_ALL_LIBS@ @LIBS@ ######################################################################## # used libtool # ######################################################################## ifeq (@INSTALL_LIBTOOL@,1) LIBTOOL_LINK = @libexecdir@/libtool.@PACKAGE@ --mode=link endif ######################################################################## # compile commands # ######################################################################## .c.o: $(CC) $(DFLAGS) $(CPPFLAGS) $(CFLAGS) -I$(ALBERTA_INCLUDE_PATH) -c $< .f.o: $(FC) $(FFLAGS) -c $< ######################################################################## # define default link commands # ######################################################################## LINK = $(LIBTOOL_LINK) $(LD) $(CFLAGS) $(LDFLAGS) -o $@ F77LINK = $(LIBTOOL_LINK) $(F77) $(FFLAGS) $(LDFLAGS) -o $@ ######################################################################## # the ALBERTA library and libraries used by ALBERTA # ######################################################################## ifeq ($(ALBERTA_DEBUG), 1) ALBERTA_LIB = -lalberta_$(DIM_OF_WORLD)d_debug else ALBERTA_LIB = -lalberta_$(DIM_OF_WORLD)d endif LIBS = -L$(ALBERTA_LIB_PATH) $(ALBERTA_LIB) $(UTIL_LIB) $(BLAS_LIB) $(EXTRA_LIBS) ######################################################################## # some often used targets # ######################################################################## default: $(DEFAULT) .PHONY: albertaclean albertacleano albertanew albertaclean: albertacleano -rm -rf .libs albertacleano: -rm -rf *.o *.lo albertarealclean: albertaclean -rm -f *~ albertanew: cleano default ######################################################################## # end of master makefile # ######################################################################## alberta-2.0.1/alberta/src/Common/Makefile.am0000644000042300001440000000031310676724253015533 00000000000000pkginclude_HEADERS = alberta.h alberta_inlines.h pkgdata_DATA = Makefile.alberta include $(srcdir)/Makefile.am.include EXTRA_DIST = Makefile.alberta.in alberta_intern.h $(sources) gltools.c dxtools.c alberta-2.0.1/alberta/src/Common/Makefile.am.include0000644000042300001440000000251410676724253017162 00000000000000# Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG)alberta-2.0.1/alberta/src/Common/Makefile.in0000644000042300001440000004046211067146146015547 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.alberta.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.am.include \ $(srcdir)/Makefile.in subdir = alberta/src/Common ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = Makefile.alberta SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgdatadir)" \ "$(DESTDIR)$(pkgincludedir)" pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkginclude_HEADERS = alberta.h alberta_inlines.h pkgdata_DATA = Makefile.alberta sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ EXTRA_DIST = Makefile.alberta.in alberta_intern.h $(sources) gltools.c dxtools.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/Common/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/Common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh Makefile.alberta: $(top_builddir)/config.status $(srcdir)/Makefile.alberta.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgdataDATA install-pkgincludeHEADERS install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgdataDATA uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgdataDATA install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-pkgdataDATA \ uninstall-pkgincludeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/Common/alberta_intern.h0000644000042300001440000002472510676724253016656 00000000000000#ifndef _ALBERTA_INTERN_H_ #define _ALBERTA_INTERN_H_ /*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: alberta_intern.h */ /* */ /* */ /* description: private header file of the ALBERTA package */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2005) */ /* (c) by D. Koester (2002-2005) */ /*--------------------------------------------------------------------------*/ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /*--------------------------------------------------------------------------*/ /* information about size of leaf data, which will be hidden at child[1] and*/ /* pointers to functions which will be used for transferring such */ /* information during refinement/coarsening */ /*--------------------------------------------------------------------------*/ typedef struct leaf_data_info LEAF_DATA_INFO; struct leaf_data_info { size_t leaf_data_size; void (*refine_leaf_data)(EL *parent, EL *child[2]); void (*coarsen_leaf_data)(EL *parent, EL *child[2]); }; /*--------------------------------------------------------------------------*/ /* interpolation of dof vectors during refinement */ /* using DOF_VEC_LIST structure */ /*--------------------------------------------------------------------------*/ typedef struct dof_vec_list DOF_VEC_LIST; struct dof_vec_list { int size; /* current size of total list */ void **list; /* total list, distributed to ones below */ int n_dof_int_vec, n_dof_dof_vec, n_dof_uchar_vec, n_dof_schar_vec, n_dof_real_vec, n_dof_real_d_vec, n_dof_ptr_vec, n_dof_matrix, n_dof_dowb_matrix; DOF_INT_VEC **dof_int_vec; DOF_DOF_VEC **dof_dof_vec; DOF_UCHAR_VEC **dof_uchar_vec; DOF_SCHAR_VEC **dof_schar_vec; DOF_REAL_VEC **dof_real_vec; DOF_REAL_D_VEC **dof_real_d_vec; DOF_PTR_VEC **dof_ptr_vec; DOF_MATRIX **dof_matrix; DOF_DOWB_MATRIX **dof_dowb_matrix; }; /*--------------------------------------------------------------------------*/ /* the structure stored in the entry mem_info of mesh. */ /* It stores information for memory management and macro elements. */ /*--------------------------------------------------------------------------*/ typedef struct mesh_mem_info MESH_MEM_INFO; struct mesh_mem_info { void *dof_ptrs; void *dofs[N_NODE_TYPES]; void *element; void *rc_list; void *real_d; DOF_VEC_LIST *dvlist; void *leaf_data; LEAF_DATA_INFO leaf_data_info[1]; /*--------------------------------------------------------------------------*/ /* special entries reserved for the use of master/slave grids. */ /*--------------------------------------------------------------------------*/ /* pointers on slave grids */ MESH *master; /* pointer to master mesh */ /* binding of master mesh */ int (*binding_method)(MESH *master, MACRO_EL *el, int subsimplex, void *data); DOF_PTR_VEC *master_binding; /* pointers to master mesh simplices */ DOF_PTR_VEC *slave_binding; /* pointers to slave mesh simplices */ /* pointers on master grids */ int n_slaves; /* no. of slaves of this mesh */ MESH **slaves; /* vector of pointers to slaves */ /*---8<---------------------------------------------------------------------*/ /*--- These last two entries are not really for memory management. ---*/ /*--- They describe the array used to store macro element coordinate ---*/ /*--- information, which is filled in macro.c and read_mesh.c. ---*/ /*--------------------------------------------------------------------->8---*/ int count; REAL_D *coords; }; /*** file memory.c ******************************************************/ extern void *AI_get_leaf_data(MESH *mesh); extern DOF_ADMIN *AI_get_dof_admin(MESH *mesh, const char *name, const int n_dof[N_NODE_TYPES]); extern void AI_free_leaf_data(void *leaf_data, MESH *mesh); extern void AI_reactivate_dof(MESH *mesh, const EL *el); extern DOF *AI_get_dof_memory(MESH *mesh, int position); extern void AI_get_dof_list(MESH *mesh, int i); extern void AI_get_dof_ptr_list(MESH *mesh); extern void AI_fill_missing_dofs(MESH *mesh); extern void AI_advance_cookies_rec(MESH *mesh); /*** file macro.c *******************************************************/ extern S_CHAR AI_get_orientation(MACRO_EL *mel); /*** file dof_admin.c ***************************************************/ extern void AI_add_dof_matrix_to_admin(DOF_MATRIX *, DOF_ADMIN *); extern void AI_add_dof_dowb_matrix_to_admin(DOF_DOWB_MATRIX *, DOF_ADMIN *); extern void AI_add_dof_int_vec_to_admin(DOF_INT_VEC *, DOF_ADMIN *); extern void AI_add_int_dof_vec_to_admin(DOF_DOF_VEC *, DOF_ADMIN *); extern void AI_add_dof_dof_vec_to_admin(DOF_DOF_VEC *, DOF_ADMIN *); extern void AI_add_dof_uchar_vec_to_admin(DOF_UCHAR_VEC *, DOF_ADMIN *); extern void AI_add_dof_schar_vec_to_admin(DOF_SCHAR_VEC *, DOF_ADMIN *); extern void AI_add_dof_real_vec_to_admin(DOF_REAL_VEC *, DOF_ADMIN *); extern void AI_add_dof_real_d_vec_to_admin(DOF_REAL_D_VEC *, DOF_ADMIN *); extern void AI_add_dof_ptr_vec_to_admin(DOF_PTR_VEC *, DOF_ADMIN *); extern void AI_remove_dof_matrix_from_admin(DOF_MATRIX *); extern void AI_remove_dof_dowb_matrix_from_admin(DOF_DOWB_MATRIX *); extern void AI_remove_dof_int_vec_from_admin(DOF_INT_VEC *); extern void AI_remove_dof_dof_vec_from_admin(DOF_DOF_VEC *); extern void AI_remove_int_dof_vec_from_admin(DOF_DOF_VEC *); extern void AI_remove_dof_uchar_vec_from_admin(DOF_UCHAR_VEC *); extern void AI_remove_dof_schar_vec_from_admin(DOF_SCHAR_VEC *); extern void AI_remove_dof_real_vec_from_admin(DOF_REAL_VEC *); extern void AI_remove_dof_real_vec_from_admin(DOF_REAL_VEC *); extern void AI_remove_dof_real_d_vec_from_admin(DOF_REAL_D_VEC *); extern void AI_remove_dof_ptr_vec_from_admin(DOF_PTR_VEC *); /*** file read_mesh.c ***************************************************/ extern bool_t AI_xdr_REAL(XDR *xdr, void *rp); extern bool_t AI_xdr_U_CHAR(XDR *xdr, void *ucp); extern bool_t AI_xdr_S_CHAR(XDR *xdr, void *cp); extern bool_t AI_xdr_DOF(XDR *xdr, void *dp); extern XDR *AI_xdr_open_file(const char *fn, enum xdr_op mode); extern int AI_xdr_close_file(XDR *xdr); /*** file refine.c ******************************************************/ extern void AI_refine_fct_1d(const EL_INFO *el_info, void *data); extern void AI_post_refine_1d(MESH *mesh); extern int AI_coarse_recursive_1d(MESH *mesh, EL *parent); #if DIM_OF_WORLD > 1 extern void AI_bisect_element_2d(MESH *mesh, EL *el, DOF *dof[3]); extern void AI_bisect_patch_2d(MESH *mesh,RC_LIST_EL ref_list[],int n_neighs); extern void AI_coarse_patch_2d(MESH *mesh,RC_LIST_EL coarse_list[], int n_neigh); extern void AI_post_refine_2d(MESH *mesh); #endif extern DOF_VEC_LIST *AI_get_dof_vec_list(MESH *mesh); extern void AI_free_dof_vec_list(MESH *mesh); extern void AI_get_neigh_on_patch_3d(RC_LIST_EL ref_list[], int n_neigh, int bound); /*** file submesh.c *****************************************************/ extern void AI_check_slavery(MESH *master); /*** file traverse_nr.c ***************************************************/ extern void AI_test_traverse_nr(MESH *mesh, int level, FLAGS fill_flag); extern void AI_update_elinfo_stack_3d(TRAVERSE_STACK *stack); /*** file traverse_r.c ***************************************************/ extern void AI_test_traverse(MESH *mesh, int level, FLAGS fill_flag); extern void AI_update_elinfo_3d(EL_INFO *elinfo); extern void AI_run_traverse_hooks(MESH *mesh, const EL_INFO *el_info); #ifdef __cplusplus } #endif #endif /* !_ALBERTA_INTERN_H_ */ alberta-2.0.1/alberta/src/Common/HB_precon.c0000644000042300001440000011127210676724253015511 00000000000000/****************************************************************************/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: HB_precon.c */ /* */ /* description: hierachical basis preconditioning, including higher */ /* order */ /* and also the BPX preconditioner */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*---8<---------------------------------------------------------------------*/ /*--- to do: something is wrong in BPX for p > 2 ---*/ /*--------------------------------------------------------------------->8---*/ #include "alberta.h" typedef struct { const FE_SPACE *fe_space; const DOF_SCHAR_VEC *bound_dv; int use_get_bound; int info; int high_degree; int mg_levels; int size; U_CHAR *dof_level; U_CHAR *local_dof; DOF (*dof_parent)[N_VERTICES_MAX]; DOF *sort_dof, *sort_dof_invers; int *dofs_per_level; const S_CHAR *bound; REAL (*ipol)[N_VERTICES_MAX]; /* for high_degree interpol. */ /* BPX section: */ REAL *g; REAL diam; } HB_DATA; static void exit_HB_precon(void *precon_data); /****************************************************************************/ typedef struct hb_traverse_data { int n0_vert, max_level, max_dof_level; const int *n_dof, *n0_dof, *node; int *local_dof_sort; HB_DATA *hb_data; } HB_TRAVERSE_DATA; static void max_level_fct(const EL_INFO *el_info, void *data) { HB_TRAVERSE_DATA *ud = (HB_TRAVERSE_DATA *)data; int dof, dof0, dof1, level = (int)(el_info->level); int dim = el_info->mesh->dim; EL *el = el_info->el; ud->max_level = MAX(level, ud->max_level); if (!(IS_LEAF_EL(el))) { dof = el->child[0]->dof[N_VERTICES(dim)-1][ud->n0_vert]; dof0 = ud->hb_data->dof_parent[dof][0] = el->dof[0][ud->n0_vert]; dof1 = ud->hb_data->dof_parent[dof][1] = el->dof[1][ud->n0_vert]; level = 1 + MAX(ud->hb_data->dof_level[dof0], ud->hb_data->dof_level[dof1]); ud->hb_data->dof_level[dof] = level; ud->max_dof_level = MAX(level, ud->max_dof_level); } } /* high_degree_fct(): set level of all non-vertex dofs to highest level, */ /* and save parent data */ static void high_degree_fct(const EL_INFO *el_info, void *data) { FUNCNAME("high_degree_fct"); HB_TRAVERSE_DATA *ud = (HB_TRAVERSE_DATA *)data; int i, j, k, m, n, nod0, n0, dof; int dim = el_info->mesh->dim; EL *el = el_info->el; DOF vertex_dof[N_VERTICES_MAX]; DEBUG_TEST_EXIT(IS_LEAF_EL(el), "Non-leaf element???\n"); for (k=0; kdof[k][ud->n0_vert]; m = N_VERTICES(dim); if ((n = ud->n_dof[CENTER]) > 0) { nod0 = ud->node[CENTER]; n0 = ud->n0_dof[CENTER]; for (j=0; jdof[nod0][n0+j]; /* MSG("center dof %2d: level %d\n", dof, max_dof_level); */ ud->hb_data->dof_level[dof] = ud->max_dof_level; for (k=0; khb_data->dof_parent[dof][k] = vertex_dof[k]; ud->hb_data->local_dof[dof] = ud->local_dof_sort[m++]; } } if(dim > 1 && (n = ud->n_dof[EDGE]) > 0) { nod0 = ud->node[EDGE]; n0 = ud->n0_dof[EDGE]; for (i=0; idof[nod0+i][n0+j]; if (!ud->hb_data->local_dof[dof]) { /* MSG("edge dof %2d: level %d\n", dof, max_dof_level); */ ud->hb_data->dof_level[dof] = ud->max_dof_level; for (k=0; khb_data->dof_parent[dof][k] = vertex_dof[k]; ud->hb_data->local_dof[dof] = ud->local_dof_sort[m]; } m++; } } if (dim == 3 && (n = ud->n_dof[FACE]) > 0) { nod0 = ud->node[FACE]; n0 = ud->n0_dof[FACE]; for (i=0; i < N_FACES_3D; i++) for (j=0; jdof[nod0+i][n0+j]; if (!ud->hb_data->local_dof[dof]) { /* MSG("face dof %2d: level %d\n", dof, max_dof_level); */ ud->hb_data->dof_level[dof] = ud->max_dof_level; for (k=0; k < N_VERTICES_3D; k++) ud->hb_data->dof_parent[dof][k] = vertex_dof[k]; ud->hb_data->local_dof[dof] = ud->local_dof_sort[m]; } m++; } } DEBUG_TEST_EXIT(m == ud->hb_data->fe_space->bas_fcts->n_bas_fcts, "m <> n_bas_fcts: %d %d\n", m, ud->hb_data->fe_space->bas_fcts->n_bas_fcts); return; } /****************************************************************************/ /* NOTE: This terrible hack is definitely something we could do better... */ static DOF *el_hat_dofs[N_VERTICES_MAX+N_EDGES_MAX+N_FACES_MAX+1]; static MESH dummy_mesh[4] = {{0},{nil,1},{nil,2},{nil,3}}; static EL el_hat = { {nil, nil}, /* children */ el_hat_dofs, 0 /* ... */ }; #if DIM_OF_WORLD == 1 static const EL_INFO el_hat_info[2] = { { nil, {{0.0}, {0.0}, {0.0}, {0.0}}, nil, nil, nil, 0, { 0 } /*--- and the rest is initialized with 0s ---*/ }, { dummy_mesh + 1, {{0.0}, {1.0}}, nil, nil, nil, FILL_COORDS, { 0 } /*--- and the rest is initialized with 0s ---*/ }}; #elif DIM_OF_WORLD == 2 static const EL_INFO el_hat_info[3] = { { nil, {{0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}}, nil, nil, nil, 0, { 0 } /*--- and the rest is initialized with 0s ---*/ }, { dummy_mesh + 1, {{0.0, 0.0}, {1.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}}, nil, nil, nil, FILL_COORDS, { 0 } /*--- and the rest is initialized with 0s ---*/ }, { dummy_mesh + 2, { {1.0, 0.0}, {0.0, 1.0}, {0.0, 0.0} }, nil, nil, nil, FILL_COORDS, { 0 } /*--- and the rest is initialized with 0s ---*/ }}; #elif DIM_OF_WORLD == 3 static const EL_INFO el_hat_info[4] = { { nil, {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}}, nil, nil, nil, 0, { 0 } /*--- and the rest is initialized with 0s ---*/ }, { dummy_mesh + 1, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}}, nil, nil, nil, FILL_COORDS, { 0 } /*--- and the rest is initialized with 0s ---*/ }, { dummy_mesh + 2, { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 0.0} }, nil, nil, nil, FILL_COORDS, { 0 } /*--- and the rest is initialized with 0s ---*/ }, { dummy_mesh + 3, { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 0.0} }, nil, nil, nil, FILL_COORDS, { 0 } /*--- and the rest is initialized with 0s ---*/ }}; #endif static REAL lambda_0(const REAL_D x) { return(x[0]);} static REAL lambda_1(const REAL_D x) { return(x[1]);} static REAL lambda_2(const REAL_D x) { return(x[2]);} static REAL lambda_0_1d(const REAL_D x) { return(1.0-x[0]);} static REAL lambda_2_2d(const REAL_D x) { return(1.0-x[0]-x[1]);} static REAL lambda_3_3d(const REAL_D x) { return(1.0-x[0]-x[1]-x[2]);} static REAL (*lambda[4][N_VERTICES_MAX])(const REAL_D) = {{nil, nil, nil, nil}, {lambda_0_1d,lambda_0,nil,nil}, {lambda_0,lambda_1,lambda_2_2d,nil}, {lambda_0,lambda_1,lambda_2,lambda_3_3d}}; /****************************************************************************/ /* init_HB_precon(matrix, boundary, info); initialize HB_DATA structure */ /* fills (void *)(HB_DATA *), if ok, */ /* returns nil, if anything goes wrong. */ /****************************************************************************/ static int init_HB_BPX_precon(void *precon_data, int BPX) { FUNCNAME("init_HB_BPX_precon"); static HB_TRAVERSE_DATA td[1]; HB_DATA *data = (HB_DATA *)precon_data; const FE_SPACE *fe_space; const DOF_ADMIN *admin; int i, j, k, m, size, info, dim; int *tmp_per_level = nil; int n_bas_fcts; const REAL *one_ipol; DOF *tmp_dofs, *tmp_dof_ptr; const DOF *dof_indices; if (!data) { ERROR("no precon_data\n"); return false; } if (!(data->fe_space)) { ERROR("no precon_data->fe_space\n"); return false; } info = data->info; fe_space = data->fe_space; if (!fe_space || !(fe_space->admin) || !(fe_space->bas_fcts)) { MSG("no fe_space or admin or bas_fcts.\n"); return false; } if (fe_space->bas_fcts->n_dof[VERTEX] != 1) { MSG("sorry, only for FE spaces with n_dof[VERTEX]==1.\n"); return false; } admin = fe_space->admin; size = admin->size_used; dim = fe_space->mesh->dim; n_bas_fcts = fe_space->bas_fcts->n_bas_fcts; data->high_degree = (n_bas_fcts > N_VERTICES(dim)); if (data->high_degree) { INFO(info, 1,"use high degree version\n"); } data->mg_levels = 0; data->dofs_per_level = nil; if (data->use_get_bound) { DOF_SCHAR_VEC dsv = {nil, nil, "HB/BPX bound", 0, nil, nil, nil}; dsv.fe_space = data->fe_space; dsv.size = size; dsv.vec = MEM_ALLOC(size, S_CHAR); dirichlet_bound(nil, nil, nil, &dsv); data->bound = dsv.vec; } else if (data->bound_dv) { data->bound = data->bound_dv->vec; } else { data->bound = nil; } data->ipol = nil; data->dof_level = MEM_ALLOC(2*size, U_CHAR); data->local_dof = data->dof_level + size; data->sort_dof = MEM_ALLOC((N_VERTICES_MAX+2)*size, DOF); data->sort_dof_invers = data->sort_dof + size; data->dof_parent = (DOF (*)[N_VERTICES_MAX])(data->sort_dof_invers + size); data->size = size; FOR_ALL_DOFS(admin, data->dof_level[dof] = 0; for (j=0; j < N_VERTICES_MAX;j++) data->dof_parent[dof][j] = -1; data->local_dof[dof] = 0; ); td->n0_vert = admin->n0_dof[VERTEX]; td->max_level = td->max_dof_level = 0; td->hb_data = data; mesh_traverse(fe_space->mesh, -1, CALL_EVERY_EL_PREORDER, max_level_fct, td); data->mg_levels = (td->max_level + dim - 1) / dim + 1; TEST_EXIT(data->mg_levels == (td->max_dof_level+1), "mg_levels %d != max_dof_level %d + 1\n", data->mg_levels, td->max_dof_level); if (data->high_degree) { /* add level for fine-grid non-vertex DOFs */ data->mg_levels++; data->ipol = (REAL (*)[N_VERTICES_MAX]) (MEM_ALLOC(N_VERTICES_MAX*n_bas_fcts, REAL)); td->local_dof_sort = MEM_ALLOC(n_bas_fcts, int); for (j=0; jlocal_dof_sort[j] = j; /* ???? */ tmp_dof_ptr = tmp_dofs = MEM_ALLOC(fe_space->mesh->n_dof_el, DOF); m = 0; for (i=0; imesh->node[VERTEX]+i] = tmp_dof_ptr; for (j=0; jn_dof[VERTEX]; j++) tmp_dof_ptr[admin->n0_dof[VERTEX]+j] = m++; tmp_dof_ptr += fe_space->mesh->n_dof[VERTEX]; } if (fe_space->mesh->n_dof[CENTER]) { el_hat_dofs[fe_space->mesh->node[CENTER]] = tmp_dof_ptr; for (j=0; jn_dof[CENTER]; j++) tmp_dof_ptr[admin->n0_dof[CENTER]+j] = m++; } if(dim > 1 && fe_space->mesh->n_dof[EDGE]) for (i=0; i < N_EDGES(dim); i++) { el_hat_dofs[fe_space->mesh->node[EDGE]+i] = tmp_dof_ptr; for (j=0; jn_dof[EDGE]; j++) tmp_dof_ptr[admin->n0_dof[EDGE]+j] = m++; tmp_dof_ptr += fe_space->mesh->n_dof[EDGE]; } if (dim == 3 && fe_space->mesh->n_dof[FACE]) for (i=0; imesh->node[FACE]+i] = tmp_dof_ptr; for (j=0; jn_dof[FACE]; j++) tmp_dof_ptr[admin->n0_dof[FACE]+j] = m++; tmp_dof_ptr += fe_space->mesh->n_dof[FACE]; } TEST_EXIT(m==n_bas_fcts,"m != n_bas_fcts: %d %d\n", m, n_bas_fcts); dof_indices = fe_space->bas_fcts->get_dof_indices(&el_hat, admin, nil); for (i = 0; ibas_fcts->n_bas_fcts; i++) td->local_dof_sort[dof_indices[i]] = i; #if 0 print_int_vec("dof_indices ", dof_indices, n_bas_fcts); print_int_vec("local_dof_sort", td->local_dof_sort, n_bas_fcts); #endif MEM_FREE(tmp_dofs, fe_space->mesh->n_dof_el, DOF); for (i=0; ibas_fcts->interpol(&(el_hat_info[dim]), 0, nil, lambda[dim][i], nil, nil); for (j=0; jipol[j][i] = one_ipol[j]; } td->max_dof_level++; td->n0_dof = admin->n0_dof; td->n_dof = admin->n_dof; td->node = fe_space->mesh->node; mesh_traverse(fe_space->mesh, -1, CALL_LEAF_EL, high_degree_fct, td); MEM_FREE(td->local_dof_sort, n_bas_fcts, int); if (info > 3) { for (i=0; iipol[i],N_VERTICES(dim)); } } #if 0 FOR_ALL_DOFS(admin, if (data->local_dof[dof]) MSG("dof %3d: local_dof=%2d\n", dof, data->local_dof[dof]); ); #endif } if (data->mg_levels < 2) { /* exit_HB_precon(data); */ return false; } data->dofs_per_level = MEM_ALLOC(data->mg_levels, int); tmp_per_level = MEM_ALLOC(data->mg_levels, int); for (i = 0; i < data->mg_levels; i++) data->dofs_per_level[i] = 0; FOR_ALL_DOFS(admin, data->dofs_per_level[data->dof_level[dof]]++); if (info > 3) { MSG("dofs_per_level:"); for (i = 0; i < data->mg_levels; i++) print_msg(" %d", data->dofs_per_level[i]); print_msg("\n"); } for (i = 1; i < data->mg_levels; i++) { tmp_per_level[i] = data->dofs_per_level[i-1]; data->dofs_per_level[i] += data->dofs_per_level[i-1]; } tmp_per_level[0] = 0; /* pointers for filling the sort vectors */ if (info > 3) { MSG("dofs_per_level accumulated:"); for (i = 0; i < data->mg_levels; i++) print_msg(" %d", data->dofs_per_level[i]); print_msg("\n"); } #if 0 for (i = 0; i < data->dofs_per_level[data->mg_levels-1]; i++) MSG("dof_parent[%3d] = (%3d,%3d,%3d), lev=%2d (%2d,%2d,%3d)\n", i, data->dof_parent[i][0], data->dof_parent[i][1], data->dof_parent[i][2], data->dof_level[i], data->dof_level[data->dof_parent[i][0]], data->dof_level[data->dof_parent[i][1]], data->dof_level[data->dof_parent[i][2]]); #endif /* build sort_dof[] and sort_dof_invers[] vectors */ FOR_ALL_DOFS(admin, j = data->dof_level[dof]; k = tmp_per_level[j]++; data->sort_dof[k] = dof; data->sort_dof_invers[dof] = k; ); #if 0 for (i = 0; i < data->dofs_per_level[data->mg_levels-1]; i++) { j = data->sort_dof[i]; MSG("sort[%3d]: dof=%3d, lev=%2d; invers[%3d]=%3d\n", i, j, data->dof_level[j], j, data->sort_dof_invers[j]); } /* WAIT; */ #endif MEM_FREE(tmp_per_level, data->mg_levels, int); if (BPX) { data->g = MEM_CALLOC(DIM_OF_WORLD*data->size, REAL); data->diam = fe_space->mesh->diam[0]; for (i=1; idiam = MAX(data->diam, fe_space->mesh->diam[i]); } else { data->g = nil; data->diam = 0; } return true; } /****************************************************************************/ /****************************************************************************/ static void exit_HB_BPX_precon(void *vdata, int BPX) { FUNCNAME("exit_HB_BPX_precon"); HB_DATA *data = (HB_DATA *)vdata; int dim; if (!data) { MSG("no data ???\n"); return; } dim = data->fe_space->mesh->dim; if (BPX) { DEBUG_TEST(data->g, "no g entry in BPX data???\n"); if (data->g) MEM_FREE(data->g, DIM_OF_WORLD*data->size, REAL); } else { DEBUG_TEST(!data->g, "g entry in HB data???\n"); if (data->g) MEM_FREE(data->g, DIM_OF_WORLD*data->size, REAL); } MEM_FREE(data->dofs_per_level, data->mg_levels, int); if (data->high_degree) { MEM_FREE(data->ipol, N_VERTICES_MAX*data->fe_space->bas_fcts->n_bas_fcts, REAL); } MEM_FREE(data->sort_dof, (N_VERTICES_MAX+2)*data->size, DOF); MEM_FREE(data->dof_level, 2*data->size, U_CHAR); if (data->use_get_bound) { MEM_FREE(data->bound, data->size, S_CHAR); } MEM_FREE(data, 1, HB_DATA); return; } /****************************************************************************/ static int init_HB_precon(void *precon_data) { return init_HB_BPX_precon(precon_data, 0); } static void exit_HB_precon(void *precon_data) { exit_HB_BPX_precon(precon_data, 0); } /****************************************************************************/ static void HB_precon_s(void *vdata, int n, REAL *r) { FUNCNAME("HB_precon_s"); int i, idof, level, last, jdof, k, level1, dim; HB_DATA *data; data = (HB_DATA *)vdata; if (!data) { MSG("no data ???\n"); return; } dim = data->fe_space->mesh->dim; if (n > data->size) { MSG("n > data->size ???\n"); return; } if (data->mg_levels < 2) /* nothing to do */ { return; } /* transposed basis transformation (run over refined levels only) */ if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; jdof = data->local_dof[i]; if (data->bound) { for (k=0; kbound[data->dof_parent[idof][k]] <= INTERIOR) r[data->dof_parent[idof][k]] += data->ipol[jdof][k] * r[idof]; } } else { for (k=0; kdof_parent[idof][k]] += data->ipol[jdof][k] * r[idof]; } } } level1 = data->mg_levels - 2; } else { level1 = data->mg_levels - 1; } for (level = level1; level > 0; level--) { last = data->dofs_per_level[level]; for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (data->bound) { if (data->bound[data->dof_parent[idof][0]] <= INTERIOR) r[data->dof_parent[idof][0]] += 0.5 * r[idof]; if (data->bound[data->dof_parent[idof][1]] <= INTERIOR) r[data->dof_parent[idof][1]] += 0.5 * r[idof]; } else { r[data->dof_parent[idof][0]] += 0.5 * r[idof]; r[data->dof_parent[idof][1]] += 0.5 * r[idof]; } } } /* basis transformation (run over refined levels only) */ for (level = 1; level <= level1; level++) { last = data->dofs_per_level[level]; for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { r[idof] += 0.5 * (r[data->dof_parent[idof][0]] + r[data->dof_parent[idof][1]]); } } } if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { jdof = data->local_dof[i]; for (k = 0; k < N_VERTICES(dim); k++) r[idof] += data->ipol[jdof][k] * r[data->dof_parent[idof][k]]; } } } return; } /****************************************************************************/ static void HB_precon_d(void *vdata, int n, REAL *r) { FUNCNAME("HB_precon_d"); int i,j, idof, level, last, jdof, k, level1, dim; HB_DATA *data; REAL_D *rd = (REAL_D *)r; data = (HB_DATA *)vdata; if (!data) { MSG("no data ???\n"); return; } dim = data->fe_space->mesh->dim; if (n > DIM_OF_WORLD*data->size) { MSG("n > data->DIM_OF_WORLD*size ???\n"); return; } if (data->mg_levels < 2) /* nothing to do */ { return; } /* transposed basis transformation (run over refined levels only) */ if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; jdof = data->local_dof[i]; if (data->bound) { for (k=0; kbound[data->dof_parent[idof][k]] <= INTERIOR) for (j=0; jdof_parent[idof][k]][j] += data->ipol[jdof][k] * rd[idof][j]; } } else { for (k=0; kdof_parent[idof][k]][j] += data->ipol[jdof][k] * rd[idof][j]; } } } level1 = data->mg_levels - 2; } else { level1 = data->mg_levels - 1; } for (level = level1; level > 0; level--) { last = data->dofs_per_level[level]; for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (data->bound) { if (data->bound[data->dof_parent[idof][0]] <= INTERIOR) for (j=0; jdof_parent[idof][0]][j] += 0.5 * rd[idof][j]; if (data->bound[data->dof_parent[idof][1]] <= INTERIOR) for (j=0; jdof_parent[idof][1]][j] += 0.5 * rd[idof][j]; } else { for (j=0; jdof_parent[idof][0]][j] += 0.5 * rd[idof][j]; rd[data->dof_parent[idof][1]][j] += 0.5 * rd[idof][j]; } } } } /* basis transformation (run over refined levels only) */ for (level = 1; level <= level1; level++) { last = data->dofs_per_level[level]; for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { for (j=0; jdof_parent[idof][0]][j] + rd[data->dof_parent[idof][1]][j]); } } } } if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { jdof = data->local_dof[i]; for (k = 0; k < N_VERTICES(dim); k++) for (j=0; jipol[jdof][k] * rd[data->dof_parent[idof][k]][j]; } } } } return; } /****************************************************************************/ /****************************************************************************/ const PRECON *get_HB_precon_s(const FE_SPACE *fe_space, const DOF_SCHAR_VEC *bound, int use_get_bound, int info) { PRECON *precon; HB_DATA *data; if (bound && (bound->fe_space != fe_space)) { ERROR("different fe spaces ?\n"); return(nil); } precon = MEM_CALLOC(1, PRECON); data = MEM_CALLOC(1, HB_DATA); data->fe_space = fe_space; if (!(data->bound_dv = bound)) data->use_get_bound = use_get_bound; data->info = info; precon->precon_data = data; precon->init_precon = init_HB_precon; precon->precon = HB_precon_s; precon->exit_precon = exit_HB_precon; return(precon); } const PRECON *get_HB_precon_d(const FE_SPACE *fe_space, const DOF_SCHAR_VEC *bound, int use_get_bound, int info) { PRECON *precon; HB_DATA *data; if (bound && (bound->fe_space != fe_space)) { ERROR("different fe spaces ?\n"); return(nil); } precon = MEM_CALLOC(1, PRECON); data = MEM_CALLOC(1, HB_DATA); data->fe_space = fe_space; if (!(data->bound_dv = bound)) data->use_get_bound = use_get_bound; data->info = info; precon->precon_data = data; precon->init_precon = init_HB_precon; precon->precon = HB_precon_d; precon->exit_precon = exit_HB_precon; return(precon); } /****************************************************************************/ /****************************************************************************/ /** BPX preconditioner **/ /****************************************************************************/ /****************************************************************************/ static int init_BPX_precon(void *precon_data) { return init_HB_BPX_precon(precon_data, 1); } void exit_BPX_precon(void *precon_data) { exit_HB_BPX_precon(precon_data, 1); } /****************************************************************************/ static void BPX_precon_s(void *vdata, int n, REAL *h) { FUNCNAME("BPX_precon_s"); int i, idof, level, first = 0, last, jdof, k, level1, *dof_parent, dim; HB_DATA *data; REAL *g, *ipol; data = (HB_DATA *)vdata; if (!data) { MSG("no data ???\n"); return; } dim = data->fe_space->mesh->dim; if (n > data->size) { MSG("n > data->size ???\n"); return; } if (data->mg_levels < 2) /* nothing to do */ { return; } g = data->g; DEBUG_TEST_EXIT(g, "no g vec in HB_DATA\n"); /* copy h to g */ for (i=0; isize; i++) g[i] = h[i]; /* Loop over all non-macro levels */ if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; /* inverse basis transformation on high degree level for h */ for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; dof_parent = data->dof_parent[idof]; jdof = data->local_dof[i]; ipol = data->ipol[jdof]; if (data->bound) { for (k=0; kbound[data->dof_parent[idof][k]] <= INTERIOR) h[idof] -= ipol[k] * h[dof_parent[k]]; } } else { for (k=0; kdofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; dof_parent = data->dof_parent[idof]; jdof = data->local_dof[i]; ipol = data->ipol[jdof]; if (data->bound) { for (k=0; kbound[dof_parent[k]] <= INTERIOR) g[dof_parent[k]] += ipol[k] * g[idof]; } } else { for (k=0; kdofs_per_level[data->mg_levels - 2]; if (data->bound) { for (i = 0; i < last; i++) { idof = data->sort_dof[i]; if (data->bound[idof] <= 0) h[idof] += g[idof]; } } else { for (i = first; i < last; i++) { idof = data->sort_dof[i]; h[idof] += g[idof]; } } level1 = data->mg_levels - 2; } else { level1 = data->mg_levels - 1; } for (level = level1; level > 0; level--) { last = data->dofs_per_level[level]; /* inverse basis transformation on level k (only) for h */ for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { h[idof] -= 0.5 * (h[data->dof_parent[idof][0]] + h[data->dof_parent[idof][1]]); } } /* transposed basis transformation on level k-1 for g */ for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (data->bound) { if (data->bound[data->dof_parent[idof][0]] <= INTERIOR) g[data->dof_parent[idof][0]] += 0.5 * g[idof]; if (data->bound[data->dof_parent[idof][1]] <= INTERIOR) g[data->dof_parent[idof][1]] += 0.5 * g[idof]; } else { g[data->dof_parent[idof][0]] += 0.5 * g[idof]; g[data->dof_parent[idof][1]] += 0.5 * g[idof]; } } /* add up to level k-1 */ last = data->dofs_per_level[level-1]; if (data->bound) { for (i = 0; i < last; i++) { idof = data->sort_dof[i]; if (data->bound[idof] <= 0) h[idof] += g[idof]; } } else { for (i = first; i < last; i++) { idof = data->sort_dof[i]; h[idof] += g[idof]; } } } /* basis transformation (all refined levels) */ for (level = 1; level <= level1; level++) { last = data->dofs_per_level[level]; for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { h[idof] += 0.5 * (h[data->dof_parent[idof][0]] + h[data->dof_parent[idof][1]]); } } } if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { dof_parent = data->dof_parent[idof]; jdof = data->local_dof[i]; ipol = data->ipol[jdof]; for (k = 0; k < N_VERTICES(dim); k++) h[idof] += ipol[k] * h[dof_parent[k]]; } } } return; } /****************************************************************************/ static void BPX_precon_d(void *vdata, int n, REAL *hh) { FUNCNAME("BPX_precon_d"); int i, j, k, idof, level, first = 0, last, jdof, level1, dim; HB_DATA *data; REAL_D *g; REAL_D *h = (REAL_D *)hh; data = (HB_DATA *)vdata; if (!data) { MSG("no data ???\n"); return; } dim = data->fe_space->mesh->dim; if (n > data->size*DIM_OF_WORLD) { MSG("n > data->size*DIM_OF_WORLD ???\n"); return; } if (data->mg_levels < 2) /* nothing to do */ { return; } g = (REAL_D *)data->g; DEBUG_TEST_EXIT(g, "no g vec in HB_DATA\n"); /* copy h to g */ for (i=0; isize; i++) for (j=0; jhigh_degree) { last = data->dofs_per_level[data->mg_levels - 1]; /* inverse basis transformation on high degree level for h */ for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; jdof = data->local_dof[i]; if (data->bound) { for (k=0; kbound[data->dof_parent[idof][k]] <= INTERIOR) for (j=0; jipol[jdof][k] * h[data->dof_parent[idof][k]][j]; } } else { for (k=0; kipol[jdof][k] * h[data->dof_parent[idof][k]][j]; } } } /* transposed basis transformation on high degree level for g */ for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; jdof = data->local_dof[i]; if (data->bound) { for (k=0; kbound[data->dof_parent[idof][k]] <= INTERIOR) for (j=0; jdof_parent[idof][k]][j] += data->ipol[jdof][k] * g[idof][j]; } } else { for (k=0; kdof_parent[idof][k]][j] += data->ipol[jdof][k] * g[idof][j]; } } } /* add up to degree1 level */ last = data->dofs_per_level[data->mg_levels - 2]; if (data->bound) { for (i = 0; i < last; i++) { idof = data->sort_dof[i]; if (data->bound[idof] <= 0) for (j=0; jsort_dof[i]; for (j=0; jmg_levels - 2; } else { level1 = data->mg_levels - 1; } for (level = level1; level > 0; level--) { last = data->dofs_per_level[level]; /* inverse basis transformation on level k (only) for h */ for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { for (j=0; jdof_parent[idof][0]][j] + h[data->dof_parent[idof][1]][j]); } } /* transposed basis transformation on level k-1 for g */ for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (data->bound) { if (data->bound[data->dof_parent[idof][0]] <= INTERIOR) for (j=0; jdof_parent[idof][0]][j] += 0.5 * g[idof][j]; if (data->bound[data->dof_parent[idof][1]] <= INTERIOR) for (j=0; jdof_parent[idof][1]][j] += 0.5 * g[idof][j]; } else { for (j=0; jdof_parent[idof][0]][j] += 0.5 * g[idof][j]; g[data->dof_parent[idof][1]][j] += 0.5 * g[idof][j]; } } } /* add up to level k-1 */ last = data->dofs_per_level[level-1]; if (data->bound) { for (i = 0; i < last; i++) { idof = data->sort_dof[i]; if (data->bound[idof] <= 0) for (j=0; jsort_dof[i]; for (j=0; jdofs_per_level[level]; for (i = data->dofs_per_level[level-1]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { for (j=0; jdof_parent[idof][0]][j] + h[data->dof_parent[idof][1]][j]); } } } if (data->high_degree) { last = data->dofs_per_level[data->mg_levels - 1]; for (i = data->dofs_per_level[data->mg_levels - 2]; i < last; i++) { idof = data->sort_dof[i]; if (!(data->bound && data->bound[idof] >= DIRICHLET)) { jdof = data->local_dof[i]; for (k = 0; k < N_VERTICES(dim); k++) for (j=0; jipol[jdof][k] * h[data->dof_parent[idof][k]][j]; } } } return; } /****************************************************************************/ const PRECON *get_BPX_precon_s(const FE_SPACE *fe_space, const DOF_SCHAR_VEC *bound, int use_get_bound, int info) { PRECON *precon; HB_DATA *data; if (bound && (bound->fe_space != fe_space)) { ERROR("different fe spaces ?\n"); return(nil); } precon = MEM_CALLOC(1, PRECON); data = MEM_CALLOC(1, HB_DATA); data->fe_space = fe_space; if (!(data->bound_dv = bound)) data->use_get_bound = use_get_bound; data->info = info; precon->precon_data = data; precon->init_precon = init_BPX_precon; precon->precon = BPX_precon_s; precon->exit_precon = exit_BPX_precon; return(precon); } const PRECON *get_BPX_precon_d(const FE_SPACE *fe_space, const DOF_SCHAR_VEC *bound, int use_get_bound, int info) { PRECON *precon; HB_DATA *data; if (bound && (bound->fe_space != fe_space)) { ERROR("different fe spaces ?\n"); return(nil); } precon = MEM_CALLOC(1, PRECON); data = MEM_CALLOC(1, HB_DATA); data->fe_space = fe_space; if (!(data->bound_dv = bound)) data->use_get_bound = use_get_bound; data->info = info; precon->precon_data = data; precon->init_precon = init_BPX_precon; precon->precon = BPX_precon_d; precon->exit_precon = exit_BPX_precon; return(precon); } /****************************************************************************/ alberta-2.0.1/alberta/src/Common/MG.c0000644000042300001440000001431510676724253014155 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: MG.c */ /* */ /* description: abstract framework for multigrid */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /****************************************************************************/ /* REAL recursive_MG_iteration(MULTI_GRID_INFO *mg_info, int level) */ /* return value: */ /* residual after MG iteration, if level=max_level-1 */ /* 0.0 otherwise */ /****************************************************************************/ static void recursive_MG_iteration(MULTI_GRID_INFO *mg_info, int level) { FUNCNAME("recursive_MG_iteration"); int cycle; REAL resid; INFO(mg_info->info, 6,"on level %d\n", level); if (level <= mg_info->exact_level) { mg_info->exact_solver(mg_info, level); } else { if (mg_info->pre_smooth) mg_info->pre_smooth(mg_info, level, mg_info->n_pre_smooth); for (cycle = 0; cycle < mg_info->cycle; cycle++) { if ((cycle > 0) && mg_info->in_smooth) mg_info->in_smooth(mg_info, level, mg_info->n_in_smooth); mg_info->mg_restrict(mg_info, level); recursive_MG_iteration(mg_info, level-1); mg_info->mg_prolongate(mg_info, level); } if (mg_info->post_smooth) mg_info->post_smooth(mg_info, level, mg_info->n_post_smooth); } if (mg_info->info >= 6) { if (level < mg_info->mg_levels-1) resid = mg_info->mg_resid(mg_info, level); else resid = 0.0; /* would be uninitialized, otherwise */ MSG("end resid on level %2d: %10.2le\n", level, resid); } return; } /****************************************************************************/ /* int MG(MULTI_GRID_INFO *mg_info) */ /* return value: */ /* -2: nil mg_info */ /* -1: error during init_multi_grid */ /* 0: initial residual <= tolerance */ /* n>0: number of MG iterations done */ /* n>max_iter: tolerance not reached after max_iter MG iterations */ /****************************************************************************/ int MG(MULTI_GRID_INFO *mg_info) { FUNCNAME("MG"); int iter, level; REAL resid, resid_old; if (!mg_info) { ERROR("no mg_info\n"); return(-2); } if (!(mg_info->mg_resid && mg_info->mg_restrict && mg_info->mg_prolongate && mg_info->exact_solver)) { ERROR("missing mg_info entry\n"); return(-2); } if (mg_info->init_multi_grid) { if (mg_info->init_multi_grid(mg_info)) { INFO(mg_info->info, 1,"error in init_multi_grid\n"); return(-1); } } if (mg_info->cycle > 1) INFO(mg_info->info, 2,"smooth=(%d,%d,%d), cycle=W(%d), exact=%d\n", mg_info->n_pre_smooth, mg_info->n_in_smooth, mg_info->n_post_smooth, mg_info->cycle, mg_info->exact_level); else INFO(mg_info->info, 2,"smooth=(%d,%d), cycle=V(%d), exact=%d\n", mg_info->n_pre_smooth, mg_info->n_post_smooth, mg_info->cycle, mg_info->exact_level); level = mg_info->mg_levels-1; resid_old = mg_info->mg_resid(mg_info, level); INFO(mg_info->info, 2,"start resid = %10.2le\n", resid_old); if (resid_old <= mg_info->tolerance) { INFO(mg_info->info, 1,"resid < tol; no MG iterations needed\n"); if (mg_info->exit_multi_grid) mg_info->exit_multi_grid(mg_info); return(0); } for (iter = 0; iter < mg_info->max_iter; iter++) { recursive_MG_iteration(mg_info, level); resid = mg_info->mg_resid(mg_info, level); INFO(mg_info->info, 2,"iter %2d: resid = %10.2le, rate = %7.4lf\n", iter+1, resid, resid/resid_old); resid_old = resid; if (resid <= mg_info->tolerance) { INFO(mg_info->info, 1,"convergence after iter %2d: resid = %10.2le\n", iter+1, resid); break; } } if (mg_info->exit_multi_grid) mg_info->exit_multi_grid(mg_info); return(iter+1); } alberta-2.0.1/alberta/src/Common/MG_s.c0000644000042300001440000002117110676724253014475 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: MG_s.c */ /* */ /* description: multigrid method for a scalar elliptic equation */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include #include /****************************************************************************/ static int init_multi_grid(MULTI_GRID_INFO *mg_info) { FUNCNAME("init_multi_grid"); MG_S_INFO *mg_s_info; int level; TEST_EXIT(mg_info && mg_info->data,"no mg_info or mg_s_info\n"); mg_s_info = (MG_S_INFO *)(mg_info->data); level = mg_info->mg_levels-1; MG_s_dof_copy_to_sparse(mg_s_info, mg_s_info->u, mg_s_info->u_h[level]); MG_s_dof_copy_to_sparse(mg_s_info, mg_s_info->f, mg_s_info->f_h[level]); return(0); } /****************************************************************************/ static void exit_multi_grid(MULTI_GRID_INFO *mg_info) { FUNCNAME("exit_multi_grid"); MG_S_INFO *mg_s_info; int level; TEST_EXIT(mg_info && mg_info->data,"no mg_info or mg_s_info\n"); mg_s_info = (MG_S_INFO *)(mg_info->data); level = mg_info->mg_levels-1; MG_s_dof_copy_from_sparse(mg_s_info, mg_s_info->u_h[level], mg_s_info->u); return; } /****************************************************************************/ /* MG solver */ /****************************************************************************/ MG_S_INFO *mg_s_init(DOF_MATRIX *matrix, const DOF_SCHAR_VEC *bound, int info, char *prefix) { FUNCNAME("mg_s_init"); char name[128], *append; clock_t first = 0, second; MULTI_GRID_INFO *mg_info; MG_S_INFO *mg_s_info; TEST_EXIT(matrix && matrix->row_fe_space,"no matrix or row_fe_space\n"); /* Ensure that we have a vertex dof admin (DK) */ get_vertex_admin(matrix->row_fe_space->mesh); mg_s_info = MEM_CALLOC(1, MG_S_INFO); mg_info = mg_s_info->mg_info = MEM_CALLOC(1, MULTI_GRID_INFO); mg_info->init_multi_grid = init_multi_grid; mg_info->pre_smooth = MG_s_smoother; mg_info->in_smooth = MG_s_smoother; mg_info->post_smooth = MG_s_smoother; mg_info->mg_restrict = MG_s_restrict; mg_info->mg_prolongate = MG_s_prolongate; mg_info->exact_solver = MG_s_exact_solver; mg_info->mg_resid = MG_s_resid; mg_info->exit_multi_grid = exit_multi_grid; mg_info->data = (void *)mg_s_info; mg_s_info->mg_info = mg_info; mg_s_info->fe_space = matrix->row_fe_space; mg_info->info = info; mg_info->cycle = 1; mg_info->n_pre_smooth = 1; mg_info->n_in_smooth = 1; mg_info->n_post_smooth = 1; mg_info->exact_level = 0; mg_s_info->smoother = 1; mg_s_info->smooth_omega = 1.0; mg_s_info->exact_solver = 1; mg_s_info->exact_omega = 1.0; if (prefix) { strncpy(name, prefix, 100); name[100] = 0; append = name; while(*append) append++; strcpy(append, "->tolerance"); GET_PARAMETER(info, name, "%f", &mg_info->tolerance); strcpy(append, "->exact_tolerance"); GET_PARAMETER(info, name, "%f", &mg_info->exact_tolerance); strcpy(append, "->cycle"); GET_PARAMETER(info, name, "%d", &mg_info->cycle); strcpy(append, "->n_pre_smooth"); GET_PARAMETER(info, name, "%d", &mg_info->n_pre_smooth); strcpy(append, "->n_in_smooth"); GET_PARAMETER(info, name, "%d", &mg_info->n_in_smooth); strcpy(append, "->n_post_smooth"); GET_PARAMETER(info, name, "%d", &mg_info->n_post_smooth); strcpy(append, "->exact_level"); GET_PARAMETER(info, name, "%d", &mg_info->exact_level); strcpy(append, "->info"); GET_PARAMETER(info, name, "%d", &mg_info->info); strcpy(append, "->smoother"); GET_PARAMETER(info, name, "%d", &mg_s_info->smoother); strcpy(append, "->smooth_omega"); GET_PARAMETER(info, name, "%e", &mg_s_info->smooth_omega); strcpy(append, "->exact_solver"); GET_PARAMETER(info, name, "%d", &mg_s_info->exact_solver); strcpy(append, "->exact_omega"); GET_PARAMETER(info, name, "%e", &mg_s_info->exact_omega); } if (mg_info->info > 2) first = clock(); MG_s_setup_levels(mg_s_info); MG_s_setup_mat_b(mg_s_info, matrix, bound); MG_s_reset_mat(mg_s_info); /* unsort matrix columns */ if (mg_info->info > 2) { second = clock(); MSG("setup needed %.5lf seconds\n", (double)(second-first)/(double)CLOCKS_PER_SEC); } return(mg_s_info); } /****************************************************************************/ int mg_s_solve(MG_S_INFO *mg_s_info, DOF_REAL_VEC *u, const DOF_REAL_VEC *f, REAL tol, int max_iter) { FUNCNAME("mg_s_solve"); clock_t first = 0, second; int iter; MULTI_GRID_INFO *mg_info = NULL; TEST_EXIT(mg_s_info && (mg_info = mg_s_info->mg_info), "no mg_s_info or mg_info\n"); TEST_EXIT(mg_s_info->mat,"mg_s_info not initialized?\n"); mg_info->tolerance = tol; mg_info->exact_tolerance = tol*0.01; mg_info->max_iter = max_iter; mg_s_info->u = u; mg_s_info->f = f; if (mg_info->info > 2) first = clock(); MG_s_sort_mat(mg_s_info); /* sort matrix columns */ iter = MG(mg_info); MG_s_reset_mat(mg_s_info); /* unsort matrix columns */ if (mg_info->info > 2) { second = clock(); MSG("setup+solver needed %.5lf seconds\n", (double)(second-first)/(double)CLOCKS_PER_SEC); } return(iter); } /****************************************************************************/ void mg_s_exit(MG_S_INFO *mg_s_info) { FUNCNAME("mg_s_exit"); MULTI_GRID_INFO *mg_info = NULL; TEST_EXIT(mg_s_info && (mg_info = mg_s_info->mg_info), "no mg_s_info or mg_info\n"); TEST_EXIT(mg_s_info->mat,"mg_s_info not initialized?\n"); MG_s_free_mem(mg_s_info); MEM_FREE(mg_info, 1, MULTI_GRID_INFO); MEM_FREE(mg_s_info, 1, MG_S_INFO); return; } /****************************************************************************/ /****************************************************************************/ int mg_s(DOF_MATRIX *matrix, DOF_REAL_VEC *u, const DOF_REAL_VEC *f, const DOF_SCHAR_VEC *bound, REAL tol, int max_iter, int info, char *prefix) { FUNCNAME("mg_s"); MG_S_INFO *mg_s_info; clock_t first = 0, second; int iter; if (info >= 2) first = clock(); mg_s_info = mg_s_init(matrix, bound, info, prefix); if (info > 2) { second = clock(); MSG("init needed %.5lf seconds\n", (double)(second-first)/(double)CLOCKS_PER_SEC); } iter = mg_s_solve(mg_s_info, u, f, tol, max_iter);;; mg_s_exit(mg_s_info); if (info >= 2) { second = clock(); MSG("init+solve needed %.5lf seconds\n", (double)(second-first)/(double)CLOCKS_PER_SEC); } return(iter); } alberta-2.0.1/alberta/src/Common/MG_s1.c0000644000042300001440000005044110721562136014547 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: MG_s1.c */ /* */ /* description: multigrid method for a scalar elliptic equation */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include #include /****************************************************************************/ typedef struct mg_traverse_data { int max_level, max_dof_level; U_CHAR *dof_level; DOF *dof_parent0, *dof_parent1; } MG_TRAVERSE_DATA; static void max_level_fct(const EL_INFO *el_info, void *data) { MG_TRAVERSE_DATA *ud = (MG_TRAVERSE_DATA *)data; int dof, dof0, dof1, level = (int)(el_info->level); int dim = el_info->mesh->dim; EL *el = el_info->el; ud->max_level = MAX(level, ud->max_level); if (!(IS_LEAF_EL(el))) { dof = el->child[0]->dof[N_VERTICES(dim)-1][0]; dof0 = ud->dof_parent0[dof] = el->dof[0][0]; dof1 = ud->dof_parent1[dof] = el->dof[1][0]; level = ud->dof_level[dof] = 1 + MAX(ud->dof_level[dof0], ud->dof_level[dof1]); ud->max_dof_level = MAX(level, ud->max_dof_level); } } /****************************************************************************/ /* int MG_s_setup_levels(MG_S_INFO *mg_s_info): */ /* build levels, dofs_per_level[], dof_level[], dof_parent[][], */ /* sort_dof[ sorted dof ] = unsorted dof, */ /* sort_dof_invers[ unsorted dof ] = sorted dof */ /* following info must be present in *mg_s_info: */ /* mg_info, fe_space */ /****************************************************************************/ void MG_s_setup_levels(MG_S_INFO *mg_s_info) { FUNCNAME("MG_s_setup_levels"); static MG_TRAVERSE_DATA td[1]; int levels, *tmp_per_level, *dofs_per_level; DOF *sort_dof, *sort_dof_invers, *parent; int i, j, k, sort_size, dim; char name[128]; const DOF_ADMIN *admin = NULL; MULTI_GRID_INFO *mg_info = NULL; DOF_MATRIX *mat; TEST_EXIT(mg_s_info && (mg_info = mg_s_info->mg_info), "no mg_s_info or mg_info\n"); TEST_EXIT(mg_s_info->fe_space && (admin = mg_s_info->fe_space->admin), "no fe_space or admin\n"); dim = mg_s_info->fe_space->mesh->dim; TEST_EXIT(mg_s_info->fe_space->bas_fcts,"no bas_fcts\n"); if (!strstr(mg_s_info->fe_space->bas_fcts->name, "lagrange1")) { ERROR_EXIT("not for bas_fcts <%s>, only for \n", mg_s_info->fe_space->bas_fcts->name); } sort_size = admin->used_count; if (mg_s_info->sort_size < sort_size) { mg_s_info->sort_dof = MEM_REALLOC(mg_s_info->sort_dof, mg_s_info->sort_size, sort_size, int); mg_s_info->dof_parent[0] = MEM_REALLOC(mg_s_info->dof_parent[0], mg_s_info->sort_size, sort_size, DOF); mg_s_info->dof_parent[1] = MEM_REALLOC(mg_s_info->dof_parent[1], mg_s_info->sort_size, sort_size, DOF); mg_s_info->dof_level = MEM_REALLOC(mg_s_info->dof_level, mg_s_info->sort_size, sort_size, U_CHAR); mg_s_info->sort_bound = MEM_REALLOC(mg_s_info->sort_bound, mg_s_info->sort_size, sort_size, S_CHAR); mg_s_info->sort_size = sort_size; } if (mg_s_info->sort_invers_size < admin->size_used) { mg_s_info->sort_dof_invers = MEM_REALLOC(mg_s_info->sort_dof_invers, mg_s_info->sort_invers_size, admin->size_used, int); mg_s_info->sort_invers_size = admin->size_used; } td->dof_level = mg_s_info->dof_level; td->dof_parent0 = mg_s_info->dof_parent[0]; td->dof_parent1 = mg_s_info->dof_parent[1]; for (i=0; idof_level[i] = 0; td->dof_parent0[i] = td->dof_parent1[i] = 0; } td->max_level = td->max_dof_level = 0; mesh_traverse(mg_s_info->fe_space->mesh, -1, CALL_EVERY_EL_PREORDER, max_level_fct, td); levels = (td->max_level + dim - 1) / dim + 1; TEST_EXIT(levels == (td->max_dof_level+1), "levels %d != max_dof_level %d + 1\n", levels, td->max_dof_level); if (levels > mg_s_info->size) { mg_s_info->matrix = MEM_REALLOC(mg_s_info->matrix, mg_s_info->size, levels, DOF_MATRIX *); mg_s_info->f_h = MEM_REALLOC(mg_s_info->f_h, mg_s_info->size, levels, REAL *); mg_s_info->u_h = MEM_REALLOC(mg_s_info->u_h, mg_s_info->size, levels, REAL *); mg_s_info->r_h = MEM_REALLOC(mg_s_info->r_h, mg_s_info->size, levels, REAL *); mg_s_info->dofs_per_level = MEM_REALLOC(mg_s_info->dofs_per_level, mg_s_info->size, levels, int); for (i = mg_s_info->size; i < levels; i++) { sprintf(name, "mg matrix level %d", i); mg_s_info->matrix[i] = get_dof_matrix(name, nil, nil); mg_s_info->f_h[i] = nil; mg_s_info->u_h[i] = nil; mg_s_info->r_h[i] = nil; } mg_s_info->size = levels; } mg_info->mg_levels = levels; /****************************************************************************/ /* count dofs per multigrid level */ sort_dof = mg_s_info->sort_dof; sort_dof_invers = mg_s_info->sort_dof_invers; dofs_per_level = mg_s_info->dofs_per_level; tmp_per_level = MEM_ALLOC(levels, int); for (i = 0; i < levels; i++) dofs_per_level[i] = 0; FOR_ALL_DOFS(admin, dofs_per_level[td->dof_level[dof]]++); if (mg_s_info->mg_info->info > 2) { MSG("dofs_per_level:"); for (i = 0; i < levels; i++) print_msg(" %d", dofs_per_level[i]); print_msg("\n"); } for (i = 1; i < levels; i++) { tmp_per_level[i] = dofs_per_level[i-1]; dofs_per_level[i] += dofs_per_level[i-1]; } tmp_per_level[0] = 0; /* pointers for filling the sort vectors */ if (mg_s_info->mg_info->info > 2) { MSG("dofs_per_level accumulated:"); for (i = 0; i < levels; i++) print_msg(" %d", dofs_per_level[i]); print_msg("\n"); } if (mg_s_info->mg_info->info > 9) { for (i = 0; i < dofs_per_level[levels-1]; i++) MSG("dof_parent[%3d] = (%3d,%3d), lev=%2d (%2d,%2d)\n", i, td->dof_parent0[i], td->dof_parent1[i], td->dof_level[i], td->dof_level[td->dof_parent0[i]], td->dof_level[td->dof_parent1[i]]); } DEBUG_TEST(dofs_per_level[levels-1] == sort_size, "dofs_per_level[levels-1] = %d != %d = sort_size\n", dofs_per_level[levels-1], sort_size); /****************************************************************************/ /* build sort_dof[] and sort_dof_invers[] vectors */ FOR_ALL_DOFS(admin, j = td->dof_level[dof]; k = tmp_per_level[j]++; sort_dof[k] = dof; sort_dof_invers[dof] = k; ); if (mg_s_info->mg_info->info > 9) { for (i = 0; i < dofs_per_level[levels-1]; i++) { j = sort_dof[i]; MSG("sort[%3d]: dof=%3d, lev=%2d; invers[%3d]=%3d\n", i, j, td->dof_level[j], j, sort_dof_invers[j]); } } MEM_FREE(tmp_per_level, levels, int); /****************************************************************************/ /* enlarge vectors and matrices, if necessary */ /****************************************************************************/ for (i = 0; i < levels; i++) { mat = mg_s_info->matrix[i]; mat->matrix_row = MEM_ALLOC(dofs_per_level[i], MATRIX_ROW *); for (j = 0; j < dofs_per_level[i]; j++) mat->matrix_row[j] = nil; mat->size = dofs_per_level[i]; mg_s_info->f_h[i] = MEM_ALLOC(dofs_per_level[i], REAL); mg_s_info->u_h[i] = MEM_ALLOC(dofs_per_level[i], REAL); mg_s_info->r_h[i] = MEM_ALLOC(dofs_per_level[i], REAL); } /****************************************************************************/ /* transform dof_parent vectors to sorted dofs */ /****************************************************************************/ parent = MEM_ALLOC(sort_size, DOF); for (i=0; idof_parent[0][sort_dof[i]]]; for (i=0; idof_parent[0][i] = parent[i]; for (i=0; idof_parent[1][sort_dof[i]]]; for (i=0; idof_parent[1][i] = parent[i]; MEM_FREE(parent, sort_size, DOF); return; } /****************************************************************************/ /* MG_s_setup_mat_b(): */ /* sort+restrict matrix, sort bound */ /* parameter bound may be nil. */ /****************************************************************************/ void MG_s_setup_mat_b(MG_S_INFO *mg_s_info, DOF_MATRIX *mat, const DOF_SCHAR_VEC *bound) { FUNCNAME("MG_s_setup_mat_b"); DOF *sort_dof; int *sort_dof_invers; S_CHAR *b, *sb; int size, level, i,j,jcol; const DOF_ADMIN *admin; DOF_MATRIX *sort_mat; MATRIX_ROW *row; clock_t first = 0, second; TEST_EXIT(mg_s_info && mg_s_info->fe_space, "no mg_s_info or fe_space\n"); TEST_EXIT(admin=mg_s_info->fe_space->admin, "no admin\n"); TEST_EXIT(sort_dof_invers=mg_s_info->sort_dof_invers, "no sort_dof_invers\n"); TEST_EXIT(sort_dof=mg_s_info->sort_dof, "no sort_dof\n"); TEST_EXIT(mat && mat->matrix_row, "no mat or matrix_row\n"); mg_s_info->mat = mat; mg_s_info->bound = bound; if (mg_s_info->mg_info->info > 2) first = clock(); /****************************************************************************/ /* transform matrix to sorted dofs */ /* change column indices in place!!!!! (i.e. matrix is changed!!!) */ /****************************************************************************/ level = mg_s_info->mg_info->mg_levels - 1; size = mg_s_info->dofs_per_level[level]; sort_mat = mg_s_info->matrix[level]; if (mg_s_info->mg_info->info > 7) { MSG("unsorted matrix:\n"); print_dof_matrix(mat); } clear_dof_matrix(sort_mat); FOR_ALL_DOFS(admin, for (row = sort_mat->matrix_row[sort_dof_invers[dof]] = mat->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { row->col[j] = sort_dof_invers[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } ); for (i=0; imatrix_row[i],"nil sort_mat->matrix_row[%d]\n", i); } if (mg_s_info->mg_info->info > 2) { second = clock(); MSG("sort needed %.5lf seconds\n", (double)(second-first)/(double)CLOCKS_PER_SEC); } /****************************************************************************/ /* transform bound vector to sorted dofs */ /****************************************************************************/ TEST_EXIT(sb = mg_s_info->sort_bound,"no sort_bound\n"); if (mg_s_info->bound) { TEST_EXIT(b = mg_s_info->bound->vec,"no bound->vec\n"); for (i=0; img_info->info > 7) { MSG("sorted matrix:\n"); print_dof_matrix(sort_mat); } if (mg_s_info->mg_info->info > 2) { second = clock(); MSG("matrix+bound sort+restrict needed %.5lf seconds\n", (double)(second-first)/(double)CLOCKS_PER_SEC); } return; } /****************************************************************************/ /* MG_s_dof_copy_to_sparse(DOF_ADMIN *admin, MULTI_GRID_INFO *mg_info, */ /* DOF_REAL_VEC *x, REAL *y) */ /* MG_s_dof_copy_from_sparse(DOF_ADMIN *admin, MULTI_GRID_INFO *mg_info, */ /* REAL *x, DOF_REAL_VEC *y) */ /****************************************************************************/ void MG_s_dof_copy_to_sparse(MG_S_INFO *mg_s_info, const DOF_REAL_VEC *x, REAL *y) { FUNCNAME("MG_s_dof_copy_to_sparse"); int j, jmax, *sort_dof_invers; REAL *xvec; const DOF_ADMIN *admin = NULL; TEST_EXIT(mg_s_info && y, "no mg_s_info or y\n"); TEST_EXIT(x && x->fe_space && (admin=x->fe_space->admin), "no x or x->fe_space or x->fe_space->admin\n"); xvec = x->vec; jmax = mg_s_info->dofs_per_level[mg_s_info->mg_info->mg_levels-1]; sort_dof_invers = mg_s_info->sort_dof_invers; FOR_ALL_DOFS(admin, j = sort_dof_invers[dof]; TEST_EXIT(j < jmax,"j=%d too big; dof=%d, max+1=%d\n", j, dof, jmax); y[j] = xvec[dof]; ); } void MG_s_dof_copy_from_sparse(MG_S_INFO *mg_s_info, const REAL *x, DOF_REAL_VEC *y) { FUNCNAME("MG_s_dof_copy_from_sparse"); int i, j, jmax, *sort_dof, ysize; REAL *yvec; TEST_EXIT(mg_s_info && x,"no mg_info or x\n"); TEST_EXIT(y,"no y\n"); sort_dof = mg_s_info->sort_dof; jmax = mg_s_info->dofs_per_level[mg_s_info->mg_info->mg_levels-1]; yvec = y->vec; ysize = y->size; for (j = 0; j < jmax; j++) { i = sort_dof[j]; TEST_EXIT(i < ysize,"i=%d too big; j=%d, y->size=%d\n", i, j, ysize); yvec[i] = x[j]; } } /****************************************************************************/ /* MG_s_reset_mat(): */ /* unsort matrix columns */ /****************************************************************************/ void MG_s_reset_mat(MG_S_INFO *mg_s_info) { FUNCNAME("MG_s_reset_mat"); DOF *sort_dof; int j, jcol; const DOF_ADMIN *admin; DOF_MATRIX *mat; MATRIX_ROW *row; TEST_EXIT(mg_s_info && mg_s_info->fe_space, "no mg_s_info or fe_space\n"); TEST_EXIT(admin=mg_s_info->fe_space->admin, "no admin\n"); TEST_EXIT(sort_dof=mg_s_info->sort_dof, "no sort_dof\n"); TEST_EXIT((mat = mg_s_info->mat) && mat->matrix_row, "no mat or matrix_row\n"); /****************************************************************************/ /* transform matrix to unsorted dofs */ /* change column indices in place!!!!! (i.e. matrix is changed!!!) */ /****************************************************************************/ FOR_ALL_DOFS(admin, for (row = mat->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { row->col[j] = sort_dof[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } ); } /****************************************************************************/ /* MG_s_sort_mat(): */ /* sort matrix columns */ /****************************************************************************/ void MG_s_sort_mat(MG_S_INFO *mg_s_info) { FUNCNAME("MG_s_sort_mat"); int *sort_dof_invers; int j, jcol; const DOF_ADMIN *admin; DOF_MATRIX *mat; MATRIX_ROW *row; TEST_EXIT(mg_s_info && mg_s_info->fe_space, "no mg_s_info or fe_space\n"); TEST_EXIT(admin=mg_s_info->fe_space->admin, "no admin\n"); TEST_EXIT(sort_dof_invers=mg_s_info->sort_dof_invers, "no sort_dof_invers\n"); TEST_EXIT((mat = mg_s_info->mat) && mat->matrix_row, "no mat or matrix_row\n"); /****************************************************************************/ /* transform matrix to unsorted dofs */ /* change column indices in place!!!!! (i.e. matrix is changed!!!) */ /****************************************************************************/ FOR_ALL_DOFS(admin, for (row = mat->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { row->col[j] = sort_dof_invers[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } ); } /****************************************************************************/ /* mg_info, fe_space */ /****************************************************************************/ void MG_s_free_mem(MG_S_INFO *mg_s_info) { FUNCNAME("MG_s_free_mem"); MULTI_GRID_INFO *mg_info = NULL; int levels, i, *dofs_per_level; TEST_EXIT(mg_s_info && (mg_info = mg_s_info->mg_info), "no mg_s_info or mg_info\n"); TEST_EXIT(dofs_per_level = mg_s_info->dofs_per_level, "no dofs_per_level\n"); levels = mg_info->mg_levels; /* fine grid matrix uses rows from mg_s_info->mat */ for (i=0; imatrix[levels-1]->size; i++) mg_s_info->matrix[levels-1]->matrix_row[i] = nil; for (i = levels-1; i >= 0; i--) { MEM_FREE(mg_s_info->r_h[i], dofs_per_level[i], REAL); MEM_FREE(mg_s_info->u_h[i], dofs_per_level[i], REAL); MEM_FREE(mg_s_info->f_h[i], dofs_per_level[i], REAL); free_dof_matrix(mg_s_info->matrix[i]); } MEM_FREE(mg_s_info->dofs_per_level, mg_s_info->size, int); MEM_FREE(mg_s_info->r_h, mg_s_info->size, REAL *); MEM_FREE(mg_s_info->u_h, mg_s_info->size, REAL *); MEM_FREE(mg_s_info->f_h, mg_s_info->size, REAL *); MEM_FREE(mg_s_info->matrix, mg_s_info->size, DOF_MATRIX *); MEM_FREE(mg_s_info->sort_dof_invers, mg_s_info->sort_invers_size, int); MEM_FREE(mg_s_info->sort_bound, mg_s_info->sort_size, S_CHAR); MEM_FREE(mg_s_info->dof_level, mg_s_info->sort_size, U_CHAR); MEM_FREE(mg_s_info->dof_parent[1], mg_s_info->sort_size, DOF); MEM_FREE(mg_s_info->dof_parent[0], mg_s_info->sort_size, DOF); MEM_FREE(mg_s_info->sort_dof, mg_s_info->sort_size, int); mg_s_info->sort_dof_invers = nil; mg_s_info->dofs_per_level = nil; mg_s_info->f_h = mg_s_info->u_h = mg_s_info->r_h = nil; mg_s_info->matrix = nil; mg_s_info->sort_dof_invers = nil; mg_s_info->sort_bound = nil; mg_s_info->dof_level = nil; mg_s_info->dof_parent[0] = mg_s_info->dof_parent[1] = nil; mg_s_info->sort_dof = nil; mg_s_info->size = 0; mg_s_info->sort_size = 0; mg_s_info->sort_invers_size = 0; return; } alberta-2.0.1/alberta/src/Common/MG_s2.c0000644000042300001440000005415610676724253014570 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: MG_s2.c */ /* */ /* description: multigrid method for a scalar elliptic equation */ /* DOF-sort-independent routines */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include #include /****************************************************************************/ /* restriction of fine-level matrix to coarser level matrices */ /****************************************************************************/ static void add_sparse_dof_entry(DOF_MATRIX *matrix, REAL sign, int irow, int jcol, REAL entry) { FUNCNAME("add_sparse_dof_entry"); int k; int free_col; MATRIX_ROW *row, *free_row; TEST_EXIT(matrix,"no matrix"); TEST_EXIT(irow < matrix->size, "irow = %d, mat.size = %d\n", irow, matrix->size); if (matrix->matrix_row[irow] == nil) { row = matrix->matrix_row[irow] = get_matrix_row(matrix->row_fe_space); row->col[0] = irow; /* first entry is diagonal element */ row->entry[0] = 0.0; } TEST_EXIT(jcol < matrix->size, "jcol = %d, matrix->size = %d\n", jcol, matrix->size); row = matrix->matrix_row[irow]; free_row = nil; free_col = 0; /* make gcc happy. Could only be uninitiazed if there were * infinite row-lists. */ do { for (k=0; kcol[k] == jcol) { row->entry[k] += sign * entry;; break; } if (ENTRY_NOT_USED(row->col[k])) { free_col = k; free_row = row; if (row->col[k] == NO_MORE_ENTRIES) { k = ROW_LENGTH; break; } } } if (k < ROW_LENGTH) break; /* done? */ if (row->next || free_row) { row = row->next; } else { free_row = row->next = get_matrix_row(matrix->row_fe_space); free_col = 0; row = nil; } } while (row); if (k >= ROW_LENGTH) { /* not done? */ TEST_EXIT(free_row,"no free_row"); TEST_EXIT(sign > 0.0,"new entry (%d,%d) in matrix %s with sign=%lf", irow, jcol, matrix->name, sign); free_row->col[free_col] = jcol; free_row->entry[free_col] = sign * entry; } } /****************************************************************************/ /* matrix restriction for one level */ /****************************************************************************/ static void restrict_mg_matrix(MG_S_INFO *mg_s_info, int fine_level) { FUNCNAME("restrict_mg_matrix"); DOF_MATRIX *fine_mat, *coarse_mat; MATRIX_ROW *row; int nfine, ncoarse, irow, jcol, i0, i1, j0, j1, l1, p1, k; int *(dof_parent[2]); REAL entry; S_CHAR *sort_bound; static REAL one = 1.0, half = 0.5, quarter = 0.25; TEST_EXIT(fine_level > 0,"fine_level = %d <= 0\n", fine_level); fine_mat = mg_s_info->matrix[fine_level]; coarse_mat = mg_s_info->matrix[fine_level - 1]; TEST_EXIT(fine_mat && coarse_mat, "fine_mat or coarse_mat == nil: %p, %p\n", fine_mat, coarse_mat); nfine = mg_s_info->dofs_per_level[fine_level]; ncoarse = mg_s_info->dofs_per_level[fine_level - 1]; dof_parent[0] = mg_s_info->dof_parent[0]; dof_parent[1] = mg_s_info->dof_parent[1]; sort_bound = mg_s_info->sort_bound; INFO(mg_s_info->mg_info->info, 2, "fine_level %d: nfine=%d, ncoarse=%d\n", fine_level, nfine, ncoarse); /****************************************************************************/ /* copy coarse/coarse entries to coarse_mat, */ /* restrict coarse/fine entries to coarse_mat using child/parents relation */ for (irow = 0; irow < ncoarse; irow++) { if (sort_bound[irow] >= DIRICHLET) { add_sparse_dof_entry(coarse_mat, one, irow, irow, one); } else { for (row = fine_mat->matrix_row[irow]; row; row = row->next) { for (k=0; kcol[k]; if (ENTRY_USED(jcol)) { if (jcol < ncoarse) { add_sparse_dof_entry(coarse_mat, one, irow, jcol, row->entry[k]); } else { entry = row->entry[k]; j0 = dof_parent[0][jcol]; j1 = dof_parent[1][jcol]; add_sparse_dof_entry(coarse_mat, half, irow, j0, entry); add_sparse_dof_entry(coarse_mat, half, irow, j1, entry); } } else if (jcol == NO_MORE_ENTRIES) break; } } } } /****************************************************************************/ /* restrict fine entries to coarse_mat using child/parents relation */ for (irow = ncoarse; irow < nfine; irow++) { if (sort_bound[irow] >= DIRICHLET) continue; i0 = dof_parent[0][irow]; i1 = dof_parent[1][irow]; for (row = fine_mat->matrix_row[irow]; row; row = row->next) { for (k=0; kcol[k]; if (!(ENTRY_USED(jcol))) { if (jcol == NO_MORE_ENTRIES) break; else continue; } entry = row->entry[k]; if (irow == jcol) /* diagonal element */ { if (sort_bound[i0] < DIRICHLET) { add_sparse_dof_entry(coarse_mat, quarter, i0, i0, entry); add_sparse_dof_entry(coarse_mat, quarter, i0, i1, entry); } if (sort_bound[i1] < DIRICHLET) { add_sparse_dof_entry(coarse_mat, quarter, i1, i0, entry); add_sparse_dof_entry(coarse_mat, quarter, i1, i1, entry); } continue; } if (jcol < ncoarse) { /* add rows */ if (sort_bound[i0] < DIRICHLET) add_sparse_dof_entry(coarse_mat, half, i0, jcol, entry); if (sort_bound[i1] < DIRICHLET) add_sparse_dof_entry(coarse_mat, half, i1, jcol, entry); } else { for (l1 = 0; l1 < 2; l1++) /* both parents of jcol */ { p1 = dof_parent[l1][jcol]; if (p1 < ncoarse) { /* add rows */ if (sort_bound[i0] < DIRICHLET) add_sparse_dof_entry(coarse_mat, quarter, i0, p1, entry); if (sort_bound[i1] < DIRICHLET) add_sparse_dof_entry(coarse_mat, quarter, i1, p1, entry); } else { ERROR("recursion 2: %d (%d %d), %d >= %d\n", jcol, dof_parent[0][jcol], dof_parent[1][jcol], p1, ncoarse); } } /* end for (l1) */ } /* end else (jcol < ncoarse) */ } /* end for (k) */ } /* end for (row) */ } /* end for (irow) */ } /****************************************************************************/ void MG_s_restrict_mg_matrices(MG_S_INFO *mg_s_info) { int level; for (level = mg_s_info->mg_info->mg_levels - 1; level > mg_s_info->mg_info->exact_level; level--) { clear_dof_matrix(mg_s_info->matrix[level-1]); restrict_mg_matrix(mg_s_info, level); } return; } /****************************************************************************/ /* restrict(): */ /* calculate residual, */ /* restrict residual to coarse grid, */ /* reset rhs on coarse grid */ /****************************************************************************/ void MG_s_restrict(MULTI_GRID_INFO *mg_info, int mg_level) { FUNCNAME("MG_s_restrict"); MG_S_INFO *mg_s_info; int i, first, last, dof1, dof2, dof3; int *dof_parent0, *dof_parent1; S_CHAR *sort_bound; REAL *fg_fct = NULL, *cg_fct = NULL; REAL new_v; TEST_EXIT(mg_info && mg_info->data,"sorry: no mg_info or mg_s_info"); mg_s_info = (MG_S_INFO *)(mg_info->data); TEST_EXIT(dof_parent0 = mg_s_info->dof_parent[0],"no dof_parent[0]\n"); TEST_EXIT(dof_parent1 = mg_s_info->dof_parent[1],"no dof_parent[1]\n"); TEST_EXIT(sort_bound = mg_s_info->sort_bound,"no sort_bound\n"); TEST_EXIT(mg_s_info->dofs_per_level,"no dofs_per_level\n"); if ((mg_level <= 0) || (mg_level <= mg_info->exact_level)) { MSG("no restriction possible on coarsest/exact level\n"); return; } MG_s_resid(mg_info, mg_level); /* calculate residual in r_h */ TEST_EXIT(mg_s_info->r_h && (fg_fct = mg_s_info->r_h[mg_level]), "sorry: no fine grid function"); TEST_EXIT(mg_s_info->f_h && (cg_fct = mg_s_info->f_h[mg_level-1]), "sorry: no coarse grid function"); first = mg_s_info->dofs_per_level[mg_level-1]; last = mg_s_info->dofs_per_level[mg_level]; for (i = 0; i < first; i++) { cg_fct[i] = fg_fct[i]; } for (i = first; i < last; i++) { dof1 = dof_parent0[i]; dof2 = dof_parent1[i]; dof3 = i; new_v = fg_fct[dof3] * 0.5; if (sort_bound[dof1] <= INTERIOR) cg_fct[dof1] += new_v; if (sort_bound[dof2] <= INTERIOR) cg_fct[dof2] += new_v; } if (mg_info->info > 3) { MSG("restricted residual on level %d:\n", mg_level-1); MSG("f_h="); for (i = 0; i < first; i++) print_msg(" %.3le", cg_fct[i]); print_msg("\n"); } /* reset solution vector on coarse mesh */ cg_fct = mg_s_info->u_h[mg_level-1]; for (i = 0; i < first; i++) cg_fct[i] = 0.0; return; } /****************************************************************************/ /* prolongation of a coarse grid function to a finer grid */ /****************************************************************************/ static REAL max_prolongated = 0.0; void MG_s_prolongate(MULTI_GRID_INFO *mg_info, int mg_level) { FUNCNAME("MG_s_prolongate"); MG_S_INFO *mg_s_info; int i, first, last, dof1,dof2,dof3; int *dof_parent0, *dof_parent1; S_CHAR *sort_bound; REAL pro, *fg_fct = NULL, *cg_fct = NULL; TEST_EXIT(mg_info && mg_info->data,"sorry: no mg_info or mg_s_info"); mg_s_info = (MG_S_INFO *)(mg_info->data); TEST_EXIT(dof_parent0 = mg_s_info->dof_parent[0],"no dof_parent[0]\n"); TEST_EXIT(dof_parent1 = mg_s_info->dof_parent[1],"no dof_parent[1]\n"); TEST_EXIT(sort_bound = mg_s_info->sort_bound,"no sort_bound\n"); TEST_EXIT(mg_s_info->dofs_per_level,"no dofs_per_level\n"); if ((mg_level <= 0) || (mg_level <= mg_info->exact_level)) { MSG("no prolongation possible to coarsest/exact level\n"); return; } TEST_EXIT(mg_s_info->u_h && (fg_fct = mg_s_info->u_h[mg_level]), "sorry: no fine grid function"); TEST_EXIT(mg_s_info->u_h && (cg_fct = mg_s_info->u_h[mg_level-1]), "sorry: no coarse grid function"); max_prolongated = 0.0; first = mg_s_info->dofs_per_level[mg_level-1]; last = mg_s_info->dofs_per_level[mg_level]; for (i = 0; i < first; i++) { if (sort_bound[i] >= DIRICHLET) continue; fg_fct[i] += cg_fct[i]; max_prolongated = MAX(max_prolongated, ABS(cg_fct[i])); } for (i = first; i < last; i++) { if (sort_bound[i] >= DIRICHLET) continue; dof1 = dof_parent0[i]; dof2 = dof_parent1[i]; dof3 = i; pro = 0.5 * (cg_fct[dof1] + cg_fct[dof2]); fg_fct[dof3] += pro; max_prolongated = MAX(max_prolongated, ABS(pro)); } if (mg_info->info > 4) MSG("level %2d: max_prolongated = %12.9lf\n", mg_level, max_prolongated); return; } /****************************************************************************/ /* calculate residuum on level mg_level */ /****************************************************************************/ REAL MG_s_resid(MULTI_GRID_INFO *mg_info, int mg_level) { FUNCNAME("MG_s_resid"); REAL *r_h = NULL, *f_h = NULL, res; S_CHAR *sort_bound; int i, last; MG_S_INFO *mg_s_info; TEST_EXIT(mg_info && mg_info->data,"no mg_info or mg_s_info\n"); mg_s_info = (MG_S_INFO *)(mg_info->data); TEST_EXIT(mg_level < mg_info->mg_levels,"mg_level too big\n"); TEST_EXIT(mg_s_info->f_h && (f_h = mg_s_info->f_h[mg_level]),"no f_h\n"); TEST_EXIT(mg_s_info->r_h && (r_h = mg_s_info->r_h[mg_level]),"no r_h\n"); TEST_EXIT(mg_s_info->matrix && mg_s_info->matrix[mg_level],"no matrix\n"); TEST_EXIT(sort_bound = mg_s_info->sort_bound,"no sort_bound\n"); TEST_EXIT(mg_s_info->dofs_per_level,"no dofs_per_level\n"); last = mg_s_info->dofs_per_level[mg_level]; /* r_h := f_h */ for (i = 0; i < last; i++) r_h[i] = f_h[i]; /* r_h := r_h - A * u_h */ MG_s_gemv(mg_s_info, mg_level, NoTranspose, -1.0, mg_s_info->matrix[mg_level], mg_s_info->u_h[mg_level], 1.0, r_h); res = 0.0; for (i = 0; i < last; i++) { if (sort_bound[i] >= DIRICHLET) { /* no residuum at dirichlet boundary */ r_h[i] = 0.0; } else { res += r_h[i]*r_h[i]; } } INFO(mg_info->info, 4,"|resid| = %.3le on level %d\n", sqrt(res), mg_level); return(sqrt(res)); } /****************************************************************************/ /* smoothing of the solution on level mg_level */ /****************************************************************************/ static void sor_smoother(MULTI_GRID_INFO *mg_info, int mg_level, int n) { FUNCNAME("sor_smoother"); int iter, i, j, k, size; REAL sum, omega1, omega, unew, max_chg = 0.0; S_CHAR *sort_bound; REAL *fvec = NULL, *uvec = NULL; MATRIX_ROW *row, **matrix_row; MG_S_INFO *mg_s_info; if (n <= 0) return; TEST_EXIT(mg_info && mg_info->data,"no mg_info or mg_s_info\n"); mg_s_info = (MG_S_INFO *)(mg_info->data); TEST_EXIT(sort_bound = mg_s_info->sort_bound,"no sort_bound\n"); TEST_EXIT(mg_s_info->f_h && (fvec = mg_s_info->f_h[mg_level]),"no f_h\n"); TEST_EXIT(mg_s_info->u_h && (uvec = mg_s_info->u_h[mg_level]),"no u_h\n"); TEST_EXIT(mg_s_info->matrix && mg_s_info->matrix[mg_level],"no matrix\n"); TEST_EXIT(matrix_row = mg_s_info->matrix[mg_level]->matrix_row, "no matrix_row\n"); size = mg_s_info->dofs_per_level[mg_level]; omega = mg_s_info->smooth_omega; omega1 = 1.0 - omega; /* PRINT_REAL_VEC("f_h", fvec, size); */ /* PRINT_REAL_VEC("u_h", uvec, size); */ /* print_dof_matrix(mg_s_info->matrix[mg_level]); */ for (iter = 0; iter < n; iter++) { max_chg = 0.0; for (i = 0; i < size; i++) { sum = fvec[i]; if (sort_bound[i] < DIRICHLET) { for (row = matrix_row[i]; row; row = row->next) { for (j = 0; j < ROW_LENGTH; j++) { k = row->col[j]; if (ENTRY_USED(k)) { if (k != i) sum = sum - row->entry[j] * uvec[k]; } else { if (k == NO_MORE_ENTRIES) break; } } } if ((row = matrix_row[i])) { sum = sum / row->entry[0]; DEBUG_TEST(row->col[0] == i, "wrong row[%d]->col[0]: %d\n", i, row->col[0]); } unew = omega * sum + omega1 * uvec[i]; max_chg = MAX(max_chg, ABS(uvec[i]-unew)); uvec[i] = unew; } else { uvec[i] = sum; } } /* MSG("iteration %d: max_chg = %12.4le\n", iter, max_chg); */ } /* PRINT_REAL_VEC("u_h", uvec, size); */ /* WAIT; */ INFO(mg_info->info,5, "%d SOR iterations with omega=%4.2lf, last max_chg = %.2le\n", iter, omega, max_chg); } static void ssor_smoother(MULTI_GRID_INFO *mg_info, int mg_level, int n) { FUNCNAME("ssor_smoother"); int iter, i, j, k, size; REAL sum, omega1, omega, unew, max_chg = 0.0; S_CHAR *sort_bound; REAL *fvec = NULL, *uvec = NULL; MATRIX_ROW *row, **matrix_row; MG_S_INFO *mg_s_info; TEST_EXIT(mg_info && mg_info->data,"no mg_info or mg_s_info\n"); mg_s_info = (MG_S_INFO *)(mg_info->data); TEST_EXIT(sort_bound = mg_s_info->sort_bound,"no sort_bound\n"); TEST_EXIT(mg_s_info->f_h && (fvec = mg_s_info->f_h[mg_level]),"no f_h\n"); TEST_EXIT(mg_s_info->u_h && (uvec = mg_s_info->u_h[mg_level]),"no u_h\n"); TEST_EXIT(mg_s_info->matrix && mg_s_info->matrix[mg_level],"no matrix\n"); TEST_EXIT(matrix_row = mg_s_info->matrix[mg_level]->matrix_row, "no matrix_row\n"); size = mg_s_info->dofs_per_level[mg_level]; omega = mg_s_info->smooth_omega; omega1 = 1.0 - omega; for (iter = 0; iter < n; iter++) { max_chg = 0.0; for (i = 0; i < size; i++) { /* iterate up */ sum = fvec[i]; if (sort_bound[i] < DIRICHLET) { for (row = matrix_row[i]; row; row = row->next) { for (j = 0; j < ROW_LENGTH; j++) { k = row->col[j]; if (ENTRY_USED(k)) { if (k != i) sum = sum - row->entry[j] * uvec[k]; } else { if (k == NO_MORE_ENTRIES) break; } } } if ((row = matrix_row[i])) { sum = sum / row->entry[0]; DEBUG_TEST(row->col[0] == i, "wrong row[%d]->col[0]: %d\n", i, row->col[0]); } unew = omega * sum + omega1 * uvec[i]; max_chg = MAX(max_chg, ABS(uvec[i]-unew)); uvec[i] = unew; } else { uvec[i] = sum; } } for (i = size-1; i >= 0; i--) { /* iterate down again */ sum = fvec[i]; if (sort_bound[i] < DIRICHLET) { for (row = matrix_row[i]; row; row = row->next) { for (j = 0; j < ROW_LENGTH; j++) { k = row->col[j]; if (ENTRY_USED(k)) { if (k != i) sum = sum - row->entry[j] * uvec[k]; } else { if (k == NO_MORE_ENTRIES) break; } } } if ((row = matrix_row[i])) { sum = sum / row->entry[0]; DEBUG_TEST(row->col[0] == i, "wrong row[%d]->col[0]: %d\n", i, row->col[0]); } unew = omega * sum + omega1 * uvec[i]; max_chg = MAX(max_chg, ABS(uvec[i]-unew)); uvec[i] = unew; } else { uvec[i] = sum; } } /* MSG("iteration %d: max_chg = %12.4le\n", iter, max_chg); */ } INFO(mg_info->info,5, "%d SOR iterations with omega=%4.2lf, last max_chg = %.2le\n", iter, omega, max_chg); } void MG_s_smoother(MULTI_GRID_INFO *mg_info, int mg_level, int n) { FUNCNAME("MG_s_smoother"); MG_S_INFO *mg_s_info; TEST_EXIT(mg_info && mg_info->data,"no mg_info or mg_s_info\n"); mg_s_info = (MG_S_INFO *)(mg_info->data); switch(mg_s_info->smoother) { case 1: sor_smoother(mg_info, mg_level, n); break; case 2: ssor_smoother(mg_info, mg_level, n); break; default: ERROR("unknown smoother %d; using 1\n"); sor_smoother(mg_info, mg_level, n); } } /****************************************************************************/ /* "exact" solution on the coarsest level */ /****************************************************************************/ void MG_s_exact_solver(MULTI_GRID_INFO *mg_info, int mg_level) { FUNCNAME("MG_s_exact_solver"); TEST_EXIT(mg_info,"no mg_info\n"); TEST_EXIT(mg_level < mg_info->mg_levels,"mg_level too big"); /* ERROR_EXIT("SPARSE_MG exact solver not yet implemented\n"); */ MG_s_smoother(mg_info, mg_level, 10); return; } /****************************************************************************/ /* general matrix*vector routine */ /* y = alpha*A*x + beta*y or y = alpha*A'*x + beta*y */ /****************************************************************************/ void MG_s_gemv(MG_S_INFO *mg_s_info, int mg_level, MatrixTranspose transpose, REAL alpha, DOF_MATRIX *a, REAL *x, REAL beta, REAL *y) { FUNCNAME("MG_s_gemv"); int i,j,jcol,last; REAL sum, ax; MATRIX_ROW *row; TEST_EXIT(mg_s_info && a && x && y,"pointer is nil: %p, %p, %p, %p", mg_s_info, a,x,y); TEST_EXIT(mg_level < mg_s_info->mg_info->mg_levels, "mg_level %d >= mg_info->mg_levels %d\n", mg_level, mg_s_info->mg_info->mg_levels); last = mg_s_info->dofs_per_level[mg_level]; TEST_EXIT(a->size >= last, "a->size = %d too small: dofs_per_level = %d", a->size, last); if (transpose == NoTranspose) { for (i = 0; i < last; i++) { sum = 0.0; for (row = a->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { sum += row->entry[j] * x[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } y[i] *= beta; y[i] += alpha * sum; } } else if (transpose == Transpose) { for (i = 0; i < last; i++) { y[i] *= beta; } for (i = 0; i < last; i++) { ax = alpha * x[i]; for (row = a->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { y[jcol] += ax * row->entry[j]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } } } else { ERROR_EXIT("transpose=%d", transpose); } } /****************************************************************************/ alberta-2.0.1/alberta/src/Common/adapt.c0000644000042300001440000007607210676724253014753 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: adapt.c */ /* */ /* description: adaptive procedures for stationary and instationary */ /* problems */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "time.h" #define TIME_USED(f,s) ((double)((s)-(f))/(double)CLOCKS_PER_SEC) /*--------------------------------------------------------------------------*/ /* adapt_mesh: call marking(), refine(), and coarsen() */ /*--------------------------------------------------------------------------*/ static U_CHAR adapt_mesh(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("adapt_mesh"); U_CHAR flag = 0; U_CHAR mark_flag; int n_elements, iadmin; clock_t first = clock(); TEST_EXIT(adapt, "no ADAPT_STAT\n"); if (adapt->marking) mark_flag = adapt->marking(mesh, adapt); else mark_flag = marking(mesh, adapt); if ((!adapt->coarsen_allowed)) mark_flag &= MESH_REFINED; /* use refine mark only */ if (adapt->build_before_refine) adapt->build_before_refine(mesh, mark_flag); n_elements = mesh->n_elements; if (mark_flag & MESH_REFINED) flag = refine(mesh); if (flag & MESH_REFINED) { n_elements = mesh->n_elements - n_elements; INFO(adapt->info,8, "%d element%s refined, giving %d element%s\n", n_elements, n_elements > 1 ? "s" : "", mesh->n_elements, mesh->n_elements > 1 ? "s" : ""); for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) INFO(adapt->info,7,"%d DOFs of admin <%s>\n", mesh->dof_admin[iadmin]->used_count, NAME(mesh->dof_admin[iadmin])); } else INFO(adapt->info,8,"no element refined\n"); if (adapt->build_before_coarsen) adapt->build_before_coarsen(mesh, mark_flag); n_elements = mesh->n_elements; if (mark_flag & MESH_COARSENED) flag |= coarsen(mesh); if (flag & MESH_COARSENED) { n_elements -= mesh->n_elements; INFO(adapt->info,8, "%d element%s coarsened, giving %d element%s\n", n_elements, n_elements > 1 ? "s" : "", mesh->n_elements, mesh->n_elements > 1 ? "s" : ""); for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) INFO(adapt->info,7,"%d DOFs of dof_admin <%s>\n", mesh->dof_admin[iadmin]->used_count, NAME(mesh->dof_admin[iadmin])); } else INFO(adapt->info,8,"no element coarsened\n"); if (adapt->build_after_coarsen) adapt->build_after_coarsen(mesh, flag); INFO(adapt->info,6,"adapting mesh and build needed %.5lg seconds\n", TIME_USED(first,clock())); return(flag); } /*--------------------------------------------------------------------------*/ /* adapt_method_stat: adapt for stationary problems */ /*--------------------------------------------------------------------------*/ void adapt_method_stat(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("adapt_method_stat"); int iter; REAL est; clock_t first; TEST_EXIT(mesh, "no MESH\n"); TEST_EXIT(adapt, "no ADAPT_STAT\n"); /* get solution on initial mesh */ if (adapt->build_before_refine) adapt->build_before_refine(mesh, 0); if (adapt->build_before_coarsen) adapt->build_before_coarsen(mesh, 0); if (adapt->build_after_coarsen) adapt->build_after_coarsen(mesh, 0); if (adapt->solve) { first = clock(); adapt->solve(mesh); INFO(adapt->info,8,"solution of discrete system needed %.5lg seconds\n", TIME_USED(first,clock())); } first = clock(); est = adapt->estimate ? adapt->estimate(mesh, adapt) : 0.0; INFO(adapt->info,8,"estimation of the error needed %.5lg seconds\n", TIME_USED(first,clock())); for (iter = 0; (est > adapt->tolerance) && ((adapt->max_iteration <= 0) || (iter < adapt->max_iteration)); iter++) { if (adapt_mesh(mesh, adapt)) { if (adapt->solve) { first = clock(); adapt->solve(mesh); INFO(adapt->info,8, "solution of discrete system needed %.5lg seconds\n", TIME_USED(first,clock())); } first = clock(); est = adapt->estimate ? adapt->estimate(mesh, adapt) : 0.0; INFO(adapt->info,8,"estimation of the error needed %.5lg seconds\n", TIME_USED(first,clock())); } else { ERROR("no mesh adaption, but estimate above tolerance ???\n"); break; } INFO(adapt->info, 4,"iter: %d", iter); PRINT_INFO(adapt->info, 4,", tol = %.4le", adapt->tolerance); PRINT_INFO(adapt->info, 4,", estimate = %.4le\n", est); } if (est > adapt->tolerance) { MSG("max_iterations REACHED: %d\n", adapt->max_iteration); MSG("prescribed tolerance %le\n", adapt->tolerance); MSG("finished with estimate %le\n", est); } else { INFO(adapt->info, 2,"no of iterations: %d\n", iter); INFO(adapt->info, 2,"prescribed tolerance %.4le\n", adapt->tolerance); INFO(adapt->info, 2,"finished with estimate %.4le\n", est); } return; } /*--------------------------------------------------------------------------*/ /* adapt_method_instat(): adapt for timedependent problems */ /*--------------------------------------------------------------------------*/ static void explicit_time_strategy(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("explicit_time_strategy"); ADAPT_STAT *adapt_s = adapt->adapt_space; /* first estimate must be computed before adapt_mesh() is called */ if (adapt->time <= adapt->start_time) { if (adapt_s->estimate) adapt_s->estimate(mesh, adapt_s); } adapt->time += adapt->timestep; if (adapt->set_time) adapt->set_time(mesh, adapt); INFO(adapt->info,6,"time = %.4le, timestep = %.4le\n", adapt->time, adapt->timestep); adapt_mesh(mesh, adapt_s); if (adapt_s->solve) adapt_s->solve(mesh); if (adapt_s->estimate) adapt_s->estimate(mesh, adapt_s); /* return value is not used */ return; } static void implicit_time_strategy(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("implicit_time_strategy"); int iter, iter_s; ADAPT_STAT *adapt_s = adapt->adapt_space; REAL err_space, err_time, space_err_limit, time_err_limit, time_err_low; space_err_limit = adapt->tolerance * adapt->rel_space_error; time_err_limit = adapt->tolerance * adapt->rel_time_error; time_err_low = adapt->tolerance * adapt->rel_time_error * adapt->time_theta_2; iter = iter_s = 0; err_time = 0.0; do { adapt->time += adapt->timestep; if (adapt->set_time) adapt->set_time(mesh, adapt); INFO(adapt->info,6,"time = %.4le, try timestep = %.4le\n", adapt->time, adapt->timestep); if (adapt_s->build_before_refine) adapt_s->build_before_refine(mesh, 0); if (adapt_s->build_before_coarsen) adapt_s->build_before_coarsen(mesh, 0); if (adapt_s->build_after_coarsen) adapt_s->build_after_coarsen(mesh, 0); if (adapt_s->solve) adapt_s->solve(mesh); err_space = adapt_s->estimate ? adapt_s->estimate(mesh, adapt_s) : 0.0; if (adapt->get_time_est) err_time = adapt->get_time_est(mesh, adapt); iter++; if (iter > adapt->max_iteration) break; if (err_time > time_err_limit) { adapt->time -= adapt->timestep; adapt->timestep *= adapt->time_delta_1; continue; } do { if (adapt_mesh(mesh, adapt_s)) { adapt_s->solve(mesh); err_space = adapt_s->estimate ? adapt_s->estimate(mesh, adapt_s) : 0.0; if (adapt->get_time_est) { err_time = adapt->get_time_est(mesh, adapt); if (err_time > time_err_limit) { adapt->time -= adapt->timestep; adapt->timestep *= adapt->time_delta_1; break; } } } iter_s++; if (iter_s > adapt_s->max_iteration) break; } while(err_space > space_err_limit); } while(err_time > time_err_limit); if (adapt->get_time_est) if (err_time <= time_err_low) { adapt->timestep *= adapt->time_delta_2; } return; } static void one_timestep(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("one_timestep"); switch(adapt->strategy) { case 0: explicit_time_strategy(mesh, adapt); break; case 1: implicit_time_strategy(mesh, adapt); break; default: MSG("unknown adapt->strategy = %d; use explicit strategy\n"); explicit_time_strategy(mesh, adapt); } return; } /*--------------------------------------------------------------------------*/ void adapt_method_instat(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("adapt_method_instat"); TEST_EXIT(adapt, "no ADAPT_INSTAT\n"); /*--------------------------------------------------------------------------*/ /* adaptation of the initial grid: done by adapt_method_stat */ /*--------------------------------------------------------------------------*/ adapt->time = adapt->start_time; if (adapt->set_time) adapt->set_time(mesh, adapt); adapt->adapt_initial->tolerance = adapt->tolerance * adapt->rel_initial_error; adapt->adapt_space->tolerance = adapt->tolerance * adapt->rel_space_error; adapt_method_stat(mesh, adapt->adapt_initial); if (adapt->close_timestep) adapt->close_timestep(mesh, adapt); /*--------------------------------------------------------------------------*/ /* adaptation of timestepsize and mesh: done by one_timestep */ /*--------------------------------------------------------------------------*/ while (adapt->time < adapt->end_time) { if (adapt->init_timestep) adapt->init_timestep(mesh, adapt); if (adapt->one_timestep) adapt->one_timestep(mesh, adapt); else one_timestep(mesh, adapt); if (adapt->close_timestep) adapt->close_timestep(mesh, adapt); } } /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* marking functions!!! */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ typedef struct adapt_traverse_data { REAL (*get_el_est)(EL *el); REAL (*get_el_estc)(EL *el); int el_mark, el_mark_c; S_CHAR g_mark_refine; S_CHAR g_mark_coarse; REAL err_max, err_sum; int mark_flag; REAL mark_r_limit, mark_c_limit; REAL GERS_sum; } ADAPT_TRAVERSE_DATA; /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /**** marking functions for several adaptive strategies ****/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ static void marking_fct_1(const EL_INFO *el_info, void *data) { el_info->el->mark = ((ADAPT_TRAVERSE_DATA *)data)->g_mark_refine; ((ADAPT_TRAVERSE_DATA *)data)->mark_flag = 1; ((ADAPT_TRAVERSE_DATA *)data)->el_mark++; return; } static void marking_fct_2(const EL_INFO *el_info, void *data) { ADAPT_TRAVERSE_DATA *ud = (ADAPT_TRAVERSE_DATA *)data; REAL error = ud->get_el_est(el_info->el); if (error > ud->mark_r_limit) { el_info->el->mark = ud->g_mark_refine; ud->mark_flag = 1; ud->el_mark++; } else if (error <= ud->mark_c_limit) { if (!ud->get_el_estc || (error + ud->get_el_estc(el_info->el) <= ud->mark_c_limit)) { el_info->el->mark = ud->g_mark_coarse; ud->mark_flag = 1; ud->el_mark_c++; } } return; } static void marking_fct_3(const EL_INFO *el_info, void *data) { ADAPT_TRAVERSE_DATA *ud = (ADAPT_TRAVERSE_DATA *)data; REAL error = ud->get_el_est(el_info->el); if (error > ud->mark_r_limit) { el_info->el->mark = ud->g_mark_refine; ud->mark_flag = 1; ud->el_mark++; } else if (error <= ud->mark_c_limit) { if (!ud->get_el_estc || (error + ud->get_el_estc(el_info->el) <= ud->mark_c_limit)) { el_info->el->mark = ud->g_mark_coarse; ud->mark_flag = 1; ud->el_mark_c++; } } return; } static void marking_fct_4(const EL_INFO *el_info, void *data) { ADAPT_TRAVERSE_DATA *ud = (ADAPT_TRAVERSE_DATA *)data; REAL error = ud->get_el_est(el_info->el); if (error > ud->mark_r_limit) { ud->GERS_sum += error; el_info->el->mark = ud->g_mark_refine; ud->mark_flag = 1; ud->el_mark++; } return; } static void marking_fct_4c(const EL_INFO *el_info, void *data) { ADAPT_TRAVERSE_DATA *ud = (ADAPT_TRAVERSE_DATA *)data; REAL error; if (el_info->el->mark <= 0) { error = ud->get_el_est(el_info->el); if (ud->get_el_estc) error += ud->get_el_estc(el_info->el); if (error <= ud->mark_c_limit) { ud->GERS_sum += error; el_info->el->mark = ud->g_mark_coarse; ud->mark_flag = 1; ud->el_mark_c++; } else el_info->el->mark = 0; } return; } /*--------------------------------------------------------------------------*/ int marking(MESH *mesh, ADAPT_STAT *adapt) { FUNCNAME("marking"); static REAL old_err_sum = 0.0; static ADAPT_TRAVERSE_DATA td[1]; REAL improv, Ltheta, redfac, wanted; REAL eps_p, ES_theta_p,ES_theta_c_p; REAL MS_gamma_p, MS_gamma_c_p, GERS_gamma; TEST_EXIT(adapt, "no adapt_stat\n"); if(adapt->strategy > 1) TEST_EXIT(td->get_el_est = adapt->get_el_est, "no adapt->get_el_est\n"); TEST_EXIT(adapt->p >= 1.0, "ADAPT_STAT->p < 1\n"); td->get_el_estc = adapt->get_el_estc; td->g_mark_refine = adapt->refine_bisections; td->g_mark_coarse = -adapt->coarse_bisections; td->mark_flag = 0; td->el_mark = td->el_mark_c = 0; eps_p = pow(adapt->tolerance, adapt->p); td->err_sum = pow(adapt->err_sum, adapt->p); td->err_max = adapt->err_max; switch(adapt->strategy) { case 1: if (adapt->err_sum > adapt->tolerance) { mesh_traverse(mesh, -1, CALL_LEAF_EL, marking_fct_1, td); } break; case 2: MS_gamma_p = pow(adapt->MS_gamma, adapt->p); if (adapt->coarsen_allowed) MS_gamma_c_p = pow(adapt->MS_gamma_c, adapt->p); else MS_gamma_c_p = -1.0; td->mark_r_limit = MS_gamma_p * td->err_max; if (adapt->coarsen_allowed) td->mark_c_limit = MS_gamma_c_p * td->err_max; mesh_traverse(mesh, -1, CALL_LEAF_EL, marking_fct_2, td); break; case 3: ES_theta_p = pow(adapt->ES_theta, adapt->p); td->mark_r_limit = ES_theta_p * eps_p / mesh->n_elements; if (adapt->coarsen_allowed) { ES_theta_c_p = pow(adapt->ES_theta_c, adapt->p); td->mark_c_limit = ES_theta_c_p * eps_p / mesh->n_elements; } else td->mark_c_limit = -1.0; INFO(adapt->info, 4, "start mark_limits: %.3le %.3le n_elements = %d\n", td->mark_r_limit, td->mark_c_limit, mesh->n_elements); mesh_traverse(mesh, -1, CALL_LEAF_EL, marking_fct_3, td); break; case 4: /*--------------------------------------------------------------------------*/ /* Graranteed error reduction strategy */ /* using extrapolation for theta */ /*--------------------------------------------------------------------------*/ Ltheta= pow(1.0 - adapt->GERS_theta_star, adapt->p); if (td->err_sum < old_err_sum) { improv = td->err_sum/old_err_sum; wanted = 0.8 * eps_p /td->err_sum; redfac = MIN((1.0-wanted)/(1.0-improv),1.0); redfac = MAX(redfac, 0.0); if (redfac < 1.0) { Ltheta = Ltheta*redfac; INFO(adapt->info, 2, "GERS: use extrapolated theta_star = %.3lf\n", pow(Ltheta, 1.0/adapt->p)); } } old_err_sum = td->err_sum; GERS_gamma = 1.0; if (Ltheta > 0) { do { td->GERS_sum = 0.0; GERS_gamma -= adapt->GERS_nu; td->mark_r_limit = GERS_gamma * td->err_max; mesh_traverse(mesh, -1, CALL_LEAF_EL, marking_fct_4, td); } while ((GERS_gamma > 0) && (td->GERS_sum < Ltheta * td->err_sum)); } INFO(adapt->info, 4, "GERS refinement with gamma = %.3lf\n", GERS_gamma); if (adapt->coarsen_allowed) { GERS_gamma = 0.3; Ltheta = adapt->GERS_theta_c * eps_p; do { td->GERS_sum = 0.0; GERS_gamma -= adapt->GERS_nu; td->mark_c_limit = GERS_gamma * td->err_max; mesh_traverse(mesh, -1, CALL_LEAF_EL, marking_fct_4c, td); INFO(adapt->info, 6, "coarse loop: gamma = %.3e, sum = %.3e, limit = %.3e\n", GERS_gamma, td->GERS_sum, Ltheta); } while (td->GERS_sum > Ltheta); INFO(adapt->info, 4, "GERS coarsening with gamma = %.3lf\n", GERS_gamma); } break; } INFO(adapt->info, 4, "%d elements marked for refinement\n", td->el_mark); INFO(adapt->info, 4, "%d elements marked for coarsening\n", td->el_mark_c); td->mark_flag = 0; if (td->el_mark) td->mark_flag = 1; if (td->el_mark_c) td->mark_flag |= 2; return(td->mark_flag); } /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* get_adapt_stat(dim, name, prefix, info, adapt_stat): */ /* */ /* if adapt_stat is non nil: */ /* allocates a new adpat_stat structure adapt and predefines the */ /* parameter entries of this structure; */ /* if name is non nil adpat->name = name */ /* */ /* Now, either for adapt_stat or the newly allocated adapt_stat the */ /* parameter entries of the structures are initialized by GET_PARAMETER() */ /* if prefix is non nil */ /* the info parameter is the the first argument of GET_PARAMETER() */ /* */ /* the return value is a pointer to the initialized adapt_stat structure */ /* */ /* for the initialization of entry we use the call */ /* GET_PARAMETER(info, "prefix->entry", "%{d,f}", &adapt->entry */ /* !! You do not have to define all parameters in your init file !! */ /* entries that are not defined in the init file have so standard value */ /* */ /* !!! before a call of get_adapt_stat() with non nil second argument !!! */ /* !!! you have to initialize your parameters via init_parameters() !!! */ /*--------------------------------------------------------------------------*/ static void init_strategy(const char *funcName, const char *prefix, int info, ADAPT_STAT *adapt) { char key[1024]; sprintf(key, "%s->strategy", prefix); GET_PARAMETER(info, key, "%d", &adapt->strategy); switch (adapt->strategy) { case 2: sprintf(key, "%s->MS_gamma", prefix); GET_PARAMETER(info, key, "%f", &adapt->MS_gamma); if (adapt->coarsen_allowed) { sprintf(key, "%s->MS_gamma_c", prefix); GET_PARAMETER(info, key, "%f", &adapt->MS_gamma_c); } return; case 3: sprintf(key, "%s->ES_theta", prefix); GET_PARAMETER(info, key, "%f", &adapt->ES_theta); if (adapt->coarsen_allowed) { sprintf(key, "%s->ES_theta_c", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->ES_theta_c); } return; case 4: sprintf(key, "%s->GERS_theta_star", prefix); GET_PARAMETER(info, key, "%f", &adapt->GERS_theta_star); sprintf(key, "%s->GERS_nu", prefix); GET_PARAMETER(info, key, "%f", &adapt->GERS_nu); if (adapt->coarsen_allowed) { sprintf(key, "%s->GERS_theta_c", prefix); GET_PARAMETER(info, key, "%f", &adapt->GERS_theta_c); } return; } return; } ADAPT_STAT *get_adapt_stat(const int dim, const char *name, const char *prefix, int info, ADAPT_STAT *adapt_stat) { FUNCNAME("get_adapt_stat"); ADAPT_STAT adapt_stand = {nil, 1.0, 2, 30, 2, nil, nil, nil, nil, nil, 0.0, 0.0, nil, nil, nil, nil, dim, 0, dim, 1, 0.5, 0.1, 0.9, 0.2, 0.6, 0.1, 0.1 }; char key[1024]; ADAPT_STAT *adapt; if(dim == 0) { WARNING("Adaption does not make sense for dim == 0!\n"); return nil; } if (adapt_stat) adapt = adapt_stat; else { adapt = MEM_ALLOC(1, ADAPT_STAT); *adapt = adapt_stand; if (name) adapt->name = strdup(name); if (!adapt->name && prefix) adapt->name = strdup(prefix); } if (!prefix) return(adapt); sprintf(key, "%s->tolerance", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->tolerance); sprintf(key, "%s->p", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->p); sprintf(key, "%s->max_iteration", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->max_iteration); sprintf(key, "%s->info", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->info); sprintf(key, "%s->refine_bisections", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->refine_bisections); sprintf(key, "%s->coarsen_allowed", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->coarsen_allowed); if (adapt->coarsen_allowed) { sprintf(key, "%s->coarse_bisections", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->coarse_bisections); } init_strategy(funcName, prefix, info-1, adapt); return(adapt); } /*--------------------------------------------------------------------------*/ /* get_adapt_instat(dim, name, prefix, info, adapt_instat): */ /* */ /* if adapt_instat is non nil: */ /* allocates a new adpat_instat structure adapt and predefines the */ /* parameter entries of this structure; */ /* if name is non nil adapt->name = name */ /* */ /* Now, either for adapt_instat or the newly allocated adapt_instat the */ /* parameter entries of the structures are initialized by GET_PARAMETER() */ /* if prefix is non nil */ /* the info parameter is the the first argument of GET_PARAMETER() */ /* */ /* the return value is a pointer to the initialized adapt_stat structure */ /* */ /* for the initialization of entry we use the call */ /* GET_PARAMETER(info, "prefix->entry", "%{d,f}", &adapt->entry) */ /* sub-structures adapt_initial/adapt_space are initialized with prefix */ /* prefix->initial resp. prefix->space */ /* */ /* !! You do not have to define all parameters in your init file !! */ /* entries that are not defined in the init file have so standard value */ /* */ /* !!! before a call of get_adapt_stat() with non nil second argument !!! */ /* !!! you have to initialize your parameters via init_parameters() !!! */ /*--------------------------------------------------------------------------*/ ADAPT_INSTAT *get_adapt_instat(const int dim, const char *name, const char *prefix, int info, ADAPT_INSTAT *adapt_instat) { FUNCNAME("get_adapt_instat"); ADAPT_INSTAT adapt_stand = {nil, {{nil, 1.0, 2.0, 1, -1, nil, nil, nil, nil, nil, 0.0, 0.0, nil, nil, nil, nil, dim, 0, dim, 2, 0.5, 0.1, 0.9, 0.2, 0.6, 0.1, 0.1}}, {{nil, 1.0, 2.0, 1, -1, nil, nil, nil, nil, nil, 0.0, 0.0, nil, nil, nil, nil, dim, 1, dim, 2, 0.5, 0.1, 0.9, 0.2, 0.6, 0.1, 0.1}}, 0.0, 0.0, 1.0, 0.01, nil, nil, nil, nil, nil, 0, 0, 1.0, 0.1, 0.4, 0.4, 1.0, 0.3, 0.7071, 1.4142, 8}; char key[1024]; ADAPT_INSTAT *adapt; if(dim == 0) { WARNING("Adaption does not make sense for dim == 0!\n"); return nil; } if (adapt_instat) adapt = adapt_instat; else { adapt = MEM_ALLOC(1, ADAPT_INSTAT); *adapt = adapt_stand; if (name) adapt->name = strdup(name); if (!adapt->name && prefix) adapt->name = strdup(prefix); } if (!prefix) return(adapt); sprintf(key, "%s initial", adapt->name); adapt->adapt_initial->name = strdup(key); sprintf(key, "%s space", adapt->name); adapt->adapt_space->name = strdup(key); /*---8<---------------------------------------------------------------------*/ /*--- and now, all other entries ---*/ /*--------------------------------------------------------------------->8---*/ sprintf(key, "%s->start_time", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->start_time); adapt->time = adapt->start_time; sprintf(key, "%s->end_time", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->end_time); sprintf(key, "%s->timestep", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->timestep); sprintf(key, "%s->strategy", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->strategy); sprintf(key, "%s->max_iteration", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->max_iteration); sprintf(key, "%s->tolerance", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->tolerance); sprintf(key, "%s->rel_initial_error", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->rel_initial_error); sprintf(key, "%s->rel_space_error", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->rel_space_error); sprintf(key, "%s->rel_time_error", prefix); GET_PARAMETER(info-1, key, "%f", &adapt->rel_time_error); sprintf(key, "%s->time_theta_1", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->time_theta_1); sprintf(key, "%s->time_theta_2", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->time_theta_2); sprintf(key, "%s->time_delta_1", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->time_delta_1); sprintf(key, "%s->time_delta_2", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->time_delta_2); sprintf(key, "%s->info", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->info); /*---8<---------------------------------------------------------------------*/ /*--- initialization of the adapt_stat for the initial grid ---*/ /*--------------------------------------------------------------------->8---*/ /*--- tolerance does not have to be initialized, is set! ---*/ adapt->adapt_initial->tolerance = adapt->tolerance*adapt->rel_initial_error; sprintf(key, "%s->initial->p", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->adapt_initial->p); sprintf(key, "%s->initial->max_iteration", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->adapt_initial->max_iteration); sprintf(key, "%s->initial->info", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->info); if (adapt->adapt_initial->info < 0) adapt->adapt_initial->info = adapt->info-2; sprintf(key, "%s->initial->refine_bisections", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->refine_bisections); sprintf(key, "%s->initial->coarsen_allowed", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->coarsen_allowed); if (adapt->adapt_initial->coarsen_allowed) { sprintf(key, "%s->initial->coarse_bisections", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_initial->coarse_bisections); } sprintf(key, "%s->initial", prefix); init_strategy(funcName, key, info-1, adapt->adapt_initial); /*---8<---------------------------------------------------------------------*/ /*--- initialization of the adapt_stat for the time-step iteration ---*/ /*--------------------------------------------------------------------->8---*/ /*--- tolerance does not have to be initialized, is set! ---*/ adapt->adapt_space->tolerance = adapt->tolerance*adapt->rel_space_error; sprintf(key, "%s->space->p", prefix); GET_PARAMETER(info-2, key, "%f", &adapt->adapt_space->p); sprintf(key, "%s->space->max_iteration", prefix); GET_PARAMETER(info-1, key, "%d", &adapt->adapt_space->max_iteration); sprintf(key, "%s->space->info", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->info); if (adapt->adapt_space->info < 0) adapt->adapt_space->info = adapt->info-2; sprintf(key, "%s->space->refine_bisections", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->refine_bisections); sprintf(key, "%s->space->coarsen_allowed", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->coarsen_allowed); if (adapt->adapt_space->coarsen_allowed) { sprintf(key, "%s->space->coarse_bisections", prefix); GET_PARAMETER(info-2, key, "%d", &adapt->adapt_space->coarse_bisections); } sprintf(key, "%s->space", prefix); init_strategy(funcName, key, info-1, adapt->adapt_space); return(adapt); } alberta-2.0.1/alberta/src/Common/assemble.c0000644000042300001440000016615210676724253015454 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: assemble.c */ /* */ /* description: fe-space independent assemblation routines of matrices */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" static const REAL TOO_SMALL = 1.e-15; /*--------------------------------------------------------------------------*/ /* information about precomputed integrals of basis functions on the */ /* standard element; */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* second order term: */ /*--------------------------------------------------------------------------*/ const Q11_PSI_PHI *get_q11_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad) { FUNCNAME("get_q11_psi_phi"); static VOID_LIST_ELEMENT *first = nil; VOID_LIST_ELEMENT *list_el; Q11_PSI_PHI *q11pp; const QUAD_FAST *q_phi, *q_psi; int dim; int i, j, k, l, n, iq, all_entries, n_psi, n_phi; REAL val, grdi, grdj; int **n_entries = nil, ***kk = nil, ***ll = nil, *k_vec = nil, *l_vec = nil; REAL ***values = nil, *val_vec = nil; if (!psi && !phi) return(nil); if (!psi) psi = phi; if (!phi) phi = psi; TEST_EXIT(psi->dim == phi->dim, "Support dimensions for phi and psi do not match!\n"); dim = phi->dim; if (!quad) quad = get_quadrature(dim, psi->degree+phi->degree-2); /*--------------------------------------------------------------------------*/ /* look for an existing entry in the list */ /*--------------------------------------------------------------------------*/ for (list_el = first; list_el; list_el = list_el->next) { q11pp = (Q11_PSI_PHI *)list_el->data; if (q11pp->psi == psi && q11pp->phi == phi && q11pp->quad == quad) return(q11pp); } /*--------------------------------------------------------------------------*/ /* create a new one */ /*--------------------------------------------------------------------------*/ n_psi = psi->n_bas_fcts; q_psi = get_quad_fast(psi, quad, INIT_GRD_PHI); n_phi = phi->n_bas_fcts; q_phi = get_quad_fast(phi, quad, INIT_GRD_PHI); list_el = get_void_list_element(); list_el->data = q11pp = MEM_ALLOC(1, Q11_PSI_PHI); list_el->next = first; first = list_el; n_entries = MAT_ALLOC(n_psi, n_phi, int); values = MAT_ALLOC(n_psi, n_phi, REAL*); kk = MAT_ALLOC(n_psi, n_phi, int*); ll = MAT_ALLOC(n_psi, n_phi, int*); q11pp->psi = psi; q11pp->phi = phi; q11pp->quad = quad; q11pp->n_entries = (const int **) n_entries; q11pp->values = (const REAL ***) values; q11pp->k = (const int ***) kk; q11pp->l = (const int ***) ll; /*--------------------------------------------------------------------------*/ /* compute first the number of all non zero entries */ /*--------------------------------------------------------------------------*/ all_entries = 0; for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { for (k = 0; k < dim+1; k++) { for (l = 0; l < dim+1; l++) { for (val = iq = 0; iq < quad->n_points; iq++) { grdi = q_psi->grd_phi[iq][i][k]; grdj = q_phi->grd_phi[iq][j][l]; val += quad->w[iq]*grdi*grdj; } if (ABS(val) > TOO_SMALL) all_entries++; } } } } /*--------------------------------------------------------------------------*/ /* now, access memory for all information */ /*--------------------------------------------------------------------------*/ if(all_entries) { val_vec = MEM_ALLOC(all_entries, REAL); k_vec = MEM_ALLOC(2*all_entries, int); } l_vec = k_vec+all_entries; /*--------------------------------------------------------------------------*/ /* and now, fill information */ /*--------------------------------------------------------------------------*/ for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { values[i][j] = val_vec; kk[i][j] = k_vec; ll[i][j] = l_vec; for (n = k = 0; k < dim+1; k++) { for (l = 0; l < dim+1; l++) { for (val = iq = 0; iq < quad->n_points; iq++) { grdi = q_psi->grd_phi[iq][i][k]; grdj = q_phi->grd_phi[iq][j][l]; val += quad->w[iq]*grdi*grdj; } if (ABS(val) > TOO_SMALL) { all_entries--; DEBUG_TEST_EXIT(all_entries >= 0, "now more entries found than counted before\n"); n++; *val_vec++ = val; *k_vec++ = k; *l_vec++ = l; } } } n_entries[i][j] = n; } } return(q11pp); } /*--------------------------------------------------------------------------*/ /* first order term */ /*--------------------------------------------------------------------------*/ const Q01_PSI_PHI *get_q01_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad) { FUNCNAME("get_q01_psi_phi"); static VOID_LIST_ELEMENT *first = nil; VOID_LIST_ELEMENT *list_el; Q01_PSI_PHI *q01pp; const QUAD_FAST *q_phi, *q_psi; int dim; int i, j, l, n, iq, all_entries, n_psi, n_phi; REAL val, psii, grdj; int **n_entries, ***ll, *l_vec = nil; REAL ***values, *val_vec = nil; if (!psi && !phi) return(nil); if (!psi) psi = phi; if (!phi) phi = psi; TEST_EXIT(psi->dim == phi->dim, "Support dimensions for phi and psi do not match!\n"); dim = phi->dim; if (!quad) quad = get_quadrature(dim, psi->degree+phi->degree-1); /*--------------------------------------------------------------------------*/ /* look for an existing entry in the list */ /*--------------------------------------------------------------------------*/ for (list_el = first; list_el; list_el = list_el->next) { q01pp = (Q01_PSI_PHI *)list_el->data; if (q01pp->psi == psi && q01pp->phi == phi && q01pp->quad == quad) return(q01pp); } /*--------------------------------------------------------------------------*/ /* otherwise, create a new one */ /*--------------------------------------------------------------------------*/ n_psi = psi->n_bas_fcts; q_psi = get_quad_fast(psi, quad, INIT_PHI); n_phi = phi->n_bas_fcts; q_phi = get_quad_fast(phi, quad, INIT_GRD_PHI); list_el = get_void_list_element(); list_el->data = q01pp = MEM_ALLOC(1, Q01_PSI_PHI); list_el->next = first; first = list_el; n_entries = MAT_ALLOC(n_psi, n_phi, int); values = MAT_ALLOC(n_psi, n_phi, REAL*); ll = MAT_ALLOC(n_psi, n_phi, int*); q01pp->psi = psi; q01pp->phi = phi; q01pp->quad = quad; q01pp->n_entries = (const int **) n_entries; q01pp->values = (const REAL ***) values; q01pp->l = (const int ***) ll; /*--------------------------------------------------------------------------*/ /* compute first the number of all non zero entries */ /*--------------------------------------------------------------------------*/ all_entries = 0; for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { for (l = 0; l < dim+1; l++) { for (val = iq = 0; iq < quad->n_points; iq++) { psii = q_psi->phi[iq][i]; grdj = q_phi->grd_phi[iq][j][l]; val += quad->w[iq]*psii*grdj; } if (ABS(val) > TOO_SMALL) all_entries++; } } } /*--------------------------------------------------------------------------*/ /* now, access memory for all information */ /*--------------------------------------------------------------------------*/ if(all_entries) { val_vec = MEM_ALLOC(all_entries, REAL); l_vec = MEM_ALLOC(all_entries, int); } /*--------------------------------------------------------------------------*/ /* and now, fill information */ /*--------------------------------------------------------------------------*/ for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { values[i][j] = val_vec; ll[i][j] = l_vec; for (n = l = 0; l < dim+1; l++) { for (val = iq = 0; iq < quad->n_points; iq++) { psii = q_psi->phi[iq][i]; grdj = q_phi->grd_phi[iq][j][l]; val += quad->w[iq]*psii*grdj; } if (ABS(val) > TOO_SMALL) { all_entries--; DEBUG_TEST_EXIT(all_entries >= 0, "now more entries found than counted before\n"); n++; *val_vec++ = val; *l_vec++ = l; } } n_entries[i][j] = n; } } return(q01pp); } const Q10_PSI_PHI *get_q10_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad) { FUNCNAME("get_q10_psi_phi"); static VOID_LIST_ELEMENT *first = nil; VOID_LIST_ELEMENT *list_el; Q10_PSI_PHI *q10pp; const QUAD_FAST *q_phi, *q_psi; int dim; int i, j, k, n, iq, all_entries, n_psi, n_phi; REAL val, phij, grdi; int **n_entries, ***kk, *k_vec = nil; REAL ***values, *val_vec = nil; if (!psi && !phi) return(nil); if (!psi) psi = phi; if (!phi) phi = psi; TEST_EXIT(psi->dim == phi->dim, "Support dimensions for phi and psi do not match!\n"); dim = phi->dim; if (!quad) quad = get_quadrature(dim, psi->degree+phi->degree-1); /*--------------------------------------------------------------------------*/ /* look for an existing entry in the list */ /*--------------------------------------------------------------------------*/ for (list_el = first; list_el; list_el = list_el->next) { q10pp = (Q10_PSI_PHI *)list_el->data; if (q10pp->psi == psi && q10pp->phi == phi && q10pp->quad == quad) return(q10pp); } /*--------------------------------------------------------------------------*/ /* otherwise, create a new one */ /*--------------------------------------------------------------------------*/ n_psi = psi->n_bas_fcts; q_psi = get_quad_fast(psi, quad, INIT_GRD_PHI); n_phi = phi->n_bas_fcts; q_phi = get_quad_fast(phi, quad, INIT_PHI); list_el = get_void_list_element(); list_el->data = q10pp = MEM_ALLOC(1, Q10_PSI_PHI); list_el->next = first; first = list_el; n_entries = MAT_ALLOC(n_psi, n_phi, int); values = MAT_ALLOC(n_psi, n_phi, REAL*); kk = MAT_ALLOC(n_psi, n_phi, int*); q10pp->psi = psi; q10pp->phi = phi; q10pp->quad = quad; q10pp->n_entries = (const int **) n_entries; q10pp->values = (const REAL ***) values; q10pp->k = (const int ***) kk; /*--------------------------------------------------------------------------*/ /* compute first the number of all non zero entries */ /*--------------------------------------------------------------------------*/ all_entries = 0; for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { for (k = 0; k < dim+1; k++) { for (val = iq = 0; iq < quad->n_points; iq++) { grdi = q_psi->grd_phi[iq][i][k]; phij = q_phi->phi[iq][j]; val += quad->w[iq]*grdi*phij; } if (ABS(val) > TOO_SMALL) all_entries++; } } } /*--------------------------------------------------------------------------*/ /* now, access memory for all information */ /*--------------------------------------------------------------------------*/ if (all_entries) { val_vec = MEM_ALLOC(all_entries, REAL); k_vec = MEM_ALLOC(all_entries, int); } /*--------------------------------------------------------------------------*/ /* and now, fill information */ /*--------------------------------------------------------------------------*/ for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { values[i][j] = val_vec; kk[i][j] = k_vec; for (n = k = 0; k < dim+1; k++) { for (val = iq = 0; iq < quad->n_points; iq++) { grdi = q_psi->grd_phi[iq][i][k]; phij = q_phi->phi[iq][j]; val += quad->w[iq]*grdi*phij; } if (ABS(val) > TOO_SMALL) { all_entries--; DEBUG_TEST_EXIT(all_entries >= 0, "now more entries found than counted before\n"); n++; *val_vec++ = val; *k_vec++ = k; } } n_entries[i][j] = n; } } return(q10pp); } /*--------------------------------------------------------------------------*/ /* first order term: */ /*--------------------------------------------------------------------------*/ const Q00_PSI_PHI *get_q00_psi_phi(const BAS_FCTS *psi, const BAS_FCTS *phi, const QUAD *quad) { FUNCNAME("get_q00_psi_phi"); static VOID_LIST_ELEMENT *first = nil; VOID_LIST_ELEMENT *list_el; Q00_PSI_PHI *q00pp; const QUAD_FAST *q_phi, *q_psi; int dim; int i, j, iq, n_psi, n_phi; REAL **values, val; if (!psi && !phi) return(nil); if (!psi) psi = phi; if (!phi) phi = psi; TEST_EXIT(psi->dim == phi->dim, "Support dimensions for phi and psi do not match!\n"); dim = phi->dim; if (!quad) quad = get_quadrature(dim, psi->degree+phi->degree); /*--------------------------------------------------------------------------*/ /* look for an existing entry in the list */ /*--------------------------------------------------------------------------*/ for (list_el = first; list_el; list_el = list_el->next) { q00pp = (Q00_PSI_PHI *)list_el->data; if (q00pp->psi == psi && q00pp->phi == phi && q00pp->quad == quad) return(q00pp); } /*--------------------------------------------------------------------------*/ /* create a new one */ /*--------------------------------------------------------------------------*/ n_psi = psi->n_bas_fcts; q_psi = get_quad_fast(psi, quad, INIT_PHI); n_phi = phi->n_bas_fcts; q_phi = get_quad_fast(phi, quad, INIT_PHI); list_el = get_void_list_element(); list_el->data = q00pp = MEM_ALLOC(1, Q00_PSI_PHI); list_el->next = first; first = list_el; values = MAT_ALLOC(n_psi, n_phi, REAL); q00pp->psi = psi; q00pp->phi = phi; q00pp->quad = quad; q00pp->values = (const REAL **) values; for (i = 0; i < n_psi; i++) { for (j = 0; j < n_phi; j++) { for (val = iq = 0; iq < quad->n_points; iq++) val += quad->w[iq]*q_psi->phi[iq][i]*q_phi->phi[iq][j]; if (ABS(val) < TOO_SMALL) values[i][j] = 0.0; else values[i][j] = val; } } return(q00pp); } typedef struct fill_info FILL_INFO; struct fill_info { const FE_SPACE *psi_fe; const FE_SPACE *phi_fe; const QUAD *quad[3]; const Q11_PSI_PHI *q11_psi_phi; const Q01_PSI_PHI *q01_psi_phi; const Q10_PSI_PHI *q10_psi_phi; const Q00_PSI_PHI *q00_psi_phi; const QUAD_FAST *psi_quad_fast[3]; const QUAD_FAST *phi_quad_fast[3]; int n_row, n_col; REAL **element_matrix; PARAMETRIC *parametric; int (*init_element)(const EL_INFO *, const QUAD *[3], void *); void (*fast_second_order)(const EL_INFO *, const FILL_INFO *); void (*fast_first_order)(const EL_INFO *, const FILL_INFO *); void (*fast_zero_order)(const EL_INFO *, const FILL_INFO *); void (*slow_second_order)(const EL_INFO *, const FILL_INFO *); void (*slow_first_order)(const EL_INFO *, const FILL_INFO *); void (*slow_zero_order)(const EL_INFO *, const FILL_INFO *); const REAL (*(*LALt)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; int LALt_symmetric; const REAL *(*Lb0)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*Lb1)(const EL_INFO *, const QUAD *, int, void *); int Lb0_Lb1_anti_symmetric; REAL (*c)(const EL_INFO *, const QUAD *, int, void *); int c_symmetric; void *user_data; FILL_INFO *next; }; /*--------------------------------------------------------------------------*/ /* functions for calculating element stiffness matrices */ /*--------------------------------------------------------------------------*/ static void pre_2(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA]; const int **n_entries, *k, *l; const REAL *values; int i, j, m; REAL **mat = info->element_matrix, val; LALt = info->LALt(el_info, info->quad[2], 0, info->user_data); n_entries = info->q11_psi_phi->n_entries; if (info->LALt_symmetric) { for (i = 0; i < info->n_row; i++) { k = info->q11_psi_phi->k[i][i]; l = info->q11_psi_phi->l[i][i]; values = info->q11_psi_phi->values[i][i]; for (val = m = 0; m < n_entries[i][i]; m++) val += values[m]*LALt[k[m]][l[m]]; mat[i][i] += val; for (j = i+1; j < info->n_col; j++) { k = info->q11_psi_phi->k[i][j]; l = info->q11_psi_phi->l[i][j]; values = info->q11_psi_phi->values[i][j]; for (val = m = 0; m < n_entries[i][j]; m++) val += values[m]*LALt[k[m]][l[m]]; mat[i][j] += val; mat[j][i] += val; } } } else /* A not symmetric or psi != phi */ { for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { k = info->q11_psi_phi->k[i][j]; l = info->q11_psi_phi->l[i][j]; values = info->q11_psi_phi->values[i][j]; for (val = m = 0; m < n_entries[i][j]; m++) val += values[m]*LALt[k[m]][l[m]]; mat[i][j] += val; } } } return; } static void pre_01(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb0; const int **n_entries, *l; const REAL *values; REAL val; int i, j, m; REAL **mat = info->element_matrix; Lb0 = info->Lb0(el_info, info->quad[1], 0, info->user_data); n_entries = info->q01_psi_phi->n_entries; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { l = info->q01_psi_phi->l[i][j]; values = info->q01_psi_phi->values[i][j]; for (val = m = 0; m < n_entries[i][j]; m++) val += values[m]*Lb0[l[m]]; mat[i][j] += val; } } return; } static void pre_10(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb1; const int **n_entries, *k; const REAL *values; int i, j, m; REAL **mat = info->element_matrix, val; Lb1 = info->Lb1(el_info, info->quad[1], -1, info->user_data); n_entries = info->q10_psi_phi->n_entries; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { k = info->q10_psi_phi->k[i][j]; values = info->q10_psi_phi->values[i][j]; for (val = m = 0; m < n_entries[i][j]; m++) val += values[m]*Lb1[k[m]]; mat[i][j] += val; } } return; } static void pre_11(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb0, *Lb1; const int **n_entries01, **n_entries10, *k, *l; const REAL *values; int i, j, m; REAL **mat = info->element_matrix, val; Lb0 = info->Lb0(el_info, info->quad[1], 0, info->user_data); Lb1 = info->Lb1(el_info, info->quad[1], 0, info->user_data); n_entries01 = info->q01_psi_phi->n_entries; n_entries10 = info->q10_psi_phi->n_entries; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { l = info->q01_psi_phi->l[i][j]; values = info->q01_psi_phi->values[i][j]; for (val = m = 0; m < n_entries01[i][j]; m++) val += values[m]*Lb0[l[m]]; k = info->q10_psi_phi->k[i][j]; values = info->q10_psi_phi->values[i][j]; for (m = 0; m < n_entries10[i][j]; m++) val += values[m]*Lb1[k[m]]; mat[i][j] += val; } } return; } static void pre_0(const EL_INFO *el_info, const FILL_INFO *info) { int i, j; REAL val, c; const REAL **values; REAL **mat = info->element_matrix; c = info->c(el_info, info->quad[0], 0, info->user_data); values = info->q00_psi_phi->values; if (info->c_symmetric) { for (i = 0; i < info->n_row; i++) { mat[i][i] += c*values[i][i]; for (j = i+1; j < info->n_col; j++) { val = c*values[i][j]; mat[i][j] += val; mat[j][i] += val; } } } else { for (i = 0; i < info->n_row; i++) for (j = 0; j < info->n_col; j++) mat[i][j] += c*values[i][j]; } return; } static inline REAL btv(const int n_lambda, const REAL *b, const REAL *v) { int i; REAL res = 0.0; for(i = 0; i < n_lambda; i++) res += b[i]*v[i]; return res; } static inline REAL utAv(const int n_lambda, const REAL *u, const REAL (*A)[N_LAMBDA], const REAL *v) { int i,j; REAL res = 0.0; for(i = 0; i < n_lambda; i++) for(j = 0; j < n_lambda; j++) res += u[i]*A[i][j]*v[j]; return res; } static void quad_2(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA]; REAL val, (*grd_psi)[N_LAMBDA], (*grd_phi)[N_LAMBDA]; int iq, i, j, n_lambda = el_info->mesh->dim + 1; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; LALt_fct = info->LALt; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric) { for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; for (i = 0; i < info->n_row; i++) { mat[i][i] += quad->w[iq]*utAv(n_lambda, grd_psi[i], LALt, grd_phi[i]); for (j = i+1; j < info->n_col; j++) { val = quad->w[iq]*utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]); mat[i][j] += val; mat[j][i] += val; } } } } else /* non symmetric assembling */ { for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { mat[i][j] += quad->w[iq]*utAv(n_lambda,grd_psi[i], LALt, grd_phi[j]); } } } } return; } static void quad_01(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb0; REAL *psi, (*grd_phi)[N_LAMBDA]; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; REAL **mat = info->element_matrix; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); Lb0_fct = info->Lb0; quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; for (iq = 0; iq < quad->n_points; iq++) { Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) mat[i][j] += quad->w[iq]*psi[i]*btv(n_lambda,Lb0,grd_phi[j]); } } return; } static void quad_10(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb1; REAL (*grd_psi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); Lb1_fct = info->Lb1; quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; for (iq = 0; iq < quad->n_points; iq++) { Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); phi = phi_fast->phi[iq]; grd_psi = psi_fast->grd_phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) mat[i][j] += quad->w[iq]*btv(n_lambda,Lb1,grd_psi[i])*phi[j]; } } return; } static void quad_11(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb0, *Lb1; REAL *psi, (*grd_psi)[N_LAMBDA], (*grd_phi)[N_LAMBDA], *phi, val; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); Lb0_fct = info->Lb0; Lb1_fct = info->Lb1; quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; if (info->Lb0_Lb1_anti_symmetric) { for (iq = 0; iq < quad->n_points; iq++) { Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = i+1; j < info->n_col; j++) { val = psi[i]*btv(n_lambda, Lb0,grd_phi[j]) + btv(n_lambda, Lb1,grd_psi[i])*phi[j]; val *= quad->w[iq]; mat[i][j] += val; mat[j][i] -= val; } } } } else { for (iq = 0; iq < quad->n_points; iq++) { Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { val = psi[i]*btv(n_lambda, Lb0,grd_phi[j]) + btv(n_lambda, Lb1,grd_psi[i])*phi[j]; mat[i][j] += quad->w[iq]*val; } } } } return; } static void quad_0(const EL_INFO *el_info, const FILL_INFO *info) { REAL c, val, *psi, *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); c_fct = info->c; quad = info->quad[0]; psi_fast = info->psi_quad_fast[0]; phi_fast = info->phi_quad_fast[0]; if (info->c_symmetric) { for (iq = 0; iq < quad->n_points; iq++) { c = (*c_fct)(el_info, quad, iq, info->user_data); psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { mat[i][i] += quad->w[iq]*c*psi[i]*phi[i]; for (j = i+1; j < info->n_col; j++) { val = quad->w[iq]*c*psi[i]*phi[j]; mat[i][j] += val; mat[j][i] += val; } } } } else /* non symmetric assembling */ { for (iq = 0; iq < quad->n_points; iq++) { c = (*c_fct)(el_info, quad, iq, info->user_data); psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) mat[i][j] += quad->w[iq]*c*psi[i]*phi[j]; } } } return; } static void quad_2_01(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA], *Lb0; REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA]; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; Lb0_fct = info->Lb0; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; for (iq = 0; iq < quad->n_points; iq++) { LALt = LALt_fct(el_info, quad, iq, info->user_data); Lb0 = Lb0_fct(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { mat[i][j] += quad->w[iq]*(utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]) + psi[i]*btv(n_lambda, Lb0, grd_phi[j])); } } } return; } static void quad_2_10(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA], *Lb1; REAL (*grd_psi)[N_LAMBDA], (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; Lb1_fct = info->Lb1; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; for (iq = 0; iq < quad->n_points; iq++) { LALt = LALt_fct(el_info, quad, iq, info->user_data); Lb1 = Lb1_fct(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { mat[i][j] += quad->w[iq]*(utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]) + btv(n_lambda, Lb1, grd_psi[i])*phi[j]); } } } return; } static void quad_2_11(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA], *Lb0, *Lb1; REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix, val2, val1; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; Lb0_fct = info->Lb0; Lb1_fct = info->Lb1; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric && info->Lb0_Lb1_anti_symmetric) { for (iq = 0; iq < quad->n_points; iq++) { LALt = LALt_fct(el_info, quad, iq, info->user_data); Lb0 = Lb0_fct(el_info, quad, iq, info->user_data); Lb1 = Lb1_fct(el_info, quad, iq, info->user_data); grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { mat[i][i] += quad->w[iq]*utAv(n_lambda, grd_psi[i], LALt, grd_phi[i]); for (j = i+1; j < info->n_col; j++) { val2 = quad->w[iq] * utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]); val1 = psi[i]*btv(n_lambda, Lb0,grd_phi[j]) + btv(n_lambda, Lb1,grd_psi[i])*phi[j]; val1 *= quad->w[iq]; mat[i][j] += val2 + val1; mat[j][i] += val2 - val1; } } } } else { for (iq = 0; iq < quad->n_points; iq++) { LALt = LALt_fct(el_info, quad, iq, info->user_data); Lb0 = Lb0_fct(el_info, quad, iq, info->user_data); Lb1 = Lb1_fct(el_info, quad, iq, info->user_data); grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { val2 = utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]); val1 = psi[i]*btv(n_lambda, Lb0,grd_phi[j]) + btv(n_lambda, Lb1,grd_psi[i])*phi[j]; mat[i][j] += quad->w[iq]*(val2 + val1); } } } } return; } static void quad_2_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA]; REAL c, val, (*grd_psi)[N_LAMBDA]; REAL *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; c_fct = info->c; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric) /* => psi == phi => c_symmetric */ { for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { val = utAv(n_lambda, grd_psi[i], LALt, grd_phi[i]) + c*psi[i]*phi[i]; mat[i][i] += quad->w[iq]*val; for (j = i+1; j < info->n_col; j++) { val = utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]) + c*psi[i]*phi[j]; val *= quad->w[iq]; mat[i][j] += val; mat[j][i] += val; } } } } else /* non symmetric assembling */ { for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { mat[i][j] += quad->w[iq]*(utAv(n_lambda,grd_psi[i], LALt, grd_phi[j]) + c*psi[i]*phi[j]); } } } } return; } static void quad_01_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb0; REAL c, *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); Lb0_fct = info->Lb0; c_fct = info->c; quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; for (iq = 0; iq < quad->n_points; iq++) { Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) mat[i][j] += quad->w[iq]*psi[i]*(btv(n_lambda,Lb0,grd_phi[j]) + c*phi[j]); } } return; } static void quad_10_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb1; REAL c, (*grd_psi)[N_LAMBDA], *psi, *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); Lb1_fct = info->Lb1; c_fct = info->c; quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; for (iq = 0; iq < quad->n_points; iq++) { Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) mat[i][j] += quad->w[iq]*(btv(n_lambda,Lb1,grd_psi[i]) + psi[i]*c)*phi[j]; } } return; } static void quad_11_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL *Lb0, *Lb1; REAL c, (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix, val0, val1; int n_lambda = el_info->mesh->dim + 1; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); Lb0_fct = info->Lb0; Lb1_fct = info->Lb1; c_fct = info->c; quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; if (info->Lb0_Lb1_anti_symmetric) /* => psi == phi => c symmetric */ { for (iq = 0; iq < quad->n_points; iq++) { Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { mat[i][i] += quad->w[iq]*psi[i]*c*phi[i]; for (j = i+1; j < info->n_col; j++) { val1 = psi[i]*btv(n_lambda,Lb0,grd_phi[j]) + btv(n_lambda,Lb1,grd_psi[i])*phi[j]; val1 *= quad->w[iq]; val0 = quad->w[iq]*psi[i]*c*phi[j]; mat[i][j] += val0 + val1; mat[j][i] += val0 - val1; } } } } else { for (iq = 0; iq < quad->n_points; iq++) { Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; grd_phi = phi_fast->grd_phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { val1 = psi[i]*btv(n_lambda,Lb0,grd_phi[j]) + btv(n_lambda,Lb1,grd_psi[i])*phi[j]; val0 = psi[i]*c*phi[j]; mat[i][j] += quad->w[iq]*(val1 + val0); } } } } return; } static void quad_2_01_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA], *Lb0; REAL c, (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi, val; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; Lb0_fct = info->Lb0; c_fct = info->c; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { val = utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]); val += psi[i]*(btv(n_lambda, Lb0, grd_phi[j])+c*phi[j]); mat[i][j] += quad->w[iq]*val; } } } return; } static void quad_2_10_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA], *Lb1; REAL c, (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi, val; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; Lb1_fct = info->Lb1; c_fct = info->c; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { val = utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]); val += (btv(n_lambda,Lb1, grd_psi[i])+c*psi[i])*phi[j]; mat[i][j] += quad->w[iq]*val; } } } return; } static void quad_2_11_0(const EL_INFO *el_info, const FILL_INFO *info) { const REAL (*LALt)[N_LAMBDA], *Lb0, *Lb1; REAL c, (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; REAL **mat = info->element_matrix, val20, val1; int n_lambda = el_info->mesh->dim + 1; const REAL (*(*LALt_fct)(const EL_INFO *,const QUAD *,int,void *))[N_LAMBDA]; const REAL *(*Lb0_fct)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*Lb1_fct)(const EL_INFO *, const QUAD *, int, void *); REAL (*c_fct)(const EL_INFO *, const QUAD *, int, void *); LALt_fct = info->LALt; Lb0_fct = info->Lb0; Lb1_fct = info->Lb1; c_fct = info->c; quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric && info->Lb0_Lb1_anti_symmetric) { for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { val20 = utAv(n_lambda, grd_psi[i], LALt, grd_phi[i]) + psi[i]*c*phi[i]; mat[i][i] += quad->w[iq]*val20; for (j = i+1; j < info->n_col; j++) { val20 = utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]) + psi[i]*c*phi[j]; val1 = psi[i]*btv(n_lambda, Lb0, grd_phi[j]) + btv(n_lambda, Lb1, grd_psi[i])*phi[j]; mat[i][j] += quad->w[iq]*(val20 + val1); mat[j][i] += quad->w[iq]*(val20 - val1); } } } } else { for (iq = 0; iq < quad->n_points; iq++) { LALt = (*LALt_fct)(el_info, quad, iq, info->user_data); Lb0 = (*Lb0_fct)(el_info, quad, iq, info->user_data); Lb1 = (*Lb1_fct)(el_info, quad, iq, info->user_data); c = (*c_fct)(el_info, quad, iq, info->user_data); grd_psi = psi_fast->grd_phi[iq]; grd_phi = phi_fast->grd_phi[iq]; psi = psi_fast->phi[iq]; phi = phi_fast->phi[iq]; for (i = 0; i < info->n_row; i++) { for (j = 0; j < info->n_col; j++) { val20 = utAv(n_lambda, grd_psi[i], LALt, grd_phi[j]) + psi[i]*c*phi[j]; val1 = psi[i]*btv(n_lambda, Lb0, grd_phi[j]) + btv(n_lambda, Lb1, grd_psi[i])*phi[j]; mat[i][j] += quad->w[iq]*(val20 + val1); } } } } return; } static const REAL **element_matrix(const EL_INFO *el_info, void *fill_info) { FILL_INFO *info = (FILL_INFO *)fill_info; int i, j, use_slow = 0; REAL **mat; mat = info->element_matrix; for(i = 0; i < info->n_row; i++) for (j = 0; j < info->n_col; j++) mat[i][j] = 0.0; /* Use the return value to determine if we are on a parametric element. */ if (info->init_element) use_slow = (*info->init_element)(el_info, info->quad, info->user_data); if (!use_slow && info->fast_second_order) (*info->fast_second_order)(el_info, info); else if (info->slow_second_order) (*info->slow_second_order)(el_info, info); if (!use_slow && info->fast_first_order) (*info->fast_first_order)(el_info, info); else if (info->slow_first_order) (*info->slow_first_order)(el_info, info); if (!use_slow && info->fast_zero_order) (*info->fast_zero_order)(el_info, info); else if (info->slow_zero_order) (*info->slow_zero_order)(el_info, info); return((const REAL **) mat); } /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Just some defines to make the code below a little bit more readable. * also, use |= below instead of += so that the reader knows: it's not * magic, it's just a flag value. */ #define FLAG_C 0x8 #define FLAG_LB1 0x4 #define FLAG_LB0 0x2 #define FLAG_LALt 0x1 const EL_MATRIX_INFO *fill_matrix_info(const OPERATOR_INFO *operator_info, EL_MATRIX_INFO *matrix_info) { FUNCNAME("fill_matrix_info"); static FILL_INFO *first_fill_info = nil; FILL_INFO *fill_info; OPERATOR_INFO oinfo[1]; const BAS_FCTS *psi, *phi; PARAMETRIC *parametric = nil; int dim, not_all_param = false; int psi_deg, phi_deg; int pre2, pre1, pre0, quad2, quad1, quad0; *oinfo = *operator_info; if (!oinfo->row_fe_space && !oinfo->col_fe_space) { ERROR("both pointer to row and column FE_SPACEs nil\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } else if (!oinfo->row_fe_space) oinfo->row_fe_space = oinfo->col_fe_space; else if (!oinfo->col_fe_space) oinfo->col_fe_space = oinfo->row_fe_space; psi = oinfo->row_fe_space->bas_fcts; phi = oinfo->col_fe_space->bas_fcts; if(phi->dim != psi->dim) { ERROR("Support dimensions of phi and psi do not match!\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } dim = phi->dim; psi_deg = psi->degree; phi_deg = phi->degree; TEST_EXIT(oinfo->row_fe_space->mesh == oinfo->col_fe_space->mesh, "Mesh must be the same for row and column fe_space!\n"); parametric = oinfo->row_fe_space->mesh->parametric; if (!oinfo->c && !oinfo->Lb0 && !oinfo->Lb1 && !oinfo->LALt) { ERROR("no function for 2nd, 1st, and 0 order term;\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } if(parametric) { if(!oinfo->quad[0] && !oinfo->quad[1] && !oinfo->quad[2]) { ERROR("User is responsible for providing at least one quadrature\n"); ERROR("when using a parametric mesh!\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } not_all_param = parametric->not_all; } if (psi != phi) { oinfo->LALt_symmetric = 0; oinfo->Lb0_Lb1_anti_symmetric = 0; } if (oinfo->LALt && !oinfo->quad[2]) oinfo->quad[2] = get_quadrature(dim, psi_deg + phi_deg - 2); else if (!oinfo->LALt) oinfo->quad[2] = nil; if ((oinfo->Lb0 || oinfo->Lb1) && !oinfo->quad[1]) { if ((!oinfo->Lb0_pw_const || !oinfo->Lb1_pw_const) && oinfo->quad[2]) oinfo->quad[1] = oinfo->quad[2]; else oinfo->quad[1] = get_quadrature(dim, psi_deg + phi_deg - 1); } else if (!oinfo->Lb0 && !oinfo->Lb1) oinfo->quad[1] = nil; if (oinfo->c && !oinfo->quad[0]) { if (!oinfo->c_pw_const && oinfo->quad[2]) oinfo->quad[0] = oinfo->quad[2]; else if (!oinfo->c_pw_const && oinfo->quad[1]) oinfo->quad[0] = oinfo->quad[1]; else oinfo->quad[0] = get_quadrature(dim, psi_deg + phi_deg); } else if (!oinfo->c) oinfo->quad[0] = nil; /*--------------------------------------------------------------------------*/ /* look for an existing fill_info */ /*--------------------------------------------------------------------------*/ for (fill_info = first_fill_info; fill_info; fill_info = fill_info->next) { if (fill_info->psi_fe != oinfo->row_fe_space) continue; if (fill_info->phi_fe != oinfo->col_fe_space) continue; if (fill_info->quad[2] != oinfo->quad[2]) continue; if (fill_info->quad[1] != oinfo->quad[1]) continue; if (fill_info->quad[0] != oinfo->quad[0]) continue; if (fill_info->parametric != parametric) continue; if (fill_info->init_element != oinfo->init_element) continue; if (fill_info->LALt != oinfo->LALt) continue; if (fill_info->LALt_symmetric != oinfo->LALt_symmetric) continue; if (fill_info->Lb0 != oinfo->Lb0) continue; if (fill_info->Lb1 != oinfo->Lb1) continue; if (fill_info->Lb0_Lb1_anti_symmetric != oinfo->Lb0_Lb1_anti_symmetric) continue; if (fill_info->c != oinfo->c) continue; if (fill_info->user_data != oinfo->user_data) continue; break; } if (!fill_info) { /*--------------------------------------------------------------------------*/ /* create a new fill_info */ /*--------------------------------------------------------------------------*/ const QUAD_FAST **psi_fast, **phi_fast; int n_row = psi->n_bas_fcts, n_col = phi->n_bas_fcts; fill_info = MEM_CALLOC(1, FILL_INFO); fill_info->next = first_fill_info; first_fill_info = fill_info; fill_info->psi_fe = oinfo->row_fe_space; fill_info->phi_fe = oinfo->col_fe_space; fill_info->quad[2] = oinfo->quad[2]; fill_info->quad[1] = oinfo->quad[1]; fill_info->quad[0] = oinfo->quad[0]; fill_info->n_row = n_row; fill_info->n_col = n_col; fill_info->element_matrix = MAT_ALLOC(n_row, n_col, REAL); psi_fast = fill_info->psi_quad_fast; phi_fast = fill_info->phi_quad_fast; fill_info->parametric = parametric; fill_info->init_element = oinfo->init_element; fill_info->LALt = oinfo->LALt; fill_info->LALt_symmetric = oinfo->LALt_symmetric; fill_info->Lb0 = oinfo->Lb0; fill_info->Lb1 = oinfo->Lb1; fill_info->Lb0_Lb1_anti_symmetric = oinfo->Lb0_Lb1_anti_symmetric; fill_info->c = oinfo->c; fill_info->c_symmetric = (phi == psi); fill_info->user_data = oinfo->user_data; psi_fast[2] = phi_fast[2] = nil; pre2 = quad2 = 0; if (fill_info->LALt) { if (oinfo->LALt_pw_const) { pre2 |= FLAG_LALt; fill_info->q11_psi_phi = get_q11_psi_phi(psi, phi, oinfo->quad[2]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant LALt but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->LALt_pw_const || parametric) { quad2 |= FLAG_LALt; psi_fast[2] = get_quad_fast(psi, oinfo->quad[2], INIT_GRD_PHI); if (psi != phi) phi_fast[2] = get_quad_fast(phi, oinfo->quad[2], INIT_GRD_PHI); else phi_fast[2] = psi_fast[2]; } } psi_fast[1] = phi_fast[1] = nil; pre1 = quad1 = 0; if (fill_info->Lb0) { if (oinfo->Lb0_pw_const) { pre1 |= FLAG_LB0; fill_info->q01_psi_phi = get_q01_psi_phi(psi, phi, oinfo->quad[1]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant Lb0 but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->Lb0_pw_const || parametric) { if (quad2 && oinfo->quad[1] == oinfo->quad[2]) quad2 |= FLAG_LB0; else quad1 |= FLAG_LB0; psi_fast[1] = get_quad_fast(psi, oinfo->quad[1], INIT_PHI); phi_fast[1] = get_quad_fast(phi, oinfo->quad[1], INIT_GRD_PHI); } } if (fill_info->Lb1) { if (oinfo->Lb1_pw_const) { pre1 |= FLAG_LB1; fill_info->q10_psi_phi = get_q10_psi_phi(psi, phi, oinfo->quad[1]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant Lb1 but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->Lb1_pw_const || parametric) { if (quad2 && oinfo->quad[1] == oinfo->quad[2]) quad2 |= FLAG_LB1; else quad1 |= FLAG_LB1; psi_fast[1] = get_quad_fast(psi, oinfo->quad[1], INIT_GRD_PHI); phi_fast[1] = get_quad_fast(phi, oinfo->quad[1], INIT_PHI); } } psi_fast[0] = phi_fast[0] = nil; pre0 = quad0 = 0; if (fill_info->c) { if (oinfo->c_pw_const) { pre0 |= FLAG_C; fill_info->q00_psi_phi = get_q00_psi_phi(psi, phi, oinfo->quad[0]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant c but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->c_pw_const || parametric) { if (quad2 && oinfo->quad[0] == oinfo->quad[2]) quad2 |= FLAG_C; else if (quad1 && oinfo->quad[0] == oinfo->quad[1]) quad1 |= FLAG_C; else quad0 |= FLAG_C; psi_fast[0] = get_quad_fast(psi, oinfo->quad[0], INIT_PHI); if (psi != phi) phi_fast[0] = get_quad_fast(phi, oinfo->quad[0], INIT_PHI); else phi_fast[0] = psi_fast[0]; } } if (pre2) { fill_info->fast_second_order = pre_2; INFO(0,2,"using second order pre_2\n"); } switch (pre1) { case FLAG_LB0: fill_info->fast_first_order = pre_01; INFO(0,2,"using first order pre_01\n"); break; case FLAG_LB1: fill_info->fast_first_order = pre_10; INFO(0,2,"using first order pre_10\n"); break; case FLAG_LB0|FLAG_LB1: fill_info->fast_first_order = pre_11; INFO(0,2,"using first order pre_11\n"); break; } if (pre0 /* == FLAG_C */) { fill_info->fast_zero_order = pre_0; INFO(0,2,"using zero order pre_0\n"); } switch (quad2) { case FLAG_LALt: fill_info->slow_second_order = quad_2; INFO(0,2,"using second order quad_2\n"); break; case FLAG_LALt|FLAG_LB0: fill_info->slow_second_order = quad_2_01; INFO(0,2,"using second order quad_2_01\n"); break; case FLAG_LALt|FLAG_LB1: fill_info->slow_second_order = quad_2_10; INFO(0,2,"using second order quad_2_10\n"); break; case FLAG_LALt|FLAG_LB1|FLAG_LB0: fill_info->slow_second_order = quad_2_11; INFO(0,2,"using second order quad_2_11\n"); break; case FLAG_LALt|FLAG_C: fill_info->slow_second_order = quad_2_0; INFO(0,2,"using second order quad_2_0\n"); break; case FLAG_LALt|FLAG_LB0|FLAG_C: fill_info->slow_second_order = quad_2_01_0; INFO(0,2,"using second order quad_2_01_0\n"); break; case FLAG_LALt|FLAG_LB1|FLAG_C: fill_info->slow_second_order = quad_2_10_0; INFO(0,2,"using second order quad_2_10_0\n"); break; case FLAG_LALt|FLAG_LB1|FLAG_LB0|FLAG_C: fill_info->slow_second_order = quad_2_11_0; INFO(0,2,"using second order quad2_11_0\n"); break; } switch (quad1) { case FLAG_LB0: fill_info->slow_first_order = quad_01; INFO(0,2,"using first order quad_01\n"); break; case FLAG_LB1: fill_info->slow_first_order = quad_10; INFO(0,2,"using first order quad_10\n"); break; case FLAG_LB0|FLAG_LB1: fill_info->slow_first_order = quad_11; INFO(0,2,"using first order quad_11\n"); break; case FLAG_LB0|FLAG_C: fill_info->slow_first_order = quad_01_0; INFO(0,2,"using first order quad_01_0\n"); break; case FLAG_LB1|FLAG_C: fill_info->slow_first_order = quad_10_0; INFO(0,2,"using first order quad_10_0\n"); break; case FLAG_LB0|FLAG_LB1|FLAG_C: fill_info->slow_first_order = quad_11_0; INFO(0,2,"using first order quad_11_0\n"); break; } if (quad0 /* == FLAG_C */) { fill_info->slow_zero_order = quad_0; INFO(0,2,"using zero order quad_0\n"); } } if (!matrix_info) matrix_info = MEM_CALLOC(1, EL_MATRIX_INFO); matrix_info->n_row = psi->n_bas_fcts; matrix_info->row_admin = oinfo->row_fe_space->admin; matrix_info->col_admin = oinfo->col_fe_space->admin; matrix_info->get_row_dof = psi->get_dof_indices; if (psi != phi) { matrix_info->n_col = phi->n_bas_fcts; matrix_info->get_col_dof = phi->get_dof_indices; matrix_info->get_bound = nil; matrix_info->fill_flag = oinfo->fill_flag; } else if (oinfo->use_get_bound) { matrix_info->get_bound = psi->get_bound; matrix_info->fill_flag = oinfo->fill_flag|FILL_BOUND; } else { matrix_info->get_bound = nil; matrix_info->fill_flag = oinfo->fill_flag; } matrix_info->factor = 1.0; matrix_info->el_matrix_fct = element_matrix; matrix_info->fill_info = fill_info; return(matrix_info); } alberta-2.0.1/alberta/src/Common/assemble_dowb.c0000644000042300001440000016145010676724253016463 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: assemble_dowb.c */ /* */ /* description: fe-space independent assemblation routines of matrices */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERT */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" static const REAL TOO_SMALL = 1.e-15; /* <<< struct dowb_fill_info */ /* Could name it "FILL_INFO", too, but this way it is easier to debug */ typedef struct dowb_fill_info DOWB_FILL_INFO; struct dowb_fill_info { const FE_SPACE *psi_fe; const FE_SPACE *phi_fe; const QUAD *quad[3]; const Q11_PSI_PHI *q11_psi_phi; const Q01_PSI_PHI *q01_psi_phi; const Q10_PSI_PHI *q10_psi_phi; const Q00_PSI_PHI *q00_psi_phi; const QUAD_FAST *psi_quad_fast[3]; const QUAD_FAST *phi_quad_fast[3]; int n_row, n_col; void **element_matrix; PARAMETRIC *parametric; int (*init_element)(const EL_INFO *, const QUAD *[3], void *); void (*fast_second_order)(const EL_INFO *, const DOWB_FILL_INFO *); void (*fast_first_order)(const EL_INFO *, const DOWB_FILL_INFO *); void (*fast_zero_order)(const EL_INFO *, const DOWB_FILL_INFO *); void (*slow_second_order)(const EL_INFO *, const DOWB_FILL_INFO *); void (*slow_first_order)(const EL_INFO *, const DOWB_FILL_INFO *); void (*slow_zero_order)(const EL_INFO *, const DOWB_FILL_INFO *); union { const REAL_DD (*(*full)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL_DDS (*(*symm)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; const REAL_D (*(*diag)(const EL_INFO *, const QUAD *, int, void *))[N_LAMBDA]; } LALt; int LALt_symmetric; union { const REAL_DD *(*full)(const EL_INFO *, const QUAD *, int, void *); const REAL_DDS *(*symm)(const EL_INFO *, const QUAD *, int, void *); const REAL_D *(*diag)(const EL_INFO *, const QUAD *, int, void *); } Lb0; union { const REAL_DD *(*full)(const EL_INFO *, const QUAD *, int, void *); const REAL_DDS *(*symm)(const EL_INFO *, const QUAD *, int, void *); const REAL_D *(*diag)(const EL_INFO *, const QUAD *, int, void *); } Lb1; int Lb0_Lb1_anti_symmetric; union { const REAL_D *(*full)(const EL_INFO *, const QUAD *, int, void *); const REAL_DDS *(*symm)(const EL_INFO *, const QUAD *, int, void *); const REAL *(*diag)(const EL_INFO *, const QUAD *, int, void *); } c; int c_symmetric; DOWBM_TYPE type; void *user_data; DOWB_FILL_INFO *next; }; /* >>> */ /* <<< functions for calculating element stiffness matrices */ /*--------------------------------------------------------------------------*/ /* functions for calculating element stiffness matrices */ /*--------------------------------------------------------------------------*/ #define DECL_DOWB_BB(thing) \ union \ { \ const REAL_DD (*full)[N_LAMBDA]; \ const REAL_DDS (*symm)[N_LAMBDA]; \ const REAL_D (*diag)[N_LAMBDA]; \ } thing #define DECL_DOWB_B(thing) \ union \ { \ const REAL_DD *full; \ const REAL_DDS *symm; \ const REAL_D *diag; \ } thing #define DECL_DOWB_C(thing) \ union \ { \ const REAL_D *full; \ const REAL_DDS *symm; \ const REAL *diag; \ } thing #define DECL_SOMEVAR(thing) \ union \ { \ REAL_DD full; \ REAL_DDS symm; \ REAL_D diag; \ } thing #define ASSIGN_MAT(thing, val) \ union \ { \ REAL_DD **full; \ REAL_DDS **symm; \ REAL_D **diag; \ } thing = { (REAL_DD **)val } #define GET_VALUE(type, dst, src, args) dst.type = (src).type args #define SWITCH_TYPE(type, body_f, body_s, body_d) \ switch (type) { \ case dowbm_full: body_f; break; \ case dowbm_symm: body_s; break; \ case dowbm_diag: body_d; break; \ } #define GET_VALUES(type, dst, src, args) \ SWITCH_TYPE(type, \ GET_VALUE(full, dst, src, args), \ GET_VALUE(symm, dst, src, args), \ GET_VALUE(diag, dst, src, args)) /* BODY(F, CAST, PRE, SUF) is supposed to be a "multiplex" macro where * BLAS routines are accessed via F##AXPY(..., CAST PRE var##SUF, ...) */ #define EMIT_BODY_SWITCH(type) \ SWITCH_TYPE(type, \ BODY(M, (REAL_D *),, full), \ BODY(SM, ,& , symm), \ BODY(DM, , , diag)) /* <<< ... with pre-computed integrals */ /* <<< pre_2() */ static void pre_2(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); const int **n_entries, *k, *l; const REAL *values; int i, j, m; DOWBM_TYPE type = info->type; DECL_SOMEVAR(val); ASSIGN_MAT(mat, info->element_matrix); GET_VALUES(type, LALt, info->LALt, (el_info, info->quad[2], 0, info->user_data)); n_entries = info->q11_psi_phi->n_entries; if (info->LALt_symmetric) { /* Careful: we have to tranpose the blocks belonging to the lower * triangle (thx, Dani!) */ #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) { \ k = info->q11_psi_phi->k[i][i]; \ l = info->q11_psi_phi->l[i][i]; \ values = info->q11_psi_phi->values[i][i]; \ for ( m = 0; m < n_entries[i][i]; m++) \ F##AXPY_DOW(values[m], C P LALt.S[k[m]][l[m]], C P mat.S[i][i]); \ \ for (j = i+1; j < info->n_col; j++) { \ k = info->q11_psi_phi->k[i][j]; \ l = info->q11_psi_phi->l[i][j]; \ values = info->q11_psi_phi->values[i][j]; \ F##SET_DOW(0.0, C P val.S); \ for (m = 0; m < n_entries[i][j]; m++) \ F##AXPY_DOW(values[m], C P LALt.S[k[m]][l[m]], C P val.S); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[i][j]); \ F##AXTPY_DOW(1.0, C P val.S, C P mat.S[j][i]); \ } \ } EMIT_BODY_SWITCH(type); } else { /* A not symmetric or psi != phi */ #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ k = info->q11_psi_phi->k[i][j]; \ l = info->q11_psi_phi->l[i][j]; \ values = info->q11_psi_phi->values[i][j]; \ for (m = 0; m < n_entries[i][j]; m++) \ F##AXPY_DOW(values[m], \ C P LALt.S[k[m]][l[m]], C P mat.S[i][j]); \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< pre_01() */ static void pre_01(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb0); const int **n_entries, *l; const REAL *values; int i, j, m; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); GET_VALUES(type, Lb0, info->Lb0, (el_info, info->quad[1], 0, info->user_data)); n_entries = info->q01_psi_phi->n_entries; #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ l = info->q01_psi_phi->l[i][j]; \ values = info->q01_psi_phi->values[i][j]; \ for (m = 0; m < n_entries[i][j]; m++) { \ F##AXPY_DOW(values[m], C P Lb0.S[l[m]], C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< pre_10() */ static void pre_10(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb1); const int **n_entries, *k; const REAL *values; int i, j, m; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); GET_VALUES(type, Lb1, info->Lb1, (el_info, info->quad[1], -1, info->user_data)); n_entries = info->q10_psi_phi->n_entries; #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ k = info->q10_psi_phi->k[i][j]; \ values = info->q10_psi_phi->values[i][j]; \ for (m = 0; m < n_entries[i][j]; m++) { \ F##AXPY_DOW(values[m], C P Lb1.S[k[m]], C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< pre_11() */ static void pre_11(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb0); DECL_DOWB_B(Lb1); const int **n_entries01, **n_entries10, *k, *l; const REAL *values; int i, j, m; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); GET_VALUES(type, Lb0, info->Lb0, (el_info, info->quad[1], 0, info->user_data)); GET_VALUES(type, Lb1, info->Lb1, (el_info, info->quad[1], 0, info->user_data)); n_entries01 = info->q01_psi_phi->n_entries; n_entries10 = info->q10_psi_phi->n_entries; #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ l = info->q01_psi_phi->l[i][j]; \ values = info->q01_psi_phi->values[i][j]; \ for (m = 0; m < n_entries01[i][j]; m++) \ F##AXPY_DOW(values[m], C P Lb0.S[l[m]], C P mat.S[i][j]); \ \ k = info->q10_psi_phi->k[i][j]; \ values = info->q10_psi_phi->values[i][j]; \ for (m = 0; m < n_entries10[i][j]; m++) \ F##AXPY_DOW(values[m], C P Lb1.S[k[m]], C P mat.S[i][j]); \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< pre_0() */ static void pre_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { int i, j; DECL_SOMEVAR(val); DECL_DOWB_C(c); const REAL **values; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); GET_VALUES(type, c, info->c, (el_info, info->quad[0], 0, info->user_data)); values = info->q00_psi_phi->values; if (info->c_symmetric) { #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(values[i][i], C c.S, C P mat.S[i][i]); \ for (j = i+1; j < info->n_col; j++) { \ F##AXEY_DOW(values[i][j], C c.S, C P val.S); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[i][j]); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[j][i]); \ } \ } EMIT_BODY_SWITCH(type); } else { #undef BODY #define BODY(F, C, P, S) \ for (i = 0; i < info->n_row; i++) \ for (j = 0; j < info->n_col; j++) \ F##AXPY_DOW(values[i][j], C c.S, P mat.S[i][j]); EMIT_BODY_SWITCH(type); } } /* >>> */ /* >>> */ /* <<< ... without pre-computed integrals */ /* <<< utAv, btv, REAL_DD versions */ /* component-wise n_lambda scp, b is matrix valued */ #undef BODY #define BODY(F, T, RT, C, P) \ static inline RT F##btv(const int n_lambda, const T b[], \ const REAL_B v, RT r) \ { \ int i; \ \ F##AXEY_DOW(v[0], C P b[0], r); \ for (i = 1; i < n_lambda; i++) { \ F##AXPY_DOW(v[i], C P b[i], r); \ } \ return r; \ } BODY(M, REAL_DD, REAL_D *, (REAL_D *),) BODY(SM, REAL_DDS, REAL_DDS *, ,&) BODY(DM, REAL_D, REAL *,,) /* A is a (N_LAMBDA)x(N_LAMBDA) block-matrix with DOWxDOW entries */ #undef BODY #define BODY(F, T, RT, C, P) \ static inline RT F##utAv(const int n_lambda, \ const REAL_B u, \ const T (*A)[N_LAMBDA], \ const REAL_B v, \ RT r) \ { \ int i; \ T tmp; \ \ F##AX_DOW(u[0], C F##btv(n_lambda, A[0], v, r)); \ for (i = 1; i < n_lambda; i++) { \ F##AXPY_DOW(u[i], C F##btv(n_lambda, A[i], v, C P tmp), r); \ } \ return r; \ } BODY(M, REAL_DD, REAL_D *, (REAL_D *),) BODY(SM, REAL_DDS, REAL_DDS *, ,&) BODY(DM, REAL_D, REAL *,,) /* >>> */ /* <<< quad_2() */ static void quad_2(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); REAL (*grd_psi)[N_LAMBDA], (*grd_phi)[N_LAMBDA]; int iq, i, j; int n_lambda = el_info->mesh->dim + 1; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; DOWBM_TYPE type = info->type; DECL_SOMEVAR(val); DECL_SOMEVAR(tmp); ASSIGN_MAT(mat, info->element_matrix); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric) { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], \ LALt.S, grd_phi[i], C P tmp.S), \ C P mat.S[i][i]); \ for (j = i+1; j < info->n_col; j++) { \ F##AX_DOW(quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], \ LALt.S, grd_phi[j], C P val.S)); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[i][j]); \ F##AXTPY_DOW(1.0, C P val.S, C P mat.S[j][i]); \ } \ } \ } EMIT_BODY_SWITCH(type); } else { /* non symmetric assembling */ #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++){ \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], \ LALt.S, grd_phi[j], C P tmp.S), \ C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< quad_01() */ static void quad_01(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb0); REAL *psi, (*grd_phi)[N_LAMBDA]; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(tmp); quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb0, info->Lb0, (el_info, quad, iq, info->user_data)); \ \ grd_phi = phi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) \ F##AXPY_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], C P tmp.S), \ C P mat.S[i][j]); \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_10() */ static void quad_10(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb1); REAL (*grd_psi)[N_LAMBDA], *phi; int iq, i, j; int n_lambda = el_info->mesh->dim + 1; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(tmp); quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb1, info->Lb1, (el_info, quad, iq, info->user_data)); \ \ phi = phi_fast->phi[iq]; \ grd_psi = psi_fast->grd_phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) \ F##AXPY_DOW(quad->w[iq]*phi[j], \ F##btv(n_lambda, Lb1.S, grd_psi[i], C P tmp.S), \ C P mat.S[i][j]); \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_11() */ static void quad_11(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb0); DECL_DOWB_B(Lb1); REAL *psi, (*grd_psi)[N_LAMBDA], (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(tmp1); DECL_SOMEVAR(tmp2); DECL_SOMEVAR(val); quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; if (info->Lb0_Lb1_anti_symmetric) { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ \ grd_phi = phi_fast->grd_phi[iq]; \ phi = phi_fast->phi[iq]; \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = i+1; j < info->n_col; j++) { \ F##AXPBY_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], \ C P tmp1.S), \ quad->w[iq]*phi[j], \ F##btv(n_lambda, Lb1.S, grd_psi[i], \ C P tmp2.S), \ C P val.S); \ F##AXPY_DOW( 1.0, C P val.S, C P mat.S[i][j]); \ F##AXTPY_DOW(-1.0, C P val.S, C P mat.S[j][i]); \ } \ } \ } EMIT_BODY_SWITCH(type); } else { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ \ grd_phi = phi_fast->grd_phi[iq]; \ phi = phi_fast->phi[iq]; \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPBYP_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], \ C P tmp1.S), \ quad->w[iq]*phi[j], \ F##btv(n_lambda, Lb1.S, grd_psi[i], \ C P tmp2.S), \ C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< quad_0() */ static void quad_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_C(c); REAL *psi, *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; DOWBM_TYPE type = info->type; DECL_SOMEVAR(val); ASSIGN_MAT(mat, info->element_matrix); quad = info->quad[0]; psi_fast = info->psi_quad_fast[0]; phi_fast = info->phi_quad_fast[0]; if (info->c_symmetric) { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, c, info->c, (el_info, quad, iq, info->user_data)); \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(quad->w[iq] * psi[i] * phi[i], C c.S, C P mat.S[i][i]); \ \ for (j = i+1; j < info->n_col; j++) { \ F##AXEY_DOW(quad->w[iq] * psi[i] * phi[j], C c.S, C P val.S); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[i][j]); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[j][i]); \ } \ } \ } EMIT_BODY_SWITCH(type); } else { /* non symmetric assembling */ #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, c, info->c, (el_info, quad, iq, info->user_data)); \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) \ F##AXPY_DOW(quad->w[iq] * psi[i] * phi[j], C c.S, C P mat.S[i][j]); \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< quad_2_01() */ static void quad_2_01(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_B(Lb0); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA]; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(tmpA); DECL_SOMEVAR(tmpb); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) \ { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPBYP_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], \ C P tmpb.S), \ quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], LALt.S, \ grd_phi[j], C P tmpA.S), \ C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_2_10() */ static void quad_2_10(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_B(Lb1); REAL (*grd_psi)[N_LAMBDA], (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(tmpA); DECL_SOMEVAR(tmpb); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPBYP_DOW(quad->w[iq]*phi[j], \ F##btv(n_lambda, Lb1.S, grd_psi[i], \ C P tmpb.S), \ quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], LALt.S, \ grd_phi[j], C P tmpA.S), \ C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_2_11() */ static void quad_2_11(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_B(Lb0); DECL_DOWB_B(Lb1); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val1); DECL_SOMEVAR(val2); DECL_SOMEVAR(tmp1); DECL_SOMEVAR(tmp2); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric && info->Lb0_Lb1_anti_symmetric) { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ \ grd_phi = phi_fast->grd_phi[iq]; \ phi = phi_fast->phi[iq]; \ \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], LALt.S, \ grd_phi[i], C P tmp1.S), \ C P mat.S[i][i]); \ \ for (j = i+1; j < info->n_col; j++) { \ F##AX_DOW(quad->w[iq], \ F##utAv(n_lambda, grd_psi[i], LALt.S, \ grd_phi[j], C P val2.S)); \ F##AXPY_DOW(1.0, C P val2.S, C P mat.S[i][j]); \ F##AXTPY_DOW(1.0, C P val2.S, C P mat.S[j][i]); \ \ F##AXPBY_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], \ C P tmp1.S), \ quad->w[iq]*phi[j], \ F##btv(n_lambda, Lb1.S,grd_psi[i], \ C P tmp2.S), \ C P val1.S); \ F##AXPY_DOW( 1.0, C P val1.S, C P mat.S[i][j]); \ F##AXTPY_DOW(-1.0, C P val1.S, C P mat.S[j][i]); \ } \ } \ } EMIT_BODY_SWITCH(type); } else { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ \ grd_phi = phi_fast->grd_phi[iq]; \ phi = phi_fast->phi[iq]; \ \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[j], \ C P val2.S); \ F##AXPY_DOW(psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], C P val1.S), \ C P val2.S); \ F##AXPY_DOW(phi[j], \ F##btv(n_lambda, Lb1.S, grd_psi[i], C P val1.S), \ C P val2.S); \ F##AXPY_DOW(quad->w[iq], C P val2.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< quad_2_0() */ static void quad_2_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_C(c); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j, n_lambda = el_info->mesh->dim + 1; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric) { /* => psi == phi => c_symmetric */ #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(psi[i]*phi[i], C c.S, \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[i], \ C P val.S)); \ F##AXPY_DOW(quad->w[iq], C P val.S, C P mat.S[i][i]); \ for (j = i+1; j < info->n_col; j++) { \ F##AXPY_DOW(psi[i]*phi[j], C c.S, \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[j], \ C P val.S)); \ F##AX_DOW(quad->w[iq], C P val.S); \ F##AXPY_DOW(1.0, C P val.S, C P mat.S[i][j]); \ F##AXTPY_DOW(1.0, C P val.S, C P mat.S[j][i]); \ } \ } \ } EMIT_BODY_SWITCH(type); } else { /* non symmetric assembling */ #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(psi[i]*phi[j], C c.S, \ F##utAv(n_lambda, grd_psi[i], LALt.S, \ grd_phi[j], C P val.S)); \ F##AXPY_DOW(quad->w[iq], C P val.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< quad_01_0() */ static void quad_01_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb0); DECL_DOWB_C(c); REAL *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val); quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_phi = phi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(phi[j], C c.S, F##btv(n_lambda, Lb0.S, grd_phi[j], \ C P val.S)); \ F##AXPY_DOW(quad->w[iq]*psi[i], C P val.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_10_0 */ static void quad_10_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb1); DECL_DOWB_C(c); REAL (*grd_psi)[N_LAMBDA], *psi, *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val); quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(psi[i], C c.S, F##btv(n_lambda, Lb1.S, grd_psi[i], \ C P val.S)); \ F##AXPY_DOW(quad->w[iq]*phi[j], C P val.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_11_0() */ static void quad_11_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_B(Lb0); DECL_DOWB_B(Lb1); DECL_DOWB_C(c); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val0); DECL_SOMEVAR(val1); DECL_SOMEVAR(tmp1); DECL_SOMEVAR(tmp2); quad = info->quad[1]; psi_fast = info->psi_quad_fast[1]; phi_fast = info->phi_quad_fast[1]; if (info->Lb0_Lb1_anti_symmetric) { /* => psi == phi => c symmetric */ #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(quad->w[iq]*psi[i]*phi[i], C c.S, C P mat.S[i][i]); \ \ for (j = i+1; j < info->n_col; j++) { \ F##AXPBY_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda,Lb0.S, grd_phi[j], C P tmp1.S), \ quad->w[iq]*phi[j], \ F##btv(n_lambda,Lb1.S, grd_psi[i], C P tmp2.S), \ C P val1.S); \ F##AXPY_DOW( 1.0, C P val1.S, C P mat.S[i][j]); \ F##AXTPY_DOW(-1.0, C P val1.S, C P mat.S[j][i]); \ \ F##AXEY_DOW(quad->w[iq]*psi[i]*phi[j], C c.S, C P val0.S); \ F##AXPY_DOW(1.0, C P val0.S, C P mat.S[i][j]); \ F##AXTPY_DOW(1.0, C P val0.S, C P mat.S[j][i]); \ \ } \ } \ } EMIT_BODY_SWITCH(type); } else { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ psi = psi_fast->phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPBY_DOW(psi[i], \ F##btv(n_lambda,Lb0.S, grd_phi[j], C P tmp1.S), \ phi[j], \ F##btv(n_lambda,Lb1.S, grd_psi[i], C P tmp2.S), \ C P val1.S); \ F##AXPY_DOW(psi[i]*phi[j], C c.S, C P val1.S); \ F##AXPY_DOW(quad->w[iq], C P val1.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* <<< quad_2_01_0() */ static void quad_2_01_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_B(Lb0); DECL_DOWB_C(c); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val); DECL_SOMEVAR(tmp); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(psi[i], \ F##AXPY_DOW(phi[j], C c.S, \ F##btv(n_lambda, Lb0.S, grd_phi[j], \ C P tmp.S)), \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[j], \ C P val.S)); \ F##AXPY_DOW(quad->w[iq], C P val.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_2_10_0() */ static void quad_2_10_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_B(Lb1); DECL_DOWB_C(c); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val); DECL_SOMEVAR(tmp); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(phi[j], \ F##AXPY_DOW(psi[i], C c.S, \ F##btv(n_lambda, Lb1.S, grd_psi[i], \ C P tmp.S)), \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[j], \ C P val.S)); \ F##AXPY_DOW(quad->w[iq], C P val.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } /* >>> */ /* <<< quad_2_11_0 */ static void quad_2_11_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info) { DECL_DOWB_BB(LALt); DECL_DOWB_B(Lb0); DECL_DOWB_B(Lb1); DECL_DOWB_C(c); REAL (*grd_psi)[N_LAMBDA], *psi, (*grd_phi)[N_LAMBDA], *phi; int iq, i, j; const QUAD_FAST *psi_fast, *phi_fast; const QUAD *quad; int n_lambda = el_info->mesh->dim + 1; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); DECL_SOMEVAR(val20); DECL_SOMEVAR(val1); DECL_SOMEVAR(tmp1); DECL_SOMEVAR(tmp2); quad = info->quad[2]; psi_fast = info->psi_quad_fast[2]; phi_fast = info->phi_quad_fast[2]; if (info->LALt_symmetric && info->Lb0_Lb1_anti_symmetric) { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ F##AXPY_DOW(psi[i]*phi[i], C c.S, \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[i], \ C P val20.S)); \ F##AXPY_DOW(quad->w[iq], C P val20.S, C P mat.S[i][i]); \ \ for (j = i+1; j < info->n_col; j++) { \ F##AXPY_DOW(psi[i]*phi[j], C c.S, \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[j], \ C P val20.S)); \ F##AX_DOW(quad->w[iq], C P val20.S); \ F##AXPY_DOW(1.0, C P val20.S, C P mat.S[i][j]); \ F##AXTPY_DOW(1.0, C P val20.S, C P mat.S[j][i]); \ \ F##AXPBY_DOW(quad->w[iq]*psi[i], \ F##btv(n_lambda,Lb0.S, grd_phi[j], C P tmp1.S), \ quad->w[iq]*phi[j], \ F##btv(n_lambda,Lb1.S, grd_psi[i], C P tmp2.S), \ C P val1.S); \ F##AXPY_DOW( 1.0, C P val1.S, C P mat.S[i][j]); \ F##AXTPY_DOW(-1.0, C P val1.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } else { #undef BODY #define BODY(F, C, P, S) \ for (iq = 0; iq < quad->n_points; iq++) { \ GET_VALUE(S, LALt, info->LALt, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb0, info->Lb0, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, Lb1, info->Lb1, \ (el_info, quad, iq, info->user_data)); \ GET_VALUE(S, c, info->c, \ (el_info, quad, iq, info->user_data)); \ \ grd_psi = psi_fast->grd_phi[iq]; \ grd_phi = phi_fast->grd_phi[iq]; \ \ psi = psi_fast->phi[iq]; \ phi = phi_fast->phi[iq]; \ \ for (i = 0; i < info->n_row; i++) { \ for (j = 0; j < info->n_col; j++) { \ F##AXPY_DOW(psi[i]*phi[j], C c.S, \ F##utAv(n_lambda, grd_psi[i], LALt.S, grd_phi[j], \ C P val20.S)); \ F##AXPY_DOW(psi[i], \ F##btv(n_lambda, Lb0.S, grd_phi[j], C P val1.S), \ C P val20.S); \ F##AXPY_DOW(phi[j], \ F##btv(n_lambda, Lb1.S, grd_psi[i], C P val1.S), \ C P val20.S); \ F##AXPY_DOW(quad->w[iq], C P val20.S, C P mat.S[i][j]); \ } \ } \ } EMIT_BODY_SWITCH(type); } } /* >>> */ /* >>> */ static const void **element_matrix(const EL_INFO *el_info, void *fill_info) { DOWB_FILL_INFO *info = (DOWB_FILL_INFO *)fill_info; int i, j, use_slow = 0; DOWBM_TYPE type = info->type; ASSIGN_MAT(mat, info->element_matrix); #undef BODY #define BODY(F, C, P, S) \ for(i = 0; i < info->n_row; i++) \ for (j = 0; j < info->n_col; j++) \ F##SET_DOW(0.0, C P mat.S[i][j]); EMIT_BODY_SWITCH(type); /* Use the return value to determine if we are on a parametric element. */ if (info->init_element) use_slow = (*info->init_element)(el_info, info->quad, info->user_data); if (!use_slow && info->fast_second_order) (*info->fast_second_order)(el_info, info); else if (info->slow_second_order) (*info->slow_second_order)(el_info, info); if (!use_slow && info->fast_first_order) (*info->fast_first_order)(el_info, info); else if (info->slow_first_order) (*info->slow_first_order)(el_info, info); if (!use_slow && info->fast_zero_order) (*info->fast_zero_order)(el_info, info); else if (info->slow_zero_order) (*info->slow_zero_order)(el_info, info); return (const void **)info->element_matrix; } /* >>> */ /* <<< fill_dowb_matrix_info(), the exported function */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Just some defines to make the code below a little bit more readable. * also, use |= below instead of += so that the reader knows: it's not * magic, it's just a flag value. */ #define FLAG_C 0x8 #define FLAG_LB1 0x4 #define FLAG_LB0 0x2 #define FLAG_LALt 0x1 const EL_DOWB_MATRIX_INFO * fill_dowb_matrix_info(const DOWB_OPERATOR_INFO *operator_info, EL_DOWB_MATRIX_INFO *matrix_info) { FUNCNAME("fill_dowb_matrix_info"); static DOWB_FILL_INFO *first_fill_info = nil; DOWB_FILL_INFO *fill_info; DOWB_OPERATOR_INFO oinfo[1]; const BAS_FCTS *psi, *phi; PARAMETRIC *parametric = nil; int dim, not_all_param = false; int psi_deg, phi_deg; int pre2, pre1, pre0, quad2, quad1, quad0; *oinfo = *operator_info; TEST_EXIT(oinfo->type == dowbm_full || oinfo->type == dowbm_symm || oinfo->type == dowbm_diag, "Unknown matrix type: %d\n", oinfo->type); if (!oinfo->row_fe_space && !oinfo->col_fe_space) { ERROR("both pointer to row and column FE_SPACEs nil\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } else if (!oinfo->row_fe_space) oinfo->row_fe_space = oinfo->col_fe_space; else if (!oinfo->col_fe_space) oinfo->col_fe_space = oinfo->row_fe_space; psi = oinfo->row_fe_space->bas_fcts; phi = oinfo->col_fe_space->bas_fcts; if(phi->dim != psi->dim) { ERROR("Support dimensions of phi and psi do not match!\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } dim = phi->dim; psi_deg = psi->degree; phi_deg = phi->degree; TEST_EXIT(oinfo->row_fe_space->mesh == oinfo->col_fe_space->mesh, "Mesh must be the same for row and column fe_space!\n"); parametric = oinfo->row_fe_space->mesh->parametric; if (!oinfo->c.full && !oinfo->Lb0.full && !oinfo->Lb1.full && !oinfo->LALt.full) { ERROR("no function for 2nd, 1st, and 0 order term;\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } if(parametric) { if(!oinfo->quad[0] && !oinfo->quad[1] && !oinfo->quad[2]) { ERROR("User is responsible for providing at least one quadrature\n"); ERROR("when using a parametric mesh!\n"); ERROR("can not initialize EL_MATRIX_INFO; returning nil\n"); return(nil); } not_all_param = parametric->not_all; } if (psi != phi) { oinfo->LALt_symmetric = 0; oinfo->Lb0_Lb1_anti_symmetric = 0; } if (oinfo->LALt.full && !oinfo->quad[2]) oinfo->quad[2] = get_quadrature(dim, psi_deg + phi_deg - 2); else if (!oinfo->LALt.full) oinfo->quad[2] = nil; if ((oinfo->Lb0.full || oinfo->Lb1.full) && !oinfo->quad[1]) { if ((!oinfo->Lb0_pw_const || !oinfo->Lb1_pw_const) && oinfo->quad[2]) oinfo->quad[1] = oinfo->quad[2]; else oinfo->quad[1] = get_quadrature(dim, psi_deg + phi_deg - 1); } else if (!oinfo->Lb0.full && !oinfo->Lb1.full) oinfo->quad[1] = nil; if (oinfo->c.full && !oinfo->quad[0]) { if (!oinfo->c_pw_const && oinfo->quad[2]) oinfo->quad[0] = oinfo->quad[2]; else if (!oinfo->c_pw_const && oinfo->quad[1]) oinfo->quad[0] = oinfo->quad[1]; else oinfo->quad[0] = get_quadrature(dim, psi_deg + phi_deg); } else if (!oinfo->c.full) oinfo->quad[0] = nil; /*--------------------------------------------------------------------------*/ /* look for an existing fill_info */ /*--------------------------------------------------------------------------*/ for (fill_info = first_fill_info; fill_info; fill_info = fill_info->next) { if (fill_info->psi_fe != oinfo->row_fe_space) continue; if (fill_info->phi_fe != oinfo->col_fe_space) continue; if (fill_info->quad[2] != oinfo->quad[2]) continue; if (fill_info->quad[1] != oinfo->quad[1]) continue; if (fill_info->quad[0] != oinfo->quad[0]) continue; if (fill_info->parametric != parametric) continue; if (fill_info->init_element != oinfo->init_element) continue; if (fill_info->LALt.full != oinfo->LALt.full) continue; if (fill_info->LALt_symmetric != oinfo->LALt_symmetric) continue; if (fill_info->Lb0.full != oinfo->Lb0.full) continue; if (fill_info->Lb1.full != oinfo->Lb1.full) continue; if (fill_info->Lb0_Lb1_anti_symmetric != oinfo->Lb0_Lb1_anti_symmetric) continue; if (fill_info->c.full != oinfo->c.full) continue; if (fill_info->user_data != oinfo->user_data) continue; if (fill_info->type != oinfo->type) continue; break; } if (!fill_info) { /*--------------------------------------------------------------------------*/ /* create a new fill_info */ /*--------------------------------------------------------------------------*/ const QUAD_FAST **psi_fast, **phi_fast; int n_row = psi->n_bas_fcts, n_col = phi->n_bas_fcts; fill_info = MEM_CALLOC(1, DOWB_FILL_INFO); fill_info->next = first_fill_info; first_fill_info = fill_info; fill_info->psi_fe = oinfo->row_fe_space; fill_info->phi_fe = oinfo->col_fe_space; fill_info->quad[2] = oinfo->quad[2]; fill_info->quad[1] = oinfo->quad[1]; fill_info->quad[0] = oinfo->quad[0]; fill_info->n_row = n_row; fill_info->n_col = n_col; switch (oinfo->type) { case dowbm_full: fill_info->element_matrix = (void **)MAT_ALLOC(n_row, n_col, REAL_DD); break; case dowbm_symm: fill_info->element_matrix = (void **)MAT_ALLOC(n_row, n_col, REAL_DDS); break; case dowbm_diag: fill_info->element_matrix = (void **)MAT_ALLOC(n_row, n_col, REAL_D); break; default: ERROR_EXIT("Unknown matrix type: %d\n", oinfo->type); } psi_fast = fill_info->psi_quad_fast; phi_fast = fill_info->phi_quad_fast; #undef ASSIGN #define ASSIGN(dst, src, what) \ (dst)->what.full = (src)->what.full; \ (dst)->what.symm = (src)->what.symm; \ (dst)->what.diag = (src)->what.diag; fill_info->parametric = parametric; fill_info->init_element = oinfo->init_element; ASSIGN(fill_info, oinfo, LALt); fill_info->LALt_symmetric = oinfo->LALt_symmetric; ASSIGN(fill_info, oinfo, Lb0); ASSIGN(fill_info, oinfo, Lb1); fill_info->Lb0_Lb1_anti_symmetric = oinfo->Lb0_Lb1_anti_symmetric; ASSIGN(fill_info, oinfo, c); fill_info->c_symmetric = (phi == psi); fill_info->user_data = oinfo->user_data; fill_info->type = oinfo->type; psi_fast[2] = phi_fast[2] = nil; pre2 = quad2 = 0; if (fill_info->LALt.full) { if (oinfo->LALt_pw_const) { pre2 |= FLAG_LALt; fill_info->q11_psi_phi = get_q11_psi_phi(psi, phi, oinfo->quad[2]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant LALt but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->LALt_pw_const || parametric) { quad2 |= FLAG_LALt; psi_fast[2] = get_quad_fast(psi, oinfo->quad[2], INIT_GRD_PHI); if (psi != phi) phi_fast[2] = get_quad_fast(phi, oinfo->quad[2], INIT_GRD_PHI); else phi_fast[2] = psi_fast[2]; } } psi_fast[1] = phi_fast[1] = nil; pre1 = quad1 = 0; if (fill_info->Lb0.full) { if (oinfo->Lb0_pw_const) { pre1 |= FLAG_LB0; fill_info->q01_psi_phi = get_q01_psi_phi(psi, phi, oinfo->quad[1]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant Lb0 but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->Lb0_pw_const || parametric) { if (quad2 && oinfo->quad[1] == oinfo->quad[2]) quad2 |= FLAG_LB0; else quad1 |= FLAG_LB0; psi_fast[1] = get_quad_fast(psi, oinfo->quad[1], INIT_PHI); phi_fast[1] = get_quad_fast(phi, oinfo->quad[1], INIT_GRD_PHI); } } if (fill_info->Lb1.full) { if (oinfo->Lb1_pw_const) { pre1 |= FLAG_LB1; fill_info->q10_psi_phi = get_q10_psi_phi(psi, phi, oinfo->quad[1]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant Lb1 but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->Lb1_pw_const || parametric) { if (quad2 && oinfo->quad[1] == oinfo->quad[2]) quad2 |= FLAG_LB1; else quad1 |= FLAG_LB1; psi_fast[1] = get_quad_fast(psi, oinfo->quad[1], INIT_GRD_PHI); phi_fast[1] = get_quad_fast(phi, oinfo->quad[1], INIT_PHI); } } psi_fast[0] = phi_fast[0] = nil; pre0 = quad0 = 0; if (fill_info->c.full) { if (oinfo->c_pw_const) { pre0 |= FLAG_C; fill_info->q00_psi_phi = get_q00_psi_phi(psi, phi, oinfo->quad[0]); if(parametric && !not_all_param) { WARNING("You have selected piecewise constant c but seem to\n"); WARNING("have a parametric mesh without affine elements!\n"); } } if(!oinfo->c_pw_const || parametric) { if (quad2 && oinfo->quad[0] == oinfo->quad[2]) quad2 |= FLAG_C; else if (quad1 && oinfo->quad[0] == oinfo->quad[1]) quad1 |= FLAG_C; else quad0 |= FLAG_C; psi_fast[0] = get_quad_fast(psi, oinfo->quad[0], INIT_PHI); if (psi != phi) phi_fast[0] = get_quad_fast(phi, oinfo->quad[0], INIT_PHI); else phi_fast[0] = psi_fast[0]; } } if (pre2) { fill_info->fast_second_order = pre_2; INFO(0,2,"using second order pre_2\n"); } switch (pre1) { case FLAG_LB0: fill_info->fast_first_order = pre_01; INFO(0,2,"using first order pre_01\n"); break; case FLAG_LB1: fill_info->fast_first_order = pre_10; INFO(0,2,"using first order pre_10\n"); break; case FLAG_LB0|FLAG_LB1: fill_info->fast_first_order = pre_11; INFO(0,2,"using first order pre_11\n"); break; } if (pre0 /* == FLAG_C */) { fill_info->fast_zero_order = pre_0; INFO(0,2,"using zero order pre_0\n"); } switch (quad2) { case FLAG_LALt: fill_info->slow_second_order = quad_2; INFO(0,2,"using second order quad_2\n"); break; case FLAG_LALt|FLAG_LB0: fill_info->slow_second_order = quad_2_01; INFO(0,2,"using second order quad_2_01\n"); break; case FLAG_LALt|FLAG_LB1: fill_info->slow_second_order = quad_2_10; INFO(0,2,"using second order quad_2_10\n"); break; case FLAG_LALt|FLAG_LB1|FLAG_LB0: fill_info->slow_second_order = quad_2_11; INFO(0,2,"using second order quad_2_11\n"); break; case FLAG_LALt|FLAG_C: fill_info->slow_second_order = quad_2_0; INFO(0,2,"using second order quad_2_0\n"); break; case FLAG_LALt|FLAG_LB0|FLAG_C: fill_info->slow_second_order = quad_2_01_0; INFO(0,2,"using second order quad_2_01_0\n"); break; case FLAG_LALt|FLAG_LB1|FLAG_C: fill_info->slow_second_order = quad_2_10_0; INFO(0,2,"using second order quad_2_10_0\n"); break; case FLAG_LALt|FLAG_LB1|FLAG_LB0|FLAG_C: fill_info->slow_second_order = quad_2_11_0; INFO(0,2,"using second order quad2_11_0\n"); break; } switch (quad1) { case FLAG_LB0: fill_info->slow_first_order = quad_01; INFO(0,2,"using first order quad_01\n"); break; case FLAG_LB1: fill_info->slow_first_order = quad_10; INFO(0,2,"using first order quad_10\n"); break; case FLAG_LB0|FLAG_LB1: fill_info->slow_first_order = quad_11; INFO(0,2,"using first order quad_11\n"); break; case FLAG_LB0|FLAG_C: fill_info->slow_first_order = quad_01_0; INFO(0,2,"using first order quad_01_0\n"); break; case FLAG_LB1|FLAG_C: fill_info->slow_first_order = quad_10_0; INFO(0,2,"using first order quad_10_0\n"); break; case FLAG_LB0|FLAG_LB1|FLAG_C: fill_info->slow_first_order = quad_11_0; INFO(0,2,"using first order quad_11_0\n"); break; } if (quad0 /* == FLAG_C */) { fill_info->slow_zero_order = quad_0; INFO(0,2,"using zero order quad_0\n"); } } if (!matrix_info) matrix_info = MEM_CALLOC(1, EL_DOWB_MATRIX_INFO); matrix_info->n_row = psi->n_bas_fcts; matrix_info->row_admin = oinfo->row_fe_space->admin; matrix_info->col_admin = oinfo->col_fe_space->admin; matrix_info->get_row_dof = psi->get_dof_indices; matrix_info->type = oinfo->type; if (psi != phi) { matrix_info->n_col = phi->n_bas_fcts; matrix_info->get_col_dof = phi->get_dof_indices; matrix_info->get_bound = nil; matrix_info->fill_flag = oinfo->fill_flag; } else if (oinfo->use_get_bound) { matrix_info->get_bound = psi->get_bound; matrix_info->fill_flag = oinfo->fill_flag|FILL_BOUND; } else { matrix_info->get_bound = nil; matrix_info->fill_flag = oinfo->fill_flag; } matrix_info->factor = 1.0; matrix_info->el_matrix_fct = element_matrix; matrix_info->fill_info = fill_info; return matrix_info; } /* >>> */ alberta-2.0.1/alberta/src/Common/bas_fct.c0000644000042300001440000004156510676724253015262 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: bas_fct.c */ /* */ /* description: collecting information of all Lagrange elements */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /* Macro for a general scalar interpolation function */ #define GENERATE_INTERPOL(PREFIX,DEGREE,DIM,N_BAS_FCT) \ static const REAL *PREFIX##interpol##DEGREE##_##DIM##d( \ const EL_INFO *el_info, \ int no, const int *b_no, \ REAL (*f)(const REAL_D), \ REAL (*f_loc)(const EL_INFO *, \ const REAL [N_LAMBDA]), \ REAL *vec) \ { \ FUNCNAME(#PREFIX "interpol" #DEGREE "_" #DIM "d"); \ static REAL my_vec[N_BAS_FCT]; \ REAL *rvec = vec ? vec : my_vec; \ int i; \ const PARAMETRIC *parametric = el_info->mesh->parametric; \ \ DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= N_BAS_FCT), \ "not for %d points\n", no); \ \ if (f_loc) \ for (i = 0; i < N_BAS_FCT; i++) \ rvec[i] = f_loc(el_info, PREFIX##bary##DEGREE##_##DIM##d[i]); \ else { \ if (parametric) { \ REAL_D world[N_BAS_FCT]; \ \ parametric->init_element(el_info, parametric); \ parametric->coord_to_world(el_info, nil, N_BAS_FCT, \ PREFIX##bary##DEGREE##_##DIM##d, world); \ \ for (i = 0; i < N_BAS_FCT; i++) \ rvec[i] = f(world[i]); \ } \ else { \ REAL_D world; \ \ DEBUG_TEST_FLAG(FILL_COORDS, el_info); \ \ for (i = 0; i < N_BAS_FCT; i++) { \ coord_to_world_##DIM##d(el_info, PREFIX##bary##DEGREE##_##DIM##d[i], \ world); \ rvec[i] = f(world); \ } \ } \ } \ \ if(b_no) { /* Perform resorting if only certain indices are required. */ \ REAL tmp[N_BAS_FCT]; \ \ memcpy(tmp, rvec, N_BAS_FCT * sizeof(REAL)); \ \ for(i = 0; i < no; i++) \ rvec[i] = tmp[b_no[i]]; \ } \ \ return(rvec); \ } /* Macro for a general vector interpolation function */ #define GENERATE_INTERPOL_D(PREFIX,DEGREE,DIM,N_BAS_FCT) \ static const REAL_D *PREFIX##interpol_d##DEGREE##_##DIM##d( \ const EL_INFO *el_info, \ int no, const int *b_no, \ const REAL *(*f)(const REAL_D, REAL_D), \ const REAL *(*f_loc)(const EL_INFO *, \ const REAL [N_LAMBDA], \ REAL_D), \ REAL_D *vec) \ { \ FUNCNAME("interpol_d" #DEGREE "_" #DIM "d"); \ static REAL_D my_vec[N_BAS_FCT]; \ REAL_D *rvec = vec ? vec : my_vec; \ int i; \ const PARAMETRIC *parametric = el_info->mesh->parametric; \ \ DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= N_BAS_FCT), \ "not for %d points\n", no); \ \ if (f_loc) \ for (i = 0; i < N_BAS_FCT; i++) \ f_loc(el_info, PREFIX##bary##DEGREE##_##DIM##d[i], rvec[i]); \ else { \ if (parametric) { \ REAL_D world[N_BAS_FCT]; \ \ parametric->init_element(el_info, parametric); \ parametric->coord_to_world(el_info, nil, N_BAS_FCT, \ PREFIX##bary##DEGREE##_##DIM##d, world); \ \ for (i = 0; i < N_BAS_FCT; i++) \ f(world[i], rvec[i]); \ } \ else { \ REAL_D world; \ \ DEBUG_TEST_FLAG(FILL_COORDS, el_info); \ \ for (i = 0; i < N_BAS_FCT; i++) { \ coord_to_world(el_info, PREFIX##bary##DEGREE##_##DIM##d[i], world); \ f(world, rvec[i]); \ } \ } \ } \ \ if(b_no) { /* Perform resorting if only certain indices are required. */ \ REAL_D tmp[N_BAS_FCT]; \ \ memcpy(tmp, rvec, N_BAS_FCT * sizeof(REAL_D)); \ \ for(i = 0; i < no; i++) \ COPY_DOW(tmp[b_no[i]], rvec[i]); \ } \ \ return (const REAL_D *) rvec; \ } #include "bas_fct_0d.c" #include "bas_fct_1d.c" #if DIM_OF_WORLD > 1 #include "bas_fct_2d.c" #if DIM_OF_WORLD > 2 #include "bas_fct_3d.c" #endif #endif #undef GENERATE_INTERPOL #undef GENERATE_INTERPOL_D struct all_bas_fcts { const BAS_FCTS *bas_fcts; struct all_bas_fcts *next; }; /*--------------------------------------------------------------------------*/ /* linked list of all used basis functions: discontinuous Lagrange */ /* basisfunctions are always members of the list */ /*--------------------------------------------------------------------------*/ #define MAX_DEG 2 static struct all_bas_fcts all_disc_lagrange[DIM_OF_WORLD * (MAX_DEG + 1)] = {{&disc_lagrange0_1d, all_disc_lagrange+1}, {&disc_lagrange1_1d, all_disc_lagrange+2}, {&disc_lagrange2_1d, #if DIM_OF_WORLD > 1 all_disc_lagrange+3}, {&disc_lagrange0_2d, all_disc_lagrange+4}, {&disc_lagrange1_2d, all_disc_lagrange+5}, {&disc_lagrange2_2d, #if DIM_OF_WORLD > 2 all_disc_lagrange+6}, {&disc_lagrange0_3d, all_disc_lagrange+7}, {&disc_lagrange1_3d, all_disc_lagrange+8}, {&disc_lagrange2_3d, #endif #endif nil}}; const BAS_FCTS *get_discontinuous_lagrange(int dim, int degree) { FUNCNAME("get_discontinuous_lagrange"); if(dim == 0 || dim > DIM_OF_WORLD) { ERROR("Discontinuous Lagrange basis functions of dimension %d are not available for DIM_OF_WORLD == %d!\n", dim, DIM_OF_WORLD); return(nil); } if (degree < 0 || degree > MAX_DEG) { ERROR("Discontinuous Lagrange basis functions of degree %d are not available\n", degree); return(nil); } return(all_disc_lagrange[(dim - 1) * 3 + degree].bas_fcts); } #undef MAX_DEG /*--------------------------------------------------------------------------*/ /* linked list of all used basis functions: Lagrange basisfunctions are */ /* always members of the list */ /*--------------------------------------------------------------------------*/ #define MAX_DEG 4 static struct all_bas_fcts all_lagrange[1+DIM_OF_WORLD * MAX_DEG] = {{&lagrange_0d, all_lagrange+1}, {&lagrange1_1d, all_lagrange+2}, {&lagrange2_1d, all_lagrange+3}, {&lagrange3_1d, all_lagrange+4}, {&lagrange4_1d, #if DIM_OF_WORLD > 1 all_lagrange+5}, {&lagrange1_2d, all_lagrange+6}, {&lagrange2_2d, all_lagrange+7}, {&lagrange3_2d, all_lagrange+8}, {&lagrange4_2d, #if DIM_OF_WORLD > 2 all_lagrange+9}, {&lagrange1_3d, all_lagrange+10}, {&lagrange2_3d, all_lagrange+11}, {&lagrange3_3d, all_lagrange+12}, {&lagrange4_3d, #endif #endif all_disc_lagrange}}; static struct all_bas_fcts *first_bas_fcts = all_lagrange; const BAS_FCTS *get_lagrange(int dim, int degree) { FUNCNAME("get_lagrange"); if(dim > DIM_OF_WORLD) { ERROR("Lagrange basis functions of dimension %d are not available for DIM_OF_WORLD == %d!\n", dim, DIM_OF_WORLD); return(nil); } if (degree < 1 || degree > MAX_DEG) { ERROR("no lagrangian basis functions of degree %d\n", degree); return(nil); } if(dim == 0) degree = 4; return(all_lagrange[(dim - 1) * 4 + degree].bas_fcts); } /*--------------------------------------------------------------------------*/ /* add a set of new basis functions to the list; return true, if possible */ /* else false */ /*--------------------------------------------------------------------------*/ int new_bas_fcts(const BAS_FCTS * bas_fcts) { FUNCNAME("new_bas_fcts"); struct all_bas_fcts *new_first; if (!bas_fcts) { ERROR("no basis functions specified; bas_fcts pointer to nil\n"); return(0); } TEST_EXIT(bas_fcts->name, "new basis functions must have name; bas_fcts->name pointer to nil\n"); TEST_EXIT(strlen(bas_fcts->name), "new basis functions must have a non empty name\n"); TEST_EXIT(bas_fcts->dim > 0 && bas_fcts->dim <= 3, "new basis functions must have a dimension between 1 and 3\n"); TEST_EXIT(bas_fcts->degree >= 0, "new basis functions must have a positive quadrature degree\n"); TEST_EXIT(bas_fcts->phi, "new basis functions: phi not set\n"); TEST_EXIT(bas_fcts->grd_phi, "new basis functions: grd_phi not set\n"); TEST(bas_fcts->D2_phi, "Warning: new basis functions: D2_phi not set\n"); TEST_EXIT(bas_fcts->get_dof_indices, "new basis functions: get_dof_indices not set\n"); TEST_EXIT(bas_fcts->get_bound, "new basis functions: get_bound not set\n"); TEST(bas_fcts->interpol, "Warning: new basis functions: interpol not set\n"); TEST(bas_fcts->interpol_d, "Warning: new basis functions: interpol_d not set\n"); for (new_first = first_bas_fcts; new_first; new_first = new_first->next) { if (!strcmp(bas_fcts->name, new_first->bas_fcts->name)) { ERROR("basis functions with this name already exist\n"); TEST_EXIT(bas_fcts == new_first->bas_fcts, "pointer to new and existing basis functions differ %p!=%p\n", bas_fcts, new_first->bas_fcts); ERROR("pointer to new and existing basis functions are the same\n"); ERROR("ignoring new basis functions; taking old ones\n"); return(0); } } new_first = MEM_ALLOC(1, struct all_bas_fcts); new_first->bas_fcts = bas_fcts; new_first->next = first_bas_fcts; first_bas_fcts = new_first; return(1); } /*--------------------------------------------------------------------------*/ /* get a pointer to a set of basis functions from the list; identifier is */ /* the name of the basis functions; */ /* returns a pointer to the BAS_FCTS structure if a corresponding set was */ /* found in the list, else pointer to nil */ /*--------------------------------------------------------------------------*/ const BAS_FCTS *get_bas_fcts(const char *name) { FUNCNAME("get_bas_fcts"); struct all_bas_fcts *bas_fcts; if (!name) { ERROR("no name specified; can not return pointer to basis functions\n"); return(nil); } if (!strlen(name)) { ERROR("empty name; can not return pointer to basis functions\n"); return(nil); } for (bas_fcts = first_bas_fcts; bas_fcts; bas_fcts = bas_fcts->next) if (!strcmp(bas_fcts->bas_fcts->name, name)) return(bas_fcts->bas_fcts); ERROR("basis functions with name %s not found in list of all functions\n"); return(nil); } alberta-2.0.1/alberta/src/Common/check.c0000644000042300001440000002600710676724253014730 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: check.c */ /* */ /* description: checks on the initial grid and utilities */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" typedef struct check_traverse_data { int error_detected; int iadmin; int dof_size; int *dof_used; } CHECK_TRAVERSE_DATA; static void check_fct(const EL_INFO *el_info, void *data) { FUNCNAME("check_fct"); CHECK_TRAVERSE_DATA *ud = (CHECK_TRAVERSE_DATA *)data; MESH *mesh = el_info->mesh; int i, j, k, opp_v = -1; int dim = el_info->mesh->dim; EL *el, *neigh; TEST_FLAG(FILL_NEIGH, el_info); el = el_info->el; for (i = 0; i < N_NEIGH(dim); i++) { if ((neigh = el_info->neigh[i])) { if (((dim == 1) && el_info->vertex_bound[1-i]) #if DIM_OF_WORLD > 1 || ((dim == 2) && el_info->edge_bound[i]) #if DIM_OF_WORLD > 2 || ((dim == 3) && el_info->face_bound[i]) #endif #endif ) { if (!ud->error_detected) MSG("error detected!!!\n"); ud->error_detected++; MSG("interior boundary to neighbor %d nonzero on element = %d\n", i, INDEX(el)); } if (dim > 0) { opp_v = el_info->opp_vertex[i]; if(opp_v < 0 || opp_v >= N_NEIGH(dim)) { if (!ud->error_detected) MSG("error detected!!!\n"); ud->error_detected++; MSG("opp_v = %d\n", opp_v); } } if(mesh->n_dof[VERTEX]) { for (j = 1; j < N_VERTICES(dim); j++) { for (k = 1; k < N_VERTICES(dim); k++) if (el->dof[(i+j)%(dim+1)] == neigh->dof[(opp_v+k)%(dim+1)]) break; if (k >= N_VERTICES(dim)) { if (!ud->error_detected) MSG("error detected!!!\n"); ud->error_detected++; MSG("dof %d of el %d at face %d isn't dof of neigh %d at face %d\n", el->dof[(i+j)%(dim+1)][0], INDEX(el), i, INDEX(neigh), opp_v); } } } } else { if ((dim == 1 && !el_info->vertex_bound[1-i]) #if DIM_OF_WORLD > 1 || (dim == 2 && !el_info->edge_bound[i]) #if DIM_OF_WORLD > 2 || (dim == 3 && !el_info->face_bound[i]) #endif #endif ) { if (!ud->error_detected) MSG("error detected!!!\n"); ud->error_detected++; MSG("boundary to neigh %d on domains boundary is zero on element %d\n", i, INDEX(el)); } } } return; } /*--------------------------------------------------------------------------*/ /* check dofs from mesh->dof_admin[iadmin] */ /*--------------------------------------------------------------------------*/ static void check_dof_fct(const EL_INFO *el_info, void *data) { FUNCNAME("check_dof_fct"); CHECK_TRAVERSE_DATA *ud = (CHECK_TRAVERSE_DATA *)data; MESH *mesh = el_info->mesh; DOF_ADMIN *admin = mesh->dof_admin[ud->iadmin]; EL *el = el_info->el; DOF *dof; int i, j, jdof, ndof, i0, j0; int dim = el_info->mesh->dim; int ov; EL *neigh; int in, k, found; if (!ud->dof_used) return; if ((ndof = admin->n_dof[VERTEX])) { j0 = admin->n0_dof[VERTEX]; TEST_EXIT(j0 + ndof <= mesh->n_dof[VERTEX], "admin->n0_dof[VERTEX] %d + n_dof %d > mesh->n_dof %d\n", j0, ndof, mesh->n_dof[VERTEX]); i0 = mesh->node[VERTEX]; for (i = 0; i < N_VERTICES(dim); i++) { if ((dof = el->dof[i0+i]) == nil) ERROR("no vertex dof %d on element %d\n", i, INDEX(el_info->el)); else for (j = 0; j < ndof; j++) { jdof = dof[j0 + j]; TEST(jdof >= 0 && jdof < ud->dof_size, "vertex dof=%d invalid? size=%d\n",jdof, ud->dof_size); ud->dof_used[jdof]++; } } /* neighbour vertex dofs have been checked in check_fct() */ } if(dim > 1) { if ((ndof = admin->n_dof[EDGE])) { j0 = admin->n0_dof[EDGE]; TEST_EXIT(j0 + ndof <= mesh->n_dof[EDGE], "admin->n0_dof[EDGE] %d + n_dof %d > mesh->n_dof %d\n", j0, ndof, mesh->n_dof[EDGE]); i0 = mesh->node[EDGE]; for (i = 0; i < N_EDGES(dim); i++) { if ((dof = el->dof[i0 + i]) == nil) ERROR("no edge dof %d on element %d\n", i, INDEX(el_info->el)); else for (j = 0; j < ndof; j++) { jdof = dof[j0 + j]; TEST(jdof >= -1 && jdof < ud->dof_size, "edge dof=%d invalid? size=%d\n",jdof, ud->dof_size); if(jdof >= 0) ud->dof_used[jdof]++; } if (el->child[0] == nil) { if(dim == 2) { if ((neigh = el_info->neigh[i])) { ov = el_info->opp_vertex[i]; TEST(neigh->dof[i0 + ov] == dof, "el %d edge %d dof %p: wrong dof %p in neighbour %d edge %d\n", INDEX(el), i, dof, neigh->dof[i0 + ov], INDEX(neigh), ov); } } else for (in = 0; in < N_NEIGH(dim); in++) { if ((in != vertex_of_edge_3d[i][0]) && (in != vertex_of_edge_3d[i][1]) && (neigh = el_info->neigh[in])) { found = 0; for (k = 0; k < N_EDGES(dim); k++) if (neigh->dof[i0 + k] == dof) found++; TEST(found==1, "el %d edge %d dof found=%d in neighbour %d\n", INDEX(el), i, found, INDEX(neigh)); } } } } } } if ((dim == 3) && (ndof = admin->n_dof[FACE])) { j0 = admin->n0_dof[FACE]; TEST_EXIT(j0 + ndof <= mesh->n_dof[FACE], "admin->n0_dof[FACE] %d + n_dof %d > mesh->n_dof %d\n", j0, ndof, mesh->n_dof[FACE]); i0 = mesh->node[FACE]; for (i = 0; i < N_FACES_3D; i++) { TEST(dof = el->dof[i0 + i], "no face dof %d ???\n", i); for (j = 0; j < ndof; j++) { jdof = dof[j0 + j]; TEST(jdof >= -1 && jdof < ud->dof_size, "face dof=%d invalid? size=%d\n",jdof, ud->dof_size); if(jdof >= 0) ud->dof_used[jdof]++; } if (el->child[0] == nil) { if ((neigh = el_info->neigh[i])) { ov = el_info->opp_vertex[i]; TEST(neigh->dof[i0 + ov] == dof, "el %d face %d dof %p: wrong dof %p in neighbour %d face %d\n", INDEX(el), i, dof, neigh->dof[i0 + ov], INDEX(neigh), ov); } } } } if ((ndof = admin->n_dof[CENTER])) { i0 = mesh->node[CENTER]; TEST(dof = el->dof[i0], "no center dof???\n"); j0 = admin->n0_dof[CENTER]; TEST_EXIT(j0 + ndof <= mesh->n_dof[CENTER], "admin->n0_dof[CENTER] %d + n_dof %d > mesh->n_dof %d\n", j0, ndof, mesh->n_dof[CENTER]); for (j = 0; j < ndof; j++) { jdof = dof[j0 + j]; TEST(jdof >= -1 && jdof < ud->dof_size, "center dof=%d invalid? size=%d\n", jdof, ud->dof_size); if(jdof >= 0) ud->dof_used[jdof]++; } } return; } /*--------------------------------------------------------------------------*/ static void node_fct(const EL_INFO *el_info, void *data) { FUNCNAME("node_fct"); int i, dim = el_info->mesh->dim; EL *el = el_info->el; if(IS_LEAF_EL(el)) MSG("leaf el %4d: ", INDEX(el)); else MSG(" el %4d: ", INDEX(el)); for (i = 0; i < N_VERTICES(dim); i++) print_msg("%4d%s", el->dof[i][0], i < N_VERTICES(dim)-1 ? ", " : "\n"); return; } /*--------------------------------------------------------------------------*/ void check_mesh(MESH *mesh) { FUNCNAME("check_mesh"); static CHECK_TRAVERSE_DATA td[1]; int i, nused, nfree; DOF_ADMIN *admin; FLAGS fill_flag; int info = -1; if (info < 0) { info = 2; GET_PARAMETER(0, "refine/coarsen info", "%d", &info); } if (info >= 2) { if(mesh->name) MSG("checking mesh '%s'\n", mesh->name); else MSG("checking mesh ''\n"); } td->error_detected = 0; fill_flag = CALL_EVERY_EL_INORDER | FILL_NEIGH | FILL_BOUND; mesh_traverse(mesh, -1, fill_flag, check_fct, td); fill_flag = CALL_EVERY_EL_INORDER | FILL_NEIGH; for (td->iadmin = 0; td->iadmin < mesh->n_dof_admin; td->iadmin++) { TEST_EXIT(admin = mesh->dof_admin[td->iadmin], "no dof_admin[%d]\n", td->iadmin); if (admin->size > 0) { if (td->dof_size < admin->size) { td->dof_used = MEM_REALLOC(td->dof_used, td->dof_size, admin->size + 1000, int); td->dof_size = admin->size + 1000; } for (i = 0; i < td->dof_size; i++) td->dof_used[i] = 0; nused = nfree = 0; mesh_traverse(mesh, -1, fill_flag, check_dof_fct, td); FOR_ALL_DOFS(admin, nused++; if (!td->dof_used[dof]) { td->error_detected++; MSG("admin '%s': dof[%d] not used??\n",admin->name,dof); }); FOR_ALL_FREE_DOFS(admin, nfree++; if (td->dof_used[dof]) { td->error_detected++; MSG("admin '%s': dof[%d] used??\n",admin->name,dof); }); TEST(nused + nfree == admin->size, "nused = %d, nfree = %d, admin->size = %d ????\n", nused, nfree, admin->size); TEST(nused == admin->used_count, "nused = %d, admin->used_count = %d ?????\n", nused, admin->used_count); } } if(td->dof_used) MEM_FREE(td->dof_used, td->dof_size, int); td->dof_used = nil; td->dof_size = 0; if (!td->error_detected) { if (info >= 2) MSG("checking done; no error detected\n"); } else { MSG("checking done; %d error%s detected\n", td->error_detected, td->error_detected == 1 ? "" : "s"); mesh_traverse(mesh, -1, CALL_EVERY_EL_INORDER, node_fct, td); WAIT_REALLY; } return; } alberta-2.0.1/alberta/src/Common/coarsen.c0000644000042300001440000004450410676724253015307 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: Common/coarsen.c */ /* */ /* */ /* description: coarsening of ? dim. hierarchical meshes; */ /* file includes all coarsen_?d.c files !! */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" /*--------------------------------------------------------------------------*/ /* restriction of dof vectors during mesh coarsening */ /* using DOF_VEC_LIST structure */ /*--------------------------------------------------------------------------*/ static int count_coarse_restrict(MESH *mesh) { FUNCNAME("count_coarse_restrict"); DOF_VEC_LIST *dvlist; DOF_ADMIN *admin; int iadmin; DOF_REAL_VEC *drv; DOF_REAL_D_VEC *drdv; DOF_INT_VEC *div; DOF_DOF_VEC *ddv; DOF_UCHAR_VEC *duv; DOF_SCHAR_VEC *dsv; DOF_PTR_VEC *dpv; DOF_MATRIX *dm; DOF_DOWB_MATRIX *ddm; int ncr = 0; int n_dof_int_vec=0, n_dof_dof_vec=0, n_dof_uchar_vec=0, n_dof_schar_vec=0, n_dof_real_vec=0, n_dof_real_d_vec=0, n_dof_ptr_vec=0, n_dof_matrix=0, n_dof_dowb_matrix=0; dvlist = AI_get_dof_vec_list(mesh); for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { admin = mesh->dof_admin[iadmin]; for (div = admin->dof_int_vec; div; div = div->next) { if (div->coarse_restrict) n_dof_int_vec++; } for (ddv = admin->dof_dof_vec; ddv; ddv = ddv->next) { if (ddv->coarse_restrict) n_dof_dof_vec++; } for (ddv = admin->int_dof_vec; ddv; ddv = ddv->next) { if (ddv->coarse_restrict) n_dof_int_vec++; } for (duv = admin->dof_uchar_vec; duv; duv = duv->next) { if (duv->coarse_restrict) n_dof_uchar_vec++; } for (dsv = admin->dof_schar_vec; dsv; dsv = dsv->next) { if (dsv->coarse_restrict) n_dof_schar_vec++; } for (drv = admin->dof_real_vec; drv; drv = drv->next) { if (drv->coarse_restrict) n_dof_real_vec++; } for (drdv = admin->dof_real_d_vec; drdv; drdv = drdv->next) { if (drdv->coarse_restrict) n_dof_real_d_vec++; } for (dpv = admin->dof_ptr_vec; dpv; dpv = dpv->next) { if (dpv->coarse_restrict) n_dof_ptr_vec++; } for (dm = admin->dof_matrix; dm; dm = dm->next) { if (dm->coarse_restrict) n_dof_matrix++; } for (ddm = admin->dof_dowb_matrix; ddm; ddm = ddm->next) { if (ddm->coarse_restrict) n_dof_dowb_matrix++; } } ncr = n_dof_int_vec + n_dof_dof_vec + n_dof_uchar_vec + n_dof_schar_vec + n_dof_ptr_vec + n_dof_real_vec + n_dof_real_d_vec + n_dof_matrix + n_dof_dowb_matrix; if (ncr > 0) { if (dvlist->size < ncr) { dvlist->list = MEM_REALLOC(dvlist->list, dvlist->size, ncr+5, void *); dvlist->size = ncr+5; } ncr = 0; if (n_dof_int_vec) dvlist->dof_int_vec = (DOF_INT_VEC **)(dvlist->list+ncr); else dvlist->dof_int_vec = nil; ncr += n_dof_int_vec; if (n_dof_dof_vec) dvlist->dof_dof_vec = (DOF_DOF_VEC **)(dvlist->list+ncr); else dvlist->dof_dof_vec = nil; ncr += n_dof_dof_vec; if (n_dof_uchar_vec) dvlist->dof_uchar_vec = (DOF_UCHAR_VEC **)(dvlist->list+ncr); else dvlist->dof_uchar_vec = nil; ncr += n_dof_uchar_vec; if (n_dof_schar_vec) dvlist->dof_schar_vec = (DOF_SCHAR_VEC **)(dvlist->list+ncr); else dvlist->dof_schar_vec = nil; ncr += n_dof_schar_vec; if (n_dof_real_vec) dvlist->dof_real_vec = (DOF_REAL_VEC **)(dvlist->list+ncr); else dvlist->dof_real_vec = nil; ncr += n_dof_real_vec; if (n_dof_real_d_vec) dvlist->dof_real_d_vec = (DOF_REAL_D_VEC **)(dvlist->list+ncr); else dvlist->dof_real_d_vec = nil; ncr += n_dof_real_d_vec; if (n_dof_ptr_vec) dvlist->dof_ptr_vec = (DOF_PTR_VEC **)(dvlist->list+ncr); else dvlist->dof_ptr_vec = nil; ncr += n_dof_ptr_vec; if (n_dof_matrix) dvlist->dof_matrix = (DOF_MATRIX **)(dvlist->list+ncr); else dvlist->dof_matrix = nil; ncr += n_dof_matrix; if (n_dof_dowb_matrix) dvlist->dof_dowb_matrix = (DOF_DOWB_MATRIX **)(dvlist->list+ncr); else dvlist->dof_dowb_matrix = nil; ncr += n_dof_dowb_matrix; DEBUG_TEST_EXIT(ncr <= dvlist->size, "error in dvlist->size"); dvlist->n_dof_int_vec = 0; dvlist->n_dof_dof_vec = 0; dvlist->n_dof_uchar_vec = 0; dvlist->n_dof_schar_vec = 0; dvlist->n_dof_real_vec = 0; dvlist->n_dof_real_d_vec = 0; dvlist->n_dof_ptr_vec = 0; dvlist->n_dof_matrix = 0; dvlist->n_dof_dowb_matrix = 0; for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { admin = mesh->dof_admin[iadmin]; for (div = admin->dof_int_vec; div; div = div->next) { if (div->coarse_restrict) dvlist->dof_int_vec[dvlist->n_dof_int_vec++] = div; } for (ddv = admin->dof_dof_vec; ddv; ddv = ddv->next) { if (ddv->coarse_restrict) dvlist->dof_dof_vec[dvlist->n_dof_dof_vec++] = ddv; } for (ddv = admin->int_dof_vec; ddv; ddv = ddv->next) { if (ddv->coarse_restrict) dvlist->dof_dof_vec[dvlist->n_dof_dof_vec++] = ddv; } for (duv = admin->dof_uchar_vec; duv; duv = duv->next) { if (duv->coarse_restrict) dvlist->dof_uchar_vec[dvlist->n_dof_uchar_vec++] = duv; } for (dsv = admin->dof_schar_vec; dsv; dsv = dsv->next) { if (dsv->coarse_restrict) dvlist->dof_schar_vec[dvlist->n_dof_schar_vec++] = dsv; } for (drv = admin->dof_real_vec; drv; drv = drv->next) { if (drv->coarse_restrict) dvlist->dof_real_vec[dvlist->n_dof_real_vec++] = drv; } for (drdv = admin->dof_real_d_vec; drdv; drdv = drdv->next) { if (drdv->coarse_restrict) dvlist->dof_real_d_vec[dvlist->n_dof_real_d_vec++] = drdv; } for (dpv = admin->dof_ptr_vec; dpv; dpv = dpv->next) { if (dpv->coarse_restrict) dvlist->dof_ptr_vec[dvlist->n_dof_ptr_vec++] = dpv; } for (dm = admin->dof_matrix; dm; dm = dm->next) { if (dm->coarse_restrict) dvlist->dof_matrix[dvlist->n_dof_matrix++] = dm; } for (ddm = admin->dof_dowb_matrix; ddm; ddm = ddm->next) { if (ddm->coarse_restrict) dvlist->dof_dowb_matrix[dvlist->n_dof_dowb_matrix++] = ddm; } } DEBUG_TEST_EXIT(dvlist->n_dof_int_vec == n_dof_int_vec, "error in n_dof_int_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_dof_vec == n_dof_dof_vec, "error in n_dof_dof_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_uchar_vec == n_dof_uchar_vec, "error in n_dof_uchar_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_schar_vec == n_dof_schar_vec, "error in n_dof_schar_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_real_vec == n_dof_real_vec, "error in n_dof_real_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_real_d_vec == n_dof_real_d_vec, "error in n_dof_real_d_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_ptr_vec == n_dof_ptr_vec, "error in n_dof_ptr_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_matrix == n_dof_matrix, "error in n_dof_matrix"); DEBUG_TEST_EXIT(dvlist->n_dof_dowb_matrix == n_dof_dowb_matrix, "error in n_dof_dowb_matrix"); } else { dvlist->dof_int_vec = nil; dvlist->dof_dof_vec = nil; dvlist->dof_uchar_vec = nil; dvlist->dof_schar_vec = nil; dvlist->dof_real_vec = nil; dvlist->dof_real_d_vec = nil; dvlist->dof_ptr_vec = nil; dvlist->dof_matrix = nil; dvlist->dof_dowb_matrix = nil; } return(ncr); } static void coarse_restrict(MESH *mesh, RC_LIST_EL *list, int n_el) { DOF_VEC_LIST *dvlist; DOF_REAL_VEC *drv; DOF_REAL_D_VEC *drdv; DOF_INT_VEC *div; DOF_DOF_VEC *ddv; DOF_UCHAR_VEC *duv; DOF_SCHAR_VEC *dsv; DOF_PTR_VEC *dpv; DOF_MATRIX *dm; DOF_DOWB_MATRIX *ddm; int i; DEBUG_TEST_EXIT(((MESH_MEM_INFO *)mesh->mem_info)->dvlist, "Huh? No dvlist found?\n"); dvlist = AI_get_dof_vec_list(mesh); for (i = 0; i < dvlist->n_dof_ptr_vec; i++) { dpv = dvlist->dof_ptr_vec[i]; if (dpv->coarse_restrict) dpv->coarse_restrict(dpv, list, n_el); } for (i = 0; i < dvlist->n_dof_int_vec; i++) { div = dvlist->dof_int_vec[i]; if (div->coarse_restrict) div->coarse_restrict(div, list, n_el); } for (i = 0; i < dvlist->n_dof_dof_vec; i++) { ddv = dvlist->dof_dof_vec[i]; if (ddv->coarse_restrict) ddv->coarse_restrict(ddv, list, n_el); } for (i = 0; i < dvlist->n_dof_uchar_vec; i++) { duv = dvlist->dof_uchar_vec[i]; if (duv->coarse_restrict) duv->coarse_restrict(duv, list, n_el); } for (i = 0; i < dvlist->n_dof_schar_vec; i++) { dsv = dvlist->dof_schar_vec[i]; if (dsv->coarse_restrict) dsv->coarse_restrict(dsv, list, n_el); } for (i = 0; i < dvlist->n_dof_real_vec; i++) { drv = dvlist->dof_real_vec[i]; if (drv->coarse_restrict) drv->coarse_restrict(drv, list, n_el); } for (i = 0; i < dvlist->n_dof_real_d_vec; i++) { drdv = dvlist->dof_real_d_vec[i]; if (drdv->coarse_restrict) drdv->coarse_restrict(drdv, list, n_el); } for (i = 0; i < dvlist->n_dof_matrix; i++) { dm = dvlist->dof_matrix[i]; if (dm->coarse_restrict) dm->coarse_restrict(dm, list, n_el); } for (i = 0; i < dvlist->n_dof_dowb_matrix; i++) { ddm = dvlist->dof_dowb_matrix[i]; if (ddm->coarse_restrict) ddm->coarse_restrict(ddm, list, n_el); } return; } /*--------------------------------------------------------------------------*/ /* calculate the maximal level of the triangulation */ /*--------------------------------------------------------------------------*/ typedef struct coarsen_traverse_data { unsigned int max_level_val; U_CHAR global_mark; } COARSEN_TRAVERSE_DATA; static void max_level_fct(const EL_INFO *el_info, void *data) { ((COARSEN_TRAVERSE_DATA *)data)->max_level_val = MAX(((COARSEN_TRAVERSE_DATA *)data)->max_level_val, el_info->level); } int get_max_level(MESH *mesh) { COARSEN_TRAVERSE_DATA td[1] = {{0}}; mesh_traverse(mesh, -1, CALL_LEAF_EL, max_level_fct, td); return(td->max_level_val); } /*--------------------------------------------------------------------------*/ /* coarsen_mark_fct: */ /* sets the mark on all elements that have to be coarsend */ /*--------------------------------------------------------------------------*/ static void coarsen_mark_fct(const EL_INFO *el_info, void *data) { #if 0 el_info->el->mark = -(S_CHAR)MIN(((COARSEN_TRAVERSE_DATA *)data)->global_mark,el_info->level); #else el_info->el->mark = ((COARSEN_TRAVERSE_DATA *)data)->global_mark; #endif return; } /*--------------------------------------------------------------------------*/ /* global_coarsen: */ /* tries to coarsen every element of mesh at least mark times */ /*--------------------------------------------------------------------------*/ U_CHAR global_coarsen(MESH *mesh, int mark) { COARSEN_TRAVERSE_DATA td[1] = {{0}}; if (mark >= 0) return(0); td->global_mark = mark; mesh_traverse(mesh, -1, CALL_LEAF_EL, coarsen_mark_fct, td); return(coarsen(mesh)); } static int call_coarse_restrict_1d; #include "coarsen_1d.c" #if DIM_OF_WORLD > 1 static int call_coarse_restrict_2d; static int do_more_coarsen_2d = true; #include "coarsen_2d.c" #if DIM_OF_WORLD > 2 static int call_coarse_restrict_3d; static int do_more_coarsen_3d = true; static TRAVERSE_STACK *stack_3d; #include "coarsen_3d.c" #endif #endif static void transfer_fct(const EL_INFO *elinfo, void *data) { MESH *mesh = elinfo->mesh; EL *s_el = elinfo->el, *m_el; DOF_PTR_VEC *master_binding; const DOF_ADMIN *s_admin; if(s_el->mark < 0) { master_binding = ((MESH_MEM_INFO *)mesh->mem_info)->master_binding; s_admin = master_binding->fe_space->admin; m_el = (EL *)master_binding->vec[s_el->dof[mesh->node[CENTER]] [s_admin->n0_dof[CENTER]]]; /****************************************************************************/ /* Transfer the coarsening marks to the master mesh. PLEASE NOTE: This */ /* actually overwrites master mesh marks! Otherwise, we could never do */ /* any coarsening for slave meshes. This may not be what the user wishes */ /* and should be well documented! */ /****************************************************************************/ m_el->mark = MIN(m_el->mark, -1); } return; } static void blank_marks_fct(const EL_INFO *elinfo, void *data) { EL *s_el = elinfo->el; s_el->mark = MAX(s_el->mark, 0); return; } U_CHAR coarsen(MESH *mesh) { FUNCNAME("refine"); MESH_MEM_INFO *mem_info = ((MESH_MEM_INFO *)mesh->mem_info); if(mem_info->n_slaves) { /****************************************************************************/ /* We are on a master mesh. */ /****************************************************************************/ #if DIM_OF_WORLD > 1 /****************************************************************************/ /* Check if we have an entire hierarchy of meshes. In this case, we need */ /* to set call_coarse_restrict_2d to nonzero to make the triple coarsening */ /* work! */ /****************************************************************************/ if(mesh->dim == 2) { int i; call_coarse_restrict_1d = 0; for(i = 0; i < mem_info->n_slaves; i++) call_coarse_restrict_1d += count_coarse_restrict(mem_info->slaves[i]); } #if DIM_OF_WORLD == 3 if(mesh->dim == 3) { int i, j; call_coarse_restrict_1d = 0; call_coarse_restrict_2d = 0; for(i = 0; i < mem_info->n_slaves; i++) { call_coarse_restrict_2d += count_coarse_restrict(mem_info->slaves[i]); if(((MESH_MEM_INFO *)(mem_info->slaves[i]->mem_info))->n_slaves) { MESH_MEM_INFO *mem_info_2 = ((MESH_MEM_INFO *)mem_info->slaves[i]->mem_info); for(j = 0; j < mem_info_2->n_slaves; j++) call_coarse_restrict_1d += count_coarse_restrict(mem_info_2->slaves[j]); } } } #endif #endif } if(mem_info->master) { /****************************************************************************/ /* We are on a slave mesh. */ /****************************************************************************/ U_CHAR mesh_coarsened; int n_slave_elements = mesh->n_elements; /* Transfer the coarsening marks to the master mesh. See note above! */ do { mesh_traverse(mesh, 0, FILL_NOTHING|CALL_LEAF_EL, transfer_fct, nil); mesh_coarsened = coarsen(mem_info->master); } while (mesh_coarsened); /* Delete the unfortunate remaining coarsening marks. */ mesh_traverse(mesh, 0, FILL_NOTHING|CALL_LEAF_EL, blank_marks_fct, nil); return (mesh->n_elements < n_slave_elements) ? MESH_COARSENED : 0; } else { /****************************************************************************/ /* We are on a top level master mesh. */ /****************************************************************************/ /* Advance cookies on this mesh and all its slaves. */ AI_advance_cookies_rec(mesh); switch(mesh->dim) { case 0: WARNING("No coarsening possible for dim==0!\n"); return 0; break; case 1: return coarsen_1d(mesh); break; #if DIM_OF_WORLD > 1 case 2: { int i, j; for(i = 0; i < mem_info->n_slaves; i++) { AI_post_refine_2d(mem_info->slaves[i]); if(((MESH_MEM_INFO *)(mem_info->slaves[i]->mem_info))->n_slaves) { MESH_MEM_INFO *mem_info_2 = ((MESH_MEM_INFO *)mem_info->slaves[i]->mem_info); for(j = 0; j < mem_info_2->n_slaves; j++) AI_post_refine_1d(mem_info_2->slaves[j]); } } return coarsen_2d(mesh); break; } #if DIM_OF_WORLD > 2 case 3: return coarsen_3d(mesh); break; #endif #endif default: ERROR_EXIT("Illegal dim during coarsening!\n"); return 0; /* not reached, but make the compiler happy. */ } } } alberta-2.0.1/alberta/src/Common/dof_admin.c0000644000042300001440000027267610676724253015612 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: dof_admin.c */ /* */ /* description: implementation of the administration of DOFs */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" /*--------------------------------------------------------------------------*/ /* use a bit vector to indicate used/unused dofs */ /* storage needed: one bit per dof */ /*--------------------------------------------------------------------------*/ #if DOF_FREE_SIZE == 32 DOF_FREE_UNIT dof_free_bit[DOF_FREE_SIZE] = { 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, 0x00000100, 0x00000200, 0x00000400, 0x00000800, 0x00001000, 0x00002000, 0x00004000, 0x00008000, 0x00010000, 0x00020000, 0x00040000, 0x00080000, 0x00100000, 0x00200000, 0x00400000, 0x00800000, 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000 }; DOF_FREE_UNIT dof_free_mod[DOF_FREE_SIZE] = { 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFC, 0xFFFFFFF8, 0xFFFFFFF0, 0xFFFFFFE0, 0xFFFFFFC0, 0xFFFFFF80, 0xFFFFFF00, 0xFFFFFE00, 0xFFFFFC00, 0xFFFFF800, 0xFFFFF000, 0xFFFFE000, 0xFFFFC000, 0xFFFF8000, 0xFFFF0000, 0xFFFE0000, 0xFFFC0000, 0xFFF80000, 0xFFF00000, 0xFFE00000, 0xFFC00000, 0xFF800000, 0xFF000000, 0xFE000000, 0xFC000000, 0xF8000000, 0xF0000000, 0xE0000000, 0xC0000000, 0x80000000 }; #elif DOF_FREE_SIZE == 64 /* why not? */ const DOF_FREE_UNIT dof_free_bit[DOF_FREE_SIZE] = { 0x0000000000000001,0x0000000000000002,0x0000000000000004,0x0000000000000008, 0x0000000000000010,0x0000000000000020,0x0000000000000040,0x0000000000000080, 0x0000000000000100,0x0000000000000200,0x0000000000000400,0x0000000000000800, 0x0000000000001000,0x0000000000002000,0x0000000000004000,0x0000000000008000, 0x0000000000010000,0x0000000000020000,0x0000000000040000,0x0000000000080000, 0x0000000000100000,0x0000000000200000,0x0000000000400000,0x0000000000800000, 0x0000000001000000,0x0000000002000000,0x0000000004000000,0x0000000008000000, 0x0000000010000000,0x0000000020000000,0x0000000040000000,0x0000000080000000, 0x0000000100000000,0x0000000200000000,0x0000000400000000,0x0000000800000000, 0x0000001000000000,0x0000002000000000,0x0000004000000000,0x0000008000000000, 0x0000010000000000,0x0000020000000000,0x0000040000000000,0x0000080000000000, 0x0000100000000000,0x0000200000000000,0x0000400000000000,0x0000800000000000, 0x0001000000000000,0x0002000000000000,0x0004000000000000,0x0008000000000000, 0x0010000000000000,0x0020000000000000,0x0040000000000000,0x0080000000000000, 0x0100000000000000,0x0200000000000000,0x0400000000000000,0x0800000000000000, 0x1000000000000000,0x2000000000000000,0x4000000000000000,0x8000000000000000 }; const DOF_FREE_UNIT dof_free_mod[DOF_FREE_SIZE] = { 0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFE,0xFFFFFFFFFFFFFFFC,0xFFFFFFFFFFFFFFF8, 0xFFFFFFFFFFFFFFF0,0xFFFFFFFFFFFFFFE0,0xFFFFFFFFFFFFFFC0,0xFFFFFFFFFFFFFF80, 0xFFFFFFFFFFFFFF00,0xFFFFFFFFFFFFFE00,0xFFFFFFFFFFFFFC00,0xFFFFFFFFFFFFF800, 0xFFFFFFFFFFFFF000,0xFFFFFFFFFFFFE000,0xFFFFFFFFFFFFC000,0xFFFFFFFFFFFF8000, 0xFFFFFFFFFFFF0000,0xFFFFFFFFFFFE0000,0xFFFFFFFFFFFC0000,0xFFFFFFFFFFF80000, 0xFFFFFFFFFFF00000,0xFFFFFFFFFFE00000,0xFFFFFFFFFFC00000,0xFFFFFFFFFF800000, 0xFFFFFFFFFF000000,0xFFFFFFFFFE000000,0xFFFFFFFFFC000000,0xFFFFFFFFF8000000, 0xFFFFFFFFF0000000,0xFFFFFFFFE0000000,0xFFFFFFFFC0000000,0xFFFFFFFF80000000, 0xFFFFFFFF00000000,0xFFFFFFFE00000000,0xFFFFFFFC00000000,0xFFFFFFF800000000, 0xFFFFFFF000000000,0xFFFFFFE000000000,0xFFFFFFC000000000,0xFFFFFF8000000000, 0xFFFFFF0000000000,0xFFFFFE0000000000,0xFFFFFC0000000000,0xFFFFF80000000000, 0xFFFFF00000000000,0xFFFFE00000000000,0xFFFFC00000000000,0xFFFF800000000000, 0xFFFF000000000000,0xFFFE000000000000,0xFFFC000000000000,0xFFF8000000000000, 0xFFF0000000000000,0xFFE0000000000000,0xFFC0000000000000,0xFF80000000000000, 0xFF00000000000000,0xFE00000000000000,0xFC00000000000000,0xF800000000000000, 0xF000000000000000,0xE000000000000000,0xC000000000000000,0x8000000000000000 }; #else DOF_FREE_UNIT dof_free_bit[DOF_FREE_SIZE] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; DOF_FREE_UNIT dof_free_mod[DOF_FREE_SIZE] = { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 }; #endif /*--------------------------------------------------------------------------*/ /* SIZE_INCREMENT: */ /* default increment for DOF_VECs etc. in enlarge_dof_lists */ /*--------------------------------------------------------------------------*/ #define SIZE_INCREMENT (DOF_FREE_SIZE * 32) /*--------------------------------------------------------------------------*/ void free_dof_index(DOF_ADMIN *admin, int dof) { FUNCNAME("free_dof_index"); #if 0 int i, j, col, col2; #endif unsigned int iunit, ibit; DOF_MATRIX *matrix; MATRIX_ROW *row, *row2; DOF_DOWB_MATRIX *dmatrix; DOWB_MATRIX_ROW *drow, *drow2; DEBUG_TEST_EXIT(admin, "no admin\n"); DEBUG_TEST_EXIT(admin->used_count > 0, "no dofs in use\n"); DEBUG_TEST_EXIT((dof >= 0) && (dof < admin->size), "invalid DOF index %d!\n",dof); for (matrix = admin->dof_matrix; matrix; matrix = matrix->next) { if ((row = matrix->matrix_row[dof])) { do { #if 0 /* This operation is expensive - and leads to wrong results, if fe_space */ /* and col_fe_space don't match! (DK) */ /* Besides, this sort of cleanup is not done for vectors either. */ for (i=0; icol[i]; if (ENTRY_USED(col)) { if (col != dof) /* remove symmetric entry if exists */ { row2 = matrix->matrix_row[col]; while (row2) { for (j=0; jcol[j]; if (col2 == dof) { row2->col[j] = UNUSED_ENTRY; } else if (col2 == NO_MORE_ENTRIES) { break; } } row2 = row2->next; } } } else if (col == NO_MORE_ENTRIES) { break; } } #endif row2 = row; row = row->next; free_matrix_row(matrix->row_fe_space, row2); } while(row); matrix->matrix_row[dof] = nil; } } for (dmatrix = admin->dof_dowb_matrix; dmatrix; dmatrix = dmatrix->next) { if ((drow = dmatrix->matrix_row[dof])) { do { #if 0 /* This operation is expensive - and leads to wrong results, if row_fe_space*/ /* and col_fe_space don't match! (DK) */ /* Besides, this sort of cleanup is not done for vectors either. */ for (i=0; icol[i]; if (ENTRY_USED(col)) { if (col != dof) /* remove symmetric entry if exists */ { drow2 = dmatrix->matrix_row[col]; while (drow2) { for (j=0; jcol[j]; if (col2 == dof) { drow2->col[j] = UNUSED_ENTRY; } else if (col2 == NO_MORE_ENTRIES) { break; } } drow2 = drow2->next; }; } } else if (col == NO_MORE_ENTRIES) { break; } } #endif drow2 = drow; drow = drow->next; free_dowb_matrix_row(dmatrix->row_fe_space, dmatrix->type, drow2); } while(drow); dmatrix->matrix_row[dof] = nil; } } iunit = dof / DOF_FREE_SIZE; ibit = dof % DOF_FREE_SIZE; admin->dof_free[iunit] |= dof_free_bit[ibit]; if (admin->first_hole > iunit) admin->first_hole = iunit; admin->used_count--; admin->hole_count++; } /*--------------------------------------------------------------------------*/ int get_dof_index(DOF_ADMIN *admin) { FUNCNAME("get_dof_index"); int dof = 0, i, ibit; DEBUG_TEST_EXIT(admin, "no admin\n"); if (admin->first_hole < admin->dof_free_size) { for (ibit = 0; ibit < DOF_FREE_SIZE; ibit++) { if (admin->dof_free[admin->first_hole] & dof_free_bit[ibit]) { admin->dof_free[admin->first_hole] ^= dof_free_bit[ibit]; dof = DOF_FREE_SIZE * admin->first_hole + ibit; if (admin->dof_free[admin->first_hole] == 0) { for (i = admin->first_hole+1; i < admin->dof_free_size; i++) { if (admin->dof_free[i]) { break; } } admin->first_hole = i; } break; } } DEBUG_TEST_EXIT(ibit < DOF_FREE_SIZE, "no free bit in first_hole ?\n"); } else { enlarge_dof_lists(admin, 0); DEBUG_TEST_EXIT(admin->first_hole < admin->dof_free_size, "no free entry after enlarge_dof_lists\n"); DEBUG_TEST_EXIT(admin->dof_free[admin->first_hole] & dof_free_bit[0], "no free bit 0\n"); admin->dof_free[admin->first_hole] ^= dof_free_bit[0]; dof = DOF_FREE_SIZE * admin->first_hole; } admin->used_count++; if (admin->hole_count > 0) admin->hole_count--; admin->size_used = MAX(admin->size_used, dof+1); return(dof); } /*--------------------------------------------------------------------------*/ void enlarge_dof_lists(DOF_ADMIN *admin, int minsize) { FUNCNAME("enlarge_dof_lists"); int old_size, new_size, i, j, new_free_size; DOF_INT_VEC *iv; DOF_DOF_VEC *dv; DOF_UCHAR_VEC *uv; DOF_SCHAR_VEC *sv; DOF_REAL_VEC *rv; DOF_REAL_D_VEC *rdv; DOF_PTR_VEC *pv; DOF_MATRIX *mat; DOF_DOWB_MATRIX *bmat; DEBUG_TEST_EXIT(admin, "no admin\n"); old_size = admin->size; if (minsize > 0) { if (old_size > minsize) return; } new_size = MAX(minsize, admin->size + SIZE_INCREMENT); new_size += (DOF_FREE_SIZE - (new_size % DOF_FREE_SIZE)) % DOF_FREE_SIZE; admin->size = new_size; new_free_size = new_size / DOF_FREE_SIZE; admin->dof_free = MEM_REALLOC(admin->dof_free, admin->dof_free_size, new_free_size, DOF_FREE_UNIT); for (i = admin->dof_free_size; i < new_free_size; i++) admin->dof_free[i] = DOF_UNIT_ALL_FREE; admin->first_hole = admin->dof_free_size; admin->dof_free_size = new_free_size; /* enlarge all vectors and matrices */ /* but int_dof_vecs don't have to be changed */ for (iv = admin->dof_int_vec; iv; iv = iv->next) { if (iv->size < new_size) { iv->vec = MEM_REALLOC(iv->vec, iv->size, new_size, int); for (i = iv->size; i < new_size; i++) iv->vec[i] = 0; iv->size = new_size; } } for (dv = admin->dof_dof_vec; dv; dv = dv->next) { if (dv->size < new_size) { dv->vec = MEM_REALLOC(dv->vec, dv->size, new_size, DOF); for (i = dv->size; i < new_size; i++) dv->vec[i] = -1; dv->size = new_size; } } for (uv = admin->dof_uchar_vec; uv; uv = uv->next) { if (uv->size < new_size) { uv->vec = MEM_REALLOC(uv->vec, uv->size, new_size, U_CHAR); for (i = uv->size; i < new_size; i++) uv->vec[i] = 0; uv->size = new_size; } } for (sv = admin->dof_schar_vec; sv; sv = sv->next) { if (sv->size < new_size) { sv->vec = MEM_REALLOC(sv->vec, old_size, new_size, S_CHAR); for (i = sv->size; i < new_size; i++) sv->vec[i] = 0; sv->size = new_size; } } for (rv = admin->dof_real_vec; rv; rv = rv->next) { if (rv->size < new_size) { rv->vec = MEM_REALLOC(rv->vec, rv->size, new_size, REAL); for (i = rv->size; i < new_size; i++) rv->vec[i] = 0.0; rv->size = new_size; } } for (rdv = admin->dof_real_d_vec; rdv; rdv = rdv->next) { if (rdv->size < new_size) { rdv->vec = MEM_REALLOC(rdv->vec, rdv->size, new_size, REAL_D); for (i = rdv->size; i < new_size; i++) for (j=0; jvec[i][j] = 0.0; rdv->size = new_size; } } for (pv = admin->dof_ptr_vec; pv; pv = pv->next) { if (pv->size < new_size) { pv->vec = MEM_REALLOC(pv->vec, pv->size, new_size, void *); for (i = pv->size; i < new_size; i++) pv->vec[i] = nil; pv->size = new_size; } } for (mat = admin->dof_matrix; mat; mat = mat->next) { if (mat->size < new_size) { mat->matrix_row = MEM_REALLOC(mat->matrix_row, mat->size, new_size, MATRIX_ROW *); for (i = mat->size; i < new_size; i++) mat->matrix_row[i] = nil; mat->size = new_size; } } for (bmat = admin->dof_dowb_matrix; bmat; bmat = bmat->next) { if (bmat->size < new_size) { bmat->matrix_row = MEM_REALLOC(bmat->matrix_row, bmat->size, new_size, DOWB_MATRIX_ROW *); for (i = bmat->size; i < new_size; i++) bmat->matrix_row[i] = nil; bmat->size = new_size; } } } /*--------------------------------------------------------------------------*/ /* dof_compress: remove holes in dof vectors */ /*--------------------------------------------------------------------------*/ typedef struct dof_admin_traverse_data1 { int *new_dof; int *g_n_dof; int *g_n0_dof; int *g_node; } DOF_ADMIN_TRAVERSE_DATA1; /*--------------------------------------------------------------------------*/ /* ATTENTION: */ /* new_dof_fct() destroys new_dof !!!!!!!!!! */ /* should be used only at the end of dof_compress()!!!!! */ /*--------------------------------------------------------------------------*/ /* CHANGE_DOFS_1 changes old dofs to NEGATIVE new dofs. The index is shifted */ /* by - 2 so that unused element DOFs (-1) are preserved. */ #define CHANGE_DOFS_1(el) \ dof0 = el->dof[n0+i]; \ dof = dof0 + nd0; \ if(dof0) \ for (j = 0; j < nd; j++) \ if ((k = dof[j]) >= 0) \ /* do it only once! (dofs are visited more than once) */ \ dof[j] = - ud->new_dof[k] - 2; /* CHANGE_DOFS_2 changes NEGATIVE new dofs to POSITIVE. The index shift above*/ /* is undone. */ #define CHANGE_DOFS_2(el) \ dof0 = el->dof[n0+i]; \ dof = dof0 + nd0; \ if(dof0) \ for (j = 0; j < nd; j++) \ if ((k = dof[j]) < -1) \ /* do it only once! (dofs are visited more than once) */ \ dof[j] = - k - 2; static void new_dof_fct1(const EL_INFO *el_info, void *data) { DOF_ADMIN_TRAVERSE_DATA1 *ud = (DOF_ADMIN_TRAVERSE_DATA1 *)data; EL *el = el_info->el; int i, j, k, n0, nd, nd0; int dim = el_info->mesh->dim; DOF *dof0, *dof; if ((nd = ud->g_n_dof[VERTEX])) { nd0 = ud->g_n0_dof[VERTEX]; n0 = ud->g_node[VERTEX]; for (i = 0; i < N_VERTICES(dim); i++) { CHANGE_DOFS_1(el); } } if(dim > 1 && (nd = ud->g_n_dof[EDGE])) { nd0 = ud->g_n0_dof[EDGE]; n0 = ud->g_node[EDGE]; for (i = 0; i < N_EDGES(dim); i++) { CHANGE_DOFS_1(el); } } if(dim == 3 && (nd = ud->g_n_dof[FACE])) { nd0 = ud->g_n0_dof[FACE]; n0 = ud->g_node[FACE]; for (i = 0; i < N_FACES_3D; i++) { CHANGE_DOFS_1(el); } } if ((nd = ud->g_n_dof[CENTER])) { nd0 = ud->g_n0_dof[CENTER]; n0 = ud->g_node[CENTER]; i = 0; /* only one center */ CHANGE_DOFS_1(el); } return; } static void new_dof_fct2(const EL_INFO *el_info, void *data) { DOF_ADMIN_TRAVERSE_DATA1 *ud = (DOF_ADMIN_TRAVERSE_DATA1 *)data; EL *el = el_info->el; int i, j, k, n0, nd, nd0; int dim = el_info->mesh->dim; DOF *dof0, *dof; if ((nd = ud->g_n_dof[VERTEX])) { nd0 = ud->g_n0_dof[VERTEX]; n0 = ud->g_node[VERTEX]; for (i = 0; i < N_VERTICES(dim); i++) { CHANGE_DOFS_2(el); } } if(dim > 1 && (nd = ud->g_n_dof[EDGE])) { nd0 = ud->g_n0_dof[EDGE]; n0 = ud->g_node[EDGE]; for (i = 0; i < N_EDGES(dim); i++) { CHANGE_DOFS_2(el); } } if(dim == 3 && (nd = ud->g_n_dof[FACE])) { nd0 = ud->g_n0_dof[FACE]; n0 = ud->g_node[FACE]; for (i = 0; i < N_FACES_3D; i++) { CHANGE_DOFS_2(el); } } if ((nd = ud->g_n_dof[CENTER])) { nd0 = ud->g_n0_dof[CENTER]; n0 = ud->g_node[CENTER]; i = 0; /* only one center */ CHANGE_DOFS_2(el); } return; } #undef CHANGE_DOFS_1 #undef CHANGE_DOFS_2 /*--------------------------------------------------------------------------*/ extern void dof_compress(MESH *mesh) { FUNCNAME("dof_compress"); DOF_ADMIN_TRAVERSE_DATA1 td[1] = {{0}}; DOF_ADMIN *compress_admin, *search_admin; int i,j,k,n,size,first,last=0,col, iadmin, jadmin; FLAGS fill_flag; DOF_INT_VEC *div; DOF_DOF_VEC *ddv; DOF_UCHAR_VEC *duv; DOF_SCHAR_VEC *dsv; DOF_REAL_D_VEC *drdv; DOF_REAL_VEC *drv; DOF_PTR_VEC *dpv; DOF_MATRIX *dm; DOF_DOWB_MATRIX *dbm; MATRIX_ROW *row, *row_next; DOWB_MATRIX_ROW *drow, *drow_next; TEST_EXIT(mesh, "No mesh given!\n"); td->g_node = mesh->node; for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { compress_admin = mesh->dof_admin[iadmin]; DEBUG_TEST_EXIT(compress_admin, "no dof_admin[%d] in mesh\n", iadmin); if ((size = compress_admin->size) < 1) continue; if (compress_admin->used_count < 1) continue; if (compress_admin->hole_count < 1) continue; td->g_n_dof = compress_admin->n_dof; td->g_n0_dof = compress_admin->n0_dof; td->new_dof = MEM_ALLOC(size, int); for (i=0; inew_dof[i] = -1; } FOR_ALL_DOFS(compress_admin, td->new_dof[dof] = 1); n = 0; for (i = 0; i < size; i++) { /* create a MONOTONE compress */ if (td->new_dof[i] == 1) { td->new_dof[i] = n++; last = i; } } DEBUG_TEST_EXIT(n == compress_admin->used_count, "count %d != used_count %d\n", n, compress_admin->used_count); { int n1 = n / DOF_FREE_SIZE; for (i = 0; i < n1; i++) compress_admin->dof_free[i] = 0; if (n1 < compress_admin->dof_free_size) compress_admin->dof_free[n1] = dof_free_mod[n % DOF_FREE_SIZE]; for (i = n1+1; i < compress_admin->dof_free_size; i++) compress_admin->dof_free[i] = DOF_UNIT_ALL_FREE; compress_admin->first_hole = n1; } compress_admin->hole_count = 0; compress_admin->size_used = n; first = 0; for (i=0; inew_dof[i] < i) && (td->new_dof[i] >= 0)) { first = i; break; } } if (last >= first) { last++; /* for (i = first; i < last; i++) ... */ /* compress all vectors associated to admin */ for (div = compress_admin->dof_int_vec; div; div = div->next) { for (i=first; inew_dof[i]) >= 0) div->vec[k] = div->vec[i]; } } for (ddv = compress_admin->dof_dof_vec; ddv; ddv = ddv->next) { for (i=first; inew_dof[i]) >= 0) ddv->vec[k] = ddv->vec[i]; } for (i=0; inew_dof[ddv->vec[i]]) >= 0) ddv->vec[i] = k; } } for (ddv = compress_admin->int_dof_vec; ddv; ddv = ddv->next) { for (i=0; i < ddv->size; i++) { if (ddv->vec[i] >= 0) if ((k = td->new_dof[ddv->vec[i]]) >= 0) ddv->vec[i] = k; } } for (duv = compress_admin->dof_uchar_vec; duv; duv = duv->next) { for (i=first; inew_dof[i]) >= 0) duv->vec[k] = duv->vec[i]; } } for (dsv = compress_admin->dof_schar_vec; dsv; dsv = dsv->next) { for (i=first; inew_dof[i]) >= 0) dsv->vec[k] = dsv->vec[i]; } } for (drv = compress_admin->dof_real_vec; drv; drv = drv->next) { for (i=first; inew_dof[i]) >= 0) drv->vec[k] = drv->vec[i]; } } for (drdv = compress_admin->dof_real_d_vec; drdv; drdv = drdv->next) { for (i=first; inew_dof[i]) >= 0) for (j=0; jvec[k][j] = drdv->vec[i][j]; } } for (dpv = compress_admin->dof_ptr_vec; dpv; dpv = dpv->next) { for (i=first; inew_dof[i]) >= 0) dpv->vec[k] = dpv->vec[i]; } } /* Row corrections */ for (dm = compress_admin->dof_matrix; dm; dm = dm->next) { for (i=first; inew_dof[i]) >= 0) { /* free dm->matrix_row[k]; */ for (row = dm->matrix_row[k]; row; row = row_next) { row_next = row->next; free_matrix_row(dm->row_fe_space, row); } dm->matrix_row[k] = dm->matrix_row[i]; dm->matrix_row[i] = nil; } } } for (dbm = compress_admin->dof_dowb_matrix; dbm; dbm = dbm->next) { for (i=first; inew_dof[i]) >= 0) { /* free dm->matrix_row[k]; */ for (drow = dbm->matrix_row[k]; drow; drow = drow_next) { drow_next = drow->next; free_dowb_matrix_row(dbm->row_fe_space, dbm->type, drow); } dbm->matrix_row[k] = dbm->matrix_row[i]; dbm->matrix_row[i] = nil; } } } /* Column corrections, we search all matrices for ones with */ /* col_fe_space->admin == compress_admin. */ for (jadmin = 0; jadmin < mesh->n_dof_admin; jadmin++) { search_admin = mesh->dof_admin[jadmin]; DEBUG_TEST_EXIT(search_admin, "no dof_admin[%d] in mesh\n", jadmin); for (dm = search_admin->dof_matrix; dm; dm = dm->next) if(dm->col_fe_space && dm->col_fe_space->admin == compress_admin) for (i=0; imatrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(col)) row->col[j] = td->new_dof[col]; } } } for (dbm = search_admin->dof_dowb_matrix; dbm; dbm = dbm->next) if(dbm->col_fe_space && dbm->col_fe_space->admin == compress_admin) for (i=0; imatrix_row[i]; drow; drow = drow->next) { for (j=0; jcol[j]; if (ENTRY_USED(col)) drow->col[j] = td->new_dof[col]; } } } } /* now, change dofs in MESH's nodes */ /* new_dof_fct destroys new_dof[] !!! */ fill_flag = CALL_EVERY_EL_PREORDER | FILL_NOTHING; mesh_traverse(mesh, -1, fill_flag, new_dof_fct1, td); mesh_traverse(mesh, -1, fill_flag, new_dof_fct2, td); } MEM_FREE(td->new_dof, size, int); td->new_dof = nil; } return; } /*--------------------------------------------------------------------------*/ /* matrix administration */ /*--------------------------------------------------------------------------*/ /* AI_add_dof_matrix_to_admin(): enter new matrix to DOF_ADMIN list */ /* (re)alloc matrix_row, el_* if necessary*/ /* AI_add_dof_dowb_matrix_to_admin(): dito for block matrices */ /* (re)alloc matrix_row, el_* if necessary*/ /* AI_add_dof_int_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_int_dof_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_dof_dof_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_dof_uchar_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_dof_schar_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_dof_real_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_dof_real_d_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* AI_add_dof_ptr_vec_to_admin(): enter new vec to DOF_ADMIN list */ /* (re)alloc vector if necessary */ /* */ /* update_dof_matrix(): add/substract el_mat to/from matrix */ /*--------------------------------------------------------------------------*/ #define CHECK_IF_PRESENT(admin, TYPE, list, vec) \ {TYPE *v; for (v=admin->list; v; v = v->next) \ if (v==vec) {ERROR("dof_vec %s already associated to admin %s\n",\ NAME(vec), NAME(admin)); return;} } #define DEFINE_ADD_DOF_OBJ_TO_ADMIN(TYPE, list, enlarge) \ void AI_add_##list##_to_admin(TYPE *obj, DOF_ADMIN *admin) \ { \ FUNCNAME("AI_add_"#list"_to_admin"); \ \ if (!obj) { \ MSG("no obj\n"); \ return; \ } \ \ CHECK_IF_PRESENT(admin, TYPE, list, obj); \ \ if (obj->size < admin->size) { \ enlarge; \ obj->size = admin->size; \ } \ \ obj->next = admin->list; \ admin->list = obj; \ /* obj->admin = admin; */ \ } #define DEFINE_ADD_DOF_VEC_TO_ADMIN(TYPE, type, list) \ DEFINE_ADD_DOF_OBJ_TO_ADMIN(TYPE, list, \ obj->vec = MEM_REALLOC(obj->vec, obj->size, admin->size, type)) #define DEFINE_ADD_DOF_MAT_TO_ADMIN(TYPE, type, list) \ DEFINE_ADD_DOF_OBJ_TO_ADMIN(TYPE, list, { \ int i; \ \ obj->matrix_row = MEM_REALLOC(obj->matrix_row, obj->size, \ admin->size, type *); \ for (i = obj->size; i < admin->size; i++) { \ obj->matrix_row[i] = nil; \ } \ }) #define DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(TYPE, list) \ void AI_remove_##list##_from_admin(TYPE *obj) \ { \ FUNCNAME("AI_remove_"#list"_from_admin"); \ DOF_ADMIN *admin; \ TYPE *obj_last; \ \ if (obj->fe_space && (admin = (DOF_ADMIN *)obj->fe_space->admin)) \ { \ if (admin->list == obj) \ admin->list = obj->next; \ else \ { \ obj_last = admin->list; \ while (obj_last && obj_last->next != obj) \ obj_last = obj_last->next; \ \ if (!obj_last) \ { \ ERROR(""#list" %s not in list of dof admin %s found\n", \ NAME(obj), NAME(admin)); \ } \ else \ obj_last->next = obj->next; \ } \ } \ return; \ } #define DEFINE_REMOVE_DOF_MAT_FROM_ADMIN(TYPE, list) \ void AI_remove_##list##_from_admin(TYPE *obj) \ { \ FUNCNAME("AI_remove_"#list"_from_admin"); \ DOF_ADMIN *admin; \ TYPE *obj_last; \ \ if (obj->row_fe_space && \ (admin = (DOF_ADMIN *)obj->row_fe_space->admin)) \ { \ if (admin->list == obj) \ admin->list = obj->next; \ else \ { \ obj_last = admin->list; \ while (obj_last && obj_last->next != obj) \ obj_last = obj_last->next; \ \ if (!obj_last) \ { \ ERROR(""#list" %s not in list of dof admin %s found\n", \ NAME(obj), NAME(admin)); \ } \ else \ obj_last->next = obj->next; \ } \ } \ return; \ } DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_INT_VEC, int, dof_int_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_INT_VEC, dof_int_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_DOF_VEC, DOF, dof_dof_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_DOF_VEC, dof_dof_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_DOF_VEC, DOF, int_dof_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_DOF_VEC, int_dof_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_UCHAR_VEC, U_CHAR, dof_uchar_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_UCHAR_VEC, dof_uchar_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_SCHAR_VEC, S_CHAR, dof_schar_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_SCHAR_VEC, dof_schar_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_REAL_VEC, REAL, dof_real_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_REAL_VEC, dof_real_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_REAL_D_VEC, REAL_D, dof_real_d_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_REAL_D_VEC, dof_real_d_vec) DEFINE_ADD_DOF_VEC_TO_ADMIN(DOF_PTR_VEC, void *, dof_ptr_vec) DEFINE_REMOVE_DOF_VEC_FROM_ADMIN(DOF_PTR_VEC, dof_ptr_vec) DEFINE_ADD_DOF_MAT_TO_ADMIN(DOF_MATRIX, MATRIX_ROW, dof_matrix) DEFINE_REMOVE_DOF_MAT_FROM_ADMIN(DOF_MATRIX, dof_matrix) DEFINE_ADD_DOF_MAT_TO_ADMIN(DOF_DOWB_MATRIX, DOWB_MATRIX_ROW, dof_dowb_matrix) DEFINE_REMOVE_DOF_MAT_FROM_ADMIN(DOF_DOWB_MATRIX, dof_dowb_matrix) #undef CHECK_IF_PRESENT #undef DEFINE_ADD_DOF_OBJ_TO_ADMIN #undef DEFINE_ADD_DOF_VEC_TO_ADMIN #undef DEFINE_ADD_DOF_MAT_TO_ADMIN #undef DEFINE_REMOVE_DOF_OBJ_FROM_ADMIN /*--------------------------------------------------------------------------*/ void update_dof_matrix(DOF_MATRIX *matrix, REAL sign, int dim, const REAL **el_mat, const DOF *el_dof, const S_CHAR *el_bound) { FUNCNAME("update_dof_matrix"); DOF i, j, k, irow, jcol; int free_col=0; MATRIX_ROW *row, *free_row; TEST_EXIT(matrix, "no matrix\n"); for (i = 0; i < dim; i++) { irow = el_dof[i]; if (matrix->matrix_row[irow] == nil) { row = matrix->matrix_row[irow] = get_matrix_row(matrix->row_fe_space); row->col[0] = irow; /* first entry is diagonal element */ if (el_bound && el_bound[i] >= DIRICHLET) { row->entry[0] = 1.0; continue; } else row->entry[0] = 0.0; } else if (el_bound && el_bound[i] >= DIRICHLET) continue; for (j = 0; j < dim; j++) { jcol = el_dof[j]; row = matrix->matrix_row[irow]; free_row = nil; do { for (k=0; kcol[k] == jcol) { row->entry[k] += sign*el_mat[i][j]; break; } if (ENTRY_NOT_USED(row->col[k])) { free_col = k; free_row = row; if (row->col[k] == NO_MORE_ENTRIES) { k = ROW_LENGTH; break; } } } if (k < ROW_LENGTH) break; /* done? */ if (row->next || free_row) { row = row->next; } else { free_row = row->next = get_matrix_row(matrix->row_fe_space); free_col = 0; row = nil; } } while (row); if (k >= ROW_LENGTH) /* not done? */ { DEBUG_TEST_EXIT(free_row, "no free_row\n"); DEBUG_TEST_EXIT(sign > 0.0, "new entry (%d,%d) in matrix %s with sign=%lf\n", irow, jcol, matrix->name, sign); free_row->col[free_col] = jcol; free_row->entry[free_col] = sign * el_mat[i][j]; } } } return; } void update_dof_dowb_matrix(DOF_DOWB_MATRIX *matrix, REAL sign, int dim, const void **el_mat, const DOF *el_dof, const S_CHAR *el_bound) { FUNCNAME("update_dof_dobw_matrix"); DOF i, j, k, irow, jcol; int free_col=0; const REAL_DD **el_mat_r = (const REAL_DD **)el_mat; const REAL_DDS **el_mat_s = (const REAL_DDS **)el_mat; const REAL_D **el_mat_d = (const REAL_D **)el_mat; DOWB_MATRIX_ROW *row, *free_row; TEST_EXIT(matrix, "no matrix\n"); for (i = 0; i < dim; i++) { irow = el_dof[i]; if (matrix->matrix_row[irow] == nil) { row = matrix->matrix_row[irow] = get_dowb_matrix_row(matrix->row_fe_space, matrix->type); row->col[0] = irow; /* first entry is diagonal element */ if (el_bound && el_bound[i] >= DIRICHLET) { switch(matrix->type) { case dowbm_full: MSET_DOW(1.0, row->entry.full[0]); break; case dowbm_symm: SMSET_DOW(1.0, &row->entry.symm[0]); break; case dowbm_diag: DMSET_DOW(1.0, row->entry.diag[0]); break; } continue; } else { switch(matrix->type) { case dowbm_full: MSET_DOW(0.0, row->entry.full[0]); break; case dowbm_symm: SMSET_DOW(0.0, &row->entry.symm[0]); break; case dowbm_diag: DMSET_DOW(0.0, row->entry.diag[0]); break; } } } else if (el_bound && el_bound[i] >= DIRICHLET) continue; for (j = 0; j < dim; j++) { jcol = el_dof[j]; row = matrix->matrix_row[irow]; free_row = nil; do { for (k=0; kcol[k] == jcol) { switch(matrix->type) { case dowbm_full: MAXPY_DOW(sign, (REAL_D *)el_mat_r[i][j], row->entry.full[k]); break; case dowbm_symm: SMAXPY_DOW(sign, &el_mat_s[i][j], &row->entry.symm[k]); break; case dowbm_diag: DMAXPY_DOW(sign, el_mat_d[i][j], row->entry.diag[k]); break; } break; } if (ENTRY_NOT_USED(row->col[k])) { free_col = k; free_row = row; if (row->col[k] == NO_MORE_ENTRIES) { k = ROW_LENGTH; break; } } } if (k < ROW_LENGTH) break; /* done? */ if (row->next || free_row) { row = row->next; } else { free_row = row->next = get_dowb_matrix_row(matrix->row_fe_space, matrix->type); free_col = 0; row = nil; } } while (row); if (k >= ROW_LENGTH) /* not done? */ { DEBUG_TEST_EXIT(free_row, "no free_row\n"); DEBUG_TEST_EXIT(sign > 0.0, "new entry (%d,%d) in matrix %s with sign=%lf\n", irow, jcol, matrix->name, sign); free_row->col[free_col] = jcol; switch (matrix->type) { case dowbm_full: MAXEY_DOW(sign, (REAL_D *)el_mat_r[i][j], free_row->entry.full[free_col]); break; case dowbm_symm: SMAXEY_DOW(sign, &el_mat_s[i][j], &free_row->entry.symm[free_col]); break; case dowbm_diag: DMAXEY_DOW(sign, el_mat_d[i][j], free_row->entry.diag[free_col]); break; } } } } return; } void update_dof_real_vec(DOF_REAL_VEC *drv, REAL sign, int el_dim, const REAL *el_vec, const DOF *el_dof, const S_CHAR *el_bound) { FUNCNAME("update_dof_real_vec"); REAL *vec; int i; TEST_EXIT(drv, "no dof_real_vec\n"); vec = drv->vec; if (el_bound) { for (i = 0; i < el_dim; i++) if (el_bound[i] < DIRICHLET) vec[el_dof[i]] += sign*el_vec[i]; } else { for (i = 0; i < el_dim; i++) vec[el_dof[i]] += sign*el_vec[i]; } return; } void update_dof_real_d_vec(DOF_REAL_D_VEC *drdv, REAL sign, int el_dim, const REAL_D *el_vec, const DOF *el_dof, const S_CHAR *el_bound) { FUNCNAME("update_dof_real_d_vec"); REAL_D *vec; int i, n; TEST_EXIT(drdv, "no dof_real_vec\n"); vec = drdv->vec; if (el_bound) { for (i = 0; i < el_dim; i++) if (el_bound[i] < DIRICHLET) for (n = 0; n < DIM_OF_WORLD; n++) vec[el_dof[i]][n] += sign*el_vec[i][n]; } else { for (i = 0; i < el_dim; i++) for (n = 0; n < DIM_OF_WORLD; n++) vec[el_dof[i]][n] += sign*el_vec[i][n]; } return; } /*--------------------------------------------------------------------------*/ /* some BLAS level 1 routines: */ /* --------------------------- */ /* dof_asum: asum = ||X||_l1 */ /* dof_nrm2: nrm2 = ||X||_l2 */ /* dof_set: X = alpha */ /* dof_scal: X = alpha * X */ /* dof_copy: Y = X */ /* dof_dot: dot = X . Y */ /* dof_axpy: Y = Y + alpha * X */ /* */ /* some BLAS level 2 routines: */ /* --------------------------- */ /* dof_gemv: y = alpha*A*x + beta*y or y = alpha*A'*x + beta*y */ /* */ /* some non-BLAS level 2 routines: */ /* --------------------------- */ /* dof_mv: y = A*x or y = A'*x */ /* dof_min: min of x */ /* dof_max: max of x */ /*--------------------------------------------------------------------------*/ REAL dof_nrm2(const DOF_REAL_VEC *x) { FUNCNAME("dof_nrm2"); REAL nrm; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); nrm = 0.0; FOR_ALL_DOFS(admin, nrm += x->vec[dof] * x->vec[dof] ); return(sqrt(nrm)); } REAL dof_asum(const DOF_REAL_VEC *x) { FUNCNAME("dof_asum"); REAL nrm; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); nrm = 0.0; FOR_ALL_DOFS(admin, nrm += ABS(x->vec[dof]) ); return(nrm); } void dof_set(REAL alpha, DOF_REAL_VEC *x) { FUNCNAME("dof_set"); const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); FOR_ALL_DOFS(admin, x->vec[dof] = alpha ); } void dof_scal(REAL alpha, DOF_REAL_VEC *x) { FUNCNAME("dof_scal"); const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); FOR_ALL_DOFS(admin, x->vec[dof] *= alpha ); } REAL dof_dot(const DOF_REAL_VEC *x, const DOF_REAL_VEC *y) { FUNCNAME("dof_dot"); REAL dot; const DOF_ADMIN *admin = nil; TEST_EXIT(x && y, "pointer is nil: %p, %p\n", x,y); TEST_EXIT(x->fe_space && y->fe_space, "fe_space is nil: %p, %p\n", x->fe_space,y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or different admins: %p, %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); dot = 0.0; FOR_ALL_DOFS(admin, dot += x->vec[dof] * y->vec[dof] ); return(dot); } void dof_copy(const DOF_REAL_VEC *x, DOF_REAL_VEC *y) { FUNCNAME("dof_copy"); REAL *xvec, *yvec; const DOF_ADMIN *admin = nil; TEST_EXIT(x && y, "pointer is nil: %p, %p\n", x,y); TEST_EXIT(x->fe_space && y->fe_space, "fe_space is nil: %p, %p\n", x->fe_space,y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or different admins: %p, %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); xvec = x->vec; yvec = y->vec; FOR_ALL_DOFS(admin, yvec[dof] = xvec[dof] ); } void dof_axpy(REAL alpha, const DOF_REAL_VEC *x, DOF_REAL_VEC *y) { FUNCNAME("dof_axpy"); REAL *xvec, *yvec; const DOF_ADMIN *admin; TEST_EXIT(x && y, "pointer is nil: %p, %p\n", x,y); TEST_EXIT(x->fe_space && y->fe_space, "fe_space is nil: %p, %p\n", x->fe_space,y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or different admins: %p, %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size = %d\n", y->size, admin->size_used); xvec = x->vec; yvec = y->vec; FOR_ALL_DOFS(admin, yvec[dof] += alpha * xvec[dof] ); } void dof_xpay(REAL alpha, const DOF_REAL_VEC *x, DOF_REAL_VEC *y) { FUNCNAME("dof_axpy"); REAL *xvec, *yvec; const DOF_ADMIN *admin; TEST_EXIT(x && y, "pointer is nil: %p, %p\n", x,y); TEST_EXIT(x->fe_space && y->fe_space, "fe_space is nil: %p, %p\n", x->fe_space,y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or different admins: %p, %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); xvec = x->vec; yvec = y->vec; FOR_ALL_DOFS(admin, yvec[dof] = xvec[dof] + alpha*yvec[dof]); } REAL dof_min(const DOF_REAL_VEC *x) { FUNCNAME("dof_min"); REAL m; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); m = 1.0E30; FOR_ALL_DOFS(admin, m = MIN(m, x->vec[dof]) ); return(m); } REAL dof_max(const DOF_REAL_VEC *x) { FUNCNAME("dof_max"); REAL m; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); m = -1.0E30; FOR_ALL_DOFS(admin, m = MAX(m, x->vec[dof]) ); return(m); } /*--------------------------------------------------------------------------*/ /* now the same routines for REAL_D vectors */ /*--------------------------------------------------------------------------*/ void dof_set_d(REAL alpha, DOF_REAL_D_VEC *x) { FUNCNAME("dof_set_d"); const DOF_ADMIN *admin = nil; int n; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: x: %p, x->fe_space: %p, x->fe_space->admin :%p\n", x, x->fe_space, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) x->vec[dof][n] = alpha); } void dof_scal_d(REAL alpha, DOF_REAL_D_VEC *x) { FUNCNAME("dof_scal_d"); const DOF_ADMIN *admin = nil; int n; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: x: %p, x->fe_space: %p, x->fe_space->admin :%p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) x->vec[dof][n] *= alpha); } REAL dof_dot_d(const DOF_REAL_D_VEC *x, const DOF_REAL_D_VEC *y) { FUNCNAME("dof_dot_d"); REAL dot; const DOF_ADMIN *admin = nil; int n; TEST_EXIT(x && y, "pointer to DOF_REAL_D_VEC is nil: x: %p, y: %p\n", x, y); TEST_EXIT(x->fe_space && y->fe_space, "pointer to FE_SPACE is nil: x->fe_space: %p, y->fe_space: %p\n", x->fe_space, y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or admins: x->fe_space->admin: %p, y->fe_space->admin: %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); dot = 0.0; FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) dot += x->vec[dof][n] * y->vec[dof][n] ); return(dot); } void dof_copy_d(const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y) { FUNCNAME("dof_copy_d"); const DOF_ADMIN *admin = nil; int n; TEST_EXIT(x && y,"pointer to DOF_REAL_D_VEC is nil: x: %p, y: %p\n", x, y); TEST_EXIT(x->fe_space && y->fe_space, "pointer to FE_SPACE is nil: x->fe_space: %p, y->fe_space: %p\n", x->fe_space, y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or admins: x->fe_space->admin: %p, y->fe_space->admin: %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) y->vec[dof][n] = x->vec[dof][n]); } void dof_axpy_d(REAL alpha, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y) { FUNCNAME("dof_axpy_d"); const DOF_ADMIN *admin; int n; TEST_EXIT(x && y,"pointer to DOF_REAL_D_VEC is nil: x: %p, y: %p\n", x, y); TEST_EXIT(x->fe_space && y->fe_space, "pointer to FE_SPACE is nil: x->fe_space: %p, y->fe_space: %p\n", x->fe_space, y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or admins: x->fe_space->admin: %p, y->fe_space->admin: %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) y->vec[dof][n] += alpha * x->vec[dof][n]); } REAL dof_nrm2_d(const DOF_REAL_D_VEC *x) { FUNCNAME("dof_nrm2_d"); REAL nrm; int n; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); nrm = 0.0; FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) nrm += x->vec[dof][n] * x->vec[dof][n]); return(sqrt(nrm)); } void dof_xpay_d(REAL alpha, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y) { FUNCNAME("dof_xpay_d"); const DOF_ADMIN *admin; int n; TEST_EXIT(x && y,"pointer to DOF_REAL_D_VEC is nil: x: %p, y: %p\n", x, y); TEST_EXIT(x->fe_space && y->fe_space, "pointer to FE_SPACE is nil: x->fe_space: %p, y->fe_space: %p\n", x->fe_space, y->fe_space); TEST_EXIT((admin = x->fe_space->admin) && (admin == y->fe_space->admin), "no admin or admins: x->fe_space->admin: %p, y->fe_space->admin: %p\n", x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); TEST_EXIT(y->size >= admin->size_used, "y->size = %d too small: admin->size_used = %d\n", y->size, admin->size_used); FOR_ALL_DOFS(admin, for (n = 0; n < DIM_OF_WORLD; n++) y->vec[dof][n] = x->vec[dof][n] + alpha*y->vec[dof][n]); } REAL dof_min_d(const DOF_REAL_D_VEC *x) { FUNCNAME("dof_min_d"); REAL m, norm; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); m = 1.0E30; FOR_ALL_DOFS(admin, norm = NORM_DOW(x->vec[dof]); m = MIN(m, norm) ); return(m); } REAL dof_max_d(const DOF_REAL_D_VEC *x) { FUNCNAME("dof_max_d"); REAL m, norm; const DOF_ADMIN *admin = nil; TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin), "pointer is nil: %p, %p\n", x, admin); TEST_EXIT(x->size >= admin->size_used, "x->size = %d too small: admin->size_used = %d\n", x->size, admin->size_used); m = 0.0; FOR_ALL_DOFS(admin, norm = NORM_DOW(x->vec[dof]); m = MAX(m, norm) ); return(m); } void dof_gemv(MatrixTranspose transpose, REAL alpha, const DOF_MATRIX *a, const DOF_REAL_VEC *x, REAL beta, DOF_REAL_VEC *y) { FUNCNAME("dof_gemv"); int j, jcol, ysize; REAL sum, ax; REAL *xvec, *yvec; MATRIX_ROW *row; const DOF_ADMIN *row_admin = nil, *col_admin = nil; TEST_EXIT(a && x && y,"pointer is nil: %p, %p, %p\n", a,x,y); TEST_EXIT(a->row_fe_space && a->col_fe_space && x->fe_space && y->fe_space, "Missing fe_space!\nMatrix row fe_space: %p\nMatrix column fe_space: %p\nX vector fe_space: %p\nY vector fe_space: %p\n", a->row_fe_space, a->col_fe_space, x->fe_space,y->fe_space); TEST_EXIT((row_admin = a->row_fe_space->admin) && (col_admin = a->col_fe_space->admin) && (col_admin == x->fe_space->admin) && (row_admin == y->fe_space->admin), "No admin or non-matching admins!\nMatrix row admin: %p\nMatrix column admin: %p\nX vector admin: %p\nY vector admin: %p\n", a->row_fe_space->admin, a->col_fe_space->admin, x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= col_admin->size_used, "x->size = %d too small: col_admin->size_used = %d\n", x->size, col_admin->size_used); TEST_EXIT(y->size >= row_admin->size_used, "y->size = %d too small: row_admin->size_used = %d\n", y->size, row_admin->size_used); TEST_EXIT(a->size >= row_admin->size_used, "a->size = %d too small: row_admin->size_used = %d\n", a->size, row_admin->size_used); xvec = x->vec; yvec = y->vec; ysize = y->size; FOR_ALL_FREE_DOFS(row_admin, if (dof < ysize) yvec[dof] = 0.0); if (transpose == NoTranspose) { FOR_ALL_DOFS(row_admin, sum = 0.0; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { sum += row->entry[j] * xvec[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } yvec[dof] = beta * yvec[dof] + alpha * sum; ); } else if (transpose == Transpose) { FOR_ALL_DOFS(row_admin, yvec[dof] *= beta ); FOR_ALL_DOFS(row_admin, ax = alpha * xvec[dof]; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) yvec[jcol] += ax * row->entry[j]; else if (jcol == NO_MORE_ENTRIES) break; } } ); } else { ERROR_EXIT("transpose=%d\n", transpose); } } /*--------------------------------------------------------------------------*/ void dof_mv(MatrixTranspose transpose, const DOF_MATRIX *a, const DOF_REAL_VEC *x, DOF_REAL_VEC *y) { FUNCNAME("dof_mv"); int j, jcol; REAL sum, ax, *xvec, *yvec; MATRIX_ROW *row; const DOF_ADMIN *row_admin = nil, *col_admin = nil; TEST_EXIT(a && x && y,"pointer is nil: %p, %p, %p\n", a,x,y); TEST_EXIT(a->row_fe_space && a->col_fe_space && x->fe_space && y->fe_space, "Missing fe_space!\nMatrix row fe_space: %p\nMatrix column fe_space: %p\nX vector fe_space: %p\nY vector fe_space: %p\n", a->row_fe_space, a->col_fe_space, x->fe_space,y->fe_space); TEST_EXIT((row_admin = a->row_fe_space->admin) && (col_admin = a->col_fe_space->admin) && (col_admin == x->fe_space->admin) && (row_admin == y->fe_space->admin), "No admin or non-matching admins!\nMatrix row admin: %p\nMatrix column admin: %p\nX vector admin: %p\nY vector admin: %p\n", a->row_fe_space->admin, a->col_fe_space->admin, x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= col_admin->size_used, "x->size = %d too small: col_admin->size_used = %d\n", x->size, col_admin->size_used); TEST_EXIT(y->size >= row_admin->size_used, "y->size = %d too small: row_admin->size_used = %d\n", y->size, row_admin->size_used); TEST_EXIT(a->size >= row_admin->size_used, "a->size = %d too small: row_admin->size_used = %d\n", a->size, row_admin->size_used); xvec = x->vec; yvec = y->vec; if (transpose == NoTranspose) { int ysize = y->size; FOR_ALL_FREE_DOFS(row_admin, if (dof < ysize) yvec[dof] = 0.0); FOR_ALL_DOFS(row_admin, sum = 0.0; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { sum += row->entry[j] * xvec[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } yvec[dof] = sum; ); } else if (transpose == Transpose) { for (j = 0; j < row_admin->size_used; j++) yvec[j] = 0.0; FOR_ALL_DOFS(row_admin, ax = xvec[dof]; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { yvec[jcol] += ax * row->entry[j]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } ); } else { ERROR_EXIT("transpose=%d\n", transpose); } } void dof_gemv_d(MatrixTranspose transpose, REAL alpha, const DOF_MATRIX *a, const DOF_REAL_D_VEC *x, REAL beta, DOF_REAL_D_VEC *y) { FUNCNAME("dof_gemv_d"); int n, j, jcol; REAL_D sum, ax; REAL_D *xvec, *yvec; MATRIX_ROW *row; const DOF_ADMIN *row_admin = nil, *col_admin = nil; TEST_EXIT(a && x && y,"pointer is nil: %p, %p, %p\n", a,x,y); TEST_EXIT(a->row_fe_space && a->col_fe_space && x->fe_space && y->fe_space, "Missing fe_space!\nMatrix row fe_space: %p\nMatrix column fe_space: %p\nX vector fe_space: %p\nY vector fe_space: %p\n", a->row_fe_space, a->col_fe_space, x->fe_space,y->fe_space); TEST_EXIT((row_admin = a->row_fe_space->admin) && (col_admin = a->col_fe_space->admin) && (col_admin == x->fe_space->admin) && (row_admin == y->fe_space->admin), "No admin or non-matching admins!\nMatrix row admin: %p\nMatrix column admin: %p\nX vector admin: %p\nY vector admin: %p\n", a->row_fe_space->admin, a->col_fe_space->admin, x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= col_admin->size_used, "x->size = %d too small: col_admin->size_used = %d\n", x->size, col_admin->size_used); TEST_EXIT(y->size >= row_admin->size_used, "y->size = %d too small: row_admin->size_used = %d\n", y->size, row_admin->size_used); TEST_EXIT(a->size >= row_admin->size_used, "a->size = %d too small: row_admin->size_used = %d\n", a->size, row_admin->size_used); xvec = x->vec; yvec = y->vec; if (transpose == NoTranspose) { int ysize = y->size; FOR_ALL_FREE_DOFS(row_admin, if (dof < ysize) for (n = 0; n < DIM_OF_WORLD; n++) yvec[dof][n] = 0.0); FOR_ALL_DOFS(row_admin, for (n = 0; n < DIM_OF_WORLD; n++) sum[n] = 0.0; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { for (n = 0; n < DIM_OF_WORLD; n++) sum[n] += row->entry[j] * xvec[jcol][n]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } for (n = 0; n < DIM_OF_WORLD; n++) yvec[dof][n] = beta * yvec[dof][n] + alpha * sum[n]; ); } else if (transpose == Transpose) { FOR_ALL_DOFS(row_admin, for (n = 0; n < DIM_OF_WORLD; n++) { yvec[dof][n] *= beta; } ); FOR_ALL_DOFS(row_admin, for (n = 0; n < DIM_OF_WORLD; n++) ax[n] = alpha * xvec[dof][n]; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { for (n = 0; n < DIM_OF_WORLD; n++) yvec[jcol][n] += ax[n] * row->entry[j]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } ); } else { ERROR_EXIT("transpose=%d\n", transpose); } } void dof_mv_d(MatrixTranspose transpose, const DOF_MATRIX *a, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y) { FUNCNAME("dof_mv_d"); int n, j, jcol; REAL_D sum, ax; REAL_D *xvec, *yvec; MATRIX_ROW *row; const DOF_ADMIN *row_admin = nil, *col_admin = nil; TEST_EXIT(a && x && y,"pointer is nil: %p, %p, %p\n", a,x,y); TEST_EXIT(a->row_fe_space && a->col_fe_space && x->fe_space && y->fe_space, "Missing fe_space!\nMatrix row fe_space: %p\nMatrix column fe_space: %p\nX vector fe_space: %p\nY vector fe_space: %p\n", a->row_fe_space, a->col_fe_space, x->fe_space,y->fe_space); TEST_EXIT((row_admin = a->row_fe_space->admin) && (col_admin = a->col_fe_space->admin) && (col_admin == x->fe_space->admin) && (row_admin == y->fe_space->admin), "No admin or non-matching admins!\nMatrix row admin: %p\nMatrix column admin: %p\nX vector admin: %p\nY vector admin: %p\n", a->row_fe_space->admin, a->col_fe_space->admin, x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= col_admin->size_used, "x->size = %d too small: col_admin->size_used = %d\n", x->size, col_admin->size_used); TEST_EXIT(y->size >= row_admin->size_used, "y->size = %d too small: row_admin->size_used = %d\n", y->size, row_admin->size_used); TEST_EXIT(a->size >= row_admin->size_used, "a->size = %d too small: row_admin->size_used = %d\n", a->size, row_admin->size_used); xvec = x->vec; yvec = y->vec; if (transpose == NoTranspose) { int ysize = y->size; FOR_ALL_FREE_DOFS(row_admin, if (dof < ysize) for (n = 0; n < DIM_OF_WORLD; n++) yvec[dof][n] = 0.0); FOR_ALL_DOFS(row_admin, for (n = 0; n < DIM_OF_WORLD; n++) sum[n] = 0.0; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { for (n = 0; n < DIM_OF_WORLD; n++) sum[n] += row->entry[j] * xvec[jcol][n]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } for (n = 0; n < DIM_OF_WORLD; n++) yvec[dof][n] = sum[n]; ); } else if (transpose == Transpose) { for (j = 0; j < row_admin->size_used; j++) for (n = 0; n < DIM_OF_WORLD; n++) yvec[j][n] = 0.0; FOR_ALL_DOFS(row_admin, for (n = 0; n < DIM_OF_WORLD; n++) ax[n] = xvec[dof][n]; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { for (n = 0; n < DIM_OF_WORLD; n++) yvec[jcol][n] += ax[n] * row->entry[j]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } ); } else { ERROR_EXIT("transpose=%d\n", transpose); } } void dof_gemv_dowb(MatrixTranspose transpose, REAL alpha, const DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *x, REAL beta, DOF_REAL_D_VEC *y) { FUNCNAME("dof_gemv_dowb"); int j, jcol; REAL_D sum, ax; REAL_D *xvec, *yvec; DOWB_MATRIX_ROW *row; const DOF_ADMIN *row_admin = nil, *col_admin = nil; TEST_EXIT(a && x && y,"pointer is nil: %p, %p, %p\n", a,x,y); TEST_EXIT(a->row_fe_space && a->col_fe_space && x->fe_space && y->fe_space, "Missing fe_space!\nMatrix row fe_space: %p\nMatrix column fe_space: %p\nX vector fe_space: %p\nY vector fe_space: %p\n", a->row_fe_space, a->col_fe_space, x->fe_space,y->fe_space); TEST_EXIT((row_admin = a->row_fe_space->admin) && (col_admin = a->col_fe_space->admin) && (col_admin == x->fe_space->admin) && (row_admin == y->fe_space->admin), "No admin or non-matching admins!\nMatrix row admin: %p\nMatrix column admin: %p\nX vector admin: %p\nY vector admin: %p\n", a->row_fe_space->admin, a->col_fe_space->admin, x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= col_admin->size_used, "x->size = %d too small: col_admin->size_used = %d\n", x->size, col_admin->size_used); TEST_EXIT(y->size >= row_admin->size_used, "y->size = %d too small: row_admin->size_used = %d\n", y->size, row_admin->size_used); TEST_EXIT(a->size >= row_admin->size_used, "a->size = %d too small: row_admin->size_used = %d\n", a->size, row_admin->size_used); xvec = x->vec; yvec = y->vec; if (transpose == NoTranspose) { int ysize = y->size; FOR_ALL_FREE_DOFS(row_admin, if (dof < ysize) SET_DOW(0.0, yvec[dof])); #undef MAT_BODY #define MAT_BODY(F, C, P, S) \ FOR_ALL_DOFS(row_admin, { \ SET_DOW(0.0, sum); \ \ for (row = a->matrix_row[dof]; row; row = row->next) { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol)) { \ F##V_DOW(C P row->entry.S[j], xvec[jcol], sum); \ } \ else \ { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ AXPBY_DOW(alpha, sum, beta, yvec[dof], yvec[dof]); \ }); MAT_EMIT_BODY_SWITCH(a->type); } else if (transpose == Transpose) { FOR_ALL_DOFS(row_admin, AX_DOW(beta, yvec[dof])); #undef MAT_BODY #define MAT_BODY(F, C, P, S) \ FOR_ALL_DOFS(row_admin, { \ COPY_DOW(xvec[dof], ax); AX_DOW(alpha, ax); \ \ for (row = a->matrix_row[dof]; row; row = row->next) { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol)) { \ F##TV_DOW(C P row->entry.S[j], ax, yvec[jcol]); \ } else { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ }); MAT_EMIT_BODY_SWITCH(a->type); } else { ERROR_EXIT("transpose=%d\n", transpose); } } /* Multiply a DOF_REAL_D_VEC with a DOF_DOWB_MATRIX * */ void dof_mv_dowb(MatrixTranspose transpose, const DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *x, DOF_REAL_D_VEC *y) { FUNCNAME("dof_mv_dowb"); int j, jcol; REAL_D sum; REAL_D *xvec, *yvec; DOWB_MATRIX_ROW *row; const DOF_ADMIN *row_admin = nil, *col_admin = nil; TEST_EXIT(a && x && y,"pointer is nil: %p, %p, %p\n", a,x,y); TEST_EXIT(a->row_fe_space && a->col_fe_space && x->fe_space && y->fe_space, "Missing fe_space!\nMatrix row fe_space: %p\nMatrix column fe_space: %p\nX vector fe_space: %p\nY vector fe_space: %p\n", a->row_fe_space, a->col_fe_space, x->fe_space,y->fe_space); TEST_EXIT((row_admin = a->row_fe_space->admin) && (col_admin = a->col_fe_space->admin) && (col_admin == x->fe_space->admin) && (row_admin == y->fe_space->admin), "No admin or non-matching admins!\nMatrix row admin: %p\nMatrix column admin: %p\nX vector admin: %p\nY vector admin: %p\n", a->row_fe_space->admin, a->col_fe_space->admin, x->fe_space->admin, y->fe_space->admin); TEST_EXIT(x->size >= col_admin->size_used, "x->size = %d too small: col_admin->size_used = %d\n", x->size, col_admin->size_used); TEST_EXIT(y->size >= row_admin->size_used, "y->size = %d too small: row_admin->size_used = %d\n", y->size, row_admin->size_used); TEST_EXIT(a->size >= row_admin->size_used, "a->size = %d too small: row_admin->size_used = %d\n", a->size, row_admin->size_used); xvec = x->vec; yvec = y->vec; if (transpose == NoTranspose) { int ysize = y->size; FOR_ALL_FREE_DOFS(row_admin, if (dof < ysize) SET_DOW(0.0, yvec[dof])); #undef MAT_BODY #define MAT_BODY(F, C, P, S) \ FOR_ALL_DOFS(row_admin, { \ SET_DOW(0.0, sum); \ \ for (row = a->matrix_row[dof]; row; row = row->next) { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol)) { \ F##V_DOW(C P row->entry.S[j], xvec[jcol], sum); \ } else { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ COPY_DOW(sum, yvec[dof]); \ }); MAT_EMIT_BODY_SWITCH(a->type); } else if (transpose == Transpose) { TEST_EXIT(x != y, "x == y not implemented in transpose mode"); for (j = 0; j < row_admin->size_used; j++) { SET_DOW(0.0, yvec[j]); } #undef MAT_BODY #define MAT_BODY(F, C, P, S) \ FOR_ALL_DOFS(row_admin, { \ for (row = a->matrix_row[dof]; row; row = row->next) { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol)) { \ F##TV_DOW(C P row->entry.S[j], xvec[dof], yvec[jcol]); \ } else { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ }); MAT_EMIT_BODY_SWITCH(a->type); } else { ERROR_EXIT("transpose=%d\n", transpose); } } /*--------------------------------------------------------------------------*/ /* print_dof_matrix: print matrix in compressed format */ /*--------------------------------------------------------------------------*/ void print_dof_matrix(const DOF_MATRIX *matrix) { FUNCNAME("print_dof_matrix"); int i, j, jcol; MATRIX_ROW *row; for (i=0; isize; i++) { for (row = matrix->matrix_row[i]; row; row = row->next) { MSG("row %3d:",i); for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { print_msg(" (%3d,% .2e)", jcol, row->entry[j]); } } print_msg("\n"); } } return; } void print_dof_dowb_matrix(const DOF_DOWB_MATRIX *matrix) { FUNCNAME("print_dof_dowb_matrix"); int i, j, jcol, n, m; DOWB_MATRIX_ROW *row; for (i=0; i < matrix->size; i++) { if (matrix->matrix_row[i]) { for (n = 0; n < DIM_OF_WORLD; n++) { if (n == 0) { MSG("row %3d:",i); } else { MSG(" "); } for (row = matrix->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { if (n == 0) { print_msg(" |%3d", jcol); } else { print_msg(" | "); } switch (matrix->type) { case dowbm_full: for (m = 0; m < DIM_OF_WORLD; m++) { print_msg(" % .2e", row->entry.full[j][n][m]); } break; case dowbm_symm: switch (n) { case 0: for (m = 0; m < n; m++) { print_msg(" "); } for (m = 0; m < DIM_OF_WORLD-n; m++) { print_msg(" % .2e", row->entry.symm[j].row0[m]); } break; case 1: for (m = 0; m < n; m++) { print_msg(" "); } for (m = 0; m < DIM_OF_WORLD-n; m++) { print_msg(" % .2e", row->entry.symm[j].row1[m]); } break; case 2: for (m = 0; m < n; m++) { print_msg(" "); } for (m = 0; m < DIM_OF_WORLD-n; m++) { print_msg(" % .2e", row->entry.symm[j].row2[m]); } break; default: ERROR_EXIT("DIM_OF_WORLD == %d unsupported", n + 1); } break; case dowbm_diag: for (m = 0; m < n; m++) { print_msg(" "); } print_msg(" % .2e", row->entry.diag[j][n]); for (; m < DIM_OF_WORLD; m++) { print_msg(" "); } break; } } } } print_msg("\n"); } } } } void print_dof_real_vec(const DOF_REAL_VEC *drv) { FUNCNAME("print_dof_real_vec"); int i, j; const DOF_ADMIN *admin = nil; char *format; if (drv->fe_space) admin = drv->fe_space->admin; MSG("Vec `%s':\n", drv->name); j = 0; if (admin) { if (admin->size_used > 100) format = "%s(%3d,%10.5le)"; else if (admin->size_used > 10) format = "%s(%2d,%10.5le)"; else format = "%s(%1d,%10.5le)"; FOR_ALL_DOFS(admin, if ((j % 3) == 0) { if (j) print_msg("\n"); MSG(format, "", dof, drv->vec[dof]); } else print_msg(format, " ", dof, drv->vec[dof]); j++; ); print_msg("\n"); } else { MSG("no DOF_ADMIN, print whole vector.\n"); for (i = 0; i < drv->size; i++) { if ((j % 3) == 0) { if (j) print_msg("\n"); MSG("(%d,%10.5le)",i,drv->vec[i]); } else print_msg(" (%d,%10.5le)",i,drv->vec[i]); j++; } print_msg("\n"); } return; } void print_dof_real_d_vec(const DOF_REAL_D_VEC *drdv) { FUNCNAME("print_dof_real_d_vec"); int i, j, k; const DOF_ADMIN *admin = nil; #if DIM_OF_WORLD < 2 static int per_line = 4; #else #if DIM_OF_WORLD < 4 static int per_line = 2; #else static int per_line = 1; #endif #endif if (drdv->fe_space) admin = drdv->fe_space->admin; MSG("Vec `%s':\n", drdv->name); j = 0; if (admin) { FOR_ALL_DOFS(admin, if ((j % per_line) == 0) { if (j) print_msg("\n"); MSG("(%3d:",dof); } else print_msg(" (%3d:", dof); for (k=0; k 0 ? ',':' '), drdv->vec[dof][k]); print_msg(")"); j++; ); print_msg("\n"); } else { MSG("no DOF_ADMIN, print whole vector.\n"); for (i = 0; i < drdv->size; i++) { if ((j % per_line) == 0) { if (j) print_msg("\n"); MSG("(%3d:",i); } else print_msg(" (%3d:", i); for (k=0; k 0 ? ',':' '), drdv->vec[i][k]); print_msg(")"); } print_msg("\n"); } return; } void print_dof_int_vec(const DOF_INT_VEC *div) { FUNCNAME("print_dof_int_vec"); int i, j; const DOF_ADMIN *admin = nil; char *format; if (div->fe_space) admin = div->fe_space->admin; MSG("Vector `%s':\n", div->name); j = 0; if (admin) { if (admin->size_used > 100) format = "%s(%3d,%3d)"; else if (admin->size_used > 10) format = "%s(%2d,%3d)"; else format = "%s(%1d,%3d)"; FOR_ALL_DOFS(admin, if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", dof,div->vec[dof]); } else print_msg(format, " ", dof, div->vec[dof]); j++; ); print_msg("\n"); } else { if (div->size > 100) format = "%s(%3d,%3d)"; else if (div->size > 10) format = "%s(%2d,%3d)"; else format = "%s(%1d,%3d)"; for (i = 0; i < div->size; i++) { if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", i, div->vec[i]); } else print_msg(format, " ", i, div->vec[i]); j++; } print_msg("\n"); } return; } void print_dof_uchar_vec(const DOF_UCHAR_VEC *duv) { FUNCNAME("print_dof_uchar_vec"); int i, j; const DOF_ADMIN *admin = nil; char *format; if (duv->fe_space) admin = duv->fe_space->admin; MSG("Vector `%s':\n", duv->name); j = 0; if (admin) { if (admin->size_used > 100) format = "%s(%3d,0x%2X)"; else if (admin->size_used > 10) format = "%s(%2d,0x%2X)"; else format = "%s(%1d,0x%2X)"; FOR_ALL_DOFS(admin, if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", dof, duv->vec[dof]); } else print_msg(format, " ", dof, duv->vec[dof]); j++; ); print_msg("\n"); } else { if (duv->size > 100) format = "%s(%3d,0x%2X)"; else if (duv->size > 10) format = "%s(%2d,0x%2X)"; else format = "%s(%1d,0x%2X)"; for (i = 0; i < duv->size; i++) { if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", i, duv->vec[i]); } else print_msg(format, " ", i, duv->vec[i]); j++; } print_msg("\n"); } return; } void print_dof_schar_vec(const DOF_SCHAR_VEC *dsv) { FUNCNAME("print_dof_schar_vec"); int i, j; const DOF_ADMIN *admin = nil; char *format; if (dsv->fe_space) admin = dsv->fe_space->admin; MSG("Vector `%s':\n", dsv->name); j = 0; if (admin) { if (admin->size_used > 100) format = "%s(%3d,0x%2X)"; else if (admin->size_used > 10) format = "%s(%2d,0x%2X)"; else format = "%s(%1d,0x%2X)"; FOR_ALL_DOFS(admin, if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "",dof,dsv->vec[dof]); } else print_msg(format, " ",dof,dsv->vec[dof]); j++; ); print_msg("\n"); } else { if (dsv->size > 100) format = "%s(%3d,0x%2X)"; else if (dsv->size > 10) format = "%s(%2d,0x%2X)"; else format = "%s(%1d,0x%2X)"; for (i = 0; i < dsv->size; i++) { if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", i, dsv->vec[i]); } else print_msg(format, " ", i, dsv->vec[i]); j++; } print_msg("\n"); } return; } void print_dof_ptr_vec(const DOF_PTR_VEC *dpv) { FUNCNAME("print_dof_ptr_vec"); int i, j; const DOF_ADMIN *admin = nil; char *format; if (dpv->fe_space) admin = dpv->fe_space->admin; MSG("Vector `%s':\n", dpv->name); j = 0; if (admin) { if (admin->size_used > 100) format = "%s(%3d,%p)"; else if (admin->size_used > 10) format = "%s(%2d,%p)"; else format = "%s(%1d,%p)"; FOR_ALL_DOFS(admin, if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", dof,dpv->vec[dof]); } else print_msg(format, " ",dof,dpv->vec[dof]); j++; ); print_msg("\n"); } else { if (dpv->size > 100) format = "%s(%3d,%p)"; else if (dpv->size > 10) format = "%s(%2d,%p)"; else format = "%s(%1d,%p)"; for (i = 0; i < dpv->size; i++) { if ((j % 5) == 0) { if (j) print_msg("\n"); MSG(format, "", i, dpv->vec[i]); } else print_msg(format, " ", i, dpv->vec[i]); j++; } print_msg("\n"); } return; } /*--------------------------------------------------------------------------*/ /* clear_dof_matrix: remove all entries from dof_matrix */ /*--------------------------------------------------------------------------*/ void clear_dof_matrix(DOF_MATRIX *matrix) { int i; MATRIX_ROW *row, *next; for (i=0; isize; i++) { for (row = matrix->matrix_row[i]; row; row = next) { next = row->next; free_matrix_row(matrix->row_fe_space, row); } matrix->matrix_row[i] = nil; } return; } /*--------------------------------------------------------------------------*/ /* clear_dof_dobw_matrix: remove all entries from dof_matrix */ /*--------------------------------------------------------------------------*/ void clear_dof_dowb_matrix(DOF_DOWB_MATRIX *matrix) { int i; DOWB_MATRIX_ROW *row, *next; for (i=0; isize; i++) { for (row = matrix->matrix_row[i]; row; row = next) { next = row->next; free_dowb_matrix_row(matrix->row_fe_space, matrix->type, row); } matrix->matrix_row[i] = nil; } } /*--------------------------------------------------------------------------*/ /* test_dof_matrix */ /*--------------------------------------------------------------------------*/ void test_dof_matrix(DOF_MATRIX *matrix) { FUNCNAME("test_dof_matrix"); int i, j, jcol, k,kcol; MATRIX_ROW *row, *row2; int non_symmetric, found; double sum; /* test symmetry */ non_symmetric = 0; for (i=0; isize; i++) { sum = 0.0; for (row = matrix->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { found = 0; if (row->entry[j] != row->entry[j]) { MSG("mat[%d,%d]=%10.5le ???\n", i,jcol,row->entry[j]); WAIT; } for (row2 = matrix->matrix_row[jcol]; row2; row2 = row2 ? row2->next : nil) { for (k=0; kcol[k]; if (ENTRY_USED(kcol)) { if (kcol==i) { found = 1; if (ABS(row2->entry[k] - row->entry[j]) > 1.E-5) { non_symmetric = 1; MSG("mat[%d,%d]=%10.5le != mat[%d,%d]=%10.5le\n", i,jcol,row->entry[j], jcol,i,row2->entry[k]); } row2 = nil; break; } } } } if (!found) { non_symmetric = 1; MSG("mat[%d,%d] not found\n",jcol,i); } } } } if (ABS(sum) > 1.E-5) { MSG("Row sum[%d] = %10.5le\n", i, sum); } } if (non_symmetric) { MSG("matrix `%s' not symmetric.\n",matrix->name); WAIT; } else { MSG("matrix `%s' is symmetric.\n",matrix->name); } return; } /*--------------------------------------------------------------------------*/ /* test_dof_dowb_matrix */ /*--------------------------------------------------------------------------*/ void test_dof_dowb_matrix(DOF_DOWB_MATRIX *matrix) { FUNCNAME("test_dof_matrix"); int i, j, jcol, k,kcol; DOWB_MATRIX_ROW *row, *row2; int non_symmetric, found; double sum; /* test symmetry */ non_symmetric = 0; for (i=0; isize; i++) { sum = 0.0; for (row = matrix->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { found = 0; for (row2 = matrix->matrix_row[jcol]; row2; row2 = row2 ? row2->next : nil) { for (k=0; kcol[k]; if (ENTRY_USED(kcol)) { if (kcol==i) { found = 1; switch (matrix->type) { case dowbm_full: if (MDST2_DOW(row2->entry.full[k], row->entry.full[j]) > 1.E-10) { non_symmetric = 1; MSG("mat[%d,%d]="MFORMAT_DOW \ " != mat[%d,%d]="MFORMAT_DOW"\n", i, jcol, MEXPAND_DOW(row->entry.full[j]), jcol, i, MEXPAND_DOW(row2->entry.full[k])); } row2 = nil; break; case dowbm_symm: if (MDST2_DOW(row2->entry.full[k], row->entry.full[j]) > 1.E-10) { non_symmetric = 1; MSG("mat[%d,%d]="SMFORMAT_DOW \ " != mat[%d,%d]="SMFORMAT_DOW"\n", i, jcol, SMEXPAND_DOW(&row->entry.symm[j]), jcol, i, SMEXPAND_DOW(&row2->entry.symm[k])); } row2 = nil; break; case dowbm_diag: if (DST2_DOW(row2->entry.diag[k], row->entry.diag[j]) > 1.E-10) { non_symmetric = 1; MSG("mat[%d,%d]="DMFORMAT_DOW \ " != mat[%d,%d]="DMFORMAT_DOW"\n", i, jcol, DMEXPAND_DOW(row->entry.diag[j]), jcol, i, DMEXPAND_DOW(row2->entry.diag[k])); } row2 = nil; break; } if (row2 == nil) { break; } } } } if (!found) { non_symmetric = 1; MSG("mat[%d,%d] not found\n",jcol,i); } } } } if (ABS(sum) > 1.E-5) { MSG("Row sum[%d] = %10.5le\n", i, sum); } } } if (non_symmetric) { MSG("matrix `%s' not symmetric.\n",matrix->name); WAIT; } else { MSG("matrix `%s' is symmetric.\n",matrix->name); } return; } /*--------------------------------------------------------------------------*/ /* the new update routines: */ /*--------------------------------------------------------------------------*/ void add_element_matrix(DOF_MATRIX *matrix, REAL sign, int n_row, int n_col, const DOF *row_dof, const DOF *col_dof, const REAL **el_mat, const S_CHAR *bound) { FUNCNAME("add_element_matrix"); DOF i, j, k, irow, jcol; int free_col=0; MATRIX_ROW *row, *free_row; TEST_EXIT(matrix,"no matrix\n"); if (!col_dof || n_col <= 0) { col_dof = row_dof; n_col = n_row; } if (row_dof != col_dof && bound) ERROR_EXIT("no boundary treatment for row_dof != col_dof\n"); for (i = 0; i < n_row; i++) { irow = row_dof[i]; if (matrix->matrix_row[irow] == nil) { row = matrix->matrix_row[irow] = get_matrix_row(matrix->row_fe_space); if (row_dof == col_dof) { row->col[0] = irow; /* first entry is diagonal element */ if (bound && bound[i] >= DIRICHLET) { row->entry[0] = 1.0; continue; } else row->entry[0] = 0.0; } else { row->col[0] = UNUSED_ENTRY; } } else if (bound && bound[i] >= DIRICHLET) continue; for (j = 0; j < n_col; j++) { jcol = col_dof[j]; row = matrix->matrix_row[irow]; free_row = nil; do { for (k=0; kcol[k] == jcol) { row->entry[k] += sign*el_mat[i][j]; break; } if (ENTRY_NOT_USED(row->col[k])) { free_col = k; free_row = row; if (row->col[k] == NO_MORE_ENTRIES) { k = ROW_LENGTH; break; } } } if (k < ROW_LENGTH) break; /* done? */ if (row->next || free_row) { row = row->next; } else { free_row = row->next = get_matrix_row(matrix->row_fe_space); free_col = 0; row = nil; } } while (row); if (k >= ROW_LENGTH) /* not done? */ { free_row->col[free_col] = jcol; free_row->entry[free_col] = sign * el_mat[i][j]; } } } return; } void add_element_dowb_matrix(DOF_DOWB_MATRIX *matrix, REAL sign, int n_row, int n_col, const DOF *row_dof, const DOF *col_dof, const void **el_mat, const S_CHAR *bound) { FUNCNAME("add_element_dowb_matrix"); DOF i, j, k, irow, jcol; int free_col=0; const REAL_DD **el_mat_r = (const REAL_DD **)el_mat; const REAL_DDS **el_mat_s = (const REAL_DDS **)el_mat; const REAL_D **el_mat_d = (const REAL_D **)el_mat; DOWB_MATRIX_ROW *row, *free_row; TEST_EXIT(matrix,"no matrix\n"); if (!col_dof || n_col <= 0) { col_dof = row_dof; n_col = n_row; } if (row_dof != col_dof && bound) ERROR_EXIT("no boundary treatment for row_dof != col_dof\n"); for (i = 0; i < n_row; i++) { irow = row_dof[i]; if (matrix->matrix_row[irow] == nil) { row = matrix->matrix_row[irow] = get_dowb_matrix_row(matrix->row_fe_space, matrix->type); if (row_dof == col_dof) { row->col[0] = irow; /* first entry is diagonal element */ if (bound && bound[i] >= DIRICHLET) { switch(matrix->type) { case dowbm_full: MSET_DOW(1.0, row->entry.full[0]); break; case dowbm_symm: SMSET_DOW(1.0, &row->entry.symm[0]); break; case dowbm_diag: DMSET_DOW(1.0, row->entry.diag[0]); break; } continue; } else { switch(matrix->type) { case dowbm_full: MSET_DOW(0.0, row->entry.full[0]); break; case dowbm_symm: SMSET_DOW(0.0, &row->entry.symm[0]); break; case dowbm_diag: DMSET_DOW(0.0, row->entry.diag[0]); break; } } } else { row->col[0] = UNUSED_ENTRY; } } else if (bound && bound[i] >= DIRICHLET) continue; for (j = 0; j < n_col; j++) { jcol = col_dof[j]; row = matrix->matrix_row[irow]; free_row = nil; do { for (k=0; kcol[k] == jcol) { switch(matrix->type) { case dowbm_full: MAXPY_DOW(sign, (REAL_D *)el_mat_r[i][j], row->entry.full[k]); break; case dowbm_symm: SMAXPY_DOW(sign, &el_mat_s[i][j], &row->entry.symm[k]); break; case dowbm_diag: DMAXPY_DOW(sign, el_mat_d[i][j], row->entry.diag[k]); break; } break; } if (ENTRY_NOT_USED(row->col[k])) { free_col = k; free_row = row; if (row->col[k] == NO_MORE_ENTRIES) { k = ROW_LENGTH; break; } } } if (k < ROW_LENGTH) break; /* done? */ if (row->next || free_row) { row = row->next; } else { free_row = row->next = get_dowb_matrix_row(matrix->row_fe_space,matrix->type); free_col = 0; row = nil; } } while (row); if (k >= ROW_LENGTH) /* not done? */ { free_row->col[free_col] = jcol; switch (matrix->type) { case dowbm_full: MAXEY_DOW(sign, (REAL_D *)el_mat_r[i][j], free_row->entry.full[free_col]); break; case dowbm_symm: SMAXEY_DOW(sign, &el_mat_s[i][j], &free_row->entry.symm[free_col]); break; case dowbm_diag: DMAXEY_DOW(sign, el_mat_d[i][j], free_row->entry.diag[free_col]); break; } } } } return; } void add_element_vec(DOF_REAL_VEC *drv, REAL sign, int dim, const DOF *dof, const REAL *vec, const S_CHAR *bound) { FUNCNAME("add_element_vec"); REAL *drv_vec = nil; int i; GET_DOF_VEC(drv_vec,drv); if (bound) { for (i = 0; i < dim; i++) if (bound[i] < DIRICHLET) drv_vec[dof[i]] += sign*vec[i]; } else { for (i = 0; i < dim; i++) drv_vec[dof[i]] += sign*vec[i]; } return; } void add_element_d_vec(DOF_REAL_D_VEC *drdv, REAL sign, int dim, const DOF *dof, const REAL_D *vec, const S_CHAR *bound) { FUNCNAME("add_element_d_vec"); REAL_D *drdv_vec = nil; int i, n; GET_DOF_VEC(drdv_vec, drdv); if (bound) { for (i = 0; i < dim; i++) if (bound[i] < DIRICHLET) for (n = 0; n < DIM_OF_WORLD; n++) drdv_vec[dof[i]][n] += sign*vec[i][n]; } else { for (i = 0; i < dim; i++) for (n = 0; n < DIM_OF_WORLD; n++) drdv_vec[dof[i]][n] += sign*vec[i][n]; } return; } #define EL_BOUND(fct) !fct ? nil : (*fct) typedef struct dof_admin_traverse_data2 { const EL_MATRIX_INFO *el_mat_info; DOF_MATRIX *matrix; const EL_DOWB_MATRIX_INFO *el_dowb_mat_info; DOF_DOWB_MATRIX *dowb_matrix; const EL_VEC_INFO *el_vec_info; DOF_REAL_VEC *dof_real_vec; const EL_VEC_D_INFO *el_vec_d_info; DOF_REAL_D_VEC *dof_real_d_vec; } DOF_ADMIN_TRAVERSE_DATA2; static void update_matrix_fct(const EL_INFO *el_info, void *data) { DOF_ADMIN_TRAVERSE_DATA2 *ud = (DOF_ADMIN_TRAVERSE_DATA2 *)data; const REAL **mat; const DOF *row_dof, *col_dof; const S_CHAR *bound; int n_row, n_col; const EL *el = el_info->el; mat = (*ud->el_mat_info->el_matrix_fct)(el_info, ud->el_mat_info->fill_info); row_dof = ud->el_mat_info->get_row_dof(el, ud->el_mat_info->row_admin, nil); n_row = ud->el_mat_info->n_row; n_col = ud->el_mat_info->n_col; if (n_col > 0 && ud->el_mat_info->get_col_dof && ud->el_mat_info->col_admin) { col_dof = ud->el_mat_info->get_col_dof(el, ud->el_mat_info->col_admin, nil); } else { col_dof = row_dof; n_col = n_row; } if (col_dof == row_dof) bound = EL_BOUND(ud->el_mat_info->get_bound)(el_info, nil); else bound = nil; add_element_matrix(ud->matrix, ud->el_mat_info->factor, n_row, n_col, row_dof, col_dof, mat, bound); return; } static void update_dowb_matrix_fct(const EL_INFO *el_info, void *data) { DOF_ADMIN_TRAVERSE_DATA2 *ud = (DOF_ADMIN_TRAVERSE_DATA2 *)data; const void **mat; const DOF *row_dof, *col_dof; const S_CHAR *bound; int n_row, n_col; const EL *el = el_info->el; mat = (*ud->el_dowb_mat_info->el_matrix_fct) (el_info, ud->el_dowb_mat_info->fill_info); row_dof = ud->el_dowb_mat_info->get_row_dof (el, ud->el_dowb_mat_info->row_admin, nil); n_row = ud->el_dowb_mat_info->n_row; n_col = ud->el_dowb_mat_info->n_col; if (n_col > 0 && ud->el_dowb_mat_info->get_col_dof && ud->el_dowb_mat_info->col_admin) { col_dof = ud->el_dowb_mat_info->get_col_dof (el, ud->el_dowb_mat_info->col_admin, nil); } else { col_dof = row_dof; n_col = n_row; } if (col_dof == row_dof) bound = EL_BOUND(ud->el_dowb_mat_info->get_bound)(el_info, nil); else bound = nil; add_element_dowb_matrix(ud->dowb_matrix, ud->el_dowb_mat_info->factor, n_row, n_col, row_dof, col_dof, mat, bound); return; } void update_matrix(DOF_MATRIX *dof_matrix, const EL_MATRIX_INFO *minfo) { FUNCNAME("update_matrix"); DOF_ADMIN_TRAVERSE_DATA2 td[1] = {{0}}; FLAGS fill_flag; TEST_EXIT(minfo,"no EL_MATRIX_INFO\n"); TEST_EXIT(dof_matrix,"no DOF_MATRIX\n"); TEST_EXIT(dof_matrix->row_fe_space,"no row fe_space in DOF_MATRIX\n"); TEST_EXIT(dof_matrix->col_fe_space,"no column fe_space in DOF_MATRIX\n"); TEST_EXIT(minfo->row_admin == dof_matrix->row_fe_space->admin, "Row admins of EL_MATRIX_INFO and DOF_MATRIX don't match\n"); TEST_EXIT(minfo->col_admin == dof_matrix->col_fe_space->admin, "Column admins of EL_MATRIX_INFO and DOF_MATRIX don't match\n"); TEST_EXIT(minfo->el_matrix_fct,"no el_matrix_fct in EL_MATRIX_INFO\n"); td->matrix = dof_matrix; td->el_mat_info = minfo; if (minfo->get_bound) fill_flag = minfo->fill_flag|FILL_BOUND; else fill_flag = minfo->fill_flag; mesh_traverse(td->matrix->row_fe_space->mesh, -1, fill_flag, update_matrix_fct, td); return; } void update_dowb_matrix(DOF_DOWB_MATRIX *dof_matrix, const EL_DOWB_MATRIX_INFO *minfo) { FUNCNAME("update_dowb_matrix"); DOF_ADMIN_TRAVERSE_DATA2 td[1] = {{0}}; FLAGS fill_flag; TEST_EXIT(minfo,"no EL_DOWB_MATRIX_INFO\n"); TEST_EXIT(dof_matrix,"no DOF_DOWB_MATRIX\n"); TEST_EXIT(minfo->row_admin == dof_matrix->row_fe_space->admin, "Row admins of EL_DOWB_MATRIX_INFO and DOF_DOWB_MATRIX don't match\n"); TEST_EXIT(minfo->col_admin == dof_matrix->col_fe_space->admin, "Column admins of EL_DOWB_MATRIX_INFO and DOF_DOWB_MATRIX don't match\n"); TEST_EXIT(minfo->el_matrix_fct,"no el_matrix_fct in EL_DOWB_MATRIX_INFO\n"); td->dowb_matrix = dof_matrix; td->el_dowb_mat_info = minfo; if (minfo->get_bound) fill_flag = minfo->fill_flag|FILL_BOUND; else fill_flag = minfo->fill_flag; mesh_traverse(dof_matrix->row_fe_space->mesh, -1, fill_flag, update_dowb_matrix_fct, td); return; } static void update_vec_fct(const EL_INFO *el_info, void *data) { DOF_ADMIN_TRAVERSE_DATA2 *ud = (DOF_ADMIN_TRAVERSE_DATA2 *)data; const REAL *vec; const DOF *dof; const S_CHAR *bound; vec = (*ud->el_vec_info->el_vec_fct)(el_info, ud->el_vec_info->fill_info); dof = (*ud->el_vec_info->get_dof)(el_info->el, ud->el_vec_info->admin, nil); bound = EL_BOUND(ud->el_vec_info->get_bound)(el_info, nil); add_element_vec(ud->dof_real_vec, ud->el_vec_info->factor, ud->el_vec_info->n_dof, dof, vec, bound); return; } void update_real_vec(DOF_REAL_VEC *drv, const EL_VEC_INFO *vec_info) { FUNCNAME("update_real_vec"); DOF_ADMIN_TRAVERSE_DATA2 td[1] = {{0}}; FLAGS fill_flag; TEST_EXIT(vec_info,"no EL_VEC_INFO\n"); TEST_EXIT(vec_info->el_vec_fct,"no el_vec_fct in EL_VEC_INFO\n"); TEST_EXIT(drv,"no DOF_REAL_VEC\n"); td->dof_real_vec = drv; td->el_vec_info = vec_info; if (vec_info->get_bound) fill_flag = vec_info->fill_flag|FILL_BOUND; else fill_flag = vec_info->fill_flag; mesh_traverse(drv->fe_space->mesh, -1, fill_flag, update_vec_fct, td); return; } static void update_vec_d_fct(const EL_INFO *el_info, void *data) { DOF_ADMIN_TRAVERSE_DATA2 *ud = (DOF_ADMIN_TRAVERSE_DATA2 *)data; const REAL_D *vec; const DOF *dof; const S_CHAR *bound; vec = (*ud->el_vec_d_info->el_vec_fct) (el_info, ud->el_vec_d_info->fill_info); dof = (*ud->el_vec_d_info->get_dof) (el_info->el, ud->el_vec_d_info->admin, nil); bound = EL_BOUND(ud->el_vec_d_info->get_bound)(el_info, nil); add_element_d_vec(ud->dof_real_d_vec, ud->el_vec_d_info->factor, ud->el_vec_d_info->n_dof, dof, vec, bound); return; } void update_real_d_vec(DOF_REAL_D_VEC *drdv, const EL_VEC_D_INFO *vecd_info) { FUNCNAME("update_real_d_vec"); DOF_ADMIN_TRAVERSE_DATA2 td[1] = {{0}}; FLAGS fill_flag; TEST_EXIT(vecd_info,"no EL_VEC_D_INFO\n"); TEST_EXIT(vecd_info->el_vec_fct,"no el_vec_fct in EL_VEC_D_INFO\n"); TEST_EXIT(drdv,"no DOF_REAL_D_VEC\n"); td->el_vec_d_info = vecd_info; td->dof_real_d_vec = drdv; if (vecd_info->get_bound) fill_flag = vecd_info->fill_flag|FILL_BOUND; else fill_flag = vecd_info->fill_flag; mesh_traverse(drdv->fe_space->mesh, -1, fill_flag, update_vec_d_fct, td); return; } /*--------------------------------------------------------------------------*/ /* attempt to find a DOF_ADMIN structure which stores vertex DOFs */ /*--------------------------------------------------------------------------*/ const DOF_ADMIN *get_vertex_admin(MESH *mesh) { int i, n_admin = mesh->n_dof_admin; DOF_ADMIN **admins = mesh->dof_admin; const DOF_ADMIN *admin = nil; for (i = 0; i < n_admin; i++) { if (admins[i]->n_dof[VERTEX]) { if (!admin) admin = admins[i]; else if (admins[i]->size < admin->size) admin = admins[i]; } } if(!admin) { const int n_dof[N_NODE_TYPES] = {1,0,0,0}; const FE_SPACE *fe_space = nil; fe_space = get_fe_space(mesh, "Vertex DOF admin", n_dof, nil, 0); admin = fe_space->admin; MEM_FREE(fe_space, 1, FE_SPACE); } return(admin); } alberta-2.0.1/alberta/src/Common/element.c0000644000042300001440000001011110676724253015271 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: Common/element.c */ /* */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "element_0d.c" #include "element_1d.c" #if DIM_OF_WORLD > 1 #include "element_2d.c" #if DIM_OF_WORLD > 2 #include "element_3d.c" #endif #endif int *sorted_wall_indices(const int dim, int wall, int permno) { FUNCNAME("wall_orientation"); switch(dim) { case 0: WARNING("Does not makes sense for dim == 0!\n"); break; case 1: return sorted_wall_indices_1d(wall, permno); break; #if DIM_OF_WORLD > 1 case 2: return sorted_wall_indices_2d(wall, permno); break; #if DIM_OF_WORLD > 2 case 3: return sorted_wall_indices_3d(wall, permno); break; #endif #endif default: ERROR_EXIT("Illegal dim!\n"); } return nil; /* Statement is not reached. */ } int wall_orientation(const int dim, const EL *el, int wall, int **vecp) { FUNCNAME("wall_orientation"); switch(dim) { case 0: WARNING("Does not makes sense for dim == 0!\n"); break; case 1: return wall_orientation_1d(el, wall, vecp); break; #if DIM_OF_WORLD > 1 case 2: return wall_orientation_2d(el, wall, vecp); break; #if DIM_OF_WORLD > 2 case 3: return wall_orientation_3d(el, wall, vecp); break; #endif #endif default: ERROR_EXIT("Illegal dim!\n"); } return -1; /* Statement is not reached. */ } int *sort_wall_indices(const int dim, const EL *el, int wall, int *vec) { FUNCNAME("sort_wall_indices"); switch(dim) { case 0: WARNING("Does not makes sense for dim == 0!\n"); break; case 1: return sort_wall_indices_1d(el, wall, vec); break; #if DIM_OF_WORLD > 1 case 2: return sort_wall_indices_2d(el, wall, vec); break; #if DIM_OF_WORLD > 2 case 3: return sort_wall_indices_3d(el, wall, vec); break; #endif #endif default: ERROR_EXIT("Illegal dim!\n"); } return nil; /* Statement is not reached. */ } alberta-2.0.1/alberta/src/Common/error.c0000644000042300001440000007030610676724253015005 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: error.c */ /* */ /* description: routines for computing different types of errors */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" static const QUAD_FAST *quad_fast = nil; static int relative; /*--------------------------------------------------------------------------*/ /* discrete solution */ /*--------------------------------------------------------------------------*/ static const DOF_REAL_VEC *err_uh; static const DOF_REAL_D_VEC *err_uh_d; static const BAS_FCTS *bas_fcts; /*--------------------------------------------------------------------------*/ /* data on a single element */ /*--------------------------------------------------------------------------*/ static const EL_INFO *elinfo; static const REAL *(*get_real_vec_el)(const EL *, const DOF_REAL_VEC *, REAL *); static const REAL_D *(*get_real_d_vec_el)(const EL *, const DOF_REAL_D_VEC *, REAL_D *); static REAL *(*rw_error)(EL *el); static PARAMETRIC *el_parametric = nil; /*--------------------------------------------------------------------------*/ /* functions handed over to the error routines evaluated in local */ /* coordinates */ /*--------------------------------------------------------------------------*/ static REAL (*p_u)(const REAL_D); static REAL err_u(const REAL lambda[N_LAMBDA]) { REAL_D x[1]; if (el_parametric) { el_parametric->coord_to_world(elinfo, nil, 1, (const REAL (*)[N_LAMBDA])lambda, x); } else { coord_to_world(elinfo, lambda, *x); } return((*p_u)(x[0])); } static const REAL *(*p_u_d)(const REAL_D, REAL_D); static const REAL *err_u_d(const REAL lambda[N_LAMBDA]) { REAL_D x[1]; if (el_parametric) { el_parametric->coord_to_world(elinfo, nil, 1, (const REAL (*)[N_LAMBDA])lambda, x); } else { coord_to_world(elinfo, lambda, x[0]); } return((*p_u_d)(x[0], nil)); } static const REAL *(*p_grd_u)(const REAL_D, REAL_D); static const REAL *err_grd_u(const REAL lambda[N_LAMBDA]) { REAL_D x[1]; if (el_parametric) { el_parametric->coord_to_world(elinfo, nil, 1, (const REAL (*)[N_LAMBDA])lambda, x); } else { coord_to_world(elinfo, lambda, *x); } return((*p_grd_u)(x[0], nil)); } static const REAL_D *(*p_grd_u_d)(const REAL_D, REAL_DD); static const REAL_D *err_grd_u_d(const REAL lambda[N_LAMBDA]) { REAL_D x[1]; if (el_parametric) { el_parametric->coord_to_world(elinfo, nil, 1, (const REAL (*)[N_LAMBDA])lambda, x); } else { coord_to_world(elinfo, lambda, *x); } return((*p_grd_u_d)(x[0], nil)); } /*--------------------------------------------------------------------------*/ /* and now, the error functions :-))) */ /*--------------------------------------------------------------------------*/ typedef struct err_traverse_data { REAL max_err; REAL rel_norm2; REAL l2_err_2, l2_norm2; REAL h1_err_2, h1_norm2; } ERR_TRAVERSE_DATA; /*--------------------------------------------------------------------------*/ /* max error at the quadrature points :-))) */ /*--------------------------------------------------------------------------*/ static void max_err_at_qp_fct(const EL_INFO *el_info, void *data) { int i; REAL err; const REAL *u_vec, *uh_vec, *uh_el; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } u_vec = f_at_qp(quad_fast->quad, err_u, nil); uh_el = (*get_real_vec_el)(el_info->el, err_uh, nil); uh_vec = uh_at_qp(quad_fast, uh_el, nil); for (i = 0; i < quad_fast->n_points; i++) { err = u_vec[i] > uh_vec[i] ? u_vec[i] - uh_vec[i] : uh_vec[i] - u_vec[i]; ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, err); } return; } /*--------------------------------------------------------------------------*/ /* max error at the quadrutare points of quadrature formula of degree */ /* of the continous function u and discrete function uh */ /*--------------------------------------------------------------------------*/ REAL max_err_at_qp(REAL (*u)(const REAL_D), const DOF_REAL_VEC *uh, const QUAD *quad) { FUNCNAME("max_err_at_qp"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe_space; if (!(p_u = u)) { ERROR("no function u specified; doing nothing\n"); return(-1.0); } if (!(err_uh = uh) || !(fe_space = uh->fe_space)) { ERROR("no discrete function or no fe_space for it; doing nothing\n"); return(-1.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(-1.0); } if (!(bas_fcts = fe_space->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(-1.0); } if (!quad) quad = get_quadrature(bas_fcts->dim, 2*bas_fcts->degree-2); quad_fast = get_quad_fast(bas_fcts, quad, INIT_PHI); get_real_vec_el = fe_space->bas_fcts->get_real_vec; td->max_err = 0.0; mesh_traverse(fe_space->mesh,-1,FILL_COORDS|CALL_LEAF_EL, max_err_at_qp_fct, td); return(td->max_err); } /*--------------------------------------------------------------------------*/ /* max error at the vertices of the grid :-))) */ /*--------------------------------------------------------------------------*/ static REAL vl[N_LAMBDA][N_LAMBDA] = {{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}; static void max_err_at_v_fct(const EL_INFO *el_info, void *data) { int i; int dim = el_info->mesh->dim; REAL err; const REAL *uh_el; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } uh_el = get_real_vec_el(el_info->el, err_uh, nil); for (i = 0; i < N_VERTICES(dim); i++) { err = err_u(vl[i]) - eval_uh(vl[i], uh_el, bas_fcts); err = ABS(err); ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, err); } return; } /*--------------------------------------------------------------------------*/ /* max error at the quadrutare points of quadrature formula of degree */ /* of the continous function u and discrete function uh */ /*--------------------------------------------------------------------------*/ REAL max_err_at_vert(REAL (*u)(const REAL_D), const DOF_REAL_VEC *uh) { FUNCNAME("max_err_at_vert"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe_space; if (!(p_u = u)) { ERROR("no function u specified; doing nothing\n"); return(-1.0); } if (!(err_uh = uh) || !(fe_space = uh->fe_space)) { ERROR("no discrete function or no fe_space for it; doing nothing\n"); return(-1.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(-1.0); } if (!(bas_fcts = fe_space->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(-1.0); } get_real_vec_el = fe_space->bas_fcts->get_real_vec; td->max_err = 0.0; mesh_traverse(fe_space->mesh,-1,FILL_COORDS|CALL_LEAF_EL, max_err_at_v_fct, td); return(td->max_err); } /*--------------------------------------------------------------------------*/ /* function for setting relative error on the elements: used by both */ /* h1_err and l2_err */ /*--------------------------------------------------------------------------*/ static void rel_fct(const EL_INFO *el_info, void *data) { REAL *exact = rw_error(el_info->el); *exact /= ((ERR_TRAVERSE_DATA *)data)->rel_norm2; return; } /*--------------------------------------------------------------------------*/ /* L2 error on the mesh */ /*--------------------------------------------------------------------------*/ static void l2_err_fct(const EL_INFO *el_info, void *data) { int i, dim = el_info->mesh->dim; REAL err, l2_err_el, norm_el, exact; REAL det[MAX_N_QUAD_POINTS]; const REAL *uh_el, *u_vec, *uh_vec; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } u_vec = f_at_qp(quad_fast->quad, err_u, nil); uh_el = (*get_real_vec_el)(el_info->el, err_uh, nil); uh_vec = uh_at_qp(quad_fast, uh_el, nil); if (el_parametric) { el_parametric->det(el_info, quad_fast->quad, 0, nil, det); for (l2_err_el = i = 0; i < quad_fast->n_points; i++) { err = u_vec[i] - uh_vec[i]; l2_err_el += det[i] * quad_fast->w[i] * SQR(err); } exact = l2_err_el; if (relative) for (i = 0; i < quad_fast->n_points; i++) ((ERR_TRAVERSE_DATA *)data)->l2_norm2 += det[i] * quad_fast->w[i] * SQR(u_vec[i]); } else { switch(dim) { case 1: det[0] = el_det_1d(el_info); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_det_2d(el_info); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_det_3d(el_info); #endif #endif } for (l2_err_el = i = 0; i < quad_fast->n_points; i++) { err = u_vec[i] - uh_vec[i]; l2_err_el += quad_fast->w[i]*SQR(err); } exact = det[0]*l2_err_el; if (relative) { for (norm_el = i = 0; i < quad_fast->n_points; i++) norm_el += quad_fast->w[i]*SQR(u_vec[i]); ((ERR_TRAVERSE_DATA *)data)->l2_norm2 += det[0]*norm_el; } } ((ERR_TRAVERSE_DATA *)data)->l2_err_2 += exact; ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, exact); if (rw_error) *(*rw_error)(el_info->el) = exact; return; } REAL L2_err(REAL (*u)(const REAL_D), const DOF_REAL_VEC *uh, const QUAD *quad, int rel_err, REAL *(*rw_err_el)(EL *), REAL *max_l2_err2) { FUNCNAME("L2_err"); ERR_TRAVERSE_DATA td[1] ={{0}}; const FE_SPACE *fe_space; if (!(p_u = u)) { ERROR("no function u specified; doing nothing\n"); return(0.0); } if (!(err_uh = uh) || !(fe_space = uh->fe_space)) { ERROR("no discrete function or no fe_space for it; doing nothing\n"); return(0.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(0.0); } if (!(bas_fcts = fe_space->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(0.0); } if (!quad) quad = get_quadrature(fe_space->mesh->dim, 2*fe_space->bas_fcts->degree -2); quad_fast = get_quad_fast(bas_fcts, quad, INIT_PHI); get_real_vec_el = fe_space->bas_fcts->get_real_vec; relative = rel_err; rw_error = rw_err_el; td->max_err = td->l2_err_2 = td->l2_norm2 = 0.0; mesh_traverse(fe_space->mesh, -1, FILL_COORDS|CALL_LEAF_EL, l2_err_fct, td); if (relative) { td->rel_norm2 = td->l2_norm2+1.e-15; if (rw_error) mesh_traverse(fe_space->mesh, -1, CALL_LEAF_EL, rel_fct, td); td->l2_err_2 /= td->rel_norm2; } if (max_l2_err2) *max_l2_err2 = td->max_err; return(sqrt(td->l2_err_2)); } /*--------------------------------------------------------------------------*/ /* H1 error on the mesh */ /*--------------------------------------------------------------------------*/ static void h1_err_fct(const EL_INFO *el_info, void *data) { int i, j; int dim = el_info->mesh->dim; REAL err, err_2, h1_err_el, norm_el, norm2, exact; REAL det[MAX_N_QUAD_POINTS]; REAL_D Lambda[MAX_N_QUAD_POINTS][N_LAMBDA]; const REAL *uh_el; const REAL_D *grdu_vec, *grduh_vec; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } grdu_vec = grd_f_at_qp(quad_fast->quad, err_grd_u, nil); uh_el = (*get_real_vec_el)(el_info->el, err_uh, nil); if (el_parametric) { el_parametric->grd_lambda(el_info, quad_fast->quad, 0, nil, Lambda, det); grduh_vec = param_grd_uh_at_qp(quad_fast, Lambda, uh_el, nil); for (h1_err_el = i = 0; i < quad_fast->n_points; i++) { for (err_2 = j = 0; j < DIM_OF_WORLD; j++) { err = grdu_vec[i][j] - grduh_vec[i][j]; err_2 += SQR(err); } h1_err_el += det[i] * quad_fast->w[i]*err_2; } exact = h1_err_el; if (relative) { for (i = 0; i < quad_fast->n_points; i++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) norm2 += SQR(grdu_vec[i][j]); ((ERR_TRAVERSE_DATA *)data)->h1_norm2 += det[i] * quad_fast->w[i]*norm2; } } } else { switch(dim) { case 1: det[0] = el_grd_lambda_1d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_grd_lambda_2d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_grd_lambda_3d(el_info, Lambda[0]); #endif #endif } grduh_vec = grd_uh_at_qp(quad_fast, (const REAL_D *)Lambda[0], uh_el, nil); for (h1_err_el = i = 0; i < quad_fast->n_points; i++) { for (err_2 = j = 0; j < DIM_OF_WORLD; j++) { err = grdu_vec[i][j] - grduh_vec[i][j]; err_2 += SQR(err); } h1_err_el += quad_fast->w[i]*err_2; } exact = det[0]*h1_err_el; if (relative) { for (norm_el = i = 0; i < quad_fast->n_points; i++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) norm2 += SQR(grdu_vec[i][j]); norm_el += quad_fast->w[i]*norm2; } ((ERR_TRAVERSE_DATA *)data)->h1_norm2 += det[0]*norm_el; } } ((ERR_TRAVERSE_DATA *)data)->h1_err_2 += exact; ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, exact); if (rw_error) *(*rw_error)(el_info->el) = exact; return; } REAL H1_err(const REAL *(*grd_u)(const REAL_D, REAL_D), const DOF_REAL_VEC *uh, const QUAD *quad, int rel_err, REAL *(*rw_err_el)(EL *), REAL *max_h1_err2) { FUNCNAME("H1_err"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe_space; if (!(p_grd_u = grd_u)) { ERROR("no gradient function grd_u specified; doing nothing\n"); return(0.0); } if (!(err_uh = uh) || !(fe_space = uh->fe_space)) { ERROR("no discrete function or no fe_space for it; doing nothing\n"); return(0.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(0.0); } if (!(bas_fcts = fe_space->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(0.0); } if (!quad) quad = get_quadrature(fe_space->mesh->dim, 2*fe_space->bas_fcts->degree-2); quad_fast = get_quad_fast(bas_fcts, quad, INIT_GRD_PHI); get_real_vec_el = fe_space->bas_fcts->get_real_vec; relative = rel_err; rw_error = rw_err_el; /* if (!rw_error) MSG("rw_err_el nil pointer; can not write errors to elements\n"); */ td->max_err = td->h1_err_2 = td->h1_norm2 = 0.0; mesh_traverse(fe_space->mesh, -1, FILL_COORDS|CALL_LEAF_EL, h1_err_fct, td); if (relative) { td->rel_norm2 = td->h1_norm2+1.e-15; if (rw_error) mesh_traverse(fe_space->mesh, -1, CALL_LEAF_EL, rel_fct, td); td->h1_err_2 /= td->rel_norm2; td->max_err /= td->rel_norm2; } if (max_h1_err2) *max_h1_err2 = td->max_err; return(sqrt(td->h1_err_2)); } /*--------------------------------------------------------------------------*/ /* and now, the error functions for _d :-))) */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* max error at the quadrature points :-))) */ /*--------------------------------------------------------------------------*/ static void max_err_d_at_qp_fct(const EL_INFO *el_info, void *data) { int i, k; REAL err; const REAL_D *u_vec, *uh_vec, *uh_el; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } u_vec = f_d_at_qp(quad_fast->quad, err_u_d, nil); uh_el = (*get_real_d_vec_el)(el_info->el, err_uh_d, nil); uh_vec = uh_d_at_qp(quad_fast, uh_el, nil); for (i = 0; i < quad_fast->n_points; i++) { for (err = k = 0; k < DIM_OF_WORLD; k++) err += SQR(u_vec[i][k] - uh_vec[i][k]); ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, err); } return; } /*--------------------------------------------------------------------------*/ /* max error at the quadrature points of quadrature formula of degree */ /* of the continous function u and discrete function uh */ /*--------------------------------------------------------------------------*/ REAL max_err_d_at_qp(const REAL *(*u)(const REAL_D, REAL_D), const DOF_REAL_D_VEC *uh, const QUAD *quad) { FUNCNAME("max_err_d_at_qp"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe; if (!(p_u_d = u)) { ERROR("no function u specified; doing nothing\n"); return(0.0); } if (!(err_uh_d = uh) || !(fe = uh->fe_space)) { ERROR("no discrete function or no fe_space for it; doing nothing\n"); return(0.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(0.0); } if (!(bas_fcts = fe->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(0.0); } if (!quad) quad = get_quadrature(fe->mesh->dim, 2*bas_fcts->degree-2); quad_fast = get_quad_fast(bas_fcts, quad, INIT_PHI); get_real_d_vec_el = bas_fcts->get_real_d_vec; td->max_err = 0.0; mesh_traverse(fe->mesh, -1, FILL_COORDS|CALL_LEAF_EL, max_err_d_at_qp_fct, td); return sqrt(td->max_err); } /*--------------------------------------------------------------------------*/ /* L2_d error on the mesh */ /*--------------------------------------------------------------------------*/ static void l2_err_fct_d(const EL_INFO *el_info, void *data) { int i, k, dim = el_info->mesh->dim; REAL err = 0, l2_err_el, norm_el, exact; REAL det[MAX_N_QUAD_POINTS]; const REAL_D *uh_el, *u_vec, *uh_vec; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } u_vec = f_d_at_qp(quad_fast->quad, err_u_d, nil); uh_el = (*get_real_d_vec_el)(el_info->el, err_uh_d, nil); uh_vec = uh_d_at_qp(quad_fast, uh_el, nil); if (el_parametric) { el_parametric->det(el_info, quad_fast->quad, 0, nil, det); for (l2_err_el = i = 0; i < quad_fast->n_points; i++) { for (err = k = 0; k < DIM_OF_WORLD; k++) err += SQR(u_vec[i][k] - uh_vec[i][k]); l2_err_el += det[i] * quad_fast->w[i]*err; } exact = l2_err_el; if (relative) { for (i = 0; i < quad_fast->n_points; i++) { for (err = k = 0; k < DIM_OF_WORLD; k++) err += SQR(u_vec[i][k]); ((ERR_TRAVERSE_DATA *)data)->l2_norm2 += det[i] * quad_fast->w[i] * err; } } } else { switch(dim) { case 1: det[0] = el_det_1d(el_info); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_det_2d(el_info); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_det_3d(el_info); #endif #endif } for (l2_err_el = i = 0; i < quad_fast->n_points; i++) { for (err = k = 0; k < DIM_OF_WORLD; k++) err += SQR(u_vec[i][k] - uh_vec[i][k]); l2_err_el += quad_fast->w[i]*err; } exact = det[0]*l2_err_el; if (relative) { for (norm_el = i = 0; i < quad_fast->n_points; i++) for (err = k = 0; k < DIM_OF_WORLD; k++) err += SQR(u_vec[i][k]); norm_el += quad_fast->w[i]*err; ((ERR_TRAVERSE_DATA *)data)->l2_norm2 += det[0]*norm_el; } } ((ERR_TRAVERSE_DATA *)data)->l2_err_2 += exact; ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, exact); if (rw_error) *(*rw_error)(el_info->el) = exact; return; } REAL L2_err_d(const REAL *(*u)(const REAL_D, REAL_D), const DOF_REAL_D_VEC *uh, const QUAD *quad, int rel_err, REAL *(*rw_err_el)(EL *), REAL *max_l2_err2) { FUNCNAME("L2_err_d"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe; if (!(p_u_d = u)) { ERROR("no function u specified; doing nothing\n"); return(0.0); } if (!(err_uh_d = uh) || !(fe = uh->fe_space)) { ERROR("no discrete function or no fe_space for it; doing nothing\n"); return(0.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(0.0); } if (!(bas_fcts = fe->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(0.0); } if (!quad) quad = get_quadrature(fe->mesh->dim, 2*bas_fcts->degree -2); quad_fast = get_quad_fast(bas_fcts, quad, INIT_PHI); get_real_d_vec_el = bas_fcts->get_real_d_vec; relative = rel_err; rw_error = rw_err_el; td->max_err = td->l2_err_2 = td->l2_norm2 = 0.0; mesh_traverse(fe->mesh, -1, FILL_COORDS|CALL_LEAF_EL, l2_err_fct_d, td); if (relative) { td->rel_norm2 = td->l2_norm2+1.e-15; if (rw_error) mesh_traverse(fe->mesh, -1, CALL_LEAF_EL, rel_fct, td); td->l2_err_2 /= td->rel_norm2; } if (max_l2_err2) *max_l2_err2 = td->max_err; return(sqrt(td->l2_err_2)); } /*--------------------------------------------------------------------------*/ /* H1_d error on the mesh */ /*--------------------------------------------------------------------------*/ static void h1_err_fct_d(const EL_INFO *el_info, void *data) { int i, j, k, dim = el_info->mesh->dim; REAL err, err_2, h1_err_el, norm_el, norm2, exact; REAL det[MAX_N_QUAD_POINTS]; REAL_D Lambda[MAX_N_QUAD_POINTS][N_LAMBDA]; const REAL_D *uh_el; const REAL_DD *grdu_vec, *grduh_vec; PARAMETRIC *parametric = el_info->mesh->parametric; elinfo = el_info; if (parametric) { parametric->init_element(el_info, parametric); el_parametric = parametric; } else { el_parametric = nil; } grdu_vec = grd_f_d_at_qp(quad_fast->quad, err_grd_u_d, nil); uh_el = (*get_real_d_vec_el)(el_info->el, err_uh_d, nil); if (el_parametric) { el_parametric->grd_lambda(el_info, quad_fast->quad, 0, nil, Lambda, det); grduh_vec = param_grd_uh_d_at_qp(quad_fast, Lambda, uh_el, nil); for (h1_err_el = i = 0; i < quad_fast->n_points; i++) { for (err_2 = k = 0; k < DIM_OF_WORLD; k++) for (j = 0; j < DIM_OF_WORLD; j++) { err = grdu_vec[i][k][j] - grduh_vec[i][k][j]; err_2 += SQR(err); } h1_err_el += det[i] * quad_fast->w[i]*err_2; } exact = h1_err_el; if (relative) { for (i = 0; i < quad_fast->n_points; i++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) for (k = 0; k < DIM_OF_WORLD; k++) norm2 += SQR(grdu_vec[i][k][j]); ((ERR_TRAVERSE_DATA *)data)->h1_norm2 += det[i] * quad_fast->w[i]*norm2; } } } else { switch(dim) { case 1: det[0] = el_grd_lambda_1d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_grd_lambda_2d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_grd_lambda_3d(el_info, Lambda[0]); #endif #endif } grduh_vec = grd_uh_d_at_qp(quad_fast, (const REAL_D *)Lambda[0], uh_el, nil); for (h1_err_el = i = 0; i < quad_fast->n_points; i++) { for (err_2 = k = 0; k < DIM_OF_WORLD; k++) for (j = 0; j < DIM_OF_WORLD; j++) { err = grdu_vec[i][k][j] - grduh_vec[i][k][j]; err_2 += SQR(err); } h1_err_el += quad_fast->w[i]*err_2; } exact = det[0]*h1_err_el; if (relative) { for (norm_el = i = 0; i < quad_fast->n_points; i++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) for (k = 0; k < DIM_OF_WORLD; k++) norm2 += SQR(grdu_vec[i][k][j]); norm_el += quad_fast->w[i]*norm2; } ((ERR_TRAVERSE_DATA *)data)->h1_norm2 += det[0] * norm_el; } } ((ERR_TRAVERSE_DATA *)data)->h1_err_2 += exact; ((ERR_TRAVERSE_DATA *)data)->max_err = MAX(((ERR_TRAVERSE_DATA *)data)->max_err, exact); if (rw_error) *(*rw_error)(el_info->el) = exact; return; } REAL H1_err_d(const REAL_D *(*grd_u)(const REAL_D, REAL_DD), const DOF_REAL_D_VEC *uh, const QUAD *quad, int rel_err, REAL *(*rw_err_el)(EL *), REAL *max_h1_err2) { FUNCNAME("H1_err_d"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe; if (!(p_grd_u_d = grd_u)) { ERROR("no gradient function grd_u specified; doing nothing\n"); return(0.0); } if (!(err_uh_d = uh) || !(fe = uh->fe_space)) { ERROR("no discrete function or no admin for it; doing nothing\n"); return(0.0); } if (!uh->vec) { ERROR("no coefficient vector at discrete solution ; doing nothing\n"); return(0.0); } if (!(bas_fcts = fe->bas_fcts)) { ERROR("no basis functions at discrete solution ; doing nothing\n"); return(0.0); } if (!quad) quad = get_quadrature(fe->mesh->dim, 2*bas_fcts->degree-2); quad_fast = get_quad_fast(bas_fcts, quad, INIT_GRD_PHI); get_real_d_vec_el = bas_fcts->get_real_d_vec; relative = rel_err; rw_error = rw_err_el; td->max_err = td->h1_err_2 = td->h1_norm2 = 0.0; mesh_traverse(fe->mesh, -1, FILL_COORDS|CALL_LEAF_EL, h1_err_fct_d, td); if (relative) { td->rel_norm2 = td->h1_norm2+1.e-15; if (rw_error) mesh_traverse(fe->mesh, -1, CALL_LEAF_EL, rel_fct, td); td->h1_err_2 /= td->rel_norm2; td->max_err /= td->rel_norm2; } if (max_h1_err2) *max_h1_err2 = td->max_err; return(sqrt(td->h1_err_2)); } alberta-2.0.1/alberta/src/Common/estimator.c0000644000042300001440000007776410676724253015702 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: estimator.c */ /* */ /* description: residual error estimator for elliptic and parabolic */ /* problems */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* residual type estimator for quasi linear elliptic problem: */ /* -\div A \nabla u + f(.,u,\nabla u) = 0 */ /*--------------------------------------------------------------------------*/ struct ellipt_est_data { const DOF_REAL_VEC *uh; const BAS_FCTS *bas_fcts; const REAL_D (*A); int is_diag; REAL (*f)(const EL_INFO *, const QUAD *, int, REAL, const REAL_D); const QUAD_FAST *quad_fast; /*-- element integration -------------*/ const QUAD *quad; /*-- face integration -------------*/ REAL *(*rw_est)(EL *); REAL *(*rw_estc)(EL *); REAL *uh_el; /*-- vector for storing uh on el -----*/ FLAGS f_flag; int norm; /*-- estimated norm: H1_NORM/L2_NORM --*/ REAL C0, C1, C2; REAL est_sum; REAL est_max; }; static REAL h2_from_det(int dim, REAL det) { FUNCNAME("h2_from_det"); switch(dim) { case 1: return det*det; case 2: return det; case 3: return pow(det, 2.0/3.0); default: ERROR_EXIT("Illegal dim!\n"); return 0.0; /* shut up the compiler */ } } /*--------------------------------------------------------------------------*/ /* element residual: C0*h_S^2*||-div A nabla u^h + r||_L^2(S) (H^1) */ /* C0*h_S^4*||-div A nabla u^h + r||_L^2(S) (L^2) */ /*--------------------------------------------------------------------------*/ static REAL el_res2(const EL_INFO *el_info, const REAL_D *Lambda, REAL det, const struct ellipt_est_data *data) { const REAL_DD *D2uhqp; int dim = el_info->mesh->dim; REAL val, riq = 0.0, h2 = h2_from_det(dim, det), uh_qpi = 0.0; int iq, i, j; const REAL *uh_qp = nil, *grd_uh_qpi = nil; const REAL_D *grd_uh_qp = nil; const QUAD_FAST *quad_fast = data->quad_fast; const QUAD *quad = quad_fast->quad; if (data->quad_fast->bas_fcts->degree > 1) D2uhqp = D2_uh_at_qp(data->quad_fast, Lambda, data->uh_el, nil); else D2uhqp = nil; if (data->f) { if (data->f_flag & INIT_UH) uh_qp = uh_at_qp(quad_fast, data->uh_el, nil); else uh_qpi = 0.0; if (data->f_flag & INIT_GRD_UH) grd_uh_qp = grd_uh_at_qp(quad_fast, Lambda, data->uh_el, nil); else grd_uh_qpi = nil; } for (val = iq = 0; iq < quad->n_points; iq++) { if (data->f) { if (data->f_flag & INIT_UH) uh_qpi = uh_qp[iq]; if (data->f_flag & INIT_GRD_UH) grd_uh_qpi = grd_uh_qp[iq]; riq = (*data->f)(el_info, quad, iq, uh_qpi, grd_uh_qpi); } else riq = 0.0; if (D2uhqp) { if (data->is_diag) { for (i = 0; i < DIM_OF_WORLD; i++) riq -= data->A[i][i]*D2uhqp[iq][i][i]; } else { for (i = 0; i < DIM_OF_WORLD; i++) for (j = 0; j < DIM_OF_WORLD; j++) riq -= data->A[i][j]*D2uhqp[iq][i][j]; } } val += quad->w[iq]*SQR(riq); } if (data->norm == L2_NORM) val = data->C0*h2*h2*det*val; else val = data->C0*h2*det*val; return(val); } /*--------------------------------------------------------------------------*/ /* face residuals: C1*h_Gamma*||[A(u_h)]||_L^2(Gamma)^2 (H^1) */ /* C1*h_S^2*h_Gamma*||[A(u_h)]||_L^2(Gamma)^2 (L^2) */ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* 0.5(det_S + det_S') */ /*--------------------------------------------------------------------------*/ static REAL jump_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const struct ellipt_est_data *data) { EL_INFO neigh_info[1]; int dim = el_info->mesh->dim; int face_ind_el[dim], face_ind_neigh[dim]; EL *neigh = el_info->neigh[face]; int opp_v = el_info->opp_vertex[face]; int i, j, i1, i2, iq; REAL_D jump, grd_uh_el, grd_uh_neigh, Lambda_neigh[N_LAMBDA]; const REAL *uh_neigh; REAL det_neigh = 0.0, lambda[N_LAMBDA], val = 0.0; const BAS_FCTS *bas_fcts = data->uh->fe_space->bas_fcts; const QUAD *quad = data->quad; /*--------------------------------------------------------------------------*/ /* orient the edge/face => same quadrature nodes from both sides! */ /*--------------------------------------------------------------------------*/ sort_wall_indices(dim, el_info->el, face, face_ind_el); sort_wall_indices(dim, neigh, opp_v, face_ind_neigh); neigh_info->mesh = el_info->mesh; neigh_info->el = neigh; neigh_info->fill_flag = FILL_COORDS; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[opp_v][j] = el_info->opp_coord[face][j]; for (i = 0; i < dim; i++) { i1 = face_ind_el[i]; i2 = face_ind_neigh[i]; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[i2][j] = el_info->coord[i1][j]; } switch(dim) { case 1: det_neigh = el_grd_lambda_1d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 1 case 2: det_neigh = el_grd_lambda_2d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 2 case 3: det_neigh = el_grd_lambda_3d(neigh_info, Lambda_neigh); #endif #endif } uh_neigh = bas_fcts->get_real_vec(neigh, data->uh, nil); /*--------------------------------------------------------------------------*/ /* now eval the jump at all quadrature nodes */ /*--------------------------------------------------------------------------*/ for (val = iq = 0; iq < quad->n_points; iq++) { lambda[face] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_el[i]] = quad->lambda[iq][i]; eval_grd_uh(lambda, (const REAL_D *)Lambda, data->uh_el, bas_fcts, grd_uh_el); lambda[opp_v] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_neigh[i]] = quad->lambda[iq][i]; eval_grd_uh(lambda, (const REAL_D *)Lambda_neigh, uh_neigh, bas_fcts, grd_uh_neigh); if (data->is_diag) { for (i = 0; i < DIM_OF_WORLD; i++) jump[i] = data->A[i][i]*(grd_uh_el[i] - grd_uh_neigh[i]); } else { for (i = 0; i < DIM_OF_WORLD; i++) for (jump[i] = j = 0; j < DIM_OF_WORLD; j++) jump[i] += data->A[i][j]*(grd_uh_el[j] - grd_uh_neigh[j]); } val += quad->w[iq]*SCP_DOW(jump,jump); } det = 0.5*(det + det_neigh); if (data->norm == L2_NORM) return(data->C1 * h2_from_det(dim, det) * det * val); else return(data->C1 * det * val); } /*--------------------------------------------------------------------------*/ /* neuman residual: C1*h_Gamma*||A(u_h).normal||_L^2(Gamma)^2 (H^1) */ /* C1*h_S^2*h_Gamma*||A(u_h).normal]||_L^2(Gamma)^2 (L^2)*/ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* det_S */ /*--------------------------------------------------------------------------*/ static REAL neumann_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const struct ellipt_est_data *data) { int i, j, iq, dim = el_info->mesh->dim; REAL lambda[N_LAMBDA], n_A_grd_uh, val; REAL_D normal, grd_uh, A_grd_uh; const QUAD *quad = data->quad; switch(dim) { case 1: get_wall_normal_1d(el_info, face, normal); break; #if DIM_OF_WORLD > 1 case 2: get_wall_normal_2d(el_info, face, normal); break; #if DIM_OF_WORLD > 2 case 3: get_wall_normal_3d(el_info, face, normal); #endif #endif } for (val = iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < face; i++) lambda[i] = quad->lambda[iq][i]; lambda[face] = 0.0; for (i = face+1; i < dim+1; i++) lambda[i] = quad->lambda[iq][i-1]; eval_grd_uh(lambda, Lambda, data->uh_el, data->bas_fcts, grd_uh); if (data->is_diag) { for (i = 0; i < DIM_OF_WORLD; i++) A_grd_uh[i] = data->A[i][i]*grd_uh[i]; } else { for (i = 0; i < DIM_OF_WORLD; i++) for (A_grd_uh[i] = j = 0; j < DIM_OF_WORLD; j++) A_grd_uh[i] += data->A[i][j]*grd_uh[j]; } n_A_grd_uh = SCP_DOW(normal, A_grd_uh); val += quad->w[iq]*SQR(n_A_grd_uh); } if (data->norm == L2_NORM) return(data->C1*h2_from_det(dim, det)*det*val); else return(data->C1*det*val); } static int is_diag_matrix(const REAL_DD A) { int i,j ; for (i = 0; i < DIM_OF_WORLD; i++) for (j = i+1; j < DIM_OF_WORLD; j++) if (ABS(A[i][j]) > 1.e-25 || ABS(A[j][i]) > 1.e-25) return(false); return(true); } static struct ellipt_est_data ell_data[1]; static void clear_indicator_fct(const EL_INFO *el_info, void *data) { el_info->el->mark = 1; if (ell_data->rw_est) *(*ell_data->rw_est)(el_info->el) = 0.0; if (ell_data->rw_estc) *(*ell_data->rw_estc)(el_info->el) = 0.0; return; } static void ellipt_est_fct(const EL_INFO *el_info, void *data) { EL *el = el_info->el; REAL det = 0.0, est_el; REAL_D Lambda[N_LAMBDA]; int face; int dim = el_info->mesh->dim; const S_CHAR *bound = ((dim == 3) ? el_info->face_bound : el_info->edge_bound); EL *neigh; /*--- if rw_est, then there might already be contributions from jumps ------*/ est_el = ell_data->rw_est ? *(*ell_data->rw_est)(el) : 0.0; ell_data->bas_fcts->get_real_vec(el, ell_data->uh, ell_data->uh_el); switch(dim) { case 1: det = el_grd_lambda_1d(el_info, Lambda); break; #if DIM_OF_WORLD > 1 case 2: det = el_grd_lambda_2d(el_info, Lambda); break; #if DIM_OF_WORLD > 2 case 3: det = el_grd_lambda_3d(el_info, Lambda); #endif #endif } /*--- element residual ---------------------------------------------------*/ if (ell_data->C0) est_el += el_res2(el_info, (const REAL_D *)Lambda, det, ell_data); /*--- face residuals -----------------------------------------------------*/ if (dim > 1 && ell_data->C1) { for (face = 0; face < N_NEIGH(dim); face++) { if ((neigh = el_info->neigh[face])) { /*--------------------------------------------------------------------------*/ /* if rw_est is nil, compute jump for both neighbouring elements */ /* only this allows correct computation of est_max */ /* if rw_est is not nil, compute jump only once for each edge/face */ /* if neigh->mark: estimate not computed on neighbour! */ /* contribution for the element and for neighbour: 0.5*jump! */ /*--------------------------------------------------------------------------*/ if (!ell_data->rw_est || neigh->mark) { REAL est = jump_res2(el_info, face, (const REAL_D *)Lambda, det, ell_data); est_el += est; /*-- if rw_est, add neighbour contribution to neigbour indicator ---------*/ if (ell_data->rw_est) *(*ell_data->rw_est)(neigh) += est; } } else if (IS_NEUMANN(bound[face])) { est_el += neumann_res2(el_info, face, (const REAL_D *)Lambda, det, ell_data); } } } /*-- if rw_est, write indicator to element -------------------------------*/ if (ell_data->rw_est) *(*ell_data->rw_est)(el) = est_el; ell_data->est_sum += est_el; ell_data->est_max = MAX(ell_data->est_max, est_el); el_info->el->mark = 0; /*--- all contributions are computed! ------------*/ return; } /*--------------------------------------------------------------------------*/ REAL ellipt_est(const DOF_REAL_VEC *uh, ADAPT_STAT *adapt, REAL *(*rw_est)(EL *), REAL *(*rw_estc)(EL *), int degree, int norm, REAL C[3], const REAL_DD A, REAL (*f)(const EL_INFO *,const QUAD *,int,REAL,const REAL_D), FLAGS f_flag) { FUNCNAME("ellipt_est"); static WORKSPACE ws = {0, nil}; FLAGS fill_flag; const QUAD *quad; int dim; if (!(ell_data->uh = uh)) { MSG("no discrete solution; doing nothing\n"); return(0.0); } dim = uh->fe_space->mesh->dim; if(dim > 1) /* We need a vertex index to orient walls. */ get_vertex_admin(uh->fe_space->mesh); TEST_EXIT(!uh->fe_space->mesh->parametric, "Elliptic error estimator is not yet implemented for parametric meshes, sorry.\n"); ell_data->bas_fcts = uh->fe_space->bas_fcts; ell_data->A = A; if (dim == 1) ell_data->is_diag = true; else ell_data->is_diag = is_diag_matrix(A); ell_data->f = f; ell_data->f_flag = f_flag; if (degree < 0) degree = 2*ell_data->bas_fcts->degree; quad = get_quadrature(dim, degree); if (ell_data->bas_fcts->degree > 1) fill_flag = INIT_PHI|INIT_GRD_PHI|INIT_D2_PHI; else fill_flag = INIT_PHI|INIT_GRD_PHI; ell_data->quad_fast = get_quad_fast(ell_data->bas_fcts, quad, fill_flag); if(dim > 1) ell_data->quad = get_quadrature(dim-1, degree); ell_data->rw_est = rw_est; ell_data->rw_estc = rw_estc; REALLOC_WORKSPACE(&ws, ell_data->bas_fcts->n_bas_fcts*sizeof(REAL)); ell_data->uh_el = (REAL *)ws.work; ell_data->norm = norm; if (C) { ell_data->C0 = C[0] > 1.e-25 ? SQR(C[0]) : 0.0; if(dim > 1) { ell_data->C1 = C[1] > 1.e-25 ? SQR(C[1]) : 0.0; ell_data->C2 = C[2] > 1.e-25 ? SQR(C[2]) : 0.0; } } else if(dim == 1) ell_data->C0 = 1.0; else ell_data->C0 = ell_data->C1 = ell_data->C2 = 1.0; if (rw_est) /*--- clear error indicators -----------------------------*/ mesh_traverse(uh->fe_space->mesh, -1, CALL_LEAF_EL, clear_indicator_fct, nil); ell_data->est_sum = ell_data->est_max = 0.0; if(dim == 1) fill_flag = FILL_COORDS|CALL_LEAF_EL; else fill_flag = FILL_NEIGH|FILL_COORDS|FILL_OPP_COORDS|FILL_BOUND|CALL_LEAF_EL; mesh_traverse(uh->fe_space->mesh, -1, fill_flag, ellipt_est_fct, nil); ell_data->est_sum = sqrt(ell_data->est_sum); if (adapt) { adapt->err_sum = ell_data->est_sum; adapt->err_max = ell_data->est_max; } return(ell_data->est_sum); } /*--------------------------------------------------------------------------*/ /* */ /* error estimator for (nonlinear) heat equation: */ /* u_t - div A grad u + f(x,t,u,grad u) = 0 */ /* */ /* eta_h = C[0]*||h^2 ((U - Uold)/tau - div A grad U + f(x,t,U,grad U))|| */ /* + C[1]*|||h^1.5 [A grad U]||| */ /* eta_c = C[2]*||(Uold - Uold_coarse)/tau|| */ /* eta_t = C[3]*||U - Uold|| */ /* */ /* heat_est() return value is the TIME DISCRETIZATION ESTIMATE, eta_t */ /* */ /*--------------------------------------------------------------------------*/ struct heat_est_data { const DOF_REAL_VEC *uh, *uh_old; const BAS_FCTS *bas_fcts; const REAL_D (*A); int is_diag; REAL (*f)(const EL_INFO *, const QUAD *, int, REAL, REAL, const REAL_D); const QUAD_FAST *quad_fast; /*-- element integration -------------*/ const QUAD *quad; /*-- face integration -------------*/ REAL *(*rw_est)(EL *); REAL *(*rw_estc)(EL *); REAL *uh_el; /*-- vector for storing uh on el -----*/ REAL *uh_old_el; /*-- vector for storing uh on el -----*/ REAL *uh_qp; /*-- vector for storing uh at quadpts -*/ REAL *uh_old_qp; /*-- vector for storing uh at quadpts -*/ REAL time, timestep; REAL C0, C1, C2, C3; /*-- interior,jump,coarsen,time coefs -*/ REAL est_sum; REAL est_max; REAL est_t_sum; FLAGS f_flag; }; static struct heat_est_data heat_data[1]; static void heat_clear_indicator_fct(const EL_INFO *el_info, void *data) { el_info->el->mark = 1; if (heat_data->rw_est) *(*heat_data->rw_est)(el_info->el) = 0.0; if (heat_data->rw_estc) *(*heat_data->rw_estc)(el_info->el) = 0.0; return; } /*--------------------------------------------------------------------------*/ /* element residual: C0*h_S^2*|| U_t -div A nabla u^h + r ||_L^2(S) */ /*--------------------------------------------------------------------------*/ /* time residual: C3*|| U - Uold ||_L^2(S) */ /*--------------------------------------------------------------------------*/ static REAL heat_el_res2(const EL_INFO *el_info, const REAL_D *Lambda, REAL det, struct heat_est_data *data) { const REAL_DD *D2uhqp; int dim = el_info->mesh->dim; REAL val, riq = 0.0, h2 = h2_from_det(dim, det), uh_qpi = 0.0; int iq, i, j; const REAL *uh_qp = nil, *uh_old_qp = nil, *grd_uh_qpi = nil; const REAL_D *grd_uh_qp = nil; const QUAD_FAST *quad_fast = data->quad_fast; const QUAD *quad = quad_fast->quad; uh_old_qp = uh_at_qp(quad_fast, data->uh_old_el, data->uh_old_qp); uh_qp = uh_at_qp(quad_fast, data->uh_el, data->uh_qp); if (data->C3) { for (val = iq = 0; iq < quad->n_points; iq++) { riq = (uh_qp[iq] - uh_old_qp[iq]); val += quad->w[iq]*SQR(riq); } data->est_t_sum += data->C3*det*val; } if (!(data->C0)) return(0.0); if (data->quad_fast->bas_fcts->degree > 1) D2uhqp = D2_uh_at_qp(data->quad_fast, Lambda, data->uh_el, nil); else D2uhqp = nil; if (data->f) { if (!(data->f_flag & INIT_UH)) uh_qpi = 0.0; if (data->f_flag & INIT_GRD_UH) grd_uh_qp = grd_uh_at_qp(quad_fast, Lambda, data->uh_el, nil); else grd_uh_qpi = nil; } for (val = iq = 0; iq < quad->n_points; iq++) { riq = (uh_qp[iq] - uh_old_qp[iq]) / data->timestep; if (data->f) { if (data->f_flag & INIT_UH) uh_qpi = uh_qp[iq]; if (data->f_flag & INIT_GRD_UH) grd_uh_qpi = grd_uh_qp[iq]; riq += (*data->f)(el_info, quad, iq, data->time, uh_qpi, grd_uh_qpi); } if (D2uhqp) { if (data->is_diag) { for (i = 0; i < DIM_OF_WORLD; i++) riq -= data->A[i][i]*D2uhqp[iq][i][i]; } else { for (i = 0; i < DIM_OF_WORLD; i++) for (j = 0; j < DIM_OF_WORLD; j++) riq -= data->A[i][j]*D2uhqp[iq][i][j]; } } val += quad->w[iq]*SQR(riq); } val = data->C0*h2*h2*det*val; return(val); } /*--------------------------------------------------------------------------*/ /* face residuals: C1*h_Gamma*||[A(u_h)]||_L^2(Gamma)^2 */ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* 0.5(det_S + det_S') */ /*--------------------------------------------------------------------------*/ static REAL heat_jump_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const struct heat_est_data *data) { EL_INFO neigh_info[1]; int dim = el_info->mesh->dim; int face_ind_el[dim], face_ind_neigh[dim]; EL *neigh = el_info->neigh[face]; int opp_v = el_info->opp_vertex[face]; int i, j, i1, i2, iq; REAL_D jump, grd_uh_el, grd_uh_neigh, Lambda_neigh[N_LAMBDA]; const REAL *uh_neigh; REAL det_neigh = 0.0, lambda[N_LAMBDA], val = 0.0; const BAS_FCTS *bas_fcts = data->uh->fe_space->bas_fcts; const QUAD *quad = data->quad; /*--------------------------------------------------------------------------*/ /* orient the edge/face => same quadrature nodes from both sides! */ /*--------------------------------------------------------------------------*/ sort_wall_indices(dim, el_info->el, face, face_ind_el); sort_wall_indices(dim, neigh, opp_v, face_ind_neigh); neigh_info->mesh = el_info->mesh; neigh_info->el = neigh; neigh_info->fill_flag = FILL_COORDS; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[opp_v][j] = el_info->opp_coord[face][j]; for (i = 0; i < dim; i++) { i1 = face_ind_el[i]; i2 = face_ind_neigh[i]; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[i2][j] = el_info->coord[i1][j]; } switch(dim) { case 1: det_neigh = el_grd_lambda_1d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 1 case 2: det_neigh = el_grd_lambda_2d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 2 case 3: det_neigh = el_grd_lambda_3d(neigh_info, Lambda_neigh); #endif #endif } uh_neigh = bas_fcts->get_real_vec(neigh, data->uh, nil); /*--------------------------------------------------------------------------*/ /* now eval the jump at all quadrature nodes */ /*--------------------------------------------------------------------------*/ for (val = iq = 0; iq < quad->n_points; iq++) { lambda[face] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_el[i]] = quad->lambda[iq][i]; eval_grd_uh(lambda, Lambda, data->uh_el, bas_fcts, grd_uh_el); lambda[opp_v] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_neigh[i]] = quad->lambda[iq][i]; eval_grd_uh(lambda, (const REAL_D *)Lambda_neigh, uh_neigh, bas_fcts, grd_uh_neigh); if (data->is_diag) { for (i = 0; i < DIM_OF_WORLD; i++) jump[i] = data->A[i][i]*(grd_uh_el[i] - grd_uh_neigh[i]); } else { for (i = 0; i < DIM_OF_WORLD; i++) for (jump[i] = j = 0; j < DIM_OF_WORLD; j++) jump[i] += data->A[i][j]*(grd_uh_el[j] - grd_uh_neigh[j]); } val += quad->w[iq]*SCP_DOW(jump,jump); } det = 0.5*(det + det_neigh); return(data->C1*h2_from_det(dim,det)*det*val); } /*--------------------------------------------------------------------------*/ /* neuman residual: C1*h_Gamma*||A(u_h).normal||_L^2(Gamma)^2 */ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* det_S */ /*--------------------------------------------------------------------------*/ static REAL heat_neumann_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const struct heat_est_data *data) { int i, j, iq, dim = el_info->mesh->dim; REAL lambda[N_LAMBDA], n_A_grd_uh, val; REAL_D normal, grd_uh, A_grd_uh; const QUAD *quad = data->quad; switch(dim) { case 1: get_wall_normal_1d(el_info, face, normal); break; #if DIM_OF_WORLD > 1 case 2: get_wall_normal_2d(el_info, face, normal); break; #if DIM_OF_WORLD > 2 case 3: get_wall_normal_3d(el_info, face, normal); #endif #endif } for (val = iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < face; i++) lambda[i] = quad->lambda[iq][i]; lambda[face] = 0.0; for (i = face+1; i < dim+1; i++) lambda[i] = quad->lambda[iq][i-1]; eval_grd_uh(lambda, Lambda, data->uh_el, data->bas_fcts, grd_uh); if (data->is_diag) { for (i = 0; i < DIM_OF_WORLD; i++) A_grd_uh[i] = data->A[i][i]*grd_uh[i]; } else { for (i = 0; i < DIM_OF_WORLD; i++) for (A_grd_uh[i] = j = 0; j < DIM_OF_WORLD; j++) A_grd_uh[i] += data->A[i][j]*grd_uh[j]; } n_A_grd_uh = SCP_DOW(normal, A_grd_uh); val += quad->w[iq]*SQR(n_A_grd_uh); } return(data->C1*h2_from_det(dim, det)*det*val); } /*--------------------------------------------------------------------------*/ static void heat_est_fct(const EL_INFO *el_info, void *data) { EL *el = el_info->el; REAL det = 0.0, est_el; REAL_D Lambda[N_LAMBDA]; int dim = el_info->mesh->dim; const S_CHAR *bound = ((dim == 3) ? el_info->face_bound : el_info->edge_bound); int face; EL *neigh; /*--- if rw_est, then there might already be contributions from jumps ------*/ est_el = heat_data->rw_est ? *(*heat_data->rw_est)(el) : 0.0; heat_data->bas_fcts->get_real_vec(el, heat_data->uh, heat_data->uh_el); heat_data->bas_fcts->get_real_vec(el, heat_data->uh_old, heat_data->uh_old_el); switch(dim) { case 1: det = el_grd_lambda_1d(el_info, Lambda); break; #if DIM_OF_WORLD > 1 case 2: det = el_grd_lambda_2d(el_info, Lambda); break; #if DIM_OF_WORLD > 2 case 3: det = el_grd_lambda_3d(el_info, Lambda); #endif #endif } /*--- element and time residual ------------------------------------------*/ if (heat_data->C0 || heat_data->C3) est_el += heat_el_res2(el_info, (const REAL_D *)Lambda, det, heat_data); /*--- face residuals -----------------------------------------------------*/ if (dim > 1 && heat_data->C1) { for (face = 0; face < N_NEIGH(dim); face++) { if ((neigh = el_info->neigh[face])) { /*--------------------------------------------------------------------------*/ /* if rw_est is nil, compute jump for both neighbouring elements */ /* only this allows correct computation of est_max */ /* if rw_est is not nil, compute jump only once for each edge/face */ /* if neigh->mark: estimate not computed on neighbour! */ /* contribution for the element and for neighbour: 0.5*jump! */ /*--------------------------------------------------------------------------*/ if (!heat_data->rw_est || neigh->mark) { REAL est = heat_jump_res2(el_info, face, (const REAL_D *)Lambda, det, heat_data); est_el += est; /*-- if rw_est, add neighbour contribution to neigbour indicator ---------*/ if (heat_data->rw_est) *(*heat_data->rw_est)(neigh) += est; } } else if (IS_NEUMANN(bound[face])) { est_el += heat_neumann_res2(el_info, face, (const REAL_D *)Lambda, det, heat_data); } } } #if 0 /*-- if rw_estc, calculate coarsening error estimate ---------------------*/ if (heat_data->rw_estc && heat_data->C2) { *(*heat_data->rw_estc)(el) = heat_estc_el(el_info, det, heat_data); } #endif /*-- if rw_est, write indicator to element -------------------------------*/ if (heat_data->rw_est) *(*heat_data->rw_est)(el) = est_el; heat_data->est_sum += est_el; heat_data->est_max = MAX(heat_data->est_max, est_el); el_info->el->mark = 0; /*--- all contributions are computed! ------------*/ return; } /*--------------------------------------------------------------------------*/ REAL heat_est(const DOF_REAL_VEC *uh, ADAPT_INSTAT *adapt, REAL *(*rw_est)(EL *), REAL *(*rw_estc)(EL *), int degree, REAL C[4], const DOF_REAL_VEC *uh_old, const REAL_DD A, REAL (*f)(const EL_INFO *, const QUAD *, int iq, REAL t, REAL u, const REAL_D grd_u), FLAGS f_flag) { FUNCNAME("heat_est"); int dim; static WORKSPACE ws = {0, nil}; FLAGS fill_flag; const QUAD *quad; if (!(heat_data->uh = uh)) { MSG("no discrete solution; doing nothing\n"); return(0.0); } dim = uh->fe_space->mesh->dim; if (!(heat_data->uh_old = uh_old)) { MSG("no discrete solution from previous timestep; doing nothing\n"); /* here, initial error could be calculated... */ return(0.0); } TEST_EXIT(!uh->fe_space->mesh->parametric, "Parabolic error estimator is not yet implemented for parametric meshes, sorry.\n"); if(dim > 1) /* We need a vertex index to orient walls. */ get_vertex_admin(uh->fe_space->mesh); heat_data->bas_fcts = uh->fe_space->bas_fcts; heat_data->A = A; if(dim == 1) heat_data->is_diag = true; else heat_data->is_diag = is_diag_matrix(A); heat_data->f = f; heat_data->f_flag = f_flag; if (degree < 0) degree = 2*heat_data->bas_fcts->degree; quad = get_quadrature(dim, degree); if (heat_data->bas_fcts->degree > 1) fill_flag = INIT_PHI|INIT_GRD_PHI|INIT_D2_PHI; else fill_flag = INIT_PHI|INIT_GRD_PHI; heat_data->quad_fast = get_quad_fast(heat_data->bas_fcts, quad, fill_flag); if (dim > 1) heat_data->quad = get_quadrature(dim-1, degree); heat_data->rw_est = rw_est; heat_data->rw_estc = rw_estc; REALLOC_WORKSPACE(&ws, 2*(heat_data->bas_fcts->n_bas_fcts + heat_data->quad_fast->n_points)*sizeof(REAL)); heat_data->uh_el = (REAL *)ws.work; heat_data->uh_old_el = heat_data->uh_el + heat_data->bas_fcts->n_bas_fcts; heat_data->uh_qp = heat_data->uh_old_el + heat_data->bas_fcts->n_bas_fcts; heat_data->uh_old_qp = heat_data->uh_qp + heat_data->quad_fast->n_points; #if 0 heat_data->uh_qp = MEM_ALLOC(6, REAL); heat_data->uh_old_qp = MEM_ALLOC(6, REAL); #endif if (C) { heat_data->C0 = C[0] > 1.e-25 ? SQR(C[0]) : 0.0; heat_data->C1 = C[1] > 1.e-25 ? SQR(C[1]) : 0.0; heat_data->C2 = C[2] > 1.e-25 ? SQR(C[2]) : 0.0; heat_data->C3 = C[3] > 1.e-25 ? SQR(C[3]) : 0.0; } else { heat_data->C0 = heat_data->C1 = heat_data->C2 = heat_data->C3 = 1.0; } heat_data->time = adapt->time; heat_data->timestep = adapt->timestep; if (rw_est) /*--- clear error indicators -----------------------------*/ mesh_traverse(uh->fe_space->mesh, -1, CALL_LEAF_EL, heat_clear_indicator_fct, nil); heat_data->est_sum = heat_data->est_max = heat_data->est_t_sum = 0.0; if(dim == 1) fill_flag = FILL_COORDS|CALL_LEAF_EL; else fill_flag = FILL_NEIGH|FILL_COORDS|FILL_OPP_COORDS|FILL_BOUND|CALL_LEAF_EL; mesh_traverse(uh->fe_space->mesh, -1, fill_flag, heat_est_fct, nil); heat_data->est_sum = sqrt(heat_data->est_sum); heat_data->est_t_sum = sqrt(heat_data->est_t_sum); if (adapt) { adapt->adapt_space->err_sum = heat_data->est_sum; adapt->adapt_space->err_max = heat_data->est_max; /* adapt->err_t = heat_data->est_t_sum; */ } return(heat_data->est_t_sum); } alberta-2.0.1/alberta/src/Common/estimator_dowb.c0000644000042300001440000010077010676724253016675 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: estimator_dowb.c */ /* */ /* description: residual error estimator for elliptic and parabolic */ /* problems, REAL_D version (for use with DOWB matrices) */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Alberta-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* residual type estimator for quasi linear elliptic problem: */ /* -\div A \nabla u + f(.,u,\nabla u) = 0 */ /*--------------------------------------------------------------------------*/ typedef struct ellipt_est_d_data ELLIPT_EST_D_DATA; struct ellipt_est_d_data { const DOF_REAL_D_VEC *uh; const BAS_FCTS *bas_fcts; const REAL_DD (*A)[DIM_OF_WORLD]; const REAL *(*f)(const EL_INFO *, const QUAD *, int iq, const REAL_D uh, const REAL_DD grd_uh, REAL_D res); const QUAD_FAST *quad_fast; /*-- element integration -------------*/ const QUAD *quad; /*-- face integration -------------*/ REAL *(*rw_est)(EL *); REAL *(*rw_estc)(EL *); REAL_D *uh_el; /*-- vector for storing uh on el -----*/ FLAGS f_flag; int norm; /*-- estimated norm: H1_NORM/L2_NORM --*/ REAL C0, C1, C2; REAL est_sum; REAL est_max; }; static REAL h2_from_det(int dim, REAL det) { FUNCNAME("h2_from_det"); switch(dim) { case 1: return det*det; case 2: return det; case 3: return pow(det, 2.0/3.0); default: ERROR_EXIT("Illegal dim!\n"); return 0.0; /* shut up the compiler */ } } /*--------------------------------------------------------------------------*/ /* element residual: C0*h_S^2*||-div A nabla u^h + r||_L^2(S) (H^1) */ /* C0*h_S^4*||-div A nabla u^h + r||_L^2(S) (L^2) */ /*--------------------------------------------------------------------------*/ static REAL el_res2(const EL_INFO *el_info, const REAL_D *Lambda, REAL det, const ELLIPT_EST_D_DATA *data) { const REAL_DD (*D2uhqp)[DIM_OF_WORLD]; int dim = el_info->mesh->dim; REAL val, h2 = h2_from_det(dim, det); const REAL *uh_qpi = NULL; int iq, i, j, mu, nu; REAL_D riq = {}; const REAL_D *uh_qp = nil, *grd_uh_qpi = nil; const REAL_DD *grd_uh_qp = nil; const QUAD_FAST *quad_fast = data->quad_fast; const QUAD *quad = quad_fast->quad; if (data->quad_fast->bas_fcts->degree > 1) D2uhqp = D2_uh_d_at_qp(data->quad_fast, Lambda, (const REAL_D *)data->uh_el, nil); else D2uhqp = nil; if (data->f) { if (data->f_flag & INIT_UH) uh_qp = uh_d_at_qp(quad_fast, (const REAL_D *)data->uh_el, nil); else uh_qpi = nil; if (data->f_flag & INIT_GRD_UH) grd_uh_qp = grd_uh_d_at_qp(quad_fast, Lambda, (const REAL_D *)data->uh_el, nil); else grd_uh_qpi = nil; } for (val = iq = 0; iq < quad->n_points; iq++) { if (data->f) { if (data->f_flag & INIT_UH) uh_qpi = uh_qp[iq]; if (data->f_flag & INIT_GRD_UH) grd_uh_qpi = grd_uh_qp[iq]; data->f(el_info, quad, iq, uh_qpi, grd_uh_qpi, riq); } else SET_DOW(0.0, riq); if (D2uhqp) { for(mu = 0; mu < DIM_OF_WORLD; mu++) for (i = 0; i < DIM_OF_WORLD; i++) for(nu = 0; nu < DIM_OF_WORLD; nu++) for (j = 0; j < DIM_OF_WORLD; j++) riq[mu] -= data->A[i][j][mu][nu] * D2uhqp[iq][nu][i][j]; } val += quad->w[iq]*NRM2_DOW(riq); } if (data->norm == L2_NORM) val = data->C0*h2*h2*det*val; else val = data->C0*h2*det*val; return(val); } /*--------------------------------------------------------------------------*/ /* face residuals: C1*h_Gamma*||[A(u_h)]||_L^2(Gamma)^2 (H^1) */ /* C1*h_S^2*h_Gamma*||[A(u_h)]||_L^2(Gamma)^2 (L^2) */ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* 0.5(det_S + det_S') */ /*--------------------------------------------------------------------------*/ static REAL jump_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const ELLIPT_EST_D_DATA *data) { EL_INFO neigh_info[1]; int dim = el_info->mesh->dim; int face_ind_el[dim], face_ind_neigh[dim]; EL *neigh = el_info->neigh[face]; int opp_v = el_info->opp_vertex[face]; int mu, nu, i, j, i1, i2, iq; REAL_DD jump, grd_uh_el, grd_uh_neigh; REAL_D Lambda_neigh[N_LAMBDA]; const REAL_D *uh_neigh; REAL det_neigh = 0.0, lambda[N_LAMBDA], val = 0.0; const BAS_FCTS *bas_fcts = data->uh->fe_space->bas_fcts; const QUAD *quad = data->quad; /*--------------------------------------------------------------------------*/ /* orient the edge/face => same quadrature nodes from both sides! */ /*--------------------------------------------------------------------------*/ sort_wall_indices(dim, el_info->el, face, face_ind_el); sort_wall_indices(dim, neigh, opp_v, face_ind_neigh); neigh_info->mesh = el_info->mesh; neigh_info->el = neigh; neigh_info->fill_flag = FILL_COORDS; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[opp_v][j] = el_info->opp_coord[face][j]; for (i = 0; i < dim; i++) { i1 = face_ind_el[i]; i2 = face_ind_neigh[i]; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[i2][j] = el_info->coord[i1][j]; } switch(dim) { case 1: det_neigh = el_grd_lambda_1d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 1 case 2: det_neigh = el_grd_lambda_2d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 2 case 3: det_neigh = el_grd_lambda_3d(neigh_info, Lambda_neigh); #endif #endif } uh_neigh = bas_fcts->get_real_d_vec(neigh, data->uh, nil); /*--------------------------------------------------------------------------*/ /* now eval the jump at all quadrature nodes */ /*--------------------------------------------------------------------------*/ for (val = iq = 0; iq < quad->n_points; iq++) { lambda[face] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_el[i]] = quad->lambda[iq][i]; eval_grd_uh_d(lambda, Lambda, (const REAL_D *)data->uh_el, bas_fcts, grd_uh_el); lambda[opp_v] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_neigh[i]] = quad->lambda[iq][i]; eval_grd_uh_d(lambda, (const REAL_D *)Lambda_neigh, uh_neigh, bas_fcts, grd_uh_neigh); for (mu = 0; mu < DIM_OF_WORLD; mu++) for (i = 0; i < DIM_OF_WORLD; i++) for (jump[mu][i] = nu = 0; nu < DIM_OF_WORLD; nu++) for (j = 0; j < DIM_OF_WORLD; j++) jump[mu][i] += data->A[i][j][mu][nu] * (grd_uh_el[nu][j] - grd_uh_neigh[nu][j]); val += quad->w[iq]*MSCP_DOW(jump,jump); } det = 0.5*(det + det_neigh); if (data->norm == L2_NORM) return(data->C1*h2_from_det(dim, det)*det*val); else return(data->C1*det*val); } /*--------------------------------------------------------------------------*/ /* neuman residual: C1*h_Gamma*||A(u_h).normal||_L^2(Gamma)^2 (H^1) */ /* C1*h_S^2*h_Gamma*||A(u_h).normal]||_L^2(Gamma)^2 (L^2)*/ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* det_S */ /*--------------------------------------------------------------------------*/ static REAL neumann_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const ELLIPT_EST_D_DATA *data) { int i, j, mu, nu, iq; int dim = el_info->mesh->dim; REAL lambda[N_LAMBDA]; REAL_D n_A_grd_uh; REAL val; REAL_D normal; REAL_DD grd_uh, A_grd_uh; const QUAD *quad = data->quad; switch(dim) { case 1: get_wall_normal_1d(el_info, face, normal); break; #if DIM_OF_WORLD > 1 case 2: get_wall_normal_2d(el_info, face, normal); break; #if DIM_OF_WORLD > 2 case 3: get_wall_normal_3d(el_info, face, normal); #endif #endif } for (val = iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < face; i++) lambda[i] = quad->lambda[iq][i]; lambda[face] = 0.0; for (i = face+1; i < N_LAMBDA; i++) lambda[i] = quad->lambda[iq][i-1]; eval_grd_uh_d(lambda, (const REAL_D *)Lambda, (const REAL_D *)data->uh_el, data->bas_fcts, grd_uh); for (mu = 0; mu < DIM_OF_WORLD; mu++) for (i = 0; i < DIM_OF_WORLD; i++) for (A_grd_uh[mu][i] = nu = 0; nu < DIM_OF_WORLD; nu++) for (j = 0; j < DIM_OF_WORLD; j++) A_grd_uh[mu][i] += data->A[i][j][mu][nu]*grd_uh[nu][j]; SET_DOW(0.0, n_A_grd_uh); MV_DOW(A_grd_uh, normal, n_A_grd_uh); val += quad->w[iq]*NRM2_DOW(n_A_grd_uh); } if (data->norm == L2_NORM) return(data->C1*h2_from_det(dim, det)*det*val); else return(data->C1*det*val); } #define DATA ((ELLIPT_EST_D_DATA *)data) static void clear_indicator_fct(const EL_INFO *el_info, void *data) { el_info->el->mark = 1; if (DATA->rw_est) *(DATA->rw_est(el_info->el)) = 0.0; if (DATA->rw_estc) *(DATA->rw_estc(el_info->el)) = 0.0; return; } static void ellipt_est_fct(const EL_INFO *el_info, void *data) { EL *el = el_info->el; REAL det = 0.0, est_el; REAL_D Lambda[N_LAMBDA]; int face; int dim = el_info->mesh->dim; const S_CHAR *bound = ((dim == 3) ? el_info->face_bound : el_info->edge_bound); EL *neigh; /*--- if rw_est, then there might already be contributions from jumps ------*/ est_el = DATA->rw_est ? *(DATA->rw_est(el)) : 0.0; DATA->bas_fcts->get_real_d_vec(el, DATA->uh, DATA->uh_el); switch(dim) { case 1: det = el_grd_lambda_1d(el_info, Lambda); break; #if DIM_OF_WORLD > 1 case 2: det = el_grd_lambda_2d(el_info, Lambda); break; #if DIM_OF_WORLD > 2 case 3: det = el_grd_lambda_3d(el_info, Lambda); #endif #endif } /*--- element residual ---------------------------------------------------*/ if (DATA->C0) est_el += el_res2(el_info, (const REAL_D *)Lambda, det, DATA); /*--- face residuals -----------------------------------------------------*/ if (dim > 1 && DATA->C1) { for (face = 0; face < N_NEIGH(dim); face++) { if ((neigh = el_info->neigh[face])) { /*--------------------------------------------------------------------------*/ /* if rw_est is nil, compute jump for both neighbouring elements */ /* only this allows correct computation of est_max */ /* if rw_est is not nil, compute jump only once for each edge/face */ /* if neigh->mark: estimate not computed on neighbour! */ /* contribution for the element and for neighbour: 0.5*jump! */ /*--------------------------------------------------------------------------*/ if (!DATA->rw_est || neigh->mark) { REAL est = jump_res2(el_info, face, (const REAL_D *)Lambda, det, DATA); est_el += est; /*-- if rw_est, add neighbour contribution to neigbour indicator ---------*/ if (DATA->rw_est) *(DATA->rw_est(neigh)) += est; } } else if (IS_NEUMANN(bound[face])) { est_el += neumann_res2(el_info, face, (const REAL_D *)Lambda, det, DATA); } } } /*-- if rw_est, write indicator to element -------------------------------*/ if (DATA->rw_est) *(DATA->rw_est(el)) = est_el; DATA->est_sum += est_el; DATA->est_max = MAX(DATA->est_max, est_el); el_info->el->mark = 0; /*--- all contributions are computed! ------------*/ return; } #undef DATA /*--------------------------------------------------------------------------*/ REAL ellipt_est_d(const DOF_REAL_D_VEC *uh, ADAPT_STAT *adapt, REAL *(rw_est)(EL *), REAL *(rw_estc)(EL *), int degree, int norm, REAL C[3], const REAL_DD A[DIM_OF_WORLD][DIM_OF_WORLD], const REAL *(*f)(const EL_INFO *, const QUAD *, int qp, const REAL_D uh, const REAL_DD grd_uh, REAL_D res), FLAGS f_flag) { FUNCNAME("ellipt_est_d"); ELLIPT_EST_D_DATA ell_data[1] = {}; static WORKSPACE ws = {0, nil}; FLAGS fill_flag; const QUAD *quad; int dim; if (!(ell_data->uh = uh)) { MSG("no discrete solution; doing nothing\n"); return(0.0); } dim = uh->fe_space->mesh->dim; if(dim > 1) /* We need a vertex index to orient walls. */ get_vertex_admin(uh->fe_space->mesh); ell_data->bas_fcts = uh->fe_space->bas_fcts; ell_data->A = A; ell_data->f = f; ell_data->f_flag = f_flag; if (degree < 0) degree = 2*ell_data->bas_fcts->degree; quad = get_quadrature(dim, degree); if (ell_data->bas_fcts->degree > 1) fill_flag = INIT_PHI|INIT_GRD_PHI|INIT_D2_PHI; else fill_flag = INIT_PHI|INIT_GRD_PHI; ell_data->quad_fast = get_quad_fast(ell_data->bas_fcts, quad, fill_flag); if(dim > 1) ell_data->quad = get_quadrature(dim-1, degree); ell_data->rw_est = rw_est; ell_data->rw_estc = rw_estc; REALLOC_WORKSPACE(&ws, ell_data->bas_fcts->n_bas_fcts*sizeof(REAL_D)); ell_data->uh_el = (REAL_D *)ws.work; ell_data->norm = norm; if (C) { ell_data->C0 = C[0] > 1.e-25 ? SQR(C[0]) : 0.0; if(dim > 1) { ell_data->C1 = C[1] > 1.e-25 ? SQR(C[1]) : 0.0; ell_data->C2 = C[2] > 1.e-25 ? SQR(C[2]) : 0.0; } } else { if(dim == 1) ell_data->C0 = 1.0; else ell_data->C0 = ell_data->C1 = ell_data->C2 = 1.0; } if (rw_est) /*--- clear error indicators -----------------------------*/ mesh_traverse(uh->fe_space->mesh, -1, CALL_LEAF_EL, clear_indicator_fct, ell_data); ell_data->est_sum = ell_data->est_max = 0.0; if(dim == 1) fill_flag = FILL_COORDS|CALL_LEAF_EL; else fill_flag = FILL_NEIGH|FILL_COORDS|FILL_OPP_COORDS|FILL_BOUND|CALL_LEAF_EL; mesh_traverse(uh->fe_space->mesh, -1, fill_flag, ellipt_est_fct, ell_data); ell_data->est_sum = sqrt(ell_data->est_sum); if (adapt) { adapt->err_sum = ell_data->est_sum; adapt->err_max = ell_data->est_max; } return(ell_data->est_sum); } /*--------------------------------------------------------------------------*/ /* */ /* error estimator for (nonlinear) heat equation: */ /* u_t - div A grad u + f(x,t,u,grad u) = 0 */ /* */ /* eta_h = C[0]*||h^2 ((U - Uold)/tau - div A grad U + f(x,t,U,grad U))|| */ /* + C[1]*|||h^1.5 [A grad U]||| */ /* eta_c = C[2]*||(Uold - Uold_coarse)/tau|| */ /* eta_t = C[3]*||U - Uold|| */ /* */ /* heat_est() return value is the TIME DISCRETIZATION ESTIMATE, eta_t */ /* */ /*--------------------------------------------------------------------------*/ typedef struct heat_est_d_data HEAT_EST_D_DATA; struct heat_est_d_data { const DOF_REAL_D_VEC *uh, *uh_old; const BAS_FCTS *bas_fcts; const REAL_DD (*A)[DIM_OF_WORLD]; const REAL *(*f)(const EL_INFO *, const QUAD *, int iq, REAL time, const REAL_D uh, const REAL_DD grd_uh, REAL_D res); const QUAD_FAST *quad_fast; /*-- element integration -------------*/ const QUAD *quad; /*-- face integration -------------*/ REAL *(*rw_est)(EL *); REAL *(*rw_estc)(EL *); REAL_D *uh_el; /*-- vector for storing uh on el -----*/ REAL_D *uh_old_el; /*-- vector for storing uh on el -----*/ REAL_D *uh_qp; /*-- vector for storing uh at quadpts -*/ REAL_D *uh_old_qp; /*-- vector for storing uh at quadpts -*/ REAL time, timestep; REAL C0, C1, C2, C3; /*-- interior,jump,coarsen,time coefs -*/ REAL est_sum; REAL est_max; REAL est_t_sum; FLAGS f_flag; }; /*--------------------------------------------------------------------------*/ /* element residual: C0*h_S^2*|| U_t -div A nabla u^h + r ||_L^2(S) */ /*--------------------------------------------------------------------------*/ /* time residual: C3*|| U - Uold ||_L^2(S) */ /*--------------------------------------------------------------------------*/ static REAL heat_el_res2(const EL_INFO *el_info, const REAL_D *Lambda, REAL det, HEAT_EST_D_DATA *data) { const REAL_DD (*D2uhqp)[DIM_OF_WORLD]; int dim = el_info->mesh->dim; REAL val, h2 = h2_from_det(dim, det); const REAL *uh_qpi = nil; REAL_D riq; int iq, i, j, mu, nu; const REAL_D *uh_qp = nil, *uh_old_qp = nil, *grd_uh_qpi = nil; const REAL_DD *grd_uh_qp = nil; const QUAD_FAST *quad_fast = data->quad_fast; const QUAD *quad = quad_fast->quad; uh_old_qp = uh_d_at_qp(quad_fast, (const REAL_D *)data->uh_old_el, data->uh_old_qp); uh_qp = uh_d_at_qp(quad_fast, (const REAL_D *)data->uh_el, data->uh_qp); if (data->C3) { for (val = iq = 0; iq < quad->n_points; iq++) { AXPBY_DOW(1.0, uh_qp[iq], -1.0, uh_old_qp[iq], riq); val += quad->w[iq]*NRM2_DOW(riq); } data->est_t_sum += data->C3*det*val; } if (!(data->C0)) return(0.0); if (data->quad_fast->bas_fcts->degree > 1) D2uhqp = D2_uh_d_at_qp(data->quad_fast, Lambda, (const REAL_D *)data->uh_el, nil); else D2uhqp = nil; if (data->f) { if (!(data->f_flag & INIT_UH)) uh_qpi = nil; if (data->f_flag & INIT_GRD_UH) grd_uh_qp = grd_uh_d_at_qp(quad_fast, Lambda, (const REAL_D *)data->uh_el, nil); else grd_uh_qpi = nil; } for (val = iq = 0; iq < quad->n_points; iq++) { AXPBY_DOW(1.0, uh_qp[iq], -1.0, uh_old_qp[iq], riq); AX_DOW(data->timestep, riq); if (data->f) { if (data->f_flag & INIT_UH) uh_qpi = uh_qp[iq]; if (data->f_flag & INIT_GRD_UH) grd_uh_qpi = grd_uh_qp[iq]; AXPY_DOW(1.0, data->f(el_info, quad, iq, data->time, uh_qpi, grd_uh_qpi, nil), riq); } if (D2uhqp) { for(mu = 0; mu < DIM_OF_WORLD; mu++) for (i = 0; i < DIM_OF_WORLD; i++) for(nu = 0; nu < DIM_OF_WORLD; nu++) for (j = 0; j < DIM_OF_WORLD; j++) riq[mu] -= data->A[i][j][mu][nu] * D2uhqp[iq][nu][i][j]; } val += quad->w[iq]*NRM2_DOW(riq); } val = data->C0*h2*h2*det*val; return(val); } /*--------------------------------------------------------------------------*/ /* face residuals: C1*h_Gamma*||[A(u_h)]||_L^2(Gamma)^2 */ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* 0.5(det_S + det_S') */ /*--------------------------------------------------------------------------*/ static REAL heat_jump_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, HEAT_EST_D_DATA *data) { EL_INFO neigh_info[1]; int dim = el_info->mesh->dim; int face_ind_el[dim], face_ind_neigh[dim]; EL *neigh = el_info->neigh[face]; int opp_v = el_info->opp_vertex[face]; int i, j, mu, nu, i1, i2, iq; REAL_DD jump, grd_uh_el, grd_uh_neigh; REAL_D Lambda_neigh[N_LAMBDA]; const REAL_D *uh_neigh; REAL det_neigh = 0.0, lambda[N_LAMBDA], val = 0.0; const BAS_FCTS *bas_fcts = data->uh->fe_space->bas_fcts; const QUAD *quad = data->quad; /*--------------------------------------------------------------------------*/ /* orient the edge/face => same quadrature nodes from both sides! */ /*--------------------------------------------------------------------------*/ sort_wall_indices(dim, el_info->el, face, face_ind_el); sort_wall_indices(dim, neigh, opp_v, face_ind_neigh); neigh_info->mesh = el_info->mesh; neigh_info->el = neigh; neigh_info->fill_flag = FILL_COORDS; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[opp_v][j] = el_info->opp_coord[face][j]; for (i = 0; i < dim; i++) { i1 = face_ind_el[i]; i2 = face_ind_neigh[i]; for (j = 0; j < DIM_OF_WORLD; j++) neigh_info->coord[i2][j] = el_info->coord[i1][j]; } switch(dim) { case 1: det_neigh = el_grd_lambda_1d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 1 case 2: det_neigh = el_grd_lambda_2d(neigh_info, Lambda_neigh); break; #if DIM_OF_WORLD > 2 case 3: det_neigh = el_grd_lambda_3d(neigh_info, Lambda_neigh); #endif #endif } uh_neigh = bas_fcts->get_real_d_vec(neigh, data->uh, nil); /*--------------------------------------------------------------------------*/ /* now eval the jump at all quadrature nodes */ /*--------------------------------------------------------------------------*/ for (val = iq = 0; iq < quad->n_points; iq++) { lambda[face] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_el[i]] = quad->lambda[iq][i]; eval_grd_uh_d(lambda, (const REAL_D *)Lambda, (const REAL_D *)data->uh_el, bas_fcts, grd_uh_el); lambda[opp_v] = 0.0; for (i = 0; i < dim; i++) lambda[face_ind_neigh[i]] = quad->lambda[iq][i]; eval_grd_uh_d(lambda, (const REAL_D *)Lambda_neigh, uh_neigh, bas_fcts, grd_uh_neigh); for (mu = 0; mu < DIM_OF_WORLD; mu++) for (i = 0; i < DIM_OF_WORLD; i++) for (jump[mu][i] = nu = 0; nu < DIM_OF_WORLD; nu++) for (j = 0; j < DIM_OF_WORLD; j++) jump[mu][i] += data->A[i][j][mu][nu] * (grd_uh_el[nu][j] - grd_uh_neigh[nu][j]); val += quad->w[iq]*MSCP_DOW(jump,jump); } det = 0.5*(det + det_neigh); return(data->C1*h2_from_det(dim, det)*det*val); } /*--------------------------------------------------------------------------*/ /* neuman residual: C1*h_Gamma*||A(u_h).normal||_L^2(Gamma)^2 */ /* Since det_S = det_Gamma*h_Gamma we use for det_Gamma*h_Gamma the term */ /* det_S */ /*--------------------------------------------------------------------------*/ static REAL heat_neumann_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, HEAT_EST_D_DATA *data) { int i, j, mu, nu, iq; int dim = el_info->mesh->dim; REAL lambda[N_LAMBDA]; REAL_D n_A_grd_uh; REAL val; REAL_D normal; REAL_DD grd_uh, A_grd_uh; const QUAD *quad = data->quad; switch(dim) { case 1: get_wall_normal_1d(el_info, face, normal); break; #if DIM_OF_WORLD > 1 case 2: get_wall_normal_2d(el_info, face, normal); break; #if DIM_OF_WORLD > 2 case 3: get_wall_normal_3d(el_info, face, normal); #endif #endif } for (val = iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < face; i++) lambda[i] = quad->lambda[iq][i]; lambda[face] = 0.0; for (i = face+1; i < N_LAMBDA; i++) lambda[i] = quad->lambda[iq][i-1]; eval_grd_uh_d(lambda, (const REAL_D *)Lambda, (const REAL_D *)data->uh_el, data->bas_fcts, grd_uh); for (mu = 0; mu < DIM_OF_WORLD; mu++) for (i = 0; i < DIM_OF_WORLD; i++) for (A_grd_uh[mu][i] = nu = 0; nu < DIM_OF_WORLD; nu++) for (j = 0; j < DIM_OF_WORLD; j++) A_grd_uh[mu][i] += data->A[i][j][mu][nu]*grd_uh[nu][j]; SET_DOW(0.0, n_A_grd_uh); MV_DOW(A_grd_uh, normal, n_A_grd_uh); val += quad->w[iq]*NRM2_DOW(n_A_grd_uh); } return(data->C1*h2_from_det(dim, det)*det*val); } /*--------------------------------------------------------------------------*/ #define DATA ((HEAT_EST_D_DATA *)data) static void heat_clear_indicator_fct(const EL_INFO *el_info, void *data) { el_info->el->mark = 1; if (DATA->rw_est) *(DATA->rw_est(el_info->el)) = 0.0; if (DATA->rw_estc) *(DATA->rw_estc(el_info->el)) = 0.0; return; } static void heat_est_fct(const EL_INFO *el_info, void *data) { EL *el = el_info->el; REAL det = 0.0, est_el; REAL_D Lambda[N_LAMBDA]; int face; int dim = el_info->mesh->dim; const S_CHAR *bound = ((dim == 3) ? el_info->face_bound : el_info->edge_bound); EL *neigh; /*--- if rw_est, then there might already be contributions from jumps ------*/ est_el = DATA->rw_est ? *(DATA->rw_est(el)) : 0.0; DATA->bas_fcts->get_real_d_vec(el, DATA->uh, DATA->uh_el); DATA->bas_fcts->get_real_d_vec(el, DATA->uh_old, DATA->uh_old_el); switch(dim) { case 1: det = el_grd_lambda_1d(el_info, Lambda); break; #if DIM_OF_WORLD > 1 case 2: det = el_grd_lambda_2d(el_info, Lambda); break; #if DIM_OF_WORLD > 2 case 3: det = el_grd_lambda_3d(el_info, Lambda); #endif #endif } /*--- element and time residual ------------------------------------------*/ if (DATA->C0 || DATA->C3) est_el += heat_el_res2(el_info, (const REAL_D *)Lambda, det, DATA); /*--- face residuals -----------------------------------------------------*/ if (dim > 1 && DATA->C1) { for (face = 0; face < N_NEIGH(dim); face++) { if ((neigh = el_info->neigh[face])) { /*--------------------------------------------------------------------------*/ /* if rw_est is nil, compute jump for both neighbouring elements */ /* only this allows correct computation of est_max */ /* if rw_est is not nil, compute jump only once for each edge/face */ /* if neigh->mark: estimate not computed on neighbour! */ /* contribution for the element and for neighbour: 0.5*jump! */ /*--------------------------------------------------------------------------*/ if (!DATA->rw_est || neigh->mark) { REAL est = heat_jump_res2(el_info, face, (const REAL_D *)Lambda, det, DATA); est_el += est; /*-- if rw_est, add neighbour contribution to neigbour indicator ---------*/ if (DATA->rw_est) *(DATA->rw_est(neigh)) += est; } } else if (IS_NEUMANN(bound[face])) { est_el += heat_neumann_res2(el_info, face, (const REAL_D *)Lambda, det, DATA); } } } #if 0 /*-- if rw_estc, calculate coarsening error estimate ---------------------*/ if (DATA->rw_estc && DATA->C2) { *(DATA->rw_estc(el)) = heat_estc_el(el_info, det, DATA); } #endif /*-- if rw_est, write indicator to element -------------------------------*/ if (DATA->rw_est) *(DATA->rw_est(el)) = est_el; DATA->est_sum += est_el; DATA->est_max = MAX(DATA->est_max, est_el); el_info->el->mark = 0; /*--- all contributions are computed! ------------*/ return; } #undef DATA /*--------------------------------------------------------------------------*/ REAL heat_est_d(const DOF_REAL_D_VEC *uh, ADAPT_INSTAT *adapt, REAL *(rw_est)(EL *), REAL *(rw_estc)(EL *), int degree, REAL C[4], const DOF_REAL_D_VEC *uh_old, const REAL_DD A[DIM_OF_WORLD][DIM_OF_WORLD], const REAL *(*f)(const EL_INFO *, const QUAD *, int iq, REAL t, const REAL_D u, const REAL_DD grd_u, REAL_D res), FLAGS f_flag) { FUNCNAME("heat_est_d"); HEAT_EST_D_DATA heat_data[1] = {}; static WORKSPACE ws = {0, nil}; FLAGS fill_flag; const QUAD *quad; int dim; if (!(heat_data->uh = uh)) { MSG("no discrete solution; doing nothing\n"); return(0.0); } dim = uh->fe_space->mesh->dim; if (!(heat_data->uh_old = uh_old)) { MSG("no discrete solution from previous timestep; doing nothing\n"); /* here, initial error could be calculated... */ return(0.0); } if(dim > 1) /* We need a vertex index to orient walls. */ get_vertex_admin(uh->fe_space->mesh); heat_data->bas_fcts = uh->fe_space->bas_fcts; heat_data->A = A; heat_data->f = f; heat_data->f_flag = f_flag; if (degree < 0) degree = 2*heat_data->bas_fcts->degree; quad = get_quadrature(dim, degree); if (heat_data->bas_fcts->degree > 1) fill_flag = INIT_PHI|INIT_GRD_PHI|INIT_D2_PHI; else fill_flag = INIT_PHI|INIT_GRD_PHI; heat_data->quad_fast = get_quad_fast(heat_data->bas_fcts, quad, fill_flag); if(dim > 1) heat_data->quad = get_quadrature(dim-1, degree); heat_data->rw_est = rw_est; heat_data->rw_estc = rw_estc; REALLOC_WORKSPACE(&ws, 2*(heat_data->bas_fcts->n_bas_fcts + heat_data->quad_fast->n_points)*sizeof(REAL_D)); heat_data->uh_el = (REAL_D *)ws.work; heat_data->uh_old_el = heat_data->uh_el + heat_data->bas_fcts->n_bas_fcts; heat_data->uh_qp = heat_data->uh_old_el + heat_data->bas_fcts->n_bas_fcts; heat_data->uh_old_qp = heat_data->uh_qp + heat_data->quad_fast->n_points; #if 0 heat_data->uh_qp = MEM_ALLOC(6, REAL); heat_data->uh_old_qp = MEM_ALLOC(6, REAL); #endif if (C) { heat_data->C0 = C[0] > 1.e-25 ? SQR(C[0]) : 0.0; heat_data->C1 = C[1] > 1.e-25 ? SQR(C[1]) : 0.0; heat_data->C2 = C[2] > 1.e-25 ? SQR(C[2]) : 0.0; heat_data->C3 = C[3] > 1.e-25 ? SQR(C[3]) : 0.0; } else { heat_data->C0 = heat_data->C1 = heat_data->C2 = heat_data->C3 = 1.0; } heat_data->time = adapt->time; heat_data->timestep = adapt->timestep; if (rw_est) /*--- clear error indicators -----------------------------*/ mesh_traverse(uh->fe_space->mesh, -1, CALL_LEAF_EL, heat_clear_indicator_fct, heat_data); heat_data->est_sum = heat_data->est_max = heat_data->est_t_sum = 0.0; if(dim == 1) fill_flag = FILL_COORDS|CALL_LEAF_EL; else fill_flag = FILL_NEIGH|FILL_COORDS|FILL_OPP_COORDS|FILL_BOUND|CALL_LEAF_EL; mesh_traverse(uh->fe_space->mesh, -1, fill_flag, heat_est_fct, heat_data); heat_data->est_sum = sqrt(heat_data->est_sum); heat_data->est_t_sum = sqrt(heat_data->est_t_sum); if (adapt) { adapt->adapt_space->err_sum = heat_data->est_sum; adapt->adapt_space->err_max = heat_data->est_max; /* adapt->err_t = heat_data->est_t_sum; */ } return(heat_data->est_t_sum); } alberta-2.0.1/alberta/src/Common/eval.c0000644000042300001440000011174310676724253014604 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: eval.c */ /* */ /* description: routines for evaluating fe-functions and derivatives */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* some routines for evaluation of a finite element function, its gradient */ /* and second derivatives; all those with _fast use the preevaluated */ /* basis functions at that point. */ /* */ /* PLEASE NOTE: The _fast routines rely on zero values in the unused */ /* barycentric coordinates and derivatives. This was done to maintain the */ /* calling syntax (the routines don't know the space dimension) and to */ /* enable loop unrolling with constant index boundaries. */ /*--------------------------------------------------------------------------*/ REAL eval_uh(const REAL_B lambda, const REAL *uh_loc, const BAS_FCTS *b) { int i; BAS_FCT **phi = b->phi; REAL val = 0.0; for (i = 0; i < b->n_bas_fcts; i++) val += uh_loc[i]*phi[i](lambda); return(val); } const REAL *eval_uh_d(const REAL lambda[N_LAMBDA], const REAL_D *uh_loc, const BAS_FCTS *b, REAL_D values) { static REAL_D Values; int i, n; BAS_FCT **phi = b->phi; REAL phil, *val = values ? values : Values; for (n = 0; n < DIM_OF_WORLD; n++) val[n] = 0; for (i = 0; i < b->n_bas_fcts; i++) { phil = phi[i](lambda); for (n = 0; n < DIM_OF_WORLD; n++) val[n] += uh_loc[i][n]*phil; } return((const REAL *) val); } REAL eval_uh_fast(const REAL *uh_loc, const REAL *phi_val, int n_bas_fcts) { int i; REAL val = 0.0; for (i = 0; i < n_bas_fcts; i++) val += uh_loc[i]*phi_val[i]; return(val); } const REAL *eval_uh_d_fast(const REAL_D *uh_loc, const REAL *phi_val, int n_bas_fcts, REAL_D values) { static REAL_D Values; int i, n; REAL *val = values ? values : Values; for (n = 0; n < DIM_OF_WORLD; n++) val[n] = 0.0; for (i = 0; i < n_bas_fcts; i++) for (n = 0; n < DIM_OF_WORLD; n++) val[n] += uh_loc[i][n]*phi_val[i]; return((const REAL *) val); } const REAL *eval_grd_uh(const REAL lambda[N_LAMBDA], const REAL_D Lambda[N_LAMBDA], const REAL *uh_loc, const BAS_FCTS *b, REAL_D grd_uh) { static REAL_D grd; const REAL *grd_b; int i, j, dim = b->dim; GRD_BAS_FCT **grd_phi = b->grd_phi; REAL *val, grd1[N_LAMBDA] = {0}; val = grd_uh ? grd_uh : grd; for (i = 0; i < b->n_bas_fcts; i++) { grd_b = grd_phi[i](lambda); for (j = 0; j < dim+1; j++) grd1[j] += uh_loc[i]*grd_b[j]; } for (i = 0; i < DIM_OF_WORLD; i++) { for (val[i] = j = 0; j < dim+1; j++) val[i] += Lambda[j][i]*grd1[j]; } return((const REAL *) val); } const REAL_D *eval_grd_uh_d(const REAL lambda[N_LAMBDA], const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, const BAS_FCTS *b, REAL_DD grd_uh) { static REAL_DD grd; const REAL *grd_b; int i, j, n, dim = b->dim; GRD_BAS_FCT **grd_phi = b->grd_phi; REAL_D *val; REAL grd1[DIM_OF_WORLD][N_LAMBDA] = {{0}}; val = grd_uh ? grd_uh : grd; for (i = 0; i < b->n_bas_fcts; i++) { grd_b = grd_phi[i](lambda); for (j = 0; j < dim+1; j++) for (n = 0; n < DIM_OF_WORLD; n++) grd1[n][j] += uh_loc[i][n]*grd_b[j]; } for (i = 0; i < DIM_OF_WORLD; i++) { for (n = 0; n < DIM_OF_WORLD; n++) for (val[n][i] = j = 0; j < dim+1; j++) val[n][i] += Lambda[j][i]*grd1[n][j]; } return((const REAL_D *) val); } const REAL *eval_grd_uh_fast(const REAL_D Lambda[N_LAMBDA], const REAL *uh_loc, const REAL (*grd_phi)[N_LAMBDA], int n_bas_fcts, REAL_D grd_uh) { static REAL_D grd; int i, j; REAL *val, grd1[N_LAMBDA] = {0}; val = grd_uh ? grd_uh : grd; for (i = 0; i < n_bas_fcts; i++) for (j = 0; j < N_LAMBDA; j++) grd1[j] += uh_loc[i]*grd_phi[i][j]; for (i = 0; i < DIM_OF_WORLD; i++) for (val[i] = j = 0; j < N_LAMBDA; j++) val[i] += Lambda[j][i]*grd1[j]; return((const REAL *) val); } const REAL_D *eval_grd_uh_d_fast(const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, const REAL (*grd_phi)[N_LAMBDA], int n_bas_fcts, REAL_DD grd_uh) { static REAL_DD grd; int i, j, n; REAL_D *val; REAL grd1[N_LAMBDA]; val = grd_uh ? grd_uh : grd; for (n = 0; n < DIM_OF_WORLD; n++) { for (j = 0; j < N_LAMBDA; j++) grd1[j] = 0.0; for (i = 0; i < n_bas_fcts; i++) { for (j = 0; j < N_LAMBDA; j++) grd1[j] += uh_loc[i][n]*grd_phi[i][j]; } for (i = 0; i < DIM_OF_WORLD; i++) { for (val[n][i] = j = 0; j < N_LAMBDA; j++) val[n][i] += Lambda[j][i]*grd1[j]; } } return((const REAL_D *) val); } const REAL_D *eval_D2_uh(const REAL lambda[N_LAMBDA], const REAL_D Lambda[N_LAMBDA], const REAL *uh_loc, const BAS_FCTS *b, REAL_DD D2_uh) { static REAL_DD D2; const REAL (*D2_b)[N_LAMBDA]; int i, j, k, l, dim = b->dim; D2_BAS_FCT **D2_phi = b->D2_phi; REAL (*val)[DIM_OF_WORLD], D2_tmp[N_LAMBDA][N_LAMBDA] = {{0}}; val = D2_uh ? D2_uh : D2; for (i = 0; i < b->n_bas_fcts; i++) { D2_b = D2_phi[i](lambda); for (k = 0; k < dim+1; k++) for (l = k; l < dim+1; l++) D2_tmp[k][l] += uh_loc[i]*D2_b[k][l]; } for (i = 0; i < DIM_OF_WORLD; i++) for (j = i; j < DIM_OF_WORLD; j++) { val[i][j] = 0.0; for (k = 0; k < dim+1; k++) { val[i][j] += Lambda[k][i]*Lambda[k][j]*D2_tmp[k][k]; for (l = k+1; l < dim+1; l++) val[i][j] += (Lambda[k][i]*Lambda[l][j] + Lambda[l][i]*Lambda[k][j])*D2_tmp[k][l]; } val[j][i] = val[i][j]; } return((const REAL_D *) val); } const REAL_DD *eval_D2_uh_d(const REAL lambda[N_LAMBDA], const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, const BAS_FCTS *b, REAL_DD *D2_uh) { static REAL_DD D2[DIM_OF_WORLD]; const REAL (*D2_b)[N_LAMBDA]; int i, j, k, l, n, dim = b->dim; D2_BAS_FCT **D2_phi = b->D2_phi; REAL D2_tmp[N_LAMBDA][N_LAMBDA]; REAL_DD *val; val = D2_uh ? D2_uh : D2; for (n = 0; n < DIM_OF_WORLD; n++) { for (k = 0; k < dim + 1; k++) for (l = k; l < dim + 1; l++) D2_tmp[k][l] = 0.0; for (i = 0; i < b->n_bas_fcts; i++) { D2_b = D2_phi[i](lambda); for (k = 0; k < dim+1; k++) for (l = k; l < dim+1; l++) D2_tmp[k][l] += uh_loc[i][n]*D2_b[k][l]; } for (i = 0; i < DIM_OF_WORLD; i++) for (j = i; j < DIM_OF_WORLD; j++) { val[n][i][j] = 0.0; for (k = 0; k < dim+1; k++) { val[n][i][j] += Lambda[k][i]*Lambda[k][j]*D2_tmp[k][k]; for (l = k+1; l < dim+1; l++) val[n][i][j] += (Lambda[k][i]*Lambda[l][j] + Lambda[l][i]*Lambda[k][j]) * D2_tmp[k][l]; } } } return((const REAL_DD *) val); } const REAL_D *eval_D2_uh_fast(const REAL_D Lambda[N_LAMBDA], const REAL *uh_loc, const REAL (*D2_phi)[N_LAMBDA][N_LAMBDA], int n_bas_fcts, REAL_DD D2_uh) { static REAL_DD D2; int i, j, k, l; REAL (*val)[DIM_OF_WORLD], D2_tmp[N_LAMBDA][N_LAMBDA] = {{0}}; val = D2_uh ? D2_uh : D2; for (i = 0; i < n_bas_fcts; i++) for (k = 0; k < N_LAMBDA; k++) for (l = k; l < N_LAMBDA; l++) D2_tmp[k][l] += uh_loc[i]*D2_phi[i][k][l]; for (i = 0; i < DIM_OF_WORLD; i++) { for (j = i; j < DIM_OF_WORLD; j++) { val[i][j] = 0.0; for (k = 0; k < N_LAMBDA; k++) { val[i][j] += Lambda[k][i]*Lambda[k][j]*D2_tmp[k][k]; for (l = k+1; l < N_LAMBDA; l++) { val[i][j] += (Lambda[k][i]*Lambda[l][j] + Lambda[l][i]*Lambda[k][j])*D2_tmp[k][l]; } } val[j][i] = val[i][j]; /* the Hessian is symmetric */ } } return((const REAL_D *) val); } const REAL_DD *eval_D2_uh_d_fast(const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, const REAL (*D2_phi)[N_LAMBDA][N_LAMBDA], int n_bas_fcts, REAL_DD *D2_uh) { static REAL_DD D2[DIM_OF_WORLD]; int i, j, k, l, n; REAL D2_tmp[N_LAMBDA][N_LAMBDA]; REAL_DD *val; val = D2_uh ? D2_uh : D2; for (n = 0; n < DIM_OF_WORLD; n++) { for (k = 0; k < N_LAMBDA; k++) for (l = k; l < N_LAMBDA; l++) { D2_tmp[k][l] = 0.0; for (i = 0; i < n_bas_fcts; i++) D2_tmp[k][l] += uh_loc[i][n]*D2_phi[i][k][l]; } for (i = 0; i < DIM_OF_WORLD; i++) { for (j = i; j < DIM_OF_WORLD; j++) { val[n][i][j] = 0.0; for (k = 0; k < N_LAMBDA; k++) { val[n][i][j] += Lambda[k][i]*Lambda[k][j]*D2_tmp[k][k]; for (l = k+1; l < N_LAMBDA; l++) { val[n][i][j] += (Lambda[k][i]*Lambda[l][j] + Lambda[l][i]*Lambda[k][j]) * D2_tmp[k][l]; } } val[n][j][i] = val[n][i][j]; } } } return((const REAL_DD *) val); } /*--------------------------------------------------------------------------*/ /* standard routines for getting values of a finite element function and */ /* its first (and second) derivatives at the quadrature points */ /*--------------------------------------------------------------------------*/ const REAL *uh_at_qp(const QUAD_FAST *fast, const REAL *uh_loc, REAL *vec) { FUNCNAME("uh_at_qp"); static REAL *quad_vec = nil; static size_t size = 0; REAL *val, **phi; int i, j; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL); size = new_size; } val = quad_vec; } phi = fast->phi; for (i = 0; i < fast->n_points; i++) for (val[i] = j = 0; j < fast->n_bas_fcts; j++) val[i] += uh_loc[j]*phi[i][j]; return((const REAL *) val); } const REAL_D *grd_uh_at_qp(const QUAD_FAST *fast, const REAL_BD Lambda, const REAL *uh_loc, REAL_D *vec) { FUNCNAME("grd_uh_at_qp"); static REAL_D *quad_vec = nil; static size_t size = 0; REAL_D *val; REAL (*grd_phi)[N_LAMBDA], grd1[N_LAMBDA]; int i, j, k, l, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_D); size = new_size; } val = quad_vec; } for (i = 0; i < fast->n_points; i++) { grd_phi = fast->grd_phi[i]; for (k = 0; k < dim+1; k++) { grd1[k] = 0.0; for (j = 0; j < fast->n_bas_fcts; j++) grd1[k] += uh_loc[j]*grd_phi[j][k]; } for (l = 0; l < DIM_OF_WORLD; l++) { for (val[i][l] = k = 0; k < dim+1; k++) val[i][l] += Lambda[k][l]*grd1[k]; } } return((const REAL_D *) val); } const REAL_D *param_grd_uh_at_qp(const QUAD_FAST *fast, REAL_D Lambda[][N_LAMBDA], const REAL *uh_loc, REAL_D *vec) { FUNCNAME("param_grd_uh_at_qp"); static REAL_D *quad_vec = nil; static size_t size = 0; REAL_D *val; REAL (*grd_phi)[N_LAMBDA], grd1[N_LAMBDA]; int i, j, k, l, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_D); size = new_size; } val = quad_vec; } for (i = 0; i < fast->n_points; i++) { grd_phi = fast->grd_phi[i]; for (k = 0; k < dim+1; k++) { grd1[k] = 0.0; for (j = 0; j < fast->n_bas_fcts; j++) grd1[k] += uh_loc[j]*grd_phi[j][k]; } for (l = 0; l < DIM_OF_WORLD; l++) { for (val[i][l] = k = 0; k < dim+1; k++) val[i][l] += Lambda[i][k][l]*grd1[k]; } } return((const REAL_D *) val); } const REAL_DD *D2_uh_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[N_LAMBDA], const REAL *uh_loc, REAL_DD *vec) { FUNCNAME("D2_uh_at_qp"); static REAL_DD *quad_vec = nil; static size_t size = 0; REAL_DD *val; REAL (*D2_phi)[N_LAMBDA][N_LAMBDA], D2_tmp[N_LAMBDA][N_LAMBDA]; int i, j, k, l, iq, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_DD); size = new_size; } val = quad_vec; } for (iq = 0; iq < fast->n_points; iq++) { D2_phi = fast->D2_phi[iq]; for (k = 0; k < dim+1; k++) for (l = k; l < dim+1; l++) { D2_tmp[k][l] = 0.0; for (i = 0; i < fast->n_bas_fcts; i++) D2_tmp[k][l] += uh_loc[i]*D2_phi[i][k][l]; } for (i = 0; i < DIM_OF_WORLD; i++) for (j = i; j < DIM_OF_WORLD; j++) { val[iq][i][j] = 0.0; for (k = 0; k < dim+1; k++) { val[iq][i][j] += Lambda[k][i]*Lambda[k][j]*D2_tmp[k][k]; for (l = k+1; l < dim+1; l++) val[iq][i][j] += (Lambda[k][i]*Lambda[l][j] + Lambda[l][i]*Lambda[k][j]) * D2_tmp[k][l]; } } } return((const REAL_DD *) val); } const REAL_DD *param_D2_uh_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[][N_LAMBDA], const REAL *uh_loc, REAL_DD *vec) { FUNCNAME("param_D2_uh_at_qp"); ERROR_EXIT("Not yet implemented, sorry.\n"); return nil; } const REAL_D *uh_d_at_qp(const QUAD_FAST *fast, const REAL_D *uh_loc, REAL_D *vec) { FUNCNAME("uh_d_at_qp"); static REAL_D *quad_vec = nil; static size_t size = 0; REAL **phi; REAL_D *val; int i, j, k; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_D); size = new_size; } val = quad_vec; } phi = fast->phi; for (i = 0; i < fast->n_points; i++) for (k = 0; k < DIM_OF_WORLD; k++) for (val[i][k] = j = 0; j < fast->n_bas_fcts; j++) val[i][k] += uh_loc[j][k]*phi[i][j]; return((const REAL_D *) val); } const REAL_DD *grd_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, REAL_DD *vec) { FUNCNAME("grd_uh_d_at_qp"); static REAL_DD *quad_vec = nil; static size_t size = 0; REAL_DD *val; REAL (*grd_phi)[N_LAMBDA], grd1[N_LAMBDA]; int i, j, k, l, m, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_DD); size = new_size; } val = quad_vec; } for (i = 0; i < fast->n_points; i++) { grd_phi = fast->grd_phi[i]; for (k = 0; k < DIM_OF_WORLD; k++) { for (m = 0; m < dim+1; m++) { grd1[m] = 0.0; for (j = 0; j < fast->n_bas_fcts; j++) grd1[m] += uh_loc[j][k]*grd_phi[j][m]; } for (l = 0; l < DIM_OF_WORLD; l++) { for (val[i][k][l] = m = 0; m < dim+1; m++) val[i][k][l] += Lambda[m][l]*grd1[m]; } } } return((const REAL_DD *) val); } const REAL_DD *param_grd_uh_d_at_qp(const QUAD_FAST *fast, REAL_D Lambda[][N_LAMBDA], const REAL_D *uh_loc, REAL_DD *vec) { FUNCNAME("param_grd_uh_d_at_qp"); static REAL_DD *quad_vec = nil; static size_t size = 0; REAL_DD *val; REAL (*grd_phi)[N_LAMBDA], grd1[N_LAMBDA]; int i, j, k, l, m, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_DD); size = new_size; } val = quad_vec; } for (i = 0; i < fast->n_points; i++) { grd_phi = fast->grd_phi[i]; for (k = 0; k < DIM_OF_WORLD; k++) { for (m = 0; m < dim+1; m++) { grd1[m] = 0.0; for (j = 0; j < fast->n_bas_fcts; j++) grd1[m] += uh_loc[j][k]*grd_phi[j][m]; } for (l = 0; l < DIM_OF_WORLD; l++) { for (val[i][k][l] = m = 0; m < dim+1; m++) val[i][k][l] += Lambda[i][m][l]*grd1[m]; } } } return((const REAL_DD *) val); } const REAL_DD (*D2_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D grd_lam[N_LAMBDA], const REAL_D *uh_loc, REAL_DD (*vec)[DIM_OF_WORLD]))[DIM_OF_WORLD] { FUNCNAME("D2_uh_d_at_qp"); static REAL_DD (*quad_vec)[DIM_OF_WORLD] = nil; static size_t size = 0; REAL_DD (*val)[DIM_OF_WORLD]; REAL (*D2_phi)[N_LAMBDA][N_LAMBDA],D2_tmp[N_LAMBDA][N_LAMBDA]; int i, j, k, l, n, iq, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->n_points); quad_vec = (REAL_DD (*) [DIM_OF_WORLD]) MEM_REALLOC(quad_vec,size*DIM_OF_WORLD,new_size*DIM_OF_WORLD,REAL_DD); size = new_size; } val = quad_vec; } for (iq = 0; iq < fast->n_points; iq++) { D2_phi = fast->D2_phi[iq]; for (n = 0; n < DIM_OF_WORLD; n++) { for (k = 0; k < dim+1; k++) for (l = k; l < dim+1; l++) { D2_tmp[k][l] = 0.0; for (i = 0; i < fast->n_bas_fcts; i++) D2_tmp[k][l] += uh_loc[i][n]*D2_phi[i][k][l]; } for (i = 0; i < DIM_OF_WORLD; i++) for (j = i; j < DIM_OF_WORLD; j++) { val[iq][n][i][j] = 0.0; for (k = 0; k < dim+1; k++) { val[iq][n][i][j] += grd_lam[k][i]*grd_lam[k][j]*D2_tmp[k][k]; for (l = k+1; l < dim+1; l++) val[iq][n][i][j] += (grd_lam[k][i]*grd_lam[l][j] + grd_lam[l][i]*grd_lam[k][j]) * D2_tmp[k][l]; } val[iq][n][j][i] = val[iq][n][i][j]; } } } return((const REAL_DD (*) [DIM_OF_WORLD]) val); } const REAL_DD (*param_D2_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D grd_lam[][N_LAMBDA], const REAL_D *uh_loc, REAL_DD (*vec)[DIM_OF_WORLD]))[DIM_OF_WORLD] { FUNCNAME("param_D2_uh_d_at_qp"); ERROR_EXIT("Not yet implemented, sorry.\n"); return nil; } REAL eval_div_uh_d(const REAL lambda[N_LAMBDA], const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, const BAS_FCTS *b) { REAL div; const REAL *grd_b; int i, j, n, dim = b->dim; GRD_BAS_FCT **grd_phi = b->grd_phi; REAL grd1[DIM_OF_WORLD][N_LAMBDA] = {{0}}; for (i = 0; i < b->n_bas_fcts; i++) { grd_b = grd_phi[i](lambda); for (j = 0; j < dim+1; j++) for (n = 0; n < DIM_OF_WORLD; n++) grd1[n][j] += uh_loc[i][n]*grd_b[j]; } for (div = n = 0; n < DIM_OF_WORLD; n++) for (j = 0; j < dim+1; j++) div += Lambda[j][n]*grd1[n][j]; return(div); } REAL eval_div_uh_d_fast(const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, const REAL (*grd_phi)[N_LAMBDA], int n_bas_fcts) { REAL div; int i, j, n; REAL grd1[N_LAMBDA]; for (div = n = 0; n < DIM_OF_WORLD; n++) { for (j = 0; j < N_LAMBDA; j++) { grd1[j] = 0.0; for (i = 0; i < n_bas_fcts; i++) grd1[j] += uh_loc[i][n]*grd_phi[i][j]; } for (j = 0; j < N_LAMBDA; j++) div += Lambda[j][n]*grd1[j]; } return(div); } const REAL *div_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[N_LAMBDA], const REAL_D *uh_loc, REAL *vec) { FUNCNAME("div_uh_d_at_qp"); static REAL *quad_vec = nil; static size_t size = 0; REAL *val, div; REAL (*grd_phi)[N_LAMBDA], grd1[N_LAMBDA]; int i, j, n, m, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL); size = new_size; } val = quad_vec; } for (m = 0; m < fast->n_points; m++) { grd_phi = fast->grd_phi[m]; for (div = n = 0; n < DIM_OF_WORLD; n++) { for (j = 0; j < dim+1; j++) { grd1[j] = 0.0; for (i = 0; i < fast->n_bas_fcts; i++) grd1[j] += uh_loc[i][n]*grd_phi[i][j]; } for (j = 0; j < dim+1; j++) div += Lambda[j][n]*grd1[j]; } val[m] = div; } return((const REAL *) val); } const REAL *param_div_uh_d_at_qp(const QUAD_FAST *fast, const REAL_D Lambda[][N_LAMBDA], const REAL_D *uh_loc, REAL *vec) { FUNCNAME("param_div_uh_d_at_qp"); static REAL *quad_vec = nil; static size_t size = 0; REAL *val, div; REAL (*grd_phi)[N_LAMBDA], grd1[N_LAMBDA]; int i, j, n, m, dim = fast->quad->dim; if (vec) { val = vec; } else { if (size < (size_t) fast->quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, fast->quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL); size = new_size; } val = quad_vec; } for (m = 0; m < fast->n_points; m++) { grd_phi = fast->grd_phi[m]; for (div = n = 0; n < DIM_OF_WORLD; n++) { for (j = 0; j < dim+1; j++) { grd1[j] = 0.0; for (i = 0; i < fast->n_bas_fcts; i++) grd1[j] += uh_loc[i][n]*grd_phi[i][j]; } for (j = 0; j < dim+1; j++) div += Lambda[m][j][n]*grd1[j]; } val[m] = div; } return((const REAL *) val); } /*--------------------------------------------------------------------------*/ /* calculation H1 or L2 Norm of a finite element function */ /*--------------------------------------------------------------------------*/ typedef struct eval_traverse_data { REAL norm; const QUAD_FAST *quad_fast; const REAL *(*get_real_vec)(const EL *, const DOF_REAL_VEC *, REAL *); const DOF_REAL_VEC *uh; const REAL_D *(*get_real_d_vec)(const EL *, const DOF_REAL_D_VEC *, REAL_D *); const DOF_REAL_D_VEC *uh_d; } EVAL_TRAVERSE_DATA; static void H1_norm_uh_fct(const EL_INFO *el_info, void *data) { EVAL_TRAVERSE_DATA *ud = (EVAL_TRAVERSE_DATA *)data; REAL det[MAX_N_QUAD_POINTS], norm2, normT; REAL_D Lambda[MAX_N_QUAD_POINTS][N_LAMBDA]; const REAL *uh_loc; const REAL_D *grduh_vec; PARAMETRIC *parametric = el_info->mesh->parametric; int iq, j, dim = el_info->mesh->dim; if(parametric) { parametric->init_element(el_info, parametric); parametric->grd_lambda(el_info, ud->quad_fast->quad, 0, nil, Lambda, det); uh_loc = (*ud->get_real_vec)(el_info->el, ud->uh, nil); grduh_vec = param_grd_uh_at_qp(ud->quad_fast, Lambda, uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) norm2 += SQR(grduh_vec[iq][j]); normT += det[iq] * ud->quad_fast->w[iq] * norm2; } ud->norm += normT; } else { switch(dim) { case 1: det[0] = el_grd_lambda_1d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_grd_lambda_2d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_grd_lambda_3d(el_info, Lambda[0]); #endif #endif } uh_loc = (*ud->get_real_vec)(el_info->el, ud->uh, nil); grduh_vec = grd_uh_at_qp(ud->quad_fast, (const REAL_D*) Lambda[0], uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) norm2 += SQR(grduh_vec[iq][j]); normT += ud->quad_fast->w[iq]*norm2; } ud->norm += det[0] * normT; } return; } REAL H1_norm_uh(const QUAD *quad, const DOF_REAL_VEC *u_h) { FUNCNAME("H1_norm_uh"); EVAL_TRAVERSE_DATA td[1] = {{0}}; int deg; if (!(td->uh = u_h)) { ERROR("no DOF vector u_h; returning 0.0\n"); return(0.0); } if (!quad) { deg = 2*td->uh->fe_space->bas_fcts->degree-2; quad = get_quadrature(td->uh->fe_space->mesh->dim, deg); } td->quad_fast = get_quad_fast(td->uh->fe_space->bas_fcts, quad, INIT_GRD_PHI); td->get_real_vec = td->uh->fe_space->bas_fcts->get_real_vec; td->norm = 0.0; mesh_traverse(td->uh->fe_space->mesh, -1, CALL_LEAF_EL|FILL_COORDS, H1_norm_uh_fct, td); return(sqrt(td->norm)); } static void L2_norm_uh_fct(const EL_INFO *el_info, void *data) { EVAL_TRAVERSE_DATA *ud = (EVAL_TRAVERSE_DATA *)data; REAL det[MAX_N_QUAD_POINTS], normT; const REAL *uh_loc, *uh_vec; int iq; int dim = el_info->mesh->dim; PARAMETRIC *parametric = el_info->mesh->parametric; if (parametric) { parametric->init_element(el_info, parametric); parametric->det(el_info, ud->quad_fast->quad, 0, nil, det); uh_loc = (*ud->get_real_vec)(el_info->el, ud->uh, nil); uh_vec = uh_at_qp(ud->quad_fast, uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { normT += det[iq] * ud->quad_fast->w[iq] * SQR(uh_vec[iq]); } ud->norm += normT; } else { switch(dim) { case 1: det[0] = el_det_1d(el_info); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_det_2d(el_info); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_det_3d(el_info); #endif #endif } uh_loc = (*ud->get_real_vec)(el_info->el, ud->uh, nil); uh_vec = uh_at_qp(ud->quad_fast, uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { normT += ud->quad_fast->w[iq]*SQR(uh_vec[iq]); } ud->norm += det[0] * normT; } return; } REAL L2_norm_uh(const QUAD *quad, const DOF_REAL_VEC *u_h) { FUNCNAME("L2_norm_uh"); EVAL_TRAVERSE_DATA td[1] = {{0}}; int deg; if (!(td->uh = u_h)) { ERROR("no DOF vector u_h; returning 0.0\n"); return(0.0); } if (!quad) { deg = 2*td->uh->fe_space->bas_fcts->degree; quad = get_quadrature(td->uh->fe_space->mesh->dim, deg); } td->quad_fast = get_quad_fast(td->uh->fe_space->bas_fcts, quad, INIT_PHI); td->get_real_vec = td->uh->fe_space->bas_fcts->get_real_vec; td->norm = 0.0; mesh_traverse(td->uh->fe_space->mesh, -1, CALL_LEAF_EL|FILL_COORDS, L2_norm_uh_fct, td); return(sqrt(td->norm)); } /*--------------------------------------------------------------------------*/ /* calculation H1 or L2 Norm of a vector valued finite element function */ /*--------------------------------------------------------------------------*/ static void H1_norm_uh_d_fct(const EL_INFO *el_info, void *data) { EVAL_TRAVERSE_DATA *ud = (EVAL_TRAVERSE_DATA *)data; REAL det[MAX_N_QUAD_POINTS], norm2, normT; REAL_D Lambda[MAX_N_QUAD_POINTS][N_LAMBDA]; const REAL_D *uh_loc; const REAL_DD *grduh_vec; PARAMETRIC *parametric = el_info->mesh->parametric; int iq, j, n; int dim = el_info->mesh->dim; if(parametric) { parametric->init_element(el_info, parametric); parametric->grd_lambda(el_info, ud->quad_fast->quad, 0, nil, Lambda, det); uh_loc = (*ud->get_real_d_vec)(el_info->el, ud->uh_d, nil); grduh_vec = param_grd_uh_d_at_qp(ud->quad_fast, Lambda, uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) for (n = 0; n < DIM_OF_WORLD; n++) norm2 += SQR(grduh_vec[iq][j][n]); normT += det[iq] * ud->quad_fast->w[iq] * norm2; } ud->norm += normT; } else { switch(dim) { case 1: det[0] = el_grd_lambda_1d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_grd_lambda_2d(el_info, Lambda[0]); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_grd_lambda_3d(el_info, Lambda[0]); #endif #endif } uh_loc = (*ud->get_real_d_vec)(el_info->el, ud->uh_d, nil); grduh_vec = grd_uh_d_at_qp(ud->quad_fast, (const REAL_D *)Lambda[0], uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { for (norm2 = j = 0; j < DIM_OF_WORLD; j++) for (n = 0; n < DIM_OF_WORLD; n++) norm2 += SQR(grduh_vec[iq][j][n]); normT += ud->quad_fast->w[iq]*norm2; } ud->norm += det[0]*normT; } return; } REAL H1_norm_uh_d(const QUAD *quad, const DOF_REAL_D_VEC *u_h) { FUNCNAME("H1_norm_uh_d"); EVAL_TRAVERSE_DATA td[1] = {{0}}; int deg; if (!(td->uh_d = u_h)) { ERROR("no DOF vector u_h; returning 0.0\n"); return(0.0); } if (!quad) { deg = 2*td->uh_d->fe_space->bas_fcts->degree-2; quad = get_quadrature(td->uh_d->fe_space->mesh->dim, deg); } td->quad_fast = get_quad_fast(td->uh_d->fe_space->bas_fcts, quad, INIT_GRD_PHI); td->get_real_d_vec = td->uh_d->fe_space->bas_fcts->get_real_d_vec; td->norm = 0.0; mesh_traverse(td->uh_d->fe_space->mesh, -1, CALL_LEAF_EL|FILL_COORDS, H1_norm_uh_d_fct, td); return(sqrt(td->norm)); } static void L2_norm_uh_d_fct(const EL_INFO *el_info, void *data) { EVAL_TRAVERSE_DATA *ud = (EVAL_TRAVERSE_DATA *)data; REAL det[MAX_N_QUAD_POINTS], normT, norm2; const REAL_D *uh_loc, *uh_vec; int iq, n; int dim = el_info->mesh->dim; PARAMETRIC *parametric = el_info->mesh->parametric; if (parametric) { parametric->init_element(el_info, parametric); parametric->det(el_info, ud->quad_fast->quad, 0, nil, det); uh_loc = (*ud->get_real_d_vec)(el_info->el, ud->uh_d, nil); uh_vec = uh_d_at_qp(ud->quad_fast, uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { for (norm2 = n = 0; n < DIM_OF_WORLD; n++) norm2 += SQR(uh_vec[iq][n]); normT += det[iq]*ud->quad_fast->w[iq]*norm2; } ud->norm += normT; } else { switch(dim) { case 1: det[0] = el_det_1d(el_info); break; #if DIM_OF_WORLD > 1 case 2: det[0] = el_det_2d(el_info); break; #if DIM_OF_WORLD > 2 case 3: det[0] = el_det_3d(el_info); #endif #endif } uh_loc = (*ud->get_real_d_vec)(el_info->el, ud->uh_d, nil); uh_vec = uh_d_at_qp(ud->quad_fast, uh_loc, nil); for (normT = iq = 0; iq < ud->quad_fast->n_points; iq++) { for (norm2 = n = 0; n < DIM_OF_WORLD; n++) norm2 += SQR(uh_vec[iq][n]); normT += ud->quad_fast->w[iq]*norm2; } ud->norm += det[0]*normT; } return; } REAL L2_norm_uh_d(const QUAD *quad, const DOF_REAL_D_VEC *u_h) { FUNCNAME("L2_norm_uh_d"); EVAL_TRAVERSE_DATA td[1] = {{0}}; int deg; if (!(td->uh_d = u_h)) { ERROR("no DOF vector u_h; returning 0.0\n"); return(0.0); } if (!quad) { deg = 2*td->uh_d->fe_space->bas_fcts->degree; quad = get_quadrature(td->uh_d->fe_space->mesh->dim, deg); } td->quad_fast = get_quad_fast(td->uh_d->fe_space->bas_fcts, quad, INIT_PHI); td->get_real_d_vec = td->uh_d->fe_space->bas_fcts->get_real_d_vec; td->norm = 0.0; mesh_traverse(td->uh_d->fe_space->mesh, -1, CALL_LEAF_EL|FILL_COORDS, L2_norm_uh_d_fct, td); return(sqrt(td->norm)); } static const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); static int n_bas_fcts; static const DOF_ADMIN *admin; /* scalar problems */ static REAL *inter_vec, (*inter_fct)(const REAL_D); static const REAL *(*interpol_el)(const EL_INFO *, int, const int *, REAL (*)(const REAL_D), REAL (*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA]), REAL *); /* vector valued problems */ static REAL_D *inter_vec_d; static const REAL *(*inter_fct_d)(const REAL_D, REAL_D); static const REAL_D *(*interpol_el_d)(const EL_INFO *, int, const int *b_no, const REAL *(*)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA], REAL_D val), REAL_D *); static void interpol_fct(const EL_INFO *el_info, void *data) { int i; const DOF *dof = get_dof_indices(el_info->el, admin, nil); const REAL *inter_val = interpol_el(el_info, 0, nil, inter_fct, nil, nil); for (i = 0; i < n_bas_fcts; i++) inter_vec[dof[i]] = inter_val[i]; return; } void interpol(REAL (*fct)(const REAL_D), DOF_REAL_VEC *vec) { FUNCNAME("interpol"); const FE_SPACE *fe_space; GET_DOF_VEC(inter_vec, vec); if (!(fe_space = vec->fe_space)) { MSG("no dof admin in vec %s, skipping interpolation\n", NAME(vec)); return; } if (!(admin = fe_space->admin)) { MSG("no dof admin in fe_space %s, skipping interpolation\n", NAME(fe_space)); return; } if (!fe_space->bas_fcts) { MSG("no basis functions in admin of vec %s, skipping interpolation\n", NAME(vec)); return; } n_bas_fcts = fe_space->bas_fcts->n_bas_fcts; if (!(inter_fct = fct)) { MSG("function that should be interpolated only pointer to nil, "); print_msg("skipping interpolation\n"); return; } if (!(interpol_el = fe_space->bas_fcts->interpol)) { MSG("no function for interpolation on an element available\n"); MSG("in basis functions of vec %s, skipping interpolation\n", NAME(vec)); return; } if (!(get_dof_indices = fe_space->bas_fcts->get_dof_indices)) { MSG("no function for getting dof's on an element available\n"); MSG("in basis functions of vec %s, skipping interpolation\n", NAME(vec)); return; } mesh_traverse(fe_space->mesh, -1, CALL_LEAF_EL|FILL_COORDS, interpol_fct, nil); return; } static void interpol_fct_d(const EL_INFO *el_info, void *data) { int i, k; const DOF *dof = get_dof_indices(el_info->el, admin, nil); const REAL_D *inter_val = interpol_el_d(el_info, 0, nil, inter_fct_d, nil,nil); for (i = 0; i < n_bas_fcts; i++) for (k = 0; k < DIM_OF_WORLD; k++) inter_vec_d[dof[i]][k] = inter_val[i][k]; return; } void interpol_d(const REAL *(*fct)(const REAL_D, REAL_D), DOF_REAL_D_VEC *vec) { FUNCNAME("interpol_d"); const FE_SPACE *fe_space; GET_DOF_VEC(inter_vec_d, vec); if (!(fe_space = vec->fe_space)) { MSG("no dof admin in vec %s, skipping interpolation\n", NAME(vec)); return; } if (!(admin = fe_space->admin)) { MSG("no dof admin in fe_space %s, skipping interpolation\n", NAME(fe_space)); return; } if (!fe_space->bas_fcts) { MSG("no basis functions in admin of vec %s, skipping interpolation\n", NAME(vec)); return; } n_bas_fcts = fe_space->bas_fcts->n_bas_fcts; if (!(inter_fct_d = fct)) { MSG("function that should be interpolated only pointer to nil, "); print_msg("skipping interpolation\n"); return; } if (!(interpol_el_d = fe_space->bas_fcts->interpol_d)) { MSG("no function for interpolation on an element available\n"); MSG("in basis functions of vec %s, skipping interpolation\n", NAME(vec)); return; } if (!(get_dof_indices = fe_space->bas_fcts->get_dof_indices)) { MSG("no function for getting dof's on an element available\n"); MSG("in basis functions of vec %s, skipping interpolation\n", NAME(vec)); return; } mesh_traverse(fe_space->mesh, -1, CALL_LEAF_EL|FILL_COORDS, interpol_fct_d, nil); return; } alberta-2.0.1/alberta/src/Common/graphXO.c0000644000042300001440000004133210676724253015221 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: graphXO.c */ /* */ /* */ /* description: simple graphical routines */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include #include #include /*---8<---------------------------------------------------------------------*/ /*--- standard colors ---*/ /*--------------------------------------------------------------------->8---*/ const GRAPH_RGBCOLOR rgb_black = {0.0,0.0,0.0}; const GRAPH_RGBCOLOR rgb_white = {1.0,1.0,1.0}; const GRAPH_RGBCOLOR rgb_red = {1.0,0.0,0.0}; const GRAPH_RGBCOLOR rgb_green = {0.0,1.0,0.0}; const GRAPH_RGBCOLOR rgb_blue = {0.0,0.0,1.0}; const GRAPH_RGBCOLOR rgb_yellow = {1.0,1.0,0.0}; const GRAPH_RGBCOLOR rgb_magenta = {1.0,0.0,1.0}; const GRAPH_RGBCOLOR rgb_cyan = {0.0,1.0,1.0}; const GRAPH_RGBCOLOR rgb_grey50 = {0.5,0.5,0.5}; const GRAPH_RGBCOLOR rgb_albert = {0.433,0.781,0.969}; const GRAPH_RGBCOLOR rgb_alberta = {0.000,0.391,0.605}; struct ogl_window { Display *dpy; Window win; GLXContext context; unsigned int width, height; float xmin[DIM_MAX]; float xmax[DIM_MAX]; float diam[DIM_MAX]; Bool doubleBuffered; }; typedef struct ogl_window OGL_WINDOW; #if DIM_OF_WORLD < 3 static Bool opengl_available = True; #endif /****************************************************************************/ #if DIM_OF_WORLD < 3 static Bool WaitForNotify(Display *d, XEvent *e, char *arg) { return (e->type == MapNotify) && (e->xmap.window == (Window)arg); } #endif /****************************************************************************/ #if DIM_OF_WORLD < 3 static Bool OGL_set_std_window(OGL_WINDOW *ogl_win) { Bool res = false; if (ogl_win) { res = glXMakeCurrent(ogl_win->dpy, ogl_win->win, ogl_win->context); glViewport(0, 0, ogl_win->width, ogl_win->height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glOrtho(ogl_win->xmin[0], ogl_win->xmax[0], ogl_win->xmin[1], ogl_win->xmax[1], -1.0, 1.0); } return res; } #define OGL_FLUSH(ogl)\ if ((ogl)->doubleBuffered)glXSwapBuffers((ogl)->dpy, ogl->win);else glFlush() static int open_info = 0; static XVisualInfo *findVisual(Display *dpy, int screen, Bool *doubleBuffered) { /* * Find a GLX Visual to use. * Order of preference * 24 bit mono double buffered * 24 bit single buffered * any depth double buffered * any depth single buffered */ int dblBuf24[] = { GLX_RGBA, GLX_DOUBLEBUFFER, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, None }; int snglBuf24[] = { GLX_RGBA, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, None }; int dblBuf[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None }; int snglBuf[] = { GLX_RGBA, None }; XVisualInfo *vi = NULL; if ((vi = glXChooseVisual(dpy, screen, dblBuf24))) { INFO(open_info,2,"Using dblBuf24\n"); *doubleBuffered = True; return(vi); } if ((vi = glXChooseVisual(dpy, screen, snglBuf24))) { *doubleBuffered = False; INFO(open_info,2,"Using snglBuf24\n"); return(vi); } if ((vi = glXChooseVisual(dpy, screen, dblBuf))) { *doubleBuffered = True; INFO(open_info,2,"Using dblBuf\n"); return(vi); } if ((vi = glXChooseVisual(dpy, screen, snglBuf))) { INFO(open_info,2,"Using snglBuf\n"); *doubleBuffered = False; return(vi); } WARNING("can't find visual\n"); return(nil); } static Window createWindow(Display *dpy, int screen, XVisualInfo *vi, const char *name, const char *geom) { XSetWindowAttributes attributes; unsigned long valuemask = 0; Window root = RootWindow(dpy, screen); Atom delete_window_atom = XInternAtom(dpy, "WM_DELETE_WINDOW", 0); Window window; XSizeHints size_hints; XEvent event; int status; const char *default_geom = "300x300+0+0"; attributes.colormap = XCreateColormap(dpy, root, vi->visual, AllocNone); if (!attributes.colormap) { WARNING("no color map\n"); return(0); } valuemask = CWColormap; valuemask = CWColormap|CWBorderPixel|CWBackPixel; size_hints.flags = PResizeInc | PMinSize ; size_hints.width_inc = 1; size_hints.height_inc = 1; size_hints.min_width = 10; size_hints.min_height = 10; if (!geom) geom = default_geom; status = XGeometry(dpy, vi->screen, (char *) geom, (char *) default_geom, 2, 1, 1, 0, 0, &(size_hints.x), &(size_hints.y), &(size_hints.width), &(size_hints.height)); if (status & (XValue|YValue)) { size_hints.flags |= USPosition; size_hints.flags &= ~PPosition; } if (status & (WidthValue|HeightValue)) { size_hints.flags |= USSize; size_hints.flags &= ~PSize; } if (size_hints.flags & USSize) { size_hints.flags |= PAspect; size_hints.min_aspect.x = size_hints.width; size_hints.min_aspect.y = size_hints.height; size_hints.max_aspect.x = size_hints.width; size_hints.max_aspect.y = size_hints.height; } attributes.border_pixel = 0; attributes.background_pixel = 0; attributes.event_mask = StructureNotifyMask; window = XCreateWindow(dpy, root, size_hints.x, size_hints.y, size_hints.width, size_hints.height, 0, vi->depth, InputOutput, vi->visual, valuemask, &attributes); if (!window) { WARNING("couldn't create a window\n"); return(0); } XSetStandardProperties(dpy, window, name, name, None, NULL, 0, &size_hints); XSelectInput(dpy, window, ExposureMask|StructureNotifyMask); XMapWindow(dpy, window); XSetWMProtocols(dpy, window, &delete_window_atom, 1); XIfEvent(dpy, &event, WaitForNotify, (char*) window); XStoreName(dpy, window, name); return(window); } static OGL_WINDOW *OGL_create_window(const char *name, const char *geometry) { FUNCNAME("OGL_create_window"); Display *dpy; int screen; Window window, root; int dummy; Bool doubleBuffered; XVisualInfo *vi; GLXContext context; unsigned int bwidth, depth; int x, y; OGL_WINDOW * ogl_win; if (!(dpy = XOpenDisplay(NULL))) { WARNING("can't open X display\n"); return (nil); } screen = DefaultScreen(dpy); if (!(opengl_available = glXQueryExtension(dpy, &dummy, &dummy))) { WARNING("server doesn't support GLX Extension\n"); return (nil); } if (!(vi = findVisual(dpy, screen, &doubleBuffered))) return(nil); if (!(window = createWindow(dpy, screen, vi, name, geometry))) return(nil); context = glXCreateContext(dpy, vi, NULL, GL_TRUE); XFree(vi); if (context == NULL) { WARNING("can't create context\n"); return(nil); } if (!glXMakeCurrent(dpy, window, context)) { WARNING("glXMakeCurrent failed\n"); return (nil); } ogl_win = MEM_ALLOC(1, OGL_WINDOW); ogl_win->dpy = dpy; ogl_win->win = window; ogl_win->context = context; ogl_win->doubleBuffered = doubleBuffered; XGetGeometry(dpy, window, &root, &x, &y, &ogl_win->width, &ogl_win->height, &bwidth, &depth); return(ogl_win); } /****************************************************************************/ static void OGL_destroy_window(OGL_WINDOW *ogl_win) { /* FUNCNAME("OGL_destroy_window"); re-enable when MSG() is used here ... */ if (!ogl_win) return; glXDestroyContext(ogl_win->dpy, ogl_win->context); XDestroyWindow(ogl_win->dpy, ogl_win->win); XFlush(ogl_win->dpy); MEM_FREE(ogl_win, 1, OGL_WINDOW); } /****************************************************************************/ static void OGL_clear_window(OGL_WINDOW *ogl_win, const GRAPH_RGBCOLOR c) { FUNCNAME("OGL_clear_window"); Window root; unsigned int w, h, depth, bwidth; int x, y; if (!ogl_win) { MSG("no OGL_WINDOW\n"); return; } OGL_set_std_window(ogl_win); /* Has the window size changed? */ XGetGeometry(ogl_win->dpy, ogl_win->win, &root, &x, &y, &w, &h, &bwidth, &depth); if (w != ogl_win->width || h != ogl_win->height){ ogl_win->width = w; ogl_win->height = h; XResizeWindow(ogl_win->dpy, ogl_win->win, w, h); } glXMakeCurrent(ogl_win->dpy, ogl_win->win, ogl_win->context); glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glOrtho(ogl_win->xmin[0], ogl_win->xmax[0], ogl_win->xmin[1], ogl_win->xmax[1], -1.0, 1.0); if (c) glClearColor(c[0], c[1], c[2], 1.0); else glClearColor(1.0, 1.0, 1.0, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); OGL_FLUSH(ogl_win); } #endif /****************************************************************************/ /****************************************************************************/ /* Common graphic routines available to the user */ /****************************************************************************/ #if DIM_OF_WORLD == 1 #include "graphXO_1d.c" #endif #if DIM_OF_WORLD == 2 #include "graphXO_2d.c" #endif GRAPH_WINDOW graph_open_window(const char *title, const char *geometry, REAL *world, MESH *mesh) { FUNCNAME("graph_open_window"); switch(mesh->dim) { #if DIM_OF_WORLD == 1 case 1: return graph_open_window_1d(title, geometry, world, mesh); #endif #if DIM_OF_WORLD == 2 case 2: return graph_open_window_2d(title, geometry, world, mesh); #endif case 3: ERROR("Not implemented for dim == 3!\n"); return 0; default: ERROR_EXIT("Illegal mesh->dim: must equal DIM_OF_WORLD\n"); } return 0; } void graph_close_window(GRAPH_WINDOW win) { #if DIM_OF_WORLD==1 graph_close_window_1d(win); #elif DIM_OF_WORLD==2 graph_close_window_2d(win); #else ERROR("Not implemented for dim == 3!\n"); #endif return; } void graph_clear_window(GRAPH_WINDOW win, const GRAPH_RGBCOLOR c) { #if DIM_OF_WORLD==1 graph_clear_window_1d(win, c); #elif DIM_OF_WORLD==2 graph_clear_window_2d(win, c); #else ERROR("Not implemented for dim == 3!\n"); #endif return; } void graph_mesh(GRAPH_WINDOW win, MESH *mesh, const GRAPH_RGBCOLOR c, FLAGS flag) { FUNCNAME("graph_mesh"); switch(mesh->dim) { #if DIM_OF_WORLD == 1 case 1: if(DIM_OF_WORLD != 1) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_mesh_1d(win, mesh, c, flag); break; #endif #if DIM_OF_WORLD == 2 case 2: if(DIM_OF_WORLD != 2) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_mesh_2d(win, mesh, c, flag); break; #endif case 3: ERROR("Not implemented for dim == 3!\n"); return; default: ERROR_EXIT("Illegal dim!\n"); } } void graph_drv(GRAPH_WINDOW win, const DOF_REAL_VEC *u, REAL min, REAL max, int refine) { FUNCNAME("graph_drv"); TEST_EXIT(u && u->fe_space && u->fe_space->admin && u->fe_space->admin->mesh, "no vec or fe_space or admin or mesh!\n"); switch(u->fe_space->admin->mesh->dim) { #if DIM_OF_WORLD == 1 case 1: if(DIM_OF_WORLD != 1) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_drv_1d(win, u, min, max, refine, nil); break; #endif #if DIM_OF_WORLD == 2 case 2: if(DIM_OF_WORLD != 2) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_drv_2d(win, u, min, max, refine); break; #endif case 3: ERROR("Not implemented for dim == 3!\n"); return; default: ERROR_EXIT("Illegal dim!\n"); } } void graph_drv_d(GRAPH_WINDOW win, const DOF_REAL_D_VEC *ud, REAL min, REAL max, int refine) { FUNCNAME("graph_drv_d"); TEST_EXIT(ud && ud->fe_space && ud->fe_space->admin && ud->fe_space->admin->mesh, "no vec or fe_space or admin or mesh!\n"); switch(ud->fe_space->admin->mesh->dim) { #if DIM_OF_WORLD == 1 case 1: if(DIM_OF_WORLD != 1) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_drv_d_1d(win, ud, min, max, refine, nil); break; #endif #if DIM_OF_WORLD ==2 case 2: if(DIM_OF_WORLD != 2) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_drv_d_2d(win, ud, min, max, refine); break; #endif case 3: ERROR("Not implemented for dim == 3!\n"); return; default: ERROR_EXIT("Illegal dim!\n"); } } void graph_el_est(GRAPH_WINDOW win, MESH *mesh, REAL (*get_est)(EL *), REAL min, REAL max) { FUNCNAME("graph_drv_d"); if(!mesh) { ERROR("No mesh given!\n"); return; } switch(mesh->dim) { #if DIM_OF_WORLD == 1 case 1: if(DIM_OF_WORLD != 1) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_el_est_1d(win, mesh, get_est, min, max, nil); break; #endif #if DIM_OF_WORLD == 2 case 2: if(DIM_OF_WORLD != 2) { ERROR("dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); return; } graph_el_est_2d(win, mesh, get_est, min, max); break; #endif case 3: ERROR("Not implemented for dim == 3!\n"); return; default: ERROR_EXIT("Illegal dim!\n"); } } /****************************************************************************/ void graph_point(GRAPH_WINDOW win, const REAL p0[2], const GRAPH_RGBCOLOR c, float ps) { #if DIM_OF_WORLD == 3 FUNCNAME("graph_point"); ERROR("Not implemented for dim == 3!\n"); #else OGL_WINDOW *ogl_win = (OGL_WINDOW *)win; OGL_set_std_window(ogl_win); glColor3fv(c ? c : rgb_black); glPointSize(ps > 0 ? ps : 1.0); glBegin(GL_POINTS); glVertex2d(p0[0], p0[1]); glEnd(); OGL_FLUSH(ogl_win); #endif return; } void graph_points(GRAPH_WINDOW win, int np, REAL (*p)[2], const GRAPH_RGBCOLOR c, float ps) { #if DIM_OF_WORLD == 3 FUNCNAME("graph_points"); ERROR("Not implemented for dim == 3!\n"); #else int i; OGL_WINDOW *ogl_win = (OGL_WINDOW *)win; OGL_set_std_window(ogl_win); glColor3fv(c ? c : rgb_black); glPointSize(ps > 0 ? ps : 1.0); glBegin(GL_POINTS); for (i = 0; i < np; i++) glVertex2d(p[i][0], p[i][1]); glEnd(); OGL_FLUSH(ogl_win); #endif return; } /****************************************************************************/ void graph_line(GRAPH_WINDOW win, const REAL p0[2], const REAL p1[2], const GRAPH_RGBCOLOR c, float lw) { #if DIM_OF_WORLD == 3 FUNCNAME("graph_line"); ERROR("Not implemented for dim == 3!\n"); #else float xy[2]; int j; OGL_WINDOW *ogl_win = (OGL_WINDOW *)win; OGL_set_std_window(ogl_win); glColor3fv(c ? c : rgb_black); glLineWidth(lw > 0 ? lw : 1.0); glBegin(GL_LINE_STRIP); for (j=0; j<2; j++) xy[j] = p0[j]; glVertex2fv(xy); for (j=0; j<2; j++) xy[j] = p1[j]; glVertex2fv(xy); glEnd(); OGL_FLUSH(ogl_win); #endif return; } alberta-2.0.1/alberta/src/Common/l2scp.c0000644000042300001440000004216210676724253014676 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: l2scp.c */ /* */ /* description: compute L2 scalar products of the right hand side and */ /* the basis functions of the fe-space */ /* sets Dirichlet boundary values */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* calculates the L2 scalar product of the function f with each basis */ /* function of the mesh belonging to the dof admin of fh; the scalar */ /* products are stored in fh; */ /* */ /* fh->vec[j] = (f, phi_j)_\Omega */ /* */ /* where phi_j are the basis functions belonging to fh->fe_space->admin */ /* */ /*--------------------------------------------------------------------------*/ void L2scp_fct_bas(REAL (*f)(const REAL_D), const QUAD *quad, DOF_REAL_VEC *fh) { FUNCNAME("L2scp_fct_bas"); static WORKSPACE ws = {0, nil}; TRAVERSE_STACK *stack; const EL_INFO *el_info; MESH *mesh = nil; const QUAD_FAST *quad_fast; REAL *det_p = nil, *wdetf_qp = nil, *f_vec = nil, **phi; REAL val, det = 0.0; REAL_D *x_p = nil, x; int iq, j, n_phi, dim; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF *dof; const PARAMETRIC *parametric; TEST_EXIT(fh,"no DOF_REAL_VEC fh\n"); if (!f) return; TEST_EXIT(fh->fe_space,"no fe_space in DOF_REAL_VEC %s\n", NAME(fh)); GET_STRUCT(mesh, fh->fe_space); GET_DOF_VEC(f_vec, fh); dim = mesh->dim; get_dof = fh->fe_space->bas_fcts->get_dof_indices; n_phi = fh->fe_space->bas_fcts->n_bas_fcts; if (!quad) quad = get_quadrature(dim, 2*fh->fe_space->bas_fcts->degree-2); quad_fast = get_quad_fast(fh->fe_space->bas_fcts, quad, INIT_PHI); phi = quad_fast->phi; if ((parametric = mesh->parametric)) { REALLOC_WORKSPACE(&ws, quad->n_points*(2 + DIM_OF_WORLD)*sizeof(REAL)); det_p = (REAL *) ws.work; wdetf_qp = det_p+quad->n_points; x_p = (REAL_D *) (wdetf_qp+quad->n_points); } else { REALLOC_WORKSPACE(&ws, quad->n_points*sizeof(REAL)); wdetf_qp = (REAL *)ws.work; } stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); while(el_info) { dof = get_dof(el_info->el, fh->fe_space->admin, nil); if (parametric) { (*parametric->init_element)(el_info, parametric); (*parametric->coord_to_world)(el_info, quad, 0, nil, x_p); (*parametric->det)(el_info, quad, 0, nil, det_p); for (iq = 0; iq < quad->n_points; iq++) wdetf_qp[iq] = quad->w[iq]*det_p[iq]*(*f)(x_p[iq]); } else { switch(dim) { case 1: det = el_det_1d(el_info); break; #if DIM_OF_WORLD > 1 case 2: det = el_det_2d(el_info); break; #if DIM_OF_WORLD > 2 case 3: det = el_det_3d(el_info); #endif #endif } for (iq = 0; iq < quad->n_points; iq++) { coord_to_world(el_info, quad->lambda[iq], x); wdetf_qp[iq] = quad->w[iq]*det*(*f)(x); } } for (j = 0; j < n_phi; j++) { for (val = iq = 0; iq < quad->n_points; iq++) val += phi[iq][j]*wdetf_qp[iq]; f_vec[dof[j]] += val; } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } void L2scp_fct_bas_d(const REAL *(*f)(const REAL_D, REAL_D), const QUAD *quad, DOF_REAL_D_VEC *fh) { FUNCNAME("L2scp_fct_bas_d"); static WORKSPACE ws = {0, nil}; TRAVERSE_STACK *stack; const EL_INFO *el_info; MESH *mesh = nil; const QUAD_FAST *quad_fast; REAL_D *x_p = nil, x; REAL_D *wdetf_qp = nil, *f_vec = nil; REAL *det_p = nil, val, det, **phi; int iq, j, n, n_phi, dim; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF *dof; const PARAMETRIC *parametric; TEST_EXIT(fh,"no DOF_REAL_D_VEC fh\n"); if (!f) return; TEST_EXIT(fh->fe_space,"no fe_space in DOF_REAL_D_VEC %s\n", NAME(fh)); GET_STRUCT(mesh, fh->fe_space); GET_DOF_VEC(f_vec, fh); dim = mesh->dim; get_dof = fh->fe_space->bas_fcts->get_dof_indices; n_phi = fh->fe_space->bas_fcts->n_bas_fcts; if (!quad) quad = get_quadrature(dim, 2*fh->fe_space->bas_fcts->degree-2); quad_fast = get_quad_fast(fh->fe_space->bas_fcts, quad, INIT_PHI); phi = quad_fast->phi; if ((parametric = mesh->parametric)) { REALLOC_WORKSPACE(&ws, quad->n_points*(1 + 2*DIM_OF_WORLD)*sizeof(REAL)); det_p = (REAL *)ws.work; wdetf_qp = (REAL_D *) (det_p+quad->n_points); x_p = wdetf_qp+quad->n_points; } else { REALLOC_WORKSPACE(&ws, quad->n_points*sizeof(REAL_D)); wdetf_qp = (REAL_D *)ws.work; } stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); while(el_info) { dof = get_dof(el_info->el, fh->fe_space->admin, nil); if (parametric) { (*parametric->init_element)(el_info, parametric); (*parametric->coord_to_world)(el_info, quad, 0, nil, x_p); (*parametric->det)(el_info, quad, 0, nil, det_p); for (iq = 0; iq < quad->n_points; iq++) { (*f)(x_p[iq], wdetf_qp[iq]); for (n = 0; n < DIM_OF_WORLD; n++) wdetf_qp[iq][n] *= quad->w[iq]*det_p[iq]; } } else { det = el_det_0cd(el_info); for (iq = 0; iq < quad->n_points; iq++) { coord_to_world(el_info, quad->lambda[iq], x); (*f)(x, wdetf_qp[iq]); for (n = 0; n < DIM_OF_WORLD; n++) wdetf_qp[iq][n] *= quad->w[iq]*det; } } for (j = 0; j < n_phi; j++) { for (n = 0; n < DIM_OF_WORLD; n++) { for (val = iq = 0; iq < quad->n_points; iq++) val += phi[iq][j]*wdetf_qp[iq][n]; f_vec[dof[j]][n] += val; } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } /*--------------------------------------------------------------------------*/ /* sets dirichlet boundary values g() in the vectors fh and uh and fills */ /* the vector boundary with the boundary type of the corresponding DOF */ /*--------------------------------------------------------------------------*/ void dirichlet_bound(REAL (*g)(const REAL_D), DOF_REAL_VEC *fh, DOF_REAL_VEC *uh, DOF_SCHAR_VEC *bound) { FUNCNAME("dirichlet_bound"); static WORKSPACE ws = {0, nil}; TRAVERSE_STACK *stack; const EL_INFO *el_info; MESH *mesh = nil; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *) = nil; const DOF *dof; DOF *bound_dof; const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *) = nil; const S_CHAR *el_bound; S_CHAR *bound_vec; const REAL *(*interpol)(const EL_INFO *, int, const int *, REAL (*)(const REAL_D), REAL (*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA]), REAL *) = nil; const REAL *dirichlet; REAL *f_vec = nil, *u_vec = nil; int j, j_dof, n_phi = 0, n_dirichlet; if (!fh && !uh && !bound) return; if (fh && uh) TEST_EXIT(fh->fe_space == uh->fe_space,"fe_spaces in fh and uh differ\n"); else if (!fh && uh) { fh = uh; uh = nil; } if (fh) { GET_STRUCT(mesh, fh->fe_space); GET_DOF_VEC(f_vec, fh); if (uh) {GET_DOF_VEC(u_vec, uh);} get_bound = fh->fe_space->bas_fcts->get_bound; get_dof = fh->fe_space->bas_fcts->get_dof_indices; n_phi = fh->fe_space->bas_fcts->n_bas_fcts; mesh = fh->fe_space->mesh; } else if (bound) { get_bound = bound->fe_space->bas_fcts->get_bound; get_dof = bound->fe_space->bas_fcts->get_dof_indices; n_phi = bound->fe_space->bas_fcts->n_bas_fcts; mesh = bound->fe_space->mesh; bound_vec = bound->vec; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_BOUND); while(el_info) { dof = get_dof(el_info->el, bound->fe_space->admin, nil); el_bound = get_bound(el_info, nil); for (j = 0; j < n_phi; j++) bound_vec[dof[j]] = el_bound[j]; el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } if (bound) { TEST_EXIT(fh->fe_space == bound->fe_space, "fh->fe_space, bound->fe_space differ!\n"); bound_vec = bound->vec; FOR_ALL_DOFS(bound->fe_space->admin, bound_vec[dof] = 0); } else bound_vec = nil; REALLOC_WORKSPACE(&ws, n_phi*sizeof(DOF)); bound_dof = (DOF *)ws.work; if (g) interpol = fh->fe_space->bas_fcts->interpol; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS|FILL_BOUND); while(el_info) { dof = get_dof(el_info->el, fh->fe_space->admin, nil); el_bound = get_bound(el_info, nil); n_dirichlet = 0; if (bound_vec) { for (j = 0; j < n_phi; j++) { if (el_bound[j] >= DIRICHLET && bound_vec[dof[j]] <= INTERIOR) { /*--- Dirichlet boundary for this DOF not set! Set it now -------------------*/ bound_dof[n_dirichlet++] = j; } bound_vec[dof[j]] = el_bound[j]; } } else { for (j = 0; j < n_phi; j++) { if (el_bound[j] >= DIRICHLET) { /*--- set Dirichlet value for this DOF ------------------------------------*/ bound_dof[n_dirichlet++] = j; } } } if (n_dirichlet && g) { /*--- compute coefficients for all Dirichlet nodes ------------------------*/ dirichlet = (*interpol)(el_info, n_dirichlet, bound_dof, g, nil, nil); if (u_vec) { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; u_vec[j_dof] = f_vec[j_dof] = dirichlet[j]; } } else { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; f_vec[j_dof] = dirichlet[j]; } } } else if (n_dirichlet) { if (u_vec) { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; u_vec[j_dof] = f_vec[j_dof] = 0.0; } } else { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; f_vec[j_dof] = 0.0; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } /*--------------------------------------------------------------------------*/ /* sets dirichlet boundary values g() in the vectors fh and uh and fills */ /* the vector boundary with the boundary type of the corresponding DOF */ /* for vector valued problems */ /*--------------------------------------------------------------------------*/ void dirichlet_bound_d(const REAL *(*g)(const REAL_D, REAL_D), DOF_REAL_D_VEC *fh, DOF_REAL_D_VEC *uh, DOF_SCHAR_VEC *bound) { FUNCNAME("dirichlet_bound_d"); static WORKSPACE ws = {0, nil}; TRAVERSE_STACK *stack; const EL_INFO *el_info; MESH *mesh = nil; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *) = nil; const DOF *dof; DOF *bound_dof; const S_CHAR *(*get_bound)(const EL_INFO *, S_CHAR *) = nil; const S_CHAR *el_bound; S_CHAR *bound_vec; const REAL_D *(*interpol)(const EL_INFO *, int, const int *b_no, const REAL *(*)(const REAL_D, REAL_D), const REAL *(*)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA], REAL_D val), REAL_D *) = nil; const REAL_D *dirichlet; REAL_D *f_vec = nil, *u_vec = nil; int n, j, j_dof, n_phi = 0, n_dirichlet; if (!fh && !uh && !bound) return; if (fh && uh) TEST_EXIT(fh->fe_space == uh->fe_space,"fe_spaces in fh and uh differ\n"); else if (!fh && uh) { fh = uh; uh = nil; } if (fh) { GET_STRUCT(mesh, fh->fe_space); GET_DOF_VEC(f_vec, fh); if (uh) {GET_DOF_VEC(u_vec, uh);} get_bound = fh->fe_space->bas_fcts->get_bound; get_dof = fh->fe_space->bas_fcts->get_dof_indices; n_phi = fh->fe_space->bas_fcts->n_bas_fcts; mesh = fh->fe_space->mesh; } else if (bound) { get_bound = bound->fe_space->bas_fcts->get_bound; get_dof = bound->fe_space->bas_fcts->get_dof_indices; n_phi = bound->fe_space->bas_fcts->n_bas_fcts; mesh = bound->fe_space->mesh; bound_vec = bound->vec; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_BOUND); while(el_info) { dof = get_dof(el_info->el, bound->fe_space->admin, nil); el_bound = get_bound(el_info, nil); for (j = 0; j < n_phi; j++) bound_vec[dof[j]] = el_bound[j]; el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } if (bound) { TEST_EXIT(fh->fe_space == bound->fe_space, "fh->fe_space, bound->fe_space differ!\n"); bound_vec = bound->vec; FOR_ALL_DOFS(bound->fe_space->admin, bound_vec[dof] = 0); } else bound_vec = nil; REALLOC_WORKSPACE(&ws, n_phi*sizeof(DOF)); bound_dof = (DOF *)ws.work; if (g) interpol = fh->fe_space->bas_fcts->interpol_d; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS|FILL_BOUND); while(el_info) { dof = get_dof(el_info->el, fh->fe_space->admin, nil); el_bound = get_bound(el_info, nil); n_dirichlet = 0; if (bound_vec) { for (j = 0; j < n_phi; j++) { if (el_bound[j] >= DIRICHLET && bound_vec[dof[j]] <= INTERIOR) { /*--- Dirichlet boundary for this DOF not set! Set it now -------------------*/ bound_dof[n_dirichlet++] = j; } bound_vec[dof[j]] = el_bound[j]; } } else { for (j = 0; j < n_phi; j++) { if (el_bound[j] >= DIRICHLET) { /*--- set Dirichlet value for this DOF ------------------------------------*/ bound_dof[n_dirichlet++] = j; } } } if (n_dirichlet && g) { /*--- compute coefficients for all Dirichlet nodes ------------------------*/ dirichlet = (*interpol)(el_info, n_dirichlet, bound_dof, g, nil, nil); if (u_vec) { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; for (n = 0; n < DIM_OF_WORLD; n++) u_vec[j_dof][n] = f_vec[j_dof][n] = dirichlet[j][n]; } } else { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; for (n = 0; n < DIM_OF_WORLD; n++) f_vec[j_dof][n] = dirichlet[j][n]; } } } else if (n_dirichlet) { if (u_vec) { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; for (n = 0; n < DIM_OF_WORLD; n++) u_vec[j_dof][n] = f_vec[j_dof][n] = 0.0; } } else { for (j = 0; j < n_dirichlet; j++) { j_dof = dof[bound_dof[j]]; for (n = 0; n < DIM_OF_WORLD; n++) f_vec[j_dof][n] = 0.0; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } alberta-2.0.1/alberta/src/Common/level.c0000644000042300001440000001416110676724253014760 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: level.c */ /* */ /* description: routines for extracting level set of a piecewise linear */ /* fe-function */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* file is includes by level_xd.c in 2d and 3d! */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de/ */ /* */ /*--------------------------------------------------------------------------*/ /* (c) by A. Schmidt and K.G. Siebert (1996-2004) */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /*--------------------------------------------------------------------------*/ #if DIM_OF_WORLD > 1 && DIM_OF_WORLD < 4 #include "alberta.h" /* Return 0 if this element should be skipped (i.e. because the work * was already done by the neighbour. For an "interior" edge (i.e. one * inside an element) the parameter "face" is -1. "v" are the values * of the level-set function at the vertices of the element, "lambda" * hold its barycentric coordinates. */ static int (*init_element)(const EL_INFO *el_info, REAL v[], int N, int face, const REAL_B lambda[]); /* "coord" are the coordinates of the vertices of the boundary * facette. In 3d the boundary facette may be a quadrilateral in which * case "i" gives the number of the sub-triangle of the virtual * triangulation of the boundary. */ static void (*cal_element)(const EL_INFO *el_info, REAL v[], int i, int face, const REAL_B lambda[], const REAL_D coord[]); static REAL level_value; static REAL small = 1.0E-8; static const DOF_REAL_VEC *level; static const REAL *(*get_real_vec)(const EL *, const DOF_REAL_VEC *, REAL *); #if DIM_OF_WORLD > 1 # include "level_2d.c" #endif #if DIM_OF_WORLD > 2 # include "level_3d.c" #endif int find_level(MESH *mesh, FLAGS fill_flag, const DOF_REAL_VEC *Level, REAL value, int (*init)(const EL_INFO *el_info, REAL v[], int N, int face, const REAL_B lambda[]), void (*cal)(const EL_INFO *el_info, REAL v[], int i, int face, const REAL_B lambda[], const REAL_D coord[])) { FUNCNAME("find_level"); REAL max_abs = 1.e-15; TEST_EXIT(mesh->dim >=2 && mesh->dim <= 3, "level set support unimplemented for dim != 2,3.\n"); TEST_EXIT((level = Level) && level->fe_space, "no level function or no fe-space in level function\n"); TEST_EXIT(linear = level->fe_space->bas_fcts, "no basis functions in level function\n"); TEST_EXIT(linear->degree == 1, "only for degree 1\n"); get_real_vec = linear->get_real_vec; level_value = value; init_element = init; cal_element = cal; FOR_ALL_DOFS(level->fe_space->admin, max_abs = MAX(max_abs, ABS(level->vec[dof] - value))); small = 1.0e-8*MIN(1.0e-2,max_abs); fill_flag |= CALL_LEAF_EL|FILL_COORDS; switch (mesh->dim) { case 2: n_el = 0; mesh_traverse(mesh, -1, fill_flag, level_fct_2d, NULL); return n_el; #if DIM_OF_WORLD > 2 case 3: n_tri = n_quad = 0; mesh_traverse(mesh, -1, fill_flag, level_fct_3d, NULL); return n_tri+n_quad; #endif } return 0; /* not reached */ } static void set_mark_fct(const EL_INFO *el_info, void *markerp) { el_info->el->mark = *(S_CHAR *)markerp; } void set_element_mark(MESH *mesh, FLAGS fill_flag, S_CHAR mark) { mesh_traverse(mesh, -1, fill_flag, set_mark_fct, &mark); } #endif /* DIM_OF_WORLD > 1 */ alberta-2.0.1/alberta/src/Common/macro.c0000644000042300001440000014336210676724253014760 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: macro.c */ /* */ /* description: reading of macro triangulations; file includes */ /* 1d/macro_1d.c, 2d/macro_2d.c, 3d/macro_3d.c which contain */ /* the dimension dependent parts. */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" #define VERT_IND(dim,i,j) ((i)*N_VERTICES(dim)+(j)) #define NEIGH_IND(dim,i,j) ((i)*N_NEIGH(dim)+(j)) /*--------------------------------------------------------------------------*/ /* opp_vertex_fast() checks whether the vertex/edge/face with vertices */ /* test[0],..,test[dim-1] is part of mel's boundary. It returns the */ /* opposite vertex if true else -1. */ /*--------------------------------------------------------------------------*/ static S_CHAR opp_vertex(int dim, int *mel_vert, int *test) { int i, j, nv = 0, ov = 0; for (i = 0; i < N_VERTICES(dim); i++) { if (nv < i-1) return(-1); for (j = 0; j < dim; j++) { if (mel_vert[i] == test[j]) { /*--------------------------------------------------------------------------*/ /* i is a common vertex */ /*--------------------------------------------------------------------------*/ ov += i; nv++; break; } } } if (nv != dim) return(-1); /*--------------------------------------------------------------------------*/ /* the opposite vertex is 1/3/6 - (sum of indices of common vertices) in */ /* 1d/2d/3d */ /*--------------------------------------------------------------------------*/ if (dim == 1) return(1-ov); else if(dim == 2) return(3-ov); else return(6-ov); } /*--------------------------------------------------------------------------*/ /* compute_neigh_fast() is an algorithm meant to speed up the task of */ /* computing neighbours. It does not use an N^2-algorithm. */ /* The idea is to link vertices to elements sharing them to make the */ /* search for neighbours more efficient - at the cost of some additional */ /* temporary memory usage. Daniel Koester */ /*--------------------------------------------------------------------------*/ void compute_neigh_fast(MACRO_DATA *data) { FUNCNAME("compute_neigh_fast"); int dim = data->dim; int i, j, k, index, vertices[DIM_OF_WORLD], info=0; int neigh_found = false; S_CHAR l; struct vert2elem { struct vert2elem *next; int mel; }; typedef struct vert2elem VERT2ELEM; VERT2ELEM *buffer, *buffer2; VERT2ELEM **list = MEM_CALLOC(data->n_total_vertices, VERT2ELEM *); if(!data->neigh) data->neigh = MEM_ALLOC(data->n_macro_elements*N_NEIGH(dim), int); /*--------------------------------------------------------------------------*/ /* first initialize elements (-2 as "undefined") */ /*--------------------------------------------------------------------------*/ for (i = 0; i < data->n_macro_elements; i++) for (j = 0; j < N_NEIGH(dim); j++) data->neigh[NEIGH_IND(dim,i,j)] = -2; /*--------------------------------------------------------------------------*/ /* fill the array "list" of linked lists */ /*--------------------------------------------------------------------------*/ for(i = 0; i < data->n_macro_elements; i++) { for(j = 0; j < N_VERTICES(dim); j++) { buffer = list[(index=data->mel_vertices[VERT_IND(dim,i,j)])]; list[index] = MEM_ALLOC(1, VERT2ELEM); list[index]->next = buffer; list[index]->mel = i; } } /*--------------------------------------------------------------------------*/ /* here comes the actual checking... */ /*--------------------------------------------------------------------------*/ for (i = 0; i < data->n_macro_elements; i++) { INFO(info,4,"Current element %d\n",i); INFO(info,6,"with vertices: "); for(j = 0; j < N_VERTICES(dim); j++) PRINT_INFO(info,6,"%d ", data->mel_vertices[VERT_IND(dim,i,j)]); PRINT_INFO(info,6,"\n"); for (j = 0; j < N_NEIGH(dim); j++) { if (data->neigh[NEIGH_IND(dim,i,j)] == -2) { INFO(info,8,"looking for neighbour no %d\n", j); for (k = 0; k < dim; k++) vertices[k] = data->mel_vertices[VERT_IND(dim, i, (j+k+1)%(dim+1))]; buffer = list[vertices[0]]; neigh_found = false; while(buffer) { if(buffer->mel != i) { if ((l = opp_vertex(dim, data->mel_vertices+buffer->mel*N_VERTICES(dim), vertices)) != -1) { TEST_EXIT(!neigh_found, "Found two neighbours on vertex/edge/face %d of macro el %d!\n", j, i); data->neigh[NEIGH_IND(dim,i,j)] = buffer->mel; data->neigh[NEIGH_IND(dim,buffer->mel,l)] = i; INFO(info,8,"found element %d as neighbour...\n", buffer->mel); neigh_found = true; } } buffer = buffer->next; } if(!neigh_found) { INFO(info,8, "no neighbour %d of element %d found: Assuming a boundary...\n", j, i); data->neigh[NEIGH_IND(dim,i,j)] = -1; } } } } /*--------------------------------------------------------------------------*/ /* now is the time to clean up */ /*--------------------------------------------------------------------------*/ for(i = 0; i < data->n_total_vertices; i++) { buffer = list[i]; while(buffer) { buffer2 = buffer->next; MEM_FREE(buffer, 1, VERT2ELEM); buffer = buffer2; } } MEM_FREE(list, data->n_total_vertices, VERT2ELEM *); return; } /*--------------------------------------------------------------------------*/ /* sets the boundary of all edges without neigbour to DIRICHLET boundary */ /* type */ /*--------------------------------------------------------------------------*/ void dirichlet_boundary(MACRO_DATA *data) { int i, dim = data->dim; if(!data->boundary) data->boundary = MEM_ALLOC(data->n_macro_elements*N_NEIGH(dim), S_CHAR); for (i = 0; i < data->n_macro_elements * N_NEIGH(dim); i++) data->boundary[i] = (data->neigh[i]>=0) ? INTERIOR : DIRICHLET; return; } #include "macro_1d.c" #if DIM_OF_WORLD > 1 #include "macro_2d.c" #if DIM_OF_WORLD > 2 #include "macro_3d.c" #endif #endif /*--------------------------------------------------------------------------*/ /* read data->neigh into mel[].neigh[] */ /* fill opp_vertex values and do a check on neighbour relations */ /*--------------------------------------------------------------------------*/ static void fill_neigh_info(MACRO_EL *mel, const MACRO_DATA *data) { FUNCNAME("fill_neigh_info"); MACRO_EL *neigh; int i, j, k, index, dim = data->dim; for (i = 0; i < data->n_macro_elements; i++) { for (j = 0; j < N_NEIGH(dim); j++) { mel[i].neigh[j] = ((index=data->neigh[NEIGH_IND(dim,i,j)]) >= 0) ? (mel+index) : nil; } } for (i = 0; i < data->n_macro_elements; i++) { for (j = 0; j < N_NEIGH(dim); j++) { if ((neigh = mel[i].neigh[j])) { for (k = 0; k < N_NEIGH(dim); k++) if (neigh->neigh[k] == mel+i) break; TEST_EXIT(kindex); mel[i].opp_vertex[j] = k; } else { mel[i].opp_vertex[j] = -1; } } } return; } /*--------------------------------------------------------------------------*/ /* domain size */ /*--------------------------------------------------------------------------*/ static void calculate_size(MESH *mesh, const MACRO_DATA *data) { int i,j; REAL_D x_min, x_max; for (j = 0; j < DIM_OF_WORLD; j++) { x_min[j] = data->coords[0][j]; x_max[j] = data->coords[0][j]; } for (i = 0; i < mesh->n_vertices; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { x_min[j] = MIN(x_min[j], data->coords[i][j]); x_max[j] = MAX(x_max[j], data->coords[i][j]); } } for (j = 0; j < DIM_OF_WORLD; j++) mesh->diam[j] = x_max[j] - x_min[j]; return; } /*--------------------------------------------------------------------------*/ /* read_indices() reads dim+1 indices from file into id[0-dim], */ /* returns true if dim+1 inputs arguments could be read successfully by */ /* fscanf(), else false */ /*--------------------------------------------------------------------------*/ static int read_indices(int dim, FILE *file, int id[]) { int i; for (i = 0; i <= dim; i++) if (fscanf(file, "%d", id+i) != 1) return(false); return(true); } #define N_KEYS 9 #define N_MIN_KEYS 6 static const char *keys[N_KEYS] = {"DIM", /* 0 */ "DIM_OF_WORLD", /* 1 */ "number of vertices", /* 2 */ "number of elements", /* 3 */ "vertex coordinates", /* 4 */ "element vertices", /* 5 */ "element boundaries", /* 6 */ "element neighbours", /* 7 */ "element type"}; /* 8 */ static int get_key_no(const char *key) { int i; for (i = 0; i < N_KEYS; i++) if (!strcmp(keys[i], key)) return(i); return(-1); } static const char *read_key(const char *line) { static char key[100]; char *k = key; while(isspace(*line)) line++; while((*k++ = *line++) != ':'); *--k = '\0'; return((const char *) key); } /*--------------------------------------------------------------------------*/ /* read_macro_data(): */ /* read macro triangulation from ascii file in ALBERTA format */ /* fills macro_data structure */ /* called by read_macro() */ /*--------------------------------------------------------------------------*/ static MACRO_DATA *read_macro_data(const char *filename) { FUNCNAME("read_macro_data"); FILE *file; MACRO_DATA *macro_data = nil; int dim, dow, nv, ne, i, j, ind[DIM_OF_WORLD+1]; REAL dbl; char name[128], line[256]; int line_no, n_keys, i_key, sort_key[N_KEYS], nv_key, ne_key; int key_def[N_KEYS] = {0,0,0,0,0,0,0,0,0}; const char *key; TEST_EXIT(filename,"no file specified; filename nil pointer\n"); TEST_EXIT(strlen(filename) < (unsigned int) 127, "can only handle filenames up to 127 characters\n"); TEST_EXIT((file=fopen(filename,"r")),"cannot open file %s\n",filename); strncpy(name, filename, 127); /*--------------------------------------------------------------------------*/ /* looking for all keys in the macro file ... */ /*--------------------------------------------------------------------------*/ line_no = n_keys = 0; while (fgets(line, 255, file)) { line_no++; if (!strchr(line, ':')) continue; key = read_key(line); i_key = get_key_no(key); TEST_EXIT(i_key >= 0, "file %s: must not contain key %s on line %d\n", name, key, line_no); TEST_EXIT(!key_def[i_key], "file %s: key %s defined second time on line %d\n", name, key, line_no); sort_key[n_keys++] = i_key; key_def[i_key] = true; } fclose(file); for (i_key = 0; i_key < N_MIN_KEYS; i_key++) { for (j = 0; j < n_keys; j++) if (sort_key[j] == i_key) break; TEST_EXIT(j < n_keys, "file %s: You do not have specified data for %s in %s\n", name, keys[i_key]); for (j = 0; j < n_keys; j++) if (sort_key[j] == 2) break; nv_key = j; for (j = 0; j < n_keys; j++) if (sort_key[j] == 3) break; ne_key = j; switch(i_key) { case 0: case 1: TEST_EXIT(sort_key[i_key] < 2, "file %s: You have to specify DIM or DIM_OF_WORLD before all other data\n", name); break; case 4: TEST_EXIT(nv_key < i_key, "file %s: Before reading data for %s, you have to specify the %s\n", name, keys[4], keys[2]); break; case 5: TEST_EXIT(nv_key < i_key && ne_key < i_key, "file %s: Before reading data for %s, you have to specify the %s and %s\n", name, keys[5], keys[3], keys[2]); case 6: case 7: case 8: TEST_EXIT(ne_key < i_key, "file %s: Before reading data for %s, you have to specify the %s\n", name, keys[i_key], keys[3]); } } for (i_key = 0; i_key < N_KEYS; i_key++) key_def[i_key] = false; /*--------------------------------------------------------------------------*/ /* and now, reading data ... */ /*--------------------------------------------------------------------------*/ TEST_EXIT((file=fopen(name,"r")),"cannot open file %s\n",name); for (i_key = 0; i_key < n_keys; i_key++) { switch(sort_key[i_key]) { case 0: TEST_EXIT(fscanf(file, "%*s %d", &dim) == 1, "file %s: can not read DIM correctly\n", name); TEST_EXIT(dim <= DIM_OF_WORLD,"file %s: dimension = %d > DIM_OF_WORLD = %d\n", name, dim, DIM_OF_WORLD); key_def[0] = true; break; case 1: TEST_EXIT(fscanf(file, "%*s %d", &dow) == 1, "file %s: can not read DIM_OF_WORLD correctly\n", name); TEST_EXIT(dow == DIM_OF_WORLD, "file %s: dimension of world = %d != DIM_OF_WORLD = %d\n", name, dow, DIM_OF_WORLD); key_def[1] = true; break; case 2: TEST_EXIT(fscanf(file, "%*s %*s %*s %d", &nv) == 1, "file %s: can not read number of vertices correctly\n", name); TEST_EXIT(nv > 0, "file %s: number of vertices = %d must be bigger than 0\n", name, nv); key_def[2] = true; if(key_def[3]) macro_data = alloc_macro_data(dim, nv, ne, 0); break; case 3: TEST_EXIT(fscanf(file, "%*s %*s %*s %d", &ne) == 1, "file %s: can not read number of elements correctly\n", name); TEST_EXIT(ne > 0, "file %s: number of elements = %d must be bigger than 0\n", name, ne); key_def[3] = true; if(key_def[2]) macro_data = alloc_macro_data(dim, nv, ne, 0); break; case 4: fscanf(file, "%*s %*s"); for (i = 0; i < nv; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { TEST_EXIT(fscanf(file, "%lf", &dbl) == 1, "file %s: error while reading coordinates, check file\n", name); macro_data->coords[i][j] = dbl; } } key_def[4] = true; break; case 5: fscanf(file, "%*s %*s"); /*--------------------------------------------------------------------------*/ /* global index of vertices for each single element */ /*--------------------------------------------------------------------------*/ for (i = 0; i < ne; i++) { TEST_EXIT(read_indices(dim, file, ind), "file %s: can not read vertex indices of element %d\n", name, i); for (j = 0; j < N_VERTICES(dim); j++) macro_data->mel_vertices[VERT_IND(dim,i,j)] = ind[j]; } key_def[5] = true; break; case 6: fscanf(file, "%*s %*s"); if(dim == 0) ERROR_EXIT("Boundary types do not make sense in 0d!\n"); else { /*--------------------------------------------------------------------------*/ /* read boundary type of each vertex/edge/face (in 1d/2d/3d) */ /*--------------------------------------------------------------------------*/ macro_data->boundary = MEM_ALLOC(ne*N_NEIGH(dim), S_CHAR); for (i = 0; i < ne; i++) { TEST_EXIT(read_indices(dim, file, ind), "file %s: can not read boundary types of element %d\n", name, i); for(j = 0; j < N_NEIGH(dim); j++) macro_data->boundary[NEIGH_IND(dim,i,j)] = (S_CHAR) ind[j]; } } key_def[6] = true; break; case 7: fscanf(file, "%*s %*s"); if(dim == 0) ERROR_EXIT("Neighbour indices do not make sense in 0d!\n"); else { /*--------------------------------------------------------------------------*/ /* read neighbour indices: */ /*--------------------------------------------------------------------------*/ macro_data->neigh = MEM_ALLOC(ne*N_NEIGH(dim), int); for (i = 0; i < ne; i++) { TEST_EXIT(read_indices(dim, file, ind), "file %s: can not read neighbour info of element %d\n", name, i); for(j = 0; j < N_NEIGH(dim); j++) macro_data->neigh[NEIGH_IND(dim,i,j)] = ind[j]; } } key_def[7] = true; break; case 8: fscanf(file, "%*s %*s"); /*--------------------------------------------------------------------------*/ /* el_type is handled just like bound and neigh above */ /*--------------------------------------------------------------------------*/ if(dim < 3) { WARNING("File %s: element type only used in 3d; will ignore data for el_type\n", name); } else { macro_data->el_type = MEM_ALLOC(ne, U_CHAR); for (i = 0; i < ne; i++) { TEST_EXIT(fscanf(file, "%d", &j) == 1, "file %s: can not read el_type of element %d\n", name, i); macro_data->el_type[i] = (U_CHAR) j; } } key_def[8] = true; break; } } fclose(file); return(macro_data); } /*--------------------------------------------------------------------------*/ /* read macro triangulation from file "filename" into macro_data data in */ /* native binary format */ /*--------------------------------------------------------------------------*/ static MACRO_DATA *read_macro_data_bin(const char *name) { FUNCNAME("read_macro_data_bin"); FILE *file; MACRO_DATA *macro_data; int dim, i,length, nv, ne; char *s; char record_written; TEST_EXIT(file = fopen(name, "rb"),"cannot open file %s\n", name); length = MAX(strlen(ALBERTA_VERSION)+1, 21); s = MEM_ALLOC(length, char); fread(s, sizeof(char), length, file); TEST_EXIT(!strncmp(s, "ALBERTA", 6),"file %s: unknown file id:\"%s\"\n",name,s); MEM_FREE(s, length, char); fread(&i, sizeof(int), 1, file); TEST_EXIT(i == sizeof(REAL),"file %s: wrong sizeof(REAL) %d\n", name, i); fread(&dim, sizeof(int), 1, file); TEST_EXIT(dim <= DIM_OF_WORLD,"file %s: dimension = %d > DIM_OF_WORLD = %d\n", name, dim, DIM_OF_WORLD); fread(&i, sizeof(int), 1, file); TEST_EXIT(i == DIM_OF_WORLD, "file %s: dimension of world = %d != DIM_OF_WORLD = %d\n", name, i, DIM_OF_WORLD); fread(&nv, sizeof(int), 1, file); TEST_EXIT(nv > 0, "file %s: number of vertices = %d must be bigger than 0\n", name, nv); fread(&ne, sizeof(int), 1, file); TEST_EXIT(ne > 0, "file %s: number of elements = %d must be bigger than 0\n", name, ne); macro_data = alloc_macro_data(dim, nv, ne, 0); fread(macro_data->coords, sizeof(REAL_D), nv, file); fread(macro_data->mel_vertices, sizeof(int), N_VERTICES(dim) * ne, file); fread(&record_written, sizeof(char), 1, file); if(record_written) { macro_data->boundary = MEM_ALLOC(ne*N_NEIGH(dim), S_CHAR); fread(macro_data->boundary, sizeof(S_CHAR), N_NEIGH(dim) * ne, file); } fread(&record_written, sizeof(char), 1, file); if(record_written) { macro_data->neigh = MEM_ALLOC(ne*N_NEIGH(dim), int); fread(macro_data->neigh, sizeof(int), N_NEIGH(dim) * ne, file); } if(dim == 3) { fread(&record_written, sizeof(char), 1, file); if(record_written) { macro_data->el_type = MEM_ALLOC(ne, U_CHAR); fread(macro_data->el_type, sizeof(U_CHAR), ne, file); } } s = MEM_ALLOC(5, char); TEST_EXIT(fread(s, sizeof(char), 4, file) == 4, "file %s: problem while reading FILE END MARK\n", name); TEST_EXIT(!strncmp(s, "EOF.", 4),"file %s: no FILE END MARK\n", name); MEM_FREE(s, 5, char); fclose(file); return(macro_data); } /*--------------------------------------------------------------------------*/ /* Some routines needed for interaction with xdr-files */ /* WARNING: These will need to be adapted if ALBERTA data types REAL, REAL_D*/ /* ,etc. change! */ /*--------------------------------------------------------------------------*/ static int xdr_dim = 0; static bool_t xdr_REAL(XDR *xdr, REAL *rp) { return (xdr_double(xdr,rp)); } ALBERTA_DEFUNUSED(static bool_t xdr_U_CHAR(XDR *xdr, U_CHAR *ucp)) { return (xdr_u_char(xdr,ucp)); } static bool_t xdr_S_CHAR(XDR *xdr, S_CHAR *cp) { return (xdr_char(xdr,(char *)cp)); } static bool_t xdr_REAL_D(XDR *xdr, REAL_D *dp) { return (xdr_vector(xdr, (char *)dp, DIM_OF_WORLD, sizeof(REAL), (xdrproc_t) xdr_REAL)); } static int read_xdr_file(char *xdr_file, char *buffer, int size) { return ((int)fread(buffer, (size_t)size, 1, (FILE *)xdr_file)); } static int write_xdr_file(char *xdr_file, char *buffer, int size) { return (fwrite(buffer, (size_t)size, 1, (FILE *)xdr_file) == 1 ? size : 0); } static XDR *xdr_open_file(const char *filename, enum xdr_op mode) { XDR *xdr; FILE *xdr_file; if (!(xdr = MEM_ALLOC(1,XDR))) { ERROR("can't allocate memory for xdr pointer.\n"); return NULL; } if ((xdr_file = fopen(filename, mode == XDR_DECODE ? "r": "w"))) { xdrrec_create(xdr, 65536, 65536, (caddr_t) xdr_file, read_xdr_file, write_xdr_file); xdr->x_op = mode; xdr->x_public = (caddr_t)xdr_file; if (mode == XDR_DECODE) xdrrec_skiprecord(xdr); return xdr; } else { ERROR("error opening xdr file.\n"); MEM_FREE(xdr,1,XDR); return NULL; } } static int xdr_close_file(XDR *xdr) { if (!xdr) { ERROR("NULL xdr pointer.\n"); return 0; } if (xdr->x_op == XDR_ENCODE) xdrrec_endofrecord(xdr, 1); if (fclose((FILE *) xdr->x_public)) ERROR("error closing file.\n"); xdr_destroy(xdr); MEM_FREE(xdr,1,XDR); return 1; } /*--------------------------------------------------------------------------*/ /* read_macro_data_xdr(): */ /* read macro triangulation from file in xdr-format */ /* fills macro_data structure */ /* called by ....? */ /*--------------------------------------------------------------------------*/ static MACRO_DATA *read_macro_data_xdr(const char *name) { FUNCNAME("read_macro_data_xdr"); XDR *xdrp; MACRO_DATA *macro_data; int length, dow, nv, ne, size; char *s; bool_t record_written; caddr_t array_loc; TEST_EXIT(name,"no file specified; filename nil pointer\n"); if (!(xdrp = xdr_open_file(name, XDR_DECODE))) ERROR_EXIT("cannot open file %s\n",name); length = MAX(strlen(ALBERTA_VERSION)+1,21); /* length with terminating \0 */ s = MEM_ALLOC(length, char); TEST_EXIT(xdr_string(xdrp, &s, length),"file %s: could not read file id\n", name); TEST_EXIT(!strncmp(s, "ALBERTA", 6),"file %s: unknown file id: \"%s\"\n",name,s); MEM_FREE(s, length, char); TEST_EXIT(xdr_int(xdrp, &xdr_dim),"file %s: could not read dimension correctly\n",name); TEST_EXIT(xdr_dim <= DIM_OF_WORLD,"file %s: dimension = %d > DIM_OF_WORLD = %d\n", name, xdr_dim, DIM_OF_WORLD); TEST_EXIT(xdr_int(xdrp, &dow),"file %s: could not read dimension of world correctly\n",name); TEST_EXIT(dow == DIM_OF_WORLD, "file %s: dimension of world = %d != DIM_OF_WORLD = %d\n", name, dow, DIM_OF_WORLD); TEST_EXIT(xdr_int(xdrp, &nv), "file %s: can not read number of vertices correctly\n", name); TEST_EXIT(nv > 0, "file %s: number of vertices = %d must be bigger than 0\n", name, nv); TEST_EXIT(xdr_int(xdrp, &ne), "file %s: can not read number of elements correctly\n", name); TEST_EXIT(ne > 0, "file %s: number of elements = %d must be bigger than 0\n", name, ne); macro_data = alloc_macro_data(xdr_dim, nv, ne, 0); array_loc=(caddr_t) macro_data->coords; TEST_EXIT(xdr_array(xdrp, &array_loc, (u_int *) &nv, (u_int) nv, sizeof(REAL_D), (xdrproc_t) xdr_REAL_D), "file %s: error while reading coordinates, check file\n", name); array_loc=(caddr_t) macro_data->mel_vertices; size = ne * N_VERTICES(xdr_dim); TEST_EXIT(xdr_array(xdrp, &array_loc, (u_int *) &size, (u_int) size, sizeof(int), (xdrproc_t) xdr_int), "file %s: can not read vertex indices\n", name); TEST_EXIT(xdr_bool(xdrp, &record_written), "file %s: could not determine whether to allocate memory for boundaries\n", name); if(record_written) { macro_data->boundary = MEM_ALLOC(ne*N_NEIGH(xdr_dim), S_CHAR); array_loc=(caddr_t) macro_data->boundary; size = ne * N_NEIGH(xdr_dim); TEST_EXIT(xdr_array(xdrp, &array_loc, (u_int *) &size, (u_int) size, sizeof(S_CHAR), (xdrproc_t) xdr_S_CHAR), "file %s: could not read boundary types\n",name); } TEST_EXIT(xdr_bool(xdrp, &record_written), "file %s: could not determine whether to allocate memory for neighbours\n", name); if(record_written) { macro_data->neigh = MEM_ALLOC(ne*N_NEIGH(xdr_dim), int); array_loc=(caddr_t) macro_data->neigh; size = ne * N_NEIGH(xdr_dim); TEST_EXIT(xdr_array(xdrp, &array_loc, (u_int *) &size, (u_int) size, sizeof(int), (xdrproc_t) xdr_int), "file %s: could not read neighbor info\n",name); } if(xdr_dim == 3) { TEST_EXIT(xdr_bool(xdrp, &record_written), "file %s: could not determine whether to allocate memory for element types\n", name); if(record_written) { macro_data->el_type = MEM_ALLOC(ne, U_CHAR); array_loc=(caddr_t) macro_data->el_type; TEST_EXIT(xdr_array(xdrp, &array_loc, (u_int *) &ne, (u_int) ne, sizeof(U_CHAR), (xdrproc_t) xdr_U_CHAR), "file %s: can not read element types\n", name); } } xdr_close_file(xdrp); return(macro_data); } /*--------------------------------------------------------------------------*/ /* supported file types for macro data files: */ /*--------------------------------------------------------------------------*/ typedef enum {ascii_format, binary_format, xdr_format} macro_format; /*--------------------------------------------------------------------------*/ /* read macro triangulation from file "filename" */ /*--------------------------------------------------------------------------*/ static MACRO_DATA *read_macro_master(const char *filename, macro_format format) { FUNCNAME("read_macro_master"); MACRO_DATA *macro_data = nil; char filenew[1024]; TEST_EXIT(filename,"no file specified; filename nil pointer\n"); switch(format) { case ascii_format: macro_data = read_macro_data(filename); break; case binary_format: macro_data = read_macro_data_bin(filename); break; case xdr_format: macro_data = read_macro_data_xdr(filename); } if(!macro_data->neigh && macro_data->dim > 0) compute_neigh_fast(macro_data); if(!macro_data->boundary && macro_data->dim > 0) dirichlet_boundary(macro_data); strncpy(filenew, filename, 1024); filenew[1023] = 0; strncat(filenew, ".new", 1024); filenew[1023] = 0; macro_test(macro_data, filenew); return macro_data; } static void cleanup_write_macro(MACRO_DATA *data, DOF_INT_VEC *dof_vert_ind, TRAVERSE_STACK *stack) { if (data) free_macro_data(data); free_dof_int_vec(dof_vert_ind); free_traverse_stack(stack); return; } /*--------------------------------------------------------------------------*/ /* mesh2macro_data(): counterpart to macro_data2mesh below. This routine */ /* converts the information stored in the leaf elements of mesh to the raw */ /* data type MACRO_DATA. */ /*--------------------------------------------------------------------------*/ extern MACRO_DATA *mesh2macro_data(MESH *mesh) { FUNCNAME("mesh2macro_data"); MACRO_DATA *data; TRAVERSE_STACK *stack; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_BOUND|FILL_NEIGH; PARAMETRIC *parametric; const DOF_ADMIN *admin; FE_SPACE fe_space = {"write fe_space", nil, nil}; const EL_INFO *el_info; DOF_INT_VEC *dof_vert_ind; int dim = mesh->dim, n0, ne, nv, i, j, *vert_ind = nil; U_CHAR write_el_type; static const REAL vertex_bary[N_VERTICES_MAX][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}}; admin = get_vertex_admin(mesh); n0 = admin->n0_dof[VERTEX]; fe_space.admin = admin; parametric = mesh->parametric; dof_vert_ind = get_dof_int_vec("vertex indices", &fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = -1); data = alloc_macro_data(dim, mesh->n_vertices, mesh->n_elements, 0); nv = ne = 0; write_el_type = false; stack = get_traverse_stack(); /*--------------------------------------------------------------------------*/ /* The first pass counts elements and vertices, checks these against the */ /* entries of mesh->n_elements, mesh->n_vertices, and fills data->coords. */ /* A check on whether an element has nonzero el_type is also done. */ /*--------------------------------------------------------------------------*/ for(el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL | FILL_COORDS); el_info; el_info = traverse_next(stack, el_info)) { if (parametric) { parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES(dim), vertex_bary, (REAL_D *)el_info->coord); } for (i = 0; i < N_VERTICES(dim); i++) { if (vert_ind[el_info->el->dof[i][n0]] == -1) { /*--------------------------------------------------------------------------*/ /* assign a global index to each vertex */ /*--------------------------------------------------------------------------*/ vert_ind[el_info->el->dof[i][n0]] = nv; for (j = 0; j < DIM_OF_WORLD; j++) data->coords[nv][j] = el_info->coord[i][j]; nv++; if(nv > mesh->n_vertices) { cleanup_write_macro(data, dof_vert_ind, stack); ERROR("mesh %s: n_vertices (==%d) is too small! Writing aborted\n", mesh->name, mesh->n_vertices); return(nil); } } } ne++; if(ne > mesh->n_elements) { cleanup_write_macro(data, dof_vert_ind, stack); ERROR("mesh %s: n_elements (==%d) is too small! Writing aborted\n", mesh->name, mesh->n_elements); return(nil); } if(dim == 3 && el_info->el_type) write_el_type = true; } if(ne < mesh->n_elements) { cleanup_write_macro(data, dof_vert_ind, stack); ERROR("mesh %s: n_elements (==%d) is too large: only %d leaf elements counted -- writing aborted\n", mesh->name, mesh->n_elements, ne); return(nil); } if(nv < mesh->n_vertices) { cleanup_write_macro(data, dof_vert_ind, stack); ERROR("mesh %s: n_vertices (==%d) is too large: only %d vertices counted -- allocation of macro data aborted\n", mesh->name, mesh->n_vertices, nv); return(nil); } if(dim > 0) data->boundary = MEM_ALLOC(ne*N_NEIGH(dim), S_CHAR); if(write_el_type) data->el_type = MEM_ALLOC(ne, U_CHAR); ne = 0; /*--------------------------------------------------------------------------*/ /* The second pass assigns mel_vertices, boundary, and if necessary el_type */ /*--------------------------------------------------------------------------*/ for(el_info = traverse_first(stack, mesh, -1, fill_flag); el_info; el_info = traverse_next(stack, el_info)) { for (i = 0; i < N_VERTICES(dim); i++) data->mel_vertices[VERT_IND(dim,ne,i)] = vert_ind[el_info->el->dof[i][n0]]; if(dim > 0) for (i = 0; i < N_NEIGH(dim); i++) switch(dim) { case 1: data->boundary[NEIGH_IND(dim,ne,i)] = el_info->vertex_bound[1-i]; break; case 2: data->boundary[NEIGH_IND(dim,ne,i)] = el_info->edge_bound[i]; break; case 3: data->boundary[NEIGH_IND(dim,ne,i)] = el_info->face_bound[i]; } if(write_el_type) data->el_type[ne] = el_info->el_type; ++ne; } /*--------------------------------------------------------------------------*/ /* Finally, we compute neighbour information. This seems to be the easiest */ /* solution, since neighbor information in ALBERTA is only available as */ /* pointers. */ /*--------------------------------------------------------------------------*/ if(dim > 0) compute_neigh_fast(data); cleanup_write_macro(nil, dof_vert_ind, stack); return(data); } /*--------------------------------------------------------------------------*/ /* write_macro() writes the current mesh (at the level of leaf elements) as */ /* a macro triangulation to the specified file */ /*--------------------------------------------------------------------------*/ static int write_macro_master(MESH *mesh, const char *filename, macro_format format) { FUNCNAME("write_macro_master"); int result = 0; /* make gcc happy */ MACRO_DATA *data; if (!filename) { ERROR("no filename specified, filename is nil pointer\n"); return(0); } if (!mesh) { ERROR("no mesh specified, mesh is nil pointer\n"); return(0); } if(!(data = mesh2macro_data(mesh))) { ERROR("Could not convert mesh to a macro data structure!\n"); return(0); } switch(format) { case ascii_format: result=write_macro_data(data, filename); break; case binary_format: result=write_macro_data_bin(data, filename); break; case xdr_format: result=write_macro_data_xdr(data, filename); } free_macro_data(data); return(result); } /*--------------------------------------------------------------------------*/ /* These routines are available to the user: */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* initialize and clear macro data structures */ /*--------------------------------------------------------------------------*/ extern MACRO_DATA *alloc_macro_data(int dim, int nv, int ne, FLAGS flag) { FUNCNAME("alloc_macro_data"); MACRO_DATA *data = MEM_CALLOC(1, MACRO_DATA); data->dim = dim; data->n_total_vertices = nv; data->n_macro_elements = ne; data->coords = MEM_ALLOC(nv, REAL_D); data->mel_vertices = MEM_ALLOC(ne*N_VERTICES(dim), int); if (flag & FILL_NEIGH) data->neigh = MEM_ALLOC(ne*N_NEIGH(dim), int); if (flag & FILL_BOUND) data->boundary = MEM_ALLOC(ne*N_NEIGH(dim), S_CHAR); if ((flag & FILL_EL_TYPE) && dim == 3) data->el_type = MEM_ALLOC(ne, U_CHAR); return(data); } extern void free_macro_data(MACRO_DATA *data) { int dim = data->dim, ne = data->n_macro_elements, nv = data->n_total_vertices; MEM_FREE(data->coords, nv, REAL_D); MEM_FREE(data->mel_vertices, ne*N_VERTICES(dim), int); if(data->neigh) MEM_FREE(data->neigh, ne*N_NEIGH(dim), int); if(data->boundary) MEM_FREE(data->boundary, ne*N_NEIGH(dim), S_CHAR); if(dim == 3 && data->el_type) MEM_FREE(data->el_type, ne, U_CHAR); MEM_FREE(data, 1, MACRO_DATA); return; } extern MACRO_DATA *read_macro(const char *filename) { return read_macro_master(filename, ascii_format); } extern MACRO_DATA *read_macro_bin(const char *filename) { return read_macro_master(filename, binary_format); } extern MACRO_DATA *read_macro_xdr(const char *filename) { return read_macro_master(filename, xdr_format); } extern int write_macro(MESH *mesh, const char *filename) { return(write_macro_master(mesh, filename, ascii_format)); } extern int write_macro_bin(MESH *mesh, const char *filename) { return(write_macro_master(mesh, filename, binary_format)); } extern int write_macro_xdr(MESH *mesh, const char *filename) { return(write_macro_master(mesh, filename, xdr_format)); } /*--------------------------------------------------------------------------*/ /* write raw macro triangulation in "data" to "filename" in standard ALBERTA*/ /* key format */ /*--------------------------------------------------------------------------*/ extern int write_macro_data(MACRO_DATA *data, const char *filename) { FUNCNAME("write_macro_data"); FILE *macro_file; int i, j, dim = data->dim; if (!(macro_file = fopen(filename, "w"))) { ERROR("could not open file %s for writing\n", filename); return(0); } fprintf(macro_file, "DIM: %d\n", dim); fprintf(macro_file, "DIM_OF_WORLD: %d\n\n", DIM_OF_WORLD); fprintf(macro_file, "number of vertices: %d\n", data->n_total_vertices); fprintf(macro_file, "number of elements: %d\n\n", data->n_macro_elements); fprintf(macro_file, "vertex coordinates:\n"); for(i = 0; i < data->n_total_vertices; i++) for (j = 0; j < DIM_OF_WORLD; j++) fprintf(macro_file, "%17.10e%s", data->coords[i][j], j < DIM_OF_WORLD-1 ? " " : "\n"); fprintf(macro_file, "\nelement vertices:\n"); for(i = 0; i < data->n_macro_elements; i++) for (j = 0; j < N_VERTICES(dim); j++) fprintf(macro_file, "%5d%s", data->mel_vertices[VERT_IND(dim,i,j)], j < N_VERTICES(dim)-1 ? " " : "\n"); if(data->boundary) { fprintf(macro_file, "\nelement boundaries:\n"); for(i = 0; i < data->n_macro_elements; i++) for (j = 0; j < N_NEIGH(dim); j++) fprintf(macro_file, "%4d%s", data->boundary[NEIGH_IND(dim,i,j)], j < N_NEIGH(dim)-1 ? " " : "\n"); } if(data->neigh) { fprintf(macro_file, "\nelement neighbours:\n"); for(i = 0; i < data->n_macro_elements; i++) for (j = 0; j < N_NEIGH(dim); j++) fprintf(macro_file, "%4d%s", data->neigh[NEIGH_IND(dim,i,j)], j < N_NEIGH(dim)-1 ? " " : "\n"); } if (dim == 3 && data->el_type) { fprintf(macro_file, "\nelement type:\n"); for(i = 0; i < data->n_macro_elements; i++) fprintf(macro_file, "%d%s", data->el_type[i], ((i+1)%20) ? " ": "\n"); } if (!(i%20)) fprintf(macro_file, "\n"); fclose(macro_file); INFO(2,2,"wrote macro file %s\n", filename); return(1); } /*--------------------------------------------------------------------------*/ /* write raw macro triangulation in "data" to "filename" in native binary */ /* format */ /*--------------------------------------------------------------------------*/ extern int write_macro_data_bin(MACRO_DATA *data, const char *filename) { FUNCNAME("write_macro_data_bin"); FILE *file; int i, dim = data->dim; char record_written=1; char record_not_written=0; if(!data) { ERROR("no data - no file created\n"); return(0); } if (!(file = fopen(filename, "wb"))) { ERROR("cannot open file %s\n",filename); return(0); } fwrite(ALBERTA_VERSION, sizeof(char), strlen(ALBERTA_VERSION)+1, file); i = sizeof(REAL); fwrite(&i, sizeof(int), 1, file); fwrite(&dim, sizeof(int), 1, file); i = DIM_OF_WORLD; fwrite(&i, sizeof(int), 1, file); fwrite(&(data->n_total_vertices), sizeof(int), 1, file); fwrite(&(data->n_macro_elements), sizeof(int), 1, file); fwrite(data->coords, sizeof(REAL_D), data->n_total_vertices, file); fwrite(data->mel_vertices, sizeof(int), N_VERTICES(dim) * data->n_macro_elements, file); if(data->boundary) { fwrite(&record_written, sizeof(char), 1, file); fwrite(data->boundary, sizeof(S_CHAR), N_NEIGH(dim) * data->n_macro_elements, file); } else fwrite(&record_not_written, sizeof(char), 1, file); if(data->neigh) { fwrite(&record_written, sizeof(char), 1, file); fwrite(data->neigh, sizeof(int), N_NEIGH(dim) * data->n_macro_elements, file); } else fwrite(&record_not_written, sizeof(char), 1, file); if (dim == 3 && data->el_type) { fwrite(&record_written, sizeof(char), 1, file); fwrite(data->el_type, sizeof(U_CHAR), data->n_macro_elements, file); } else fwrite(&record_not_written, sizeof(char), 1, file); fwrite("EOF.", sizeof(char), 4, file); fclose(file); INFO(2,2,"wrote macro binary-file %s\n", filename); return(1); } /*--------------------------------------------------------------------------*/ /* write raw macro triangulation in "data" to "filename" in xdr format */ /*--------------------------------------------------------------------------*/ extern int write_macro_data_xdr(MACRO_DATA *data, const char *filename) { FUNCNAME("write_macro_data_xdr"); XDR *xdrp; int i, length; char *s; bool_t record_written=1; bool_t record_not_written=0; caddr_t array_loc; if(!data) { ERROR("no data - no file created\n"); return(0); } if (!(xdrp = xdr_open_file(filename, XDR_ENCODE))) { ERROR("cannot open file %s\n",filename); return(0); } length = MAX(strlen(ALBERTA_VERSION) + 1, 5); /* length with terminating \0 */ s=MEM_ALLOC(length, char); strcpy(s, ALBERTA_VERSION); xdr_string(xdrp, &s, length); MEM_FREE(s, length, char); xdr_dim = data->dim; xdr_int(xdrp, &xdr_dim); i = DIM_OF_WORLD; xdr_int(xdrp, &i); xdr_int(xdrp, &(data->n_total_vertices)); xdr_int(xdrp, &(data->n_macro_elements)); array_loc=(caddr_t) data->coords; xdr_array(xdrp, &array_loc, (u_int *) &(data->n_total_vertices), (u_int) data->n_total_vertices, sizeof(REAL_D), (xdrproc_t) xdr_REAL_D); array_loc=(caddr_t) data->mel_vertices; xdr_array(xdrp, &array_loc, (u_int *) &(data->n_macro_elements), (u_int) data->n_macro_elements * N_VERTICES(xdr_dim), sizeof(int), (xdrproc_t) xdr_int); if(data->boundary) { xdr_bool(xdrp, &record_written); array_loc=(caddr_t) data->boundary; xdr_array(xdrp, &array_loc, (u_int *) &(data->n_macro_elements), (u_int) data->n_macro_elements * N_NEIGH(xdr_dim), sizeof(S_CHAR), (xdrproc_t) xdr_S_CHAR); } else xdr_bool(xdrp, &record_not_written); if(data->neigh) { xdr_bool(xdrp, &record_written); array_loc=(caddr_t) data->neigh; xdr_array(xdrp, &array_loc, (u_int *) &(data->n_macro_elements), (u_int) data->n_macro_elements * N_NEIGH(xdr_dim), sizeof(int), (xdrproc_t) xdr_int); } else xdr_bool(xdrp, &record_not_written); if (xdr_dim == 3 && data->el_type) { xdr_bool(xdrp, &record_written); array_loc=(caddr_t) data->el_type; xdr_array(xdrp, &array_loc, (u_int *) &(data->n_macro_elements), (u_int) data->n_macro_elements, sizeof(U_CHAR), (xdrproc_t) xdr_U_CHAR); } else xdr_bool(xdrp, &record_not_written); xdr_close_file(xdrp); INFO(2,2,"wrote macro xdr-file %s\n", filename); return(1); } /***************************************************************************/ /* macro_data2mesh(): */ /* copy macro data to the MESH structure "mesh" provided: */ /* 1) set most entries in "mesh" */ /* 2) allocate macro elements and link them to "mesh" */ /* 3) calculate macro element orientation for 3D */ /* 4) calculate the mesh size for "mesh->diam" */ /* 5) Initialize slave meshes */ /* */ /* the entire MACRO_DATA structure can be freed after use! */ /***************************************************************************/ extern void macro_data2mesh(MESH *mesh, const MACRO_DATA *data, NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int)) { FUNCNAME("macro_data2mesh"); int i, j, dim = data->dim; MACRO_EL *mel; REAL_D *newcoords; TEST_EXIT(mesh,"no mesh, mesh is nil pointer!\n"); mesh->dim = dim; mesh->n_elements = mesh->n_hier_elements = mesh->n_macro_el = data->n_macro_elements; mesh->n_vertices = data->n_total_vertices; mel = mesh->macro_els = MEM_CALLOC(data->n_macro_elements, MACRO_EL); newcoords = MEM_ALLOC(data->n_total_vertices, REAL_D); for(i = 0; i < data->n_total_vertices; i++) for(j = 0; j < DIM_OF_WORLD; j++) newcoords[i][j] = data->coords[i][j]; ((MESH_MEM_INFO *)mesh->mem_info)->count = data->n_total_vertices; ((MESH_MEM_INFO *)mesh->mem_info)->coords = newcoords; for(i = 0; i < data->n_macro_elements; i++) { mel[i].el = get_element(mesh); mel[i].index = i; #if ALBERTA_DEBUG mel[i].el->index = i; #endif for(j = 0; j < N_VERTICES(dim); j++) mel[i].coord[j] = newcoords[data->mel_vertices[VERT_IND(dim,i,j)]]; #if DIM_OF_WORLD == 3 if(dim == 3) { mel[i].el_type = data->el_type ? data->el_type[i] : 0; mel[i].orientation = AI_get_orientation(mel + i); } #endif } if (mesh->parametric) WARNING("mesh->diam not set, problems with graphical output may occur\n"); else calculate_size(mesh, data); if(dim > 0) { if (!data->neigh) ERROR_EXIT("Neighbor information must be present!\n"); fill_neigh_info(mel, data); if (!data->boundary) ERROR_EXIT("Boundary information must be present!\n"); switch(dim) { case 1: fill_bound_info_1d(mesh, data); break; #if DIM_OF_WORLD > 1 case 2: fill_bound_info_2d(mesh, data); count_edges_2d(mesh); break; #if DIM_OF_WORLD > 2 case 3: fill_bound_info_3d(mesh, data); fill_more_bound_info_3d(mesh, data); break; #endif #endif default: ERROR_EXIT("Illegal dimension %d!\n", dim); } } /****************************************************************************/ /* Call the user-defined new vertex projection assignment routine "n_proj". */ /****************************************************************************/ if(n_proj) { for (i = 0; i < mesh->n_macro_el; i++) { mel[i].projection[0] = n_proj(mesh, mel + i, 0); #if DIM_OF_WORLD > 1 if(dim == 2) for(j = 1; j < N_NEIGH_2D + 1; j++) mel[i].projection[j] = n_proj(mesh, mel + i, j); #if DIM_OF_WORLD > 2 else if(dim == 3) for(j = 1; j < N_NEIGH_3D + 1; j++) mel[i].projection[j] = n_proj(mesh, mel + i, j); #endif #endif #if 0 /* No point in doing this at the moment, DK. */ /****************************************************************************/ /* If necessary, copy projections to neighbour elements. */ /****************************************************************************/ for(j = 0; j < N_NEIGH(dim); j++) { NODE_PROJECTION *tmp_proj; MACRO_EL *neigh; if(neigh = mel[i].neigh[j]) { tmp_proj = mel[i].projection[0]; if(mel[i].projection[j+1]) tmp_proj = mel[i].projection[j+1]; /* Search for the correct subsimplex on the neighbour element. */ for(k = 0; k < N_NEIGH(dim); k++) if(neigh->neigh[k] == mel + i) break; neigh->projection[k+1] = tmp_proj; } #endif } } return; } extern void macro_test(MACRO_DATA *data, const char *new_name) { FUNCNAME("macro_test"); switch(data->dim) { case 0: break; case 1: macro_test_1d(data, new_name); break; #if DIM_OF_WORLD > 1 case 2: macro_test_2d(data, new_name); break; #if DIM_OF_WORLD > 2 case 3: macro_test_3d(data, new_name); break; #endif #endif default: ERROR_EXIT("Illegal dim == %d!\n", data->dim); } } alberta-2.0.1/alberta/src/Common/memory.c0000644000042300001440000017734210676724253015174 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: memory.c */ /* */ /* description: routines for memory handling */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" /*--------------------------------------------------------------------------*/ /* some routines for allocation and deallocation */ /*--------------------------------------------------------------------------*/ /* * default value for increasing size of memory in an memoryadmin. * * see also setCapacityIncrement(...) */ #define DEFAULTCAPACITYINCREMENT 1000 #define ALIGNSIZE(size) ((size) + ((size) % sizeof(void*) == 0 ? 0 : sizeof(void*) - (size) % sizeof(void*))) typedef struct FreeMemory FREEMEMORY; struct FreeMemory { FREEMEMORY *next; }; typedef struct Block BLOCK; struct Block { BLOCK *next; void *end; }; typedef struct MemoryAdmin MEMORYADMIN; struct MemoryAdmin { unsigned int capacity; unsigned int capacityIncrement; size_t objectSize; BLOCK *blocks; FREEMEMORY *freeMem; }; static int newBlock(MEMORYADMIN* ma, unsigned int capacityIncrement) { FUNCNAME("newBlock"); BLOCK* block; FREEMEMORY *freeMem; void **i; size_t ma_objectSize_div_sizeofvoid; size_t sizeofBlock = ALIGNSIZE(sizeof(BLOCK)); ma_objectSize_div_sizeofvoid = ma->objectSize / sizeof(void*); block = (BLOCK *)alberta_alloc(sizeofBlock + capacityIncrement * ma->objectSize, funcName, __FILE__, __LINE__); ma->capacity += capacityIncrement; block->next = ma->blocks; ma->blocks = block; freeMem = (FREEMEMORY*)((void**)block + sizeofBlock / sizeof(void*)); block->end = ((void**)freeMem) + capacityIncrement * ma_objectSize_div_sizeofvoid; for(i = (void**)freeMem; i < (void**)(block->end) - ma_objectSize_div_sizeofvoid; i += ma_objectSize_div_sizeofvoid) { ((FREEMEMORY*)i)->next = (FREEMEMORY*)(i + ma_objectSize_div_sizeofvoid); } ((FREEMEMORY*)i)->next = ma->freeMem; ma->freeMem = freeMem; return 0; } /* * newObject(..) returns a void-pointer to a memoryadmin for objects of size * objectSize. Use the returned value as parameter for getMemory. */ static void* newObject(size_t objectSize, unsigned int initialCapacity) { FUNCNAME("newObject"); MEMORYADMIN *ma; ma = (MEMORYADMIN *)alberta_alloc(sizeof(MEMORYADMIN), funcName, __FILE__, __LINE__); ma->capacity = 0; ma->capacityIncrement = (initialCapacity ? initialCapacity : DEFAULTCAPACITYINCREMENT); TEST_EXIT(objectSize, "Attempted to allocate a zero length object!\n"); ma->objectSize = ALIGNSIZE(objectSize); ma->blocks = nil; ma->freeMem = nil; if(initialCapacity) newBlock(ma, initialCapacity); return ma; } /* * A memoryadmin allocates new memory, whenever getMemory is called and there * is no more free memory already allocated. The size of the new memory is * given by objectSize * capacityIncrement. By default capacityIncrement == * DEFAULTCAPACITYINCREMENT */ static void setCapacityIncrement(void* memoryAdmin, unsigned int capacityIncrement) { FUNCNAME("setCapacityIncrement"); DEBUG_TEST_EXIT(memoryAdmin, "memoryAdmin == nil\n"); ((MEMORYADMIN*)memoryAdmin)->capacityIncrement = capacityIncrement; if(!((MEMORYADMIN*)memoryAdmin)->capacityIncrement) { ERROR_EXIT("capacityIncrement == 0\n"); } return; } /* * returns a pointer to an object of size objectsize given by creating the * memoryadmin. */ static void* getMemory(void* memoryAdmin) { MEMORYADMIN *admin; FREEMEMORY *tmp; admin = (MEMORYADMIN *)memoryAdmin; while(admin->capacity <= 0) newBlock(admin, admin->capacityIncrement); tmp = admin->freeMem; admin->freeMem = admin->freeMem->next; admin->capacity--; #ifdef __GNUC__ /* gcc has a bug when run with -O3 and the i386 default target; so * insert an optimization barrier here :( */ __asm__ __volatile__("" ::: "memory"); #endif return (void *)tmp; } /* * returns memory at *object to memoryadmin. !!! object must be the result of * an call of getMemory(...) with the same memoryadmin. !!! */ static void freeMemory(void* object, void* memoryAdmin) { /* FUNCNAME("freeMemory"); */ ((FREEMEMORY*)object)->next = ((MEMORYADMIN*)memoryAdmin)->freeMem; ((MEMORYADMIN*)memoryAdmin)->freeMem = (FREEMEMORY*)object; ((MEMORYADMIN*)memoryAdmin)->capacity++; return; } /* * the counterpart to newObject, frees all memory allocated with the given * memoryadmin. */ static void deleteObject(void* memoryAdmin) { FUNCNAME("deleteObject"); BLOCK *b, *tmp; size_t sizeofBlock; DEBUG_TEST_EXIT(memoryAdmin, "memoryAdmin=nil\n"); b = ((MEMORYADMIN*)memoryAdmin)->blocks; while(b != nil) { tmp = b->next; sizeofBlock = (size_t)b->end - (size_t)b; alberta_free(b, sizeofBlock); b = tmp; } alberta_free(memoryAdmin, sizeof(MEMORYADMIN)); return; } typedef struct dof_admin_mem_info DOF_ADMIN_MEM_INFO; struct dof_admin_mem_info { void *dof_matrix; void *matrix_row; void *dof_dowb_matrix; void *dowb_matrix_row; void *dowb_matrix_row_s; void *dowb_matrix_row_d; void *dof_int_vec; void *dof_dof_vec; void *int_dof_vec; void *dof_uchar_vec; void *dof_schar_vec; void *dof_real_vec; void *dof_real_d_vec; void *dof_ptr_vec; }; /*--------------------------------------------------------------------------*/ /* memory management for DOF admin structures */ /*--------------------------------------------------------------------------*/ static void add_dof_admin_to_mesh(DOF_ADMIN *admin, MESH *mesh) { FUNCNAME("add_dof_admin_to_mesh"); int i, n, dim = mesh->dim; admin->mesh = mesh; n = mesh->n_dof_admin; if ((n > 0) && (mesh->dof_admin == nil)) ERROR_EXIT("no mesh->dof_admin but n_dof_admin=%d\n", n); if ((n <= 0) && (mesh->dof_admin != nil)) ERROR_EXIT("found mesh->dof_admin but n_dof_admin=%d\n", n); for (i = 0; i < n; i++) if (mesh->dof_admin[i] == admin) ERROR_EXIT("admin %s is already associated to mesh %s\n", NAME(admin), NAME(mesh)); mesh->dof_admin = MEM_REALLOC(mesh->dof_admin, n, n+1, DOF_ADMIN *); n++; mesh->dof_admin[n-1] = admin; mesh->n_dof_admin = n; mesh->n_dof_el = 0; admin->n0_dof[VERTEX] = mesh->n_dof[VERTEX]; mesh->n_dof[VERTEX] += admin->n_dof[VERTEX]; mesh->n_dof_el += N_VERTICES(dim) * mesh->n_dof[VERTEX]; admin->n0_dof[CENTER] = mesh->n_dof[CENTER]; mesh->n_dof[CENTER] += admin->n_dof[CENTER]; mesh->n_dof_el += mesh->n_dof[CENTER]; if(dim > 1) { admin->n0_dof[EDGE] = mesh->n_dof[EDGE]; mesh->n_dof[EDGE] += admin->n_dof[EDGE]; mesh->n_dof_el += N_EDGES(dim) * mesh->n_dof[EDGE]; } if(dim == 3) { admin->n0_dof[FACE] = mesh->n_dof[FACE]; mesh->n_dof[FACE] += admin->n_dof[FACE]; mesh->n_dof_el += N_FACES_3D * mesh->n_dof[FACE]; } mesh->node[VERTEX] = 0; if (mesh->n_dof[VERTEX] > 0) mesh->n_node_el = N_VERTICES(dim); else mesh->n_node_el = 0; if(dim > 1) { mesh->node[EDGE] = mesh->n_node_el; if (mesh->n_dof[EDGE] > 0) mesh->n_node_el += N_EDGES(dim); } if (dim == 3) { mesh->node[FACE] = mesh->n_node_el; if (mesh->n_dof[FACE] > 0) mesh->n_node_el += N_FACES_3D; } mesh->node[CENTER] = mesh->n_node_el; if (mesh->n_dof[CENTER] > 0) mesh->n_node_el += 1; return; } /*--------------------------------------------------------------------------*/ DOF_ADMIN *AI_get_dof_admin(MESH *mesh, const char *name, const int n_dof[N_NODE_TYPES]) { FUNCNAME("AI_get_dof_admin"); DOF_ADMIN *admin; int i; DOF_ADMIN_MEM_INFO *mem_info; admin = MEM_CALLOC(1, DOF_ADMIN); admin->mesh = mesh; admin->name = name ? strdup(name) : nil; admin->dof_free = nil; admin->dof_free_size = admin->first_hole = 0; TEST_EXIT((mesh->dim > 1) || (n_dof[EDGE]==0), "EDGE DOFs only make sense for mesh->dim > 1!\n"); TEST_EXIT((mesh->dim == 3) || (n_dof[FACE]==0), "FACE DOFs only make sense for mesh->dim == 3!\n"); for (i = 0; i < N_NODE_TYPES; i++) admin->n_dof[i] = n_dof[i]; mem_info = (DOF_ADMIN_MEM_INFO *) (admin->mem_info = MEM_ALLOC(1, DOF_ADMIN_MEM_INFO)); mem_info->dof_matrix = newObject(sizeof(DOF_MATRIX), 0); setCapacityIncrement(mem_info->dof_matrix, 10); mem_info->matrix_row = newObject(sizeof(MATRIX_ROW), 0); setCapacityIncrement(mem_info->matrix_row, 100); mem_info->dof_dowb_matrix = newObject(sizeof(DOF_DOWB_MATRIX), 0); setCapacityIncrement(mem_info->dof_dowb_matrix, 10); mem_info->dowb_matrix_row = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*sizeof(REAL_DD), 0); setCapacityIncrement(mem_info->dowb_matrix_row, 100); mem_info->dowb_matrix_row_s = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*sizeof(REAL_DDS), 0); setCapacityIncrement(mem_info->dowb_matrix_row_s, 100); mem_info->dowb_matrix_row_d = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*sizeof(REAL_D), 0); setCapacityIncrement(mem_info->dowb_matrix_row_d, 100); mem_info->dof_int_vec = newObject(sizeof(DOF_INT_VEC), 0); setCapacityIncrement(mem_info->dof_int_vec, 10); mem_info->dof_dof_vec = newObject(sizeof(DOF_DOF_VEC), 0); setCapacityIncrement(mem_info->dof_dof_vec, 10); mem_info->int_dof_vec = newObject(sizeof(DOF_DOF_VEC), 0); setCapacityIncrement(mem_info->int_dof_vec, 10); mem_info->dof_uchar_vec = newObject(sizeof(DOF_UCHAR_VEC), 0); setCapacityIncrement(mem_info->dof_uchar_vec, 10); mem_info->dof_schar_vec = newObject(sizeof(DOF_SCHAR_VEC), 0); setCapacityIncrement(mem_info->dof_schar_vec, 10); mem_info->dof_real_vec = newObject(sizeof(DOF_REAL_VEC), 0); setCapacityIncrement(mem_info->dof_real_vec, 10); mem_info->dof_real_d_vec = newObject(sizeof(DOF_REAL_D_VEC), 0); setCapacityIncrement(mem_info->dof_real_d_vec, 10); mem_info->dof_ptr_vec = newObject(sizeof(DOF_PTR_VEC), 0); setCapacityIncrement(mem_info->dof_ptr_vec, 10); add_dof_admin_to_mesh(admin, mesh); return(admin); } /*--------------------------------------------------------------------------*/ /* Free all DOF_ADMINs in a rather brutal way, only makes sense when */ /* freeing an entire mesh. */ /*--------------------------------------------------------------------------*/ static void free_dof_admins(MESH *mesh) { FUNCNAME("free_dof_admins"); DOF_ADMIN **admin = mesh->dof_admin; int i, n; DOF_MATRIX *dof_matrix, *dof_matrix_next; DOF_DOWB_MATRIX *dof_dowb_matrix, *dof_dowb_matrix_next; DOF_INT_VEC *dof_int_vec, *dof_int_vec_next; DOF_DOF_VEC *dof_dof_vec, *dof_dof_vec_next; DOF_DOF_VEC *int_dof_vec, *int_dof_vec_next; DOF_UCHAR_VEC *dof_uchar_vec, *dof_uchar_vec_next; DOF_SCHAR_VEC *dof_schar_vec, *dof_schar_vec_next; DOF_REAL_VEC *dof_real_vec, *dof_real_vec_next; DOF_REAL_D_VEC *dof_real_d_vec, *dof_real_d_vec_next; DOF_PTR_VEC *dof_ptr_vec, *dof_ptr_vec_next; n = mesh->n_dof_admin; if ((n > 0) && !admin) ERROR_EXIT("no mesh->dof_admin but n_dof_admin=%d\n", n); if ((n <= 0) && admin) ERROR_EXIT("found mesh->dof_admin but n_dof_admin=%d\n", n); for(i = 0; i < n; i++) { #define FREE_DOF_OBJ(admin, obj) \ for(obj = admin[i]->obj; obj; obj = obj##_next) { \ obj##_next = obj->next; \ free_##obj(obj); \ } FREE_DOF_OBJ(admin, dof_matrix); FREE_DOF_OBJ(admin, dof_dowb_matrix); FREE_DOF_OBJ(admin, dof_int_vec); FREE_DOF_OBJ(admin, dof_dof_vec); FREE_DOF_OBJ(admin, int_dof_vec); FREE_DOF_OBJ(admin, dof_uchar_vec); FREE_DOF_OBJ(admin, dof_schar_vec); FREE_DOF_OBJ(admin, dof_real_vec); FREE_DOF_OBJ(admin, dof_real_d_vec); FREE_DOF_OBJ(admin, dof_ptr_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_matrix); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->matrix_row); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_dowb_matrix); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dowb_matrix_row); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dowb_matrix_row_s); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dowb_matrix_row_d); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_int_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_dof_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->int_dof_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_uchar_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_schar_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_real_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_real_d_vec); deleteObject(((DOF_ADMIN_MEM_INFO *)admin[i]->mem_info)->dof_ptr_vec); MEM_FREE(admin[i]->mem_info, 1, DOF_ADMIN_MEM_INFO); MEM_FREE(admin[i]->dof_free, admin[i]->dof_free_size, DOF_FREE_UNIT); } return; } /*--------------------------------------------------------------------------*/ /* allocate memory for a new mesh, and build a simply linked list of these */ /*--------------------------------------------------------------------------*/ typedef struct mesh_info MESH_INFO; struct mesh_info { MESH *mesh; MESH_INFO *next; }; static MESH_INFO *first_mesh = nil; extern void AI_advance_cookies_rec(MESH *mesh) { FUNCNAME("AI_advance_cookies_rec"); int i; MESH_MEM_INFO *mem_info; TEST_EXIT(mesh,"Oops, did not get a mesh!\n"); mem_info = (MESH_MEM_INFO *)mesh->mem_info; mesh->cookie += 1; for(i = 0; i < mem_info->n_slaves; i++) AI_advance_cookies_rec(mem_info->slaves[i]); return; } static MESH *get_mesh(int dim, const char *name, const MACRO_DATA *macro_data, NODE_PROJECTION *(*init_node_proj) (MESH *, MACRO_EL *, int)) { FUNCNAME("get_mesh"); MESH_INFO *new_mesh; MESH *mesh; MESH_MEM_INFO *mem_info; HOOK_QUEUE_ENUM queue; new_mesh = MEM_CALLOC(1,MESH_INFO); mesh = MEM_CALLOC(1,MESH); new_mesh->mesh = mesh; new_mesh->next = first_mesh; first_mesh = new_mesh; mesh->dim = dim; mesh->name = name ? strdup(name) : nil; mem_info = (MESH_MEM_INFO *) (mesh->mem_info = MEM_CALLOC(1, MESH_MEM_INFO)); mem_info->element = newObject(sizeof(EL), 0); if(mesh->dim == 3) mem_info->rc_list = nil; mem_info->real_d = newObject(sizeof(REAL_D), 0); mem_info->leaf_data = nil; if(macro_data) macro_data2mesh(mesh, macro_data, init_node_proj); for (queue = HOOK_QUEUE_0; queue <= HOOK_QUEUE_7; queue ++) { mesh->traverse_hooks[queue].next = mesh->traverse_hooks[queue].prev = &mesh->traverse_hooks[queue]; } #if ALBERTA_DEBUG srandom(13); #else srandom((unsigned int) time(nil)); #endif mesh->cookie = random(); check_mesh(mesh); return(mesh); } void add_traverse_hook(MESH *mesh, TRAVERSE_HOOK *hook, HOOK_QUEUE_ENUM queue) { mesh->traverse_hooks[queue].next->prev = &hook->node; hook->node.next = mesh->traverse_hooks[queue].next; hook->node.prev = &mesh->traverse_hooks[queue]; mesh->traverse_hooks[queue].next = &hook->node; mesh->active_hooks |= 1UL << (queue + HOOK_QUEUE_OFFSET); } void remove_traverse_hook(MESH *mesh, TRAVERSE_HOOK *hook, HOOK_QUEUE_ENUM queue) { hook->node.next->prev = hook->node.prev; hook->node.prev->next = hook->node.next; if (mesh->traverse_hooks[queue].next == mesh->traverse_hooks[queue].prev) { mesh->active_hooks &= ~(1UL << (queue + HOOK_QUEUE_OFFSET)); } } void free_mesh(MESH *mesh) { FUNCNAME("free_mesh"); MESH_INFO *mesh_info, **prev; MESH_MEM_INFO *mem_info; int i; if(!mesh) { ERROR("No mesh specified!\n"); return; } mem_info = (MESH_MEM_INFO *)mesh->mem_info; prev = &first_mesh; for (mesh_info = first_mesh; mesh_info; mesh_info = mesh_info->next) { if (mesh_info->mesh == mesh) { *prev = mesh_info->next; MEM_FREE(mesh_info, 1, MESH_INFO); /* If this mesh is itself a slave mesh, then unchain it first. */ if(mem_info->master) unchain_submesh(mesh); /* Free all slave meshes... */ for(i = 0; i < mem_info->n_slaves; i++) unchain_submesh(mem_info->slaves[i]); MEM_FREE(mem_info->slaves, mem_info->n_slaves, MESH *); /* free all elements/dofs/... */ deleteObject(mem_info->dof_ptrs); for(i = 0; i < N_NODE_TYPES; i++) { if(mem_info->dofs[i]) deleteObject(mem_info->dofs[i]); } deleteObject(mem_info->element); if(mem_info->rc_list) free_rc_list(mesh, mem_info->rc_list); deleteObject(mem_info->real_d); if (mem_info->leaf_data) deleteObject(mem_info->leaf_data); AI_free_dof_vec_list(mesh); MEM_FREE(mem_info->coords, mem_info->count, REAL_D); MEM_FREE(mem_info, 1, MESH_MEM_INFO); free_dof_admins(mesh); MEM_FREE(mesh->dof_admin, mesh->n_dof_admin, DOF_ADMIN); if(mesh->name) free((char *)mesh->name); MEM_FREE(mesh, 1, MESH); break; } prev = &(mesh_info->next); } TEST(mesh_info,"mesh not found in mesh_info list; mesh not freed\n"); return; } extern MESH *check_and_get_mesh(int dim, int dow, int debug, const char *version, const char *name, const MACRO_DATA *macro_data, NODE_PROJECTION *(*init_node_proj) (MESH *, MACRO_EL *, int)) { FUNCNAME("check_and_get_mesh"); int error = 0; if (dow != DIM_OF_WORLD) { ERROR("%s = %d, but you are using a lib with %s = %d\n", "DIM_OF_WORLD", dow, "DIM_OF_WORLD", DIM_OF_WORLD); error++; } if (dim > DIM_OF_WORLD) { ERROR("dim == %d > %d == DIM_OF_WORLD!\n", dim, DIM_OF_WORLD); error++; } if (debug != ALBERTA_DEBUG) { ERROR("%s = %d, but you are using a lib with %s = %d\n", "DEBUG", debug, "DEBUG", ALBERTA_DEBUG); error++; } if (strcmp(version,ALBERTA_VERSION)) { ERROR("you are using %s but a lib with %s\n", version, ALBERTA_VERSION); error++; } if (error) ERROR_EXIT("Bye!\n"); return get_mesh(dim, name, macro_data, init_node_proj); } /*--------------------------------------------------------------------------*/ /* memory management for DOF pointers */ /*--------------------------------------------------------------------------*/ static const int max_dof_ptrs[4] = {2, 4, 7, 15}; static DOF **get_dof_ptrs(MESH *mesh) { FUNCNAME("get_dof_ptrs"); int i, n; DOF **ptrs; MESH_MEM_INFO *mem_info; DEBUG_TEST_EXIT(mesh, "mesh=nil\n"); DEBUG_TEST_EXIT(mesh->mem_info, "mesh \"%s\": mesh->mem_info=nil\n", mesh->name); mem_info = (MESH_MEM_INFO*)(mesh->mem_info); n = mesh->n_node_el; if (n <= 0) return(nil); DEBUG_TEST_EXIT(n <= max_dof_ptrs[mesh->dim], "mesh \"%s\": too many nodes: %d > %d\n", mesh->name, n, max_dof_ptrs[mesh->dim]); DEBUG_TEST_EXIT(mem_info->dof_ptrs, "mesh \"%s\": mesh->mem_info->dof_ptrs=nil\n", mesh->name); ptrs = (DOF **)getMemory(mem_info->dof_ptrs); for (i = 0; i < n; i++) ptrs[i] = nil; return(ptrs); } static void free_dof_ptrs(DOF **ptrs, MESH *mesh) { FUNCNAME("free_dof_ptrs"); int n; MESH_MEM_INFO *mem_info; DEBUG_TEST_EXIT(ptrs,"ptrs=nil\n"); DEBUG_TEST_EXIT(mesh, "mesh=nil\n"); DEBUG_TEST_EXIT(mesh->mem_info, "mesh \"%s\": mesh->mem_info=nil\n", mesh->name); n = mesh->n_node_el; if (n <= 0) return; DEBUG_TEST_EXIT(n <= max_dof_ptrs[mesh->dim], "mesh \"%s\": too many nodes: %d > %d\n", mesh->name, n, max_dof_ptrs[mesh->dim]); mem_info = (MESH_MEM_INFO*)(mesh->mem_info); DEBUG_TEST_EXIT(mem_info->dof_ptrs, "mesh \"%s\": mesh->mem_info->dof_ptrs=nil\n", mesh->name); freeMemory((void *)ptrs, mem_info->dof_ptrs); return; } void AI_get_dof_ptr_list(MESH *mesh) { FUNCNAME("AI_get_dof_ptr_list"); MESH_MEM_INFO *mem_info; DEBUG_TEST_EXIT(mesh, "No mesh given!\n"); mem_info = (MESH_MEM_INFO*)mesh->mem_info; DEBUG_TEST_EXIT(mem_info, "No mesh memory info structure present!\n"); mem_info->dof_ptrs = newObject(mesh->n_node_el * sizeof(DOF*), 1000); return; } /*--------------------------------------------------------------------------*/ /* memory management for DOFs */ /*--------------------------------------------------------------------------*/ #define DOF_BLOCK 1000 /****************************************************************************/ /* AI_reactivate_dof(mesh, el): */ /* When coarsening the mesh, we must replace all -1 settings with new DOF */ /* indices. We no longer allocate new memory for DOF pointers in the */ /* el->dof[] vector - this memory was also freed in old versions depending */ /* on the "mesh->preserve_coarse_dofs" setting. */ /****************************************************************************/ void AI_reactivate_dof(MESH *mesh, const EL *el) { FUNCNAME("AI_reactivate_dof"); DOF_ADMIN *admin; int i, j, n, n0, node; MESH_MEM_INFO* mem_info; DEBUG_TEST_EXIT(mesh,"mesh=nil\n"); DEBUG_TEST_EXIT(el, "el=nil\n"); mem_info = (MESH_MEM_INFO *)mesh->mem_info; DEBUG_TEST_EXIT(mem_info, "mesh \"%s\": mesh->mem_info=nil\n", mesh->name); for (i = 0; i < mesh->n_dof_admin; i++) { admin = mesh->dof_admin[i]; DEBUG_TEST_EXIT(admin, "mesh \"%s\": no dof_admin[%d]\n", mesh->name, i); if(mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; n = admin->n_dof[CENTER]; if(n) { n0 = admin->n0_dof[CENTER]; DEBUG_TEST_EXIT(n+n0 <= mesh->n_dof[CENTER], "dof_admin \"%s\": n=%d, n0=%d too large: ndof[CENTER]=%d\n", admin->name, n, n0, mesh->n_dof[CENTER]); if(el->dof[node][n0] == -1) for (j = 0; j < n; j++) el->dof[node][n0+j] = get_dof_index(admin); } } #if DIM_OF_WORLD > 1 if(mesh->n_dof[EDGE]) { int k; for(k = 0; k < N_EDGES(mesh->dim); k++) { node = mesh->node[EDGE] + k; n = admin->n_dof[EDGE]; if(n) { n0 = admin->n0_dof[EDGE]; DEBUG_TEST_EXIT(n+n0 <= mesh->n_dof[EDGE], "dof_admin \"%s\": n=%d, n0=%d too large: ndof[EDGE]=%d\n", admin->name, n, n0, mesh->n_dof[EDGE]); if(el->dof[node][n0] == -1) for (j = 0; j < n; j++) el->dof[node][n0+j] = get_dof_index(admin); } } } #if DIM_OF_WORLD == 3 if(mesh->n_dof[FACE]) { int k; for(k = 0; k < N_FACES_3D; k++) { node = mesh->node[FACE] + k; n = admin->n_dof[FACE]; if(n) { n0 = admin->n0_dof[FACE]; DEBUG_TEST_EXIT(n+n0 <= mesh->n_dof[FACE], "dof_admin \"%s\": n=%d, n0=%d too large: ndof[FACE]=%d\n", admin->name, n, n0, mesh->n_dof[FACE]); if(el->dof[node][n0] == -1) for (j = 0; j < n; j++) el->dof[node][n0+j] = get_dof_index(admin); } } } #endif #endif } return; } DOF *AI_get_dof_memory(MESH *mesh, int position) { FUNCNAME("AI_get_dof_memory"); int ndof; MESH_MEM_INFO *mem_info; DEBUG_TEST_EXIT(mesh, "mesh=nil\n"); mem_info = (MESH_MEM_INFO *)mesh->mem_info; DEBUG_TEST_EXIT(mem_info, "mesh \"%s\": mesh->mem_info=nil\n", mesh->name); DEBUG_TEST_EXIT(position >= 0 && position < N_NODE_TYPES, "mesh \"%s\": unknown position %d\n", mesh->name, position); ndof = mesh->n_dof[position]; DEBUG_TEST_EXIT(ndof, "mesh->n_dof[%d] == 0!\n", position); return (DOF *)getMemory(mem_info->dofs[position]); } DOF *get_dof(MESH *mesh, int position) { FUNCNAME("get_dof"); DOF_ADMIN *admin; DOF *dof; int i, j, n, n0, ndof; ndof = mesh->n_dof[position]; if (ndof <= 0) return(nil); dof = AI_get_dof_memory(mesh, position); for (i = 0; i < mesh->n_dof_admin; i++) { admin = mesh->dof_admin[i]; DEBUG_TEST_EXIT(admin, "mesh \"%s\": no dof_admin[%d]\n", mesh->name, i); n = admin->n_dof[position]; n0 = admin->n0_dof[position]; DEBUG_TEST_EXIT(n+n0 <= ndof, "dof_admin \"%s\": n=%d, n0=%d too large: ndof=%d\n", admin->name, n, n0, ndof); for (j = 0; j < n; j++) dof[n0+j] = get_dof_index(admin); } return(dof); } void free_dof(DOF *dof, MESH *mesh, int position, const int is_coarse_dof) { FUNCNAME("free_dof"); DOF_ADMIN *admin; int i, j, n, n0, ndof; MESH_MEM_INFO* mem_info; DEBUG_TEST_EXIT(mesh, "mesh=nil\n"); mem_info = (MESH_MEM_INFO*)mesh->mem_info; DEBUG_TEST_EXIT(mem_info,"mesh \"%s\": mesh->mem_info=nil\n", mesh->name); DEBUG_TEST_EXIT(position >= 0 && position < N_NODE_TYPES, "mesh \"%s\": unknown position %d\n",mesh->name, position); ndof = mesh->n_dof[position]; DEBUG_TEST_EXIT(!ndof || dof, "dof = nil, but ndof=%d\n", ndof); DEBUG_TEST_EXIT(ndof || !dof, "dof != nil, but ndof=0\n"); DEBUG_TEST_EXIT(mem_info->dofs[position], "mesh \"%s\": no memory management present for %d DOFs.", mesh->name, position); for (i = 0; i < mesh->n_dof_admin; i++) { admin = mesh->dof_admin[i]; DEBUG_TEST_EXIT(admin, "mesh \"%s\": no dof_admin[%d]\n", mesh->name, i); n = admin->n_dof[position]; n0 = admin->n0_dof[position]; DEBUG_TEST_EXIT(n+n0 <= ndof, "dof_admin \"%s\": n=%d, n0=%d too large: ndof=%d\n", admin, n, n0, ndof); if(!(admin->preserve_coarse_dofs && is_coarse_dof)) for (j = 0; j < n; j++) { free_dof_index(admin, dof[n0+j]); dof[n0+j] = -1; /* Mark this DOF as unused! */ } } if(!is_coarse_dof) { /* Also free the DOF pointer memory. */ freeMemory((void *)dof, mem_info->dofs[position]); } return; } /****************************************************************************/ /* AI_get_dof_list(mesh, position): */ /* Allocate a memory management object to administrate DOFs. The el->dof[] */ /* entries will point into this memory space. Please note that we will also */ /* allocate space for freed coarse DOFs - the allocated DOFs will have value*/ /* -1 to show that they are no longer being used. */ /* */ /* This routine is also called from read_mesh.c. */ /****************************************************************************/ void AI_get_dof_list(MESH *mesh, int position) { FUNCNAME("AI_get_dof_list"); MESH_MEM_INFO *mem_info; DEBUG_TEST_EXIT(mesh, "No mesh given!\n"); DEBUG_TEST_EXIT(position >=0 && position < N_NODE_TYPES, "Illegal position %d!\n", position); DEBUG_TEST_EXIT(mesh->n_dof[position], "Mesh has no DOFs on this position!\n"); mem_info = (MESH_MEM_INFO*)mesh->mem_info; DEBUG_TEST_EXIT(mem_info, "No mesh memory info structure found!\n"); mem_info->dofs[position] = newObject(sizeof(DOF)*mesh->n_dof[position], DOF_BLOCK); return; } /*--------------------------------------------------------------------------*/ /* memory management for FE_SPACE and DOF_ADMIN structures */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* transfer_dofs(mesh, new_admin, old_dof, position, is_coarse_dof): */ /* We allocate and return memory for a new dof pointer in an el->dof[] */ /* entry. The field is filled either with new DOF indices for each admin or */ /* with -1 to mark it as unused. */ /****************************************************************************/ static DOF *transfer_dofs(MESH *mesh, DOF_ADMIN *new_admin, DOF *old_dof, int position, int is_coarse_dof) { /* FUNCNAME("transfer_dofs"); */ DOF_ADMIN *admin; DOF *new_dof = nil; int i, j, n, n0, ndof = mesh->n_dof[position]; if (ndof <= 0) return nil; new_dof = AI_get_dof_memory(mesh, position); for (i = 0; i < mesh->n_dof_admin; i++) { admin = mesh->dof_admin[i]; n = admin->n_dof[position]; n0 = admin->n0_dof[position]; for (j = 0; j < n; j++) if(admin == new_admin) if(!is_coarse_dof || admin->preserve_coarse_dofs) new_dof[n0+j] = get_dof_index(admin); else new_dof[n0+j] = -1; else if(old_dof) new_dof[n0+j] = old_dof[n0 + j]; else new_dof[n0+j] = -1; } return new_dof; } #include "memory_0d.c" #include "memory_1d.c" #if DIM_OF_WORLD > 1 #include "memory_2d.c" #if DIM_OF_WORLD > 2 #include "memory_3d.c" #endif #endif /****************************************************************************/ /* get_fe_space(mesh,name,n_dof,bas_fcts,preserve_coarse_dofs): Unlike in */ /* older versions of ALBERTA, this routine can be called at any time, even */ /* after mesh refinement. As this is implemented at the price of temporary */ /* memory usage and CPU time, it should still be avoided. */ /****************************************************************************/ const FE_SPACE *get_fe_space(MESH *mesh, const char *name, const int n_dof[N_NODE_TYPES], const BAS_FCTS *bas_fcts, const U_CHAR preserve_coarse_dofs) { FUNCNAME("get_fe_space"); DOF_ADMIN *admin = nil; FE_SPACE *fe_space; int i, j, good_admin; const int *ndof; fe_space = MEM_ALLOC(1, FE_SPACE); fe_space->name = name ? strdup(name) : nil; if (bas_fcts) ndof = bas_fcts->n_dof; else ndof = n_dof; TEST_EXIT(ndof,"no n_dof or bas_fcts->n_dof\n"); TEST_EXIT((bas_fcts==nil) || (bas_fcts->dim == mesh->dim), "Dimension of basis functions %d does not match mesh dimension %d!\n", bas_fcts->dim, mesh->dim); /****************************************************************************/ /* Search for a fitting DOF_ADMIN to serve the required n_dof field and */ /* preserve_coarse_dofs status. Both have to match exactly! */ /****************************************************************************/ for (i = 0; i < mesh->n_dof_admin; i++) { admin = mesh->dof_admin[i]; good_admin = true; for (j = 0; j < N_NODE_TYPES; j++) { if (admin->n_dof[j] != ndof[j]) { good_admin = false; break; } } if (admin->preserve_coarse_dofs != preserve_coarse_dofs) good_admin = false; if(good_admin == true) break; admin = nil; } if (!admin) { /****************************************************************************/ /* We did not find a fitting admin. In this case, we must adjust the */ /* mem_info->dof_ptrs and mem_info->dofs[i] fields. */ /****************************************************************************/ int old_n_node_el; int old_n_dof[N_NODE_TYPES]; int old_node[N_NODE_TYPES]; void *old_dof_ptrs; void *old_dofs[N_NODE_TYPES]; MESH_MEM_INFO *mem_info = (MESH_MEM_INFO *)mesh->mem_info; old_n_node_el = mesh->n_node_el; old_dof_ptrs = mem_info->dof_ptrs; for(i = 0; i < N_NODE_TYPES; i++) { old_n_dof[i] = mesh->n_dof[i]; old_node[i] = mesh->node[i]; old_dofs[i] = mem_info->dofs[i]; } admin = AI_get_dof_admin(mesh, name, ndof); admin->preserve_coarse_dofs = (preserve_coarse_dofs ? 1 : 0); /* We must now adjust the mem_info->dofs[i] memory management object. */ for(i = 0; i < N_NODE_TYPES; i++) if(ndof[i]) AI_get_dof_list(mesh, i); /* Did mesh->n_node_el change while adding the new admin? If so, we have to */ /* adjust the mem_info->dof_ptrs memory management object. */ if(old_n_node_el < mesh->n_node_el) AI_get_dof_ptr_list(mesh); /* Now we magically adjust all pointers by traversing the mesh. :-) */ switch(mesh->dim) { case 0: adjust_dofs_and_dof_ptrs_0d(mesh, admin, old_n_node_el, old_n_dof, old_node); break; case 1: adjust_dofs_and_dof_ptrs_1d(mesh, admin, old_n_node_el, old_n_dof, old_node); break; #if DIM_OF_WORLD > 1 case 2: adjust_dofs_and_dof_ptrs_2d(mesh, admin, old_n_node_el, old_n_dof, old_node); break; #if DIM_OF_WORLD == 3 case 3: adjust_dofs_and_dof_ptrs_3d(mesh, admin, old_n_node_el, old_n_dof, old_node); break; #endif #endif default: ERROR_EXIT("Illegal mesh dimension!\n"); } /* Release old memory management objects. */ if(old_n_node_el < mesh->n_node_el && old_dof_ptrs) deleteObject(old_dof_ptrs); for(i = 0; i < N_NODE_TYPES; i++) if(ndof[i] && old_dofs[i]) deleteObject(old_dofs[i]); } fe_space->admin = admin; fe_space->bas_fcts = bas_fcts; fe_space->mesh = mesh; return(fe_space); } void free_fe_space(FE_SPACE *fe_space) { FUNCNAME("free_fe_space"); if(!fe_space) { ERROR("No fe_space specified!\n"); return; } if(fe_space->name) free((char *)fe_space->name); MEM_FREE(fe_space, 1, FE_SPACE); return; } /****************************************************************************/ /* AI_fill_missing_dofs(mesh): */ /* This routine allocates currently unused element DOF pointers since this */ /* is not done during read_mesh(). These corresponding values pointed to */ /* will be -1. The reason: write_mesh() does not save these pointers in */ /* the file, since this information is unnecessary to recreate DOF_ADMINs. */ /* */ /* called by read_mesh(). */ /****************************************************************************/ void AI_fill_missing_dofs(MESH *mesh) { FUNCNAME("AI_fill_missing_dofs"); DEBUG_TEST_EXIT(mesh, "Did not supply a mesh!\n"); switch(mesh->dim) { case 0: break; case 1: fill_missing_dofs_1d(mesh); break; #if DIM_OF_WORLD > 1 case 2: fill_missing_dofs_2d(mesh); break; #if DIM_OF_WORLD == 3 case 3: fill_missing_dofs_3d(mesh); break; #endif #endif default: ERROR_EXIT("Illegal mesh dimension!\n"); } return; } /*--------------------------------------------------------------------------*/ /* memory management for leaf_data */ /*--------------------------------------------------------------------------*/ #define LEAF_DATA_BLOCK 1000 void *AI_get_leaf_data(MESH *mesh) { FUNCNAME("AI_get_leaf_data"); MEMORYADMIN *ldbi; DEBUG_TEST_EXIT(mesh, "pointer to mesh = nil\n"); ldbi = (MEMORYADMIN *)((MESH_MEM_INFO*)(mesh->mem_info))->leaf_data; if (ldbi) return(getMemory(ldbi)); else return(nil); } void AI_free_leaf_data(void *leaf_data, MESH *mesh) { FUNCNAME("AI_free_leaf_data"); MEMORYADMIN *ldbi; if (!leaf_data) return; DEBUG_TEST_EXIT(mesh, "pointer to mesh = nil\n"); ldbi = (MEMORYADMIN *) ((MESH_MEM_INFO*)(mesh->mem_info))->leaf_data; if (!ldbi) return; freeMemory((void *)leaf_data, ldbi); return; } /****************************************************************************/ /* init_leaf_data(mesh, name, size, rld, cld): */ /* Initialize leaf data on the mesh. */ /****************************************************************************/ size_t init_leaf_data(MESH *mesh, size_t size, void (*refine_leaf_data)(EL *parent, EL *child[2]), void (*coarsen_leaf_data)(EL *parent, EL *child[2])) { MESH_MEM_INFO *mem_info; size_t new_size; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info = nil; TEST_EXIT(mesh,"No mesh specified!\n"); TEST_EXIT(size, "size must be > 0!\n"); TEST_EXIT(mesh->mem_info,"No memory management present for mesh!\n"); mem_info = (MESH_MEM_INFO *)mesh->mem_info; TEST_EXIT(!mem_info->leaf_data,"Leaf data was already initialized!\n"); new_size = ALIGNSIZE(size); if (new_size != size) WARNING("installing leafdata of size %d with aligned size %d\n", size, new_size); mem_info->leaf_data_info->leaf_data_size = new_size; mem_info->leaf_data_info->refine_leaf_data = refine_leaf_data; mem_info->leaf_data_info->coarsen_leaf_data = coarsen_leaf_data; mem_info->leaf_data = newObject(new_size, 0); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); while (el_info) { el_info->el->child[1] = (EL *) AI_get_leaf_data(mesh); el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return new_size; } #if 0 /* not used at the moment */ /*--------------------------------------------------------------------------*/ /* memory management for quadratures */ /*--------------------------------------------------------------------------*/ #define QUAD_VEC_BLOCK 100 #define MAX_QUAD_INFO 3 static MEM_BLOCK_INFO *quad_vec_block_infos[MAX_QUAD_INFO+1]; REAL *get_quad_vec(int dim) { FUNCNAME("get_quad_vec"); int i, n; REAL *quad_vec; MEM_BLOCK_INFO *gvbi; DEBUG_TEST_EXIT(dim >= 1 && dim <= 3, "dim = %d not allowed\n"); gvbi = quad_vec_block_infos[dim]; if (!gvbi) { gvbi = MEM_ALLOC(1, MEM_BLOCK_INFO); gvbi->free = nil; gvbi->info = nil; gvbi->free_count = 0; gvbi->used_count = 0; gvbi->unit_size = get_max_no_quad_point(dim)*sizeof(REAL); gvbi->block_size = QUAD_VEC_BLOCK; quad_vec_block_infos[dim] = gvbi; } quad_vec = (REAL *) get_mem(gvbi); return(quad_vec); } void free_quad_vec(REAL *quad_vec, int dim) { FUNCNAME("free_quad_vec"); int n; MEM_BLOCK_INFO *gvbi; if (!quad_vec) return; DEBUG_TEST_EXIT(dim >= 1 && dim <= 3, "dim = %d not allowed\n"); gvbi = quad_vec_block_infos[dim]; if (!gvbi) return; free_mem((void *) quad_vec, gvbi); return; } static MEM_BLOCK_INFO *quad_vec_d_block_infos[MAX_QUAD_INFO+1]; REAL_D *get_quad_vec_d(int dim) { FUNCNAME("get_quad_vec_d"); int i, n; REAL_D *quad_vec_d; MEM_BLOCK_INFO *gvdbi; DEBUG_TEST_EXIT(dim >= 1 && dim <= 3, "dim = %d not allowed\n"); gvdbi = quad_vec_d_block_infos[dim]; if (!gvdbi) { gvdbi = MEM_ALLOC(1, MEM_BLOCK_INFO); gvdbi->free = nil; gvdbi->info = nil; gvdbi->free_count = 0; gvdbi->used_count = 0; gvdbi->unit_size = get_max_no_quad_point(dim)*sizeof(REAL_D); gvdbi->block_size = QUAD_VEC_BLOCK; quad_vec_d_block_infos[dim] = gvdbi; } quad_vec_d = (REAL_D *) get_mem(gvdbi); return(quad_vec_d); } void free_quad_vec_d(REAL_D *quad_vec_d, int dim) { FUNCNAME("free_quad_vec_d"); int n; MEM_BLOCK_INFO *gvdbi; if (!quad_vec_d) return; DEBUG_TEST_EXIT(dim >= 1 && dim <= 3, "dim = %d not allowed\n"); gvdbi = quad_vec_d_block_infos[dim]; if (!gvdbi) return; free_mem((void *) quad_vec_d, gvdbi); return; } #endif /*--------------------------------------------------------------------------*/ /* memory management for elements */ /*--------------------------------------------------------------------------*/ #define EL_BLOCK 1000 #if ALBERTA_DEBUG static int el_index = 0; #endif EL *get_element(MESH *mesh) { FUNCNAME("get_element"); EL *el; DEBUG_TEST_EXIT(mesh, "mesh == nil\n"); DEBUG_TEST_EXIT(mesh->mem_info, "mesh \"%s\": no memory management present.\n", mesh->name); el = (EL *)getMemory(((MESH_MEM_INFO*)(mesh->mem_info))->element); el->child[0] = nil; el->child[1] = (EL *) AI_get_leaf_data(mesh); el->dof = get_dof_ptrs(mesh); #if ALBERTA_DEBUG el->index = el_index++; #endif el->mark = 0; el->new_coord = nil; return el; } void free_element(EL *el, MESH *mesh) { free_dof_ptrs(el->dof, mesh); if(mesh->dim > 1 && el->new_coord) { free_real_d(mesh, el->new_coord); el->new_coord = nil; } if (el->child[1]) AI_free_leaf_data((void *) el->child[1], mesh); freeMemory(el, ((MESH_MEM_INFO*)(mesh->mem_info))->element); } /*--------------------------------------------------------------------------*/ /* some routines for allocation and deallocation of list for collecting */ /* neighbours at the refinement edge in 3 dimensions */ /*--------------------------------------------------------------------------*/ #define LIST_BLOCK 20 /* static MEM_BLOCK_INFO rc_list_block_info = {nil, nil, 0, 0, 0, LIST_BLOCK}; */ RC_LIST_EL *get_rc_list(MESH *mesh) { FUNCNAME("get_rc_list"); if (!((MESH_MEM_INFO*)mesh->mem_info)->rc_list) { ((MESH_MEM_INFO*)mesh->mem_info)->rc_list = newObject(mesh->max_edge_neigh*sizeof(RC_LIST_EL), LIST_BLOCK); } else { DEBUG_TEST_EXIT( ((MEMORYADMIN *)((MESH_MEM_INFO*)mesh->mem_info)->rc_list)->objectSize == (mesh->max_edge_neigh * sizeof(RC_LIST_EL)), "mesh \"%s\": mesh->max_edge_neigh changed\n", mesh->name); } return (RC_LIST_EL *)getMemory(((MESH_MEM_INFO*)mesh->mem_info)->rc_list); } void free_rc_list(MESH *mesh, RC_LIST_EL *list) { freeMemory((void *)list, ((MESH_MEM_INFO *)(mesh->mem_info))->rc_list); } /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ REAL *get_real_d(MESH *mesh) { FUNCNAME("get_real_d"); DEBUG_TEST_EXIT(mesh, "mesh==nil\n"); return (REAL *)getMemory(((MESH_MEM_INFO*)(mesh->mem_info))->real_d); } void free_real_d(MESH *mesh, REAL *ptr) { FUNCNAME("free_real_d"); DEBUG_TEST_EXIT(mesh, "mesh==nil\n"); freeMemory((void *)ptr, ((MESH_MEM_INFO*)(mesh->mem_info))->real_d); return; } /*--------------------------------------------------------------------------*/ /* memory management for matrix rows */ /* matrix rows not connected to a FE_SPACE, e.g. in multigrid.c are */ /* treated specially. Others are fixed to a FE_SPACE and thus to a unique */ /* DOF_ADMIN and MESH. */ /*--------------------------------------------------------------------------*/ static void *unconnected_rows = nil; MATRIX_ROW *get_matrix_row(const FE_SPACE *fe_space) { MATRIX_ROW *row; static void *matrix_row_info = nil; int j; if(!fe_space || !fe_space->admin) { if(!unconnected_rows) unconnected_rows = newObject(sizeof(MATRIX_ROW), 100); matrix_row_info = unconnected_rows; } else matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->matrix_row; row = (MATRIX_ROW *)getMemory(matrix_row_info); row->next = nil; for (j=0; jcol[j] = NO_MORE_ENTRIES; return(row); } void free_matrix_row(const FE_SPACE *fe_space, MATRIX_ROW *row) { static void *matrix_row_info = nil; if(!fe_space || !fe_space->admin) matrix_row_info = unconnected_rows; else matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->matrix_row; freeMemory((void *)row, matrix_row_info); } ALBERTA_DEFUNUSED(static void delete_unconnected_rows(void)) { if(unconnected_rows) deleteObject(unconnected_rows); unconnected_rows = nil; } static void *unconnected_dowb_rows = nil; static void *unconnected_dowb_rows_s = nil; static void *unconnected_dowb_rows_d = nil; DOWB_MATRIX_ROW *get_dowb_matrix_row(const FE_SPACE *fe_space, DOWBM_TYPE type) { DOWB_MATRIX_ROW *row; void *matrix_row_info = nil; int j; switch (type) { case dowbm_full: if(!fe_space || !fe_space->admin) { if(!unconnected_dowb_rows) unconnected_dowb_rows = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*sizeof(REAL_DD), 100); matrix_row_info = unconnected_dowb_rows; } else { matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->dowb_matrix_row; } break; case dowbm_symm: if(!fe_space || !fe_space->admin) { if(!unconnected_dowb_rows_s) unconnected_dowb_rows_s = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*sizeof(REAL_DDS), 100); matrix_row_info = unconnected_dowb_rows_s; } else { matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->dowb_matrix_row_s; } break; case dowbm_diag: if(!fe_space || !fe_space->admin) { if(!unconnected_dowb_rows_d) unconnected_dowb_rows_d = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*sizeof(REAL_D), 100); matrix_row_info = unconnected_dowb_rows_d; } else { matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->dowb_matrix_row_d; } break; default: break; } row = (DOWB_MATRIX_ROW *)getMemory(matrix_row_info); row->next = nil; for (j=0; jcol[j] = NO_MORE_ENTRIES; } return(row); } void free_dowb_matrix_row(const FE_SPACE *fe_space, DOWBM_TYPE type, DOWB_MATRIX_ROW *row) { void *matrix_row_info = nil; switch (type) { case dowbm_full: if(!fe_space || !fe_space->admin) matrix_row_info = unconnected_dowb_rows; else matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->dowb_matrix_row; break; case dowbm_symm: if(!fe_space || !fe_space->admin) matrix_row_info = unconnected_dowb_rows_s; else matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->dowb_matrix_row_s; break; case dowbm_diag: if(!fe_space || !fe_space->admin) matrix_row_info = unconnected_dowb_rows_d; else matrix_row_info = ((DOF_ADMIN_MEM_INFO *)fe_space->admin->mem_info)->dowb_matrix_row_d; break; default: break; } freeMemory((void *)row, matrix_row_info); } #if 0 static void delete_unconnected_dowb_rows(void) { if(unconnected_dowb_rows) deleteObject(unconnected_dowb_rows); unconnected_dowb_rows = nil; if(unconnected_dowb_rows) deleteObject(unconnected_dowb_rows_s); unconnected_dowb_rows_s = nil; if(unconnected_dowb_rows) deleteObject(unconnected_dowb_rows_d); unconnected_dowb_rows_d = nil; } #endif /*--------------------------------------------------------------------------*/ /* memory management for matrices */ /* unconnected_matrices: see unconnected rows above... */ /*--------------------------------------------------------------------------*/ static void *unconnected_matrices = nil; DOF_MATRIX *get_dof_matrix(const char *name, const FE_SPACE *row_fe_space, const FE_SPACE *col_fe_space) { DOF_MATRIX *mat; void *matrix_info = nil; if(!row_fe_space || !row_fe_space->admin) { if(!unconnected_matrices) unconnected_matrices = newObject(sizeof(DOF_MATRIX), 10); matrix_info = unconnected_matrices; } else { matrix_info = ((DOF_ADMIN_MEM_INFO *)row_fe_space->admin->mem_info)->dof_matrix; if(!col_fe_space) col_fe_space = row_fe_space; } mat = (DOF_MATRIX *)getMemory(matrix_info); mat->next = nil; mat->row_fe_space = row_fe_space; mat->col_fe_space = col_fe_space; mat->name = name ? strdup(name) : nil; mat->matrix_row = nil; mat->size = 0; mat->refine_interpol = mat->coarse_restrict = nil; mat->mem_info = nil; if (row_fe_space && row_fe_space->admin) AI_add_dof_matrix_to_admin(mat, (DOF_ADMIN *)row_fe_space->admin); return(mat); } void free_dof_matrix(DOF_MATRIX *mat) { if (mat->row_fe_space && mat->row_fe_space->admin) AI_remove_dof_matrix_from_admin(mat); clear_dof_matrix(mat); /* free all matrix_rows */ MEM_FREE(mat->matrix_row, mat->size, MATRIX_ROW *); mat->matrix_row = nil; mat->size = 0; if(mat->row_fe_space && mat->row_fe_space->admin) freeMemory((void *)mat, ((DOF_ADMIN_MEM_INFO*)(mat->row_fe_space->admin->mem_info))->dof_matrix); else freeMemory((void *)mat, unconnected_matrices); } ALBERTA_DEFUNUSED(static void delete_unconnected_matrices(void)) { if(unconnected_matrices) deleteObject(unconnected_matrices); unconnected_matrices = nil; } static void *unconnected_dowb_matrices = nil; DOF_DOWB_MATRIX *get_dof_dowb_matrix(const char *name, const FE_SPACE *row_fe_space, const FE_SPACE *col_fe_space, DOWBM_TYPE type) { DOF_DOWB_MATRIX *mat; void *matrix_info = nil; if(!row_fe_space || !row_fe_space->admin) { if(!unconnected_dowb_matrices) unconnected_dowb_matrices = newObject(sizeof(DOF_DOWB_MATRIX), 10); matrix_info = unconnected_dowb_matrices; } else { matrix_info = ((DOF_ADMIN_MEM_INFO *)row_fe_space->admin->mem_info)->dof_dowb_matrix; if(!col_fe_space) col_fe_space = row_fe_space; } mat = (DOF_DOWB_MATRIX *)getMemory(matrix_info); mat->next = nil; mat->row_fe_space = row_fe_space; mat->col_fe_space = col_fe_space; mat->name = name ? strdup(name) : nil; mat->matrix_row = nil; mat->size = 0; mat->refine_interpol = mat->coarse_restrict = nil; mat->mem_info = nil; if (row_fe_space && row_fe_space->admin) AI_add_dof_dowb_matrix_to_admin(mat, (DOF_ADMIN *)row_fe_space->admin); mat->type = type; return(mat); } void free_dof_dowb_matrix(DOF_DOWB_MATRIX *mat) { if (mat->row_fe_space && mat->row_fe_space->admin) AI_remove_dof_dowb_matrix_from_admin(mat); clear_dof_dowb_matrix(mat); /* free all matrix_rows */ MEM_FREE(mat->matrix_row, mat->size, MATRIX_ROW *); mat->matrix_row = nil; mat->size = 0; if(mat->row_fe_space && mat->row_fe_space->admin) freeMemory((void *)mat, ((DOF_ADMIN_MEM_INFO*)(mat->row_fe_space->admin->mem_info))->dof_dowb_matrix); else freeMemory((void *)mat, unconnected_dowb_matrices); } #if 0 static void delete_unconnected_dowb_matrices(void) { if(unconnected_dowb_matrices) deleteObject(unconnected_dowb_matrices); unconnected_dowb_matrices = nil; } #endif /*--------------------------------------------------------------------------*/ /* memory management for dof_vectors */ /* unconnected dof_vectors are handled as above */ /*--------------------------------------------------------------------------*/ static void *unconnected_dof_int_vecs = nil; DOF_INT_VEC *get_dof_int_vec(const char *name, const FE_SPACE *fe_space) { DOF_INT_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_int_vecs) unconnected_dof_int_vecs = newObject(sizeof(DOF_INT_VEC), 10); vec_info = unconnected_dof_int_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_int_vec; vec = (DOF_INT_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name): nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_int_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_int_vec(DOF_INT_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_int_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, int); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_int_vec); else freeMemory((void *)vec, unconnected_dof_int_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_int_vecs(void)) { if(unconnected_dof_int_vecs) deleteObject(unconnected_dof_int_vecs); unconnected_dof_int_vecs = nil; } static void *unconnected_dof_dof_vecs = nil; DOF_DOF_VEC *get_dof_dof_vec(const char *name, const FE_SPACE *fe_space) { DOF_DOF_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_dof_vecs) unconnected_dof_dof_vecs = newObject(sizeof(DOF_DOF_VEC), 10); vec_info = unconnected_dof_dof_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_dof_vec; vec = (DOF_DOF_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_dof_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_dof_vec(DOF_DOF_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_dof_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, int); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_dof_vec); else freeMemory((void *)vec, unconnected_dof_dof_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_dof_vecs(void)) { if(unconnected_dof_dof_vecs) deleteObject(unconnected_dof_dof_vecs); unconnected_dof_dof_vecs = nil; } static void *unconnected_int_dof_vecs = nil; DOF_DOF_VEC *get_int_dof_vec(const char *name, const FE_SPACE *fe_space) { DOF_DOF_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_int_dof_vecs) unconnected_int_dof_vecs = newObject(sizeof(DOF_DOF_VEC), 10); vec_info = unconnected_int_dof_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->int_dof_vec; vec = (DOF_DOF_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; if (fe_space && fe_space->admin) AI_add_int_dof_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_int_dof_vec(DOF_DOF_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_int_dof_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, int); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->int_dof_vec); else freeMemory((void *)vec, unconnected_int_dof_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_int_dof_vecs(void)) { if(unconnected_int_dof_vecs) deleteObject(unconnected_int_dof_vecs); unconnected_int_dof_vecs = nil; } static void *unconnected_dof_uchar_vecs = nil; DOF_UCHAR_VEC *get_dof_uchar_vec(const char *name, const FE_SPACE *fe_space) { DOF_UCHAR_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_uchar_vecs) unconnected_dof_uchar_vecs = newObject(sizeof(DOF_UCHAR_VEC), 10); vec_info = unconnected_dof_uchar_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_uchar_vec; vec = (DOF_UCHAR_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_uchar_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_uchar_vec(DOF_UCHAR_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_uchar_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, U_CHAR); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_uchar_vec); else freeMemory((void *)vec, unconnected_dof_uchar_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_uchar_vecs(void)) { if(unconnected_dof_uchar_vecs) deleteObject(unconnected_dof_uchar_vecs); unconnected_dof_uchar_vecs = nil; } static void *unconnected_dof_schar_vecs = nil; DOF_SCHAR_VEC *get_dof_schar_vec(const char *name, const FE_SPACE *fe_space) { DOF_SCHAR_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_schar_vecs) unconnected_dof_schar_vecs = newObject(sizeof(DOF_SCHAR_VEC), 10); vec_info = unconnected_dof_schar_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_schar_vec; vec = (DOF_SCHAR_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_schar_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_schar_vec(DOF_SCHAR_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_schar_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, S_CHAR); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_schar_vec); else freeMemory((void *)vec, unconnected_dof_schar_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_schar_vecs(void)) { if(unconnected_dof_schar_vecs) deleteObject(unconnected_dof_schar_vecs); unconnected_dof_schar_vecs = nil; } static void *unconnected_dof_real_vecs = nil; DOF_REAL_VEC *get_dof_real_vec(const char *name, const FE_SPACE *fe_space) { DOF_REAL_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_real_vecs) unconnected_dof_real_vecs = newObject(sizeof(DOF_REAL_VEC), 10); vec_info = unconnected_dof_real_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_real_vec; vec = (DOF_REAL_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_real_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_real_vec(DOF_REAL_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_real_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, REAL); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_real_vec); else freeMemory((void *)vec, unconnected_dof_real_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_real_vecs(void)) { if(unconnected_dof_real_vecs) deleteObject(unconnected_dof_real_vecs); unconnected_dof_real_vecs = nil; } static void *unconnected_dof_real_d_vecs = nil; DOF_REAL_D_VEC *get_dof_real_d_vec(const char *name, const FE_SPACE *fe_space) { DOF_REAL_D_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_real_d_vecs) unconnected_dof_real_d_vecs = newObject(sizeof(DOF_REAL_D_VEC), 10); vec_info = unconnected_dof_real_d_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_real_d_vec; vec = (DOF_REAL_D_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_real_d_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_real_d_vec(DOF_REAL_D_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_real_d_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, REAL_D); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_real_d_vec); else freeMemory((void *)vec, unconnected_dof_real_d_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_real_d_vecs(void)) { if(unconnected_dof_real_d_vecs) deleteObject(unconnected_dof_real_d_vecs); unconnected_dof_real_d_vecs = nil; } static void *unconnected_dof_ptr_vecs = nil; DOF_PTR_VEC *get_dof_ptr_vec(const char *name, const FE_SPACE *fe_space) { DOF_PTR_VEC *vec; static void *vec_info = nil; if(!fe_space || !fe_space->admin) { if(!unconnected_dof_ptr_vecs) unconnected_dof_ptr_vecs = newObject(sizeof(DOF_PTR_VEC), 10); vec_info = unconnected_dof_ptr_vecs; } else vec_info = ((DOF_ADMIN_MEM_INFO*)(fe_space->admin->mem_info))->dof_ptr_vec; vec = (DOF_PTR_VEC *)getMemory(vec_info); vec->next = nil; vec->fe_space = fe_space; vec->name = name ? strdup(name) : nil; vec->size = 0; vec->vec = nil; vec->refine_interpol = vec->coarse_restrict = nil; vec->mem_info = nil; if (fe_space && fe_space->admin) AI_add_dof_ptr_vec_to_admin(vec, (DOF_ADMIN *)fe_space->admin); return(vec); } void free_dof_ptr_vec(DOF_PTR_VEC *vec) { if (vec->fe_space && vec->fe_space->admin) AI_remove_dof_ptr_vec_from_admin(vec); MEM_FREE(vec->vec, vec->size, void *); vec->vec = nil; vec->size = 0; if(vec->fe_space && vec->fe_space->admin) freeMemory((void *)vec, ((DOF_ADMIN_MEM_INFO*)(vec->fe_space->admin->mem_info))->dof_ptr_vec); else freeMemory((void *)vec, unconnected_dof_ptr_vecs); } ALBERTA_DEFUNUSED(static void delete_unconnected_dof_ptr_vecs(void)) { if(unconnected_dof_ptr_vecs) deleteObject(unconnected_dof_ptr_vecs); unconnected_dof_ptr_vecs = nil; } alberta-2.0.1/alberta/src/Common/numint.c0000644000042300001440000020033510676724253015163 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: numint.c */ /* */ /* description: quadrature formulas and routines for numerical quadrature */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #define zero 0.0 #define one 1.0 #define half 0.5 #define third 1.0/3.0 #define quart 1.0/4.0 /*--------------------------------------------------------------------------*/ /* 0d quadrature formulas using 1 barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define MAX_QUAD_DEG_0d 19 static const double x_0d[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; static const double *gx_0d[1] = {x_0d}; static const double w_0d[1] = {1.0}; static QUAD quad_0d[MAX_QUAD_DEG_0d+1] = { {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_0 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_1 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_2 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_3 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_4 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_5 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_6 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_7 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_8 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_9 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_10 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_11 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_12 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_13 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_14 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_15 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_16 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_17 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d}, /* P_18 */ {"0d", MAX_QUAD_DEG_0d, 0, 1, gx_0d, w_0d} /* P_19 */ }; #define StdVol 1.0 /*--------------------------------------------------------------------------*/ /* 1d quadrature formulas using 2 barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define MAX_QUAD_DEG_1d 19 /*--------------------------------------------------------------------------*/ /* quadrature exact on P_1 */ /*--------------------------------------------------------------------------*/ static const double x0_1d[N_LAMBDA] = {0.5, 0.5, 0.0, 0.0}; static const double *gx0_1d[1] = {x0_1d}; static const double w0_1d[1] = {StdVol*1.0}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_3 */ /*--------------------------------------------------------------------------*/ static const double x1_1d[2][N_LAMBDA] = {{0.788675134594813, 0.211324865405187, 0.0, 0.0}, {0.211324865405187, 0.788675134594813, 0.0, 0.0}}; static const double *gx1_1d[2] = {x1_1d[0], x1_1d[1]}; static const double w1_1d[2] = {StdVol*0.5, StdVol*0.5}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_5 */ /*--------------------------------------------------------------------------*/ static const double x2_1d[3][N_LAMBDA] = {{0.887298334620741, 0.112701665379259, 0.0, 0.0}, {0.500000000000000, 0.500000000000000, 0.0, 0.0}, {0.112701665379259, 0.887298334620741, 0.0, 0.0}}; static const double *gx2_1d[3] = {x2_1d[0], x2_1d[1], x2_1d[2]}; static const double w2_1d[3] = {StdVol*0.277777777777778, StdVol*0.444444444444444, StdVol*0.277777777777778}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_7 */ /*--------------------------------------------------------------------------*/ static const double x3_1d[4][N_LAMBDA] = {{0.930568155797026, 0.069431844202973, 0.0, 0.0}, {0.669990521792428, 0.330009478207572, 0.0, 0.0}, {0.330009478207572, 0.669990521792428, 0.0, 0.0}, {0.069431844202973, 0.930568155797026, 0.0, 0.0}}; static const double *gx3_1d[4] = {x3_1d[0], x3_1d[1], x3_1d[2], x3_1d[3]}; static const double w3_1d[4] = {StdVol*0.173927422568727, StdVol*0.326072577431273, StdVol*0.326072577431273, StdVol*0.173927422568727}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_9 */ /*--------------------------------------------------------------------------*/ static const double x4_1d[5][N_LAMBDA] = {{0.953089922969332, 0.046910077030668, 0.0, 0.0}, {0.769234655052841, 0.230765344947159, 0.0, 0.0}, {0.500000000000000, 0.500000000000000, 0.0, 0.0}, {0.230765344947159, 0.769234655052841, 0.0, 0.0}, {0.046910077030668, 0.953089922969332, 0.0, 0.0}}; static const double *gx4_1d[5] = {x4_1d[0], x4_1d[1], x4_1d[2], x4_1d[3], x4_1d[4]}; static const double w4_1d[5] = {StdVol*0.118463442528095, StdVol*0.239314335249683, StdVol*0.284444444444444, StdVol*0.239314335249683, StdVol*0.118463442528095}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_11 */ /*--------------------------------------------------------------------------*/ static const double x5_1d[6][N_LAMBDA] = {{0.966234757101576, 0.033765242898424, 0.0, 0.0}, {0.830604693233133, 0.169395306766867, 0.0, 0.0}, {0.619309593041598, 0.380690406958402, 0.0, 0.0}, {0.380690406958402, 0.619309593041598, 0.0, 0.0}, {0.169395306766867, 0.830604693233133, 0.0, 0.0}, {0.033765242898424, 0.966234757101576, 0.0, 0.0}}; static const double *gx5_1d[6] = {x5_1d[0], x5_1d[1], x5_1d[2], x5_1d[3], x5_1d[4], x5_1d[5]}; static const double w5_1d[6] = {StdVol*0.085662246189585, StdVol*0.180380786524069, StdVol*0.233956967286345, StdVol*0.233956967286345, StdVol*0.180380786524069, StdVol*0.085662246189585}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_13 */ /*--------------------------------------------------------------------------*/ static const double x6_1d[7][N_LAMBDA] = {{0.974553956171380, 0.025446043828620, 0.0, 0.0}, {0.870765592799697, 0.129234407200303, 0.0, 0.0}, {0.702922575688699, 0.297077424311301, 0.0, 0.0}, {0.500000000000000, 0.500000000000000, 0.0, 0.0}, {0.297077424311301, 0.702922575688699, 0.0, 0.0}, {0.129234407200303, 0.870765592799697, 0.0, 0.0}, {0.025446043828620, 0.974553956171380, 0.0, 0.0}}; static const double *gx6_1d[7] = {x6_1d[0], x6_1d[1], x6_1d[2], x6_1d[3], x6_1d[4], x6_1d[5], x6_1d[6]}; static const double w6_1d[7] = {StdVol*0.064742483084435, StdVol*0.139852695744614, StdVol*0.190915025252559, StdVol*0.208979591836735, StdVol*0.190915025252559, StdVol*0.139852695744614, StdVol*0.064742483084435}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_15 */ /*--------------------------------------------------------------------------*/ static const double x7_1d[8][N_LAMBDA] = {{0.980144928248768, 0.019855071751232, 0.0, 0.0}, {0.898333238706813, 0.101666761293187, 0.0, 0.0}, {0.762766204958164, 0.237233795041836, 0.0, 0.0}, {0.591717321247825, 0.408282678752175, 0.0, 0.0}, {0.408282678752175, 0.591717321247825, 0.0, 0.0}, {0.237233795041836, 0.762766204958164, 0.0, 0.0}, {0.101666761293187, 0.898333238706813, 0.0, 0.0}, {0.019855071751232, 0.980144928248768, 0.0, 0.0}}; static const double *gx7_1d[8] = {x7_1d[0], x7_1d[1], x7_1d[2], x7_1d[3], x7_1d[4], x7_1d[5], x7_1d[6], x7_1d[7]}; static const double w7_1d[8] = {StdVol*0.050614268145188, StdVol*0.111190517226687, StdVol*0.156853322938943, StdVol*0.181341891689181, StdVol*0.181341891689181, StdVol*0.156853322938943, StdVol*0.111190517226687, StdVol*0.050614268145188}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_17 */ /*--------------------------------------------------------------------------*/ static const double x8_1d[9][N_LAMBDA] = {{0.984080119753813, 0.015919880246187, 0.0, 0.0}, {0.918015553663318, 0.081984446336682, 0.0, 0.0}, {0.806685716350295, 0.193314283649705, 0.0, 0.0}, {0.662126711701905, 0.337873288298095, 0.0, 0.0}, {0.500000000000000, 0.500000000000000, 0.0, 0.0}, {0.337873288298095, 0.662126711701905, 0.0, 0.0}, {0.193314283649705, 0.806685716350295, 0.0, 0.0}, {0.081984446336682, 0.918015553663318, 0.0, 0.0}, {0.015919880246187, 0.984080119753813, 0.0, 0.0}}; static const double *gx8_1d[9] = {x8_1d[0], x8_1d[1], x8_1d[2], x8_1d[3], x8_1d[4], x8_1d[5], x8_1d[6], x8_1d[7], x8_1d[8]}; static const double w8_1d[9] = {StdVol*0.040637194180787, StdVol*0.090324080347429, StdVol*0.130305348201467, StdVol*0.156173538520001, StdVol*0.165119677500630, StdVol*0.156173538520001, StdVol*0.130305348201467, StdVol*0.090324080347429, StdVol*0.040637194180787}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_19 */ /*--------------------------------------------------------------------------*/ static const double x9_1d[10][N_LAMBDA] = {{0.986953264258586, 0.013046735741414, 0.0, 0.0}, {0.932531683344493, 0.067468316655508, 0.0, 0.0}, {0.839704784149512, 0.160295215850488, 0.0, 0.0}, {0.716697697064623, 0.283302302935377, 0.0, 0.0}, {0.574437169490815, 0.425562830509185, 0.0, 0.0}, {0.425562830509185, 0.574437169490815, 0.0, 0.0}, {0.283302302935377, 0.716697697064623, 0.0, 0.0}, {0.160295215850488, 0.839704784149512, 0.0, 0.0}, {0.067468316655508, 0.932531683344493, 0.0, 0.0}, {0.013046735741414, 0.986953264258586, 0.0, 0.0}}; static const double *gx9_1d[10] = {x9_1d[0], x9_1d[1], x9_1d[2], x9_1d[3], x9_1d[4], x9_1d[5], x9_1d[6], x9_1d[7], x9_1d[8], x9_1d[9]}; static const double w9_1d[10] = {StdVol*0.033335672154344, StdVol*0.074725674575291, StdVol*0.109543181257991, StdVol*0.134633359654998, StdVol*0.147762112357376, StdVol*0.147762112357376, StdVol*0.134633359654998, StdVol*0.109543181257991, StdVol*0.074725674575291, StdVol*0.033335672154344}; static QUAD quad_1d[MAX_QUAD_DEG_1d+1] = { {"1d-Gauss: P_1", 1, 1, 1, gx0_1d, w0_1d}, /* P_0 */ {"1d-Gauss: P_1", 1, 1, 1, gx0_1d, w0_1d}, /* P_1 */ {"1d-Gauss: P_3", 3, 1, 2, gx1_1d, w1_1d}, /* P_2 */ {"1d-Gauss: P_3", 3, 1, 2, gx1_1d, w1_1d}, /* P_3 */ {"1d-Gauss: P_5", 5, 1, 3, gx2_1d, w2_1d}, /* P_4 */ {"1d-Gauss: P_5", 5, 1, 3, gx2_1d, w2_1d}, /* P_5 */ {"1d-Gauss: P_7", 7, 1, 4, gx3_1d, w3_1d}, /* P_6 */ {"1d-Gauss: P_7", 7, 1, 4, gx3_1d, w3_1d}, /* P_7 */ {"1d-Gauss: P_9", 9, 1, 5, gx4_1d, w4_1d}, /* P_8 */ {"1d-Gauss: P_9", 9, 1, 5, gx4_1d, w4_1d}, /* P_9 */ {"1d-Gauss: P_11", 11, 1, 6, gx5_1d, w5_1d}, /* P_10 */ {"1d-Gauss: P_11", 11, 1, 6, gx5_1d, w5_1d}, /* P_11 */ {"1d-Gauss: P_13", 13, 1, 7, gx6_1d, w6_1d}, /* P_12 */ {"1d-Gauss: P_13", 13, 1, 7, gx6_1d, w6_1d}, /* P_13 */ {"1d-Gauss: P_15", 15, 1, 8, gx7_1d, w7_1d}, /* P_14 */ {"1d-Gauss: P_15", 15, 1, 8, gx7_1d, w7_1d}, /* P_15 */ {"1d-Gauss: P_17", 17, 1, 9, gx8_1d, w8_1d}, /* P_16 */ {"1d-Gauss: P_17", 17, 1, 9, gx8_1d, w8_1d}, /* P_17 */ {"1d-Gauss: P_19", 19, 1, 10, gx9_1d, w9_1d}, /* P_18 */ {"1d-Gauss: P_19", 19, 1, 10, gx9_1d, w9_1d}};/* P_19 */ #undef StdVol /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* 2d quadrature formulas using 3 barycentric coordinates */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ #define CYCLE(c1,c2,c3) {c1,c2,c3,0.0},{c2,c3,c1,0.0},{c3,c1,c2,0.0} #define ALL_COMB(c1,c2,c3) CYCLE(c1,c2,c3), CYCLE(c1,c3,c2) #define W_CYCLE(w1) w1, w1, w1 #define W_ALL_COMB(w1) W_CYCLE(w1), W_CYCLE(w1) #define MAX_QUAD_DEG_2d 17 #define StdVol 0.5 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 1 */ /*--------------------------------------------------------------------------*/ #define N1 1 #define c1 1.0/3.0 #define w1 StdVol*1.0 static const double x1_2d[N_LAMBDA] = {c1, c1, c1, 0}; static const double *gx1_2d[N1] = {x1_2d}; static const double w1_2d[N1] = {w1}; #undef c1 #undef w1 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 2 */ /* Stroud, A.H.: Approximate calculation of multiple integrals */ /* Prentice-Hall Series in Automatic Computation. (1971) */ /* optimal number of points: 3, number of points: 3 */ /* interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N2 3 #define c1 2.0/3.0 #define c2 1.0/6.0 #define w1 StdVol/3.0 static const double x2_2d[3][N_LAMBDA] = {CYCLE(c1, c2, c2)}; static const double *gx2_2d[3] = {x2_2d[0], x2_2d[1], x2_2d[2]}; static const double w2_2d[3] = {W_CYCLE(w1)}; #undef c1 #undef c2 #undef w1 /*--------------------------------------------------------------------------*/ /* quadrature exact on P_3 */ /*--------------------------------------------------------------------------*/ #define N3 6 #define c1 0.0 #define c2 1.0/2.0 #define c3 4.0/6.0 #define c4 1.0/6.0 #define w1 StdVol*1.0/30.0 #define w2 StdVol*9.0/30.0 static const double x3_2d[N3][N_LAMBDA] = {CYCLE(c1,c2,c2), CYCLE(c3,c4,c4)}; static const double *gx3_2d[N3] = {x3_2d[0], x3_2d[1], x3_2d[2], x3_2d[3], x3_2d[4], x3_2d[5]}; static const double w3_2d[N3] = {W_CYCLE(w1), W_CYCLE(w2)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef w1 #undef w2 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 4 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nearly optimal number of (interior) points, positive wheights (PI) */ /* number of points: 6, optimal number of points: 6 */ /*--------------------------------------------------------------------------*/ #define N4 6 #define c1 0.816847572980459 #define c2 0.091576213509771 #define c3 0.108103018168070 #define c4 0.445948490915965 #define w1 StdVol*0.109951743655322 #define w2 StdVol*0.223381589678011 static const double x4_2d[N4][N_LAMBDA] = {CYCLE(c1,c2,c2), CYCLE(c3,c4,c4)}; static const double *gx4_2d[N4] = {x4_2d[0], x4_2d[1], x4_2d[2], x4_2d[3], x4_2d[4], x4_2d[5]}; static const double w4_2d[N4] = {W_CYCLE(w1), W_CYCLE(w2)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef w1 #undef w2 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 5 */ /*--------------------------------------------------------------------------*/ #if 0 /*--------------------------------------------------------------------------*/ /* Stroud, A.H.: Approximate calculation of multiple integrals */ /* Prentice-Hall Series in Automatic Computation. (1971) */ /* number of points: 7, optimal number of points: 7 */ /*--------------------------------------------------------------------------*/ #define N5 7 #define c1 1.0/3.0 #define c2 0.0 #define c3 1.0/2.0 #define c4 1.0 #define c5 0.0 #define w1 StdVol*0.45 #define w2 StdVol*4.0/30.0 #define w3 StdVol*0.05 #else /*--------------------------------------------------------------------------*/ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* number of points: 7, optimal number of points: 7 */ /*--------------------------------------------------------------------------*/ #define N5 7 #define c1 1.0/3.0 #define c2 0.797426985353087 #define c3 0.101286507323456 #define c4 0.059715871789770 #define c5 0.470142064105115 #define w1 StdVol*0.225000000000000 #define w2 StdVol*0.125939180544827 #define w3 StdVol*0.132394152788506 #endif static const double x5_2d[N5][N_LAMBDA] = {{c1, c1, c1, 0.0}, CYCLE(c2,c3,c3), CYCLE(c4,c5,c5)}; static const double *gx5_2d[N5] = {x5_2d[0], x5_2d[1], x5_2d[2], x5_2d[3], x5_2d[4], x5_2d[5], x5_2d[6]}; static const double w5_2d[N5] = {w1, W_CYCLE(w2), W_CYCLE(w3)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef w1 #undef w2 #undef w3 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 6: only 12 point rule available in the literature */ /* -> use quadrature exact on P 7 with 12 points */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* quadrature exact on P 7 */ /*--------------------------------------------------------------------------*/ #if 1 /*--------------------------------------------------------------------------*/ /* Gatermann, Karin: The construction of symmetric cubature formulas for */ /* the square and the triangle. Computing 40, No.3, 229-240 (1988) */ /* optimal number of points: 12, number of points: 12 */ /* only interior points, not completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N7 12 #define c1 0.06238226509439084 #define c2 0.06751786707392436 #define c3 0.87009986783168480 #define c4 0.05522545665692000 #define c5 0.32150249385201560 #define c6 0.62327204949106440 #define c7 0.03432430294509488 #define c8 0.66094919618679800 #define c9 0.30472650086810720 #define c10 0.5158423343536001 #define c11 0.2777161669764050 #define c12 0.2064414986699949 #define w1 0.02651702815743450 #define w2 0.04388140871444811 #define w3 0.02877504278497528 #define w4 0.06749318700980879 static const double x7_2d[N7][N_LAMBDA] = {CYCLE(c1,c2,c3), CYCLE(c4,c5,c6), CYCLE(c7,c8,c9), CYCLE(c10,c11,c12)}; static const double *gx7_2d[N7] = {x7_2d[0], x7_2d[1], x7_2d[2], x7_2d[3], x7_2d[4], x7_2d[5], x7_2d[6], x7_2d[7], x7_2d[8], x7_2d[9], x7_2d[10], x7_2d[11]}; static const double w7_2d[N7] = {W_CYCLE(w1), W_CYCLE(w2), W_CYCLE(w3), W_CYCLE(w4)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef c11 #undef c12 #undef w1 #undef w2 #undef w3 #undef w4 #else /*--------------------------------------------------------------------------*/ /* Stroud, A.H.: Approximate calculation of multiple integrals */ /* Prentice-Hall Series in Automatic Computation. (1971) */ /* optimal number of points: 12, number of points: 16 */ /* only interior points, not symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N7 16 static const double x7_2d[N7][N_LAMBDA] = { {0.0571041961, 0.065466992667427, 0.877428811232573, 0.0}, {0.2768430136, 0.050210121765552, 0.672946864634448, 0.0}, {0.5835904324, 0.028912083388173, 0.387497484211827, 0.0}, {0.8602401357, 0.009703784843971, 0.130056079456029, 0.0}, {0.0571041961, 0.311164552242009, 0.631731251657992, 0.0}, {0.2768430136, 0.238648659738548, 0.484508326661452, 0.0}, {0.5835904324, 0.137419104121164, 0.278990463478836, 0.0}, {0.8602401357, 0.046122079890946, 0.093637784409054, 0.0}, {0.0571041961, 0.631731251657991, 0.311164552242009, 0.0}, {0.2768430136, 0.484508326661451, 0.238648659738549, 0.0}, {0.5835904324, 0.278990463478836, 0.137419104121164, 0.0}, {0.8602401357, 0.093637784409054, 0.046122079890946, 0.0}, {0.0571041961, 0.877428809346781, 0.065466994553219, 0.0}, {0.2768430136, 0.672946863188134, 0.050210123211866, 0.0}, {0.5835904324, 0.387497483379007, 0.028912084220993, 0.0}, {0.8602401357, 0.130056079176509, 0.009703785123491, 0.0}}; static const double *gx7_2d[N7] ={x7_2d[0], x7_2d[1], x7_2d[2], x7_2d[3], x7_2d[4], x7_2d[5], x7_2d[6], x7_2d[7], x7_2d[8], x7_2d[9], x7_2d[10], x7_2d[11], x7_2d[12], x7_2d[13], x7_2d[14], x7_2d[15]}; static const double w7_2d[N7] = {StdVol*0.047136736384287, StdVol*0.070776135805325, StdVol*0.045168098569998, StdVol*0.010846451805605, StdVol*0.088370177015713, StdVol*0.132688432194675, StdVol*0.084679449030002, StdVol*0.020334519094395, StdVol*0.088370177015713, StdVol*0.132688432194675, StdVol*0.084679449030002, StdVol*0.020334519094395, StdVol*0.047136736384287, StdVol*0.070776135805325, StdVol*0.045168098569998, StdVol*0.010846451805605}; #endif /*--------------------------------------------------------------------------*/ /* quadrature exact on P 8 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* number of points: 16, optimal number of points: 15 */ /* only interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N8 16 #define c1 1.0/3.0 #define c2 0.081414823414554 #define c3 0.459292588292723 #define c4 0.658861384496480 #define c5 0.170569307751760 #define c6 0.898905543365938 #define c7 0.050547228317031 #define c8 0.008394777409958 #define c9 0.263112829634638 #define c10 0.728492392955404 #define w1 StdVol*0.144315607677787 #define w2 StdVol*0.095091634267285 #define w3 StdVol*0.103217370534718 #define w4 StdVol*0.032458497623198 #define w5 StdVol*0.027230314174435 static const double x8_2d[N8][N_LAMBDA] = {{c1, c1, c1, 0.0}, CYCLE(c2,c3,c3), CYCLE(c4,c5,c5), CYCLE(c6,c7,c7), ALL_COMB(c8,c9,c10)}; static const double *gx8_2d[N8] ={x8_2d[0], x8_2d[1], x8_2d[2], x8_2d[3], x8_2d[4], x8_2d[5], x8_2d[6], x8_2d[7], x8_2d[8], x8_2d[9], x8_2d[10], x8_2d[11], x8_2d[12], x8_2d[13], x8_2d[14], x8_2d[15]}; static const double w8_2d[N8] = {w1, W_CYCLE(w2), W_CYCLE(w3), W_CYCLE(w4), W_ALL_COMB(w5)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef w1 #undef w2 #undef w3 #undef w4 #undef w5 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 9 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* optimal number of points: ?, number of points: 19 */ /* only interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N9 19 #define c1 1.0/3.0 #define c2 0.020634961602525 #define c3 0.489682519198738 #define c4 0.125820817014127 #define c5 0.437089591492937 #define c6 0.623592928761935 #define c7 0.188203535619033 #define c8 0.910540973211095 #define c9 0.044729513394453 #define c10 0.036838412054736 #define c11 0.221962989160766 #define c12 0.741198598784498 #define w1 StdVol*0.097135796282799 #define w2 StdVol*0.031334700227139 #define w3 StdVol*0.077827541004774 #define w4 StdVol*0.079647738927210 #define w5 StdVol*0.025577675658698 #define w6 StdVol*0.043283539377289 static const double x9_2d[N9][N_LAMBDA] = {{c1, c1, c1, 0.0}, CYCLE(c2,c3,c3), CYCLE(c4,c5,c5), CYCLE(c6,c7,c7), CYCLE(c8,c9,c9), ALL_COMB(c10,c11,c12)}; static const double *gx9_2d[N9] ={x9_2d[0], x9_2d[1], x9_2d[2], x9_2d[3], x9_2d[4], x9_2d[5], x9_2d[6], x9_2d[7], x9_2d[8], x9_2d[9], x9_2d[10], x9_2d[11], x9_2d[12], x9_2d[13], x9_2d[14], x9_2d[15], x9_2d[16], x9_2d[17], x9_2d[18]}; static const double w9_2d[N9] = {w1, W_CYCLE(w2), W_CYCLE(w3), W_CYCLE(w4), W_CYCLE(w5), W_ALL_COMB(w6)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef c11 #undef c12 #undef w1 #undef w2 #undef w3 #undef w4 #undef w5 #undef w6 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 10 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* optimal number of points: ?, number of points: 25 */ /* only interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N10 25 #define c1 1.0/3.0 #define c2 0.028844733232685 #define c3 0.485577633383657 #define c4 0.781036849029926 #define c5 0.109481575485037 #define c6 0.141707219414880 #define c7 0.307939838764121 #define c8 0.550352941820999 #define c9 0.025003534762686 #define c10 0.246672560639903 #define c11 0.728323904597411 #define c12 0.009540815400299 #define c13 0.066803251012200 #define c14 0.923655933587500 #define w1 StdVol*0.090817990382754 #define w2 StdVol*0.036725957756467 #define w3 StdVol*0.045321059435528 #define w4 StdVol*0.072757916845420 #define w5 StdVol*0.028327242531057 #define w6 StdVol*0.009421666963733 static const double x10_2d[N10][N_LAMBDA] = {{c1, c1, c1, 0.0}, CYCLE(c2,c3,c3), CYCLE(c4,c5,c5), ALL_COMB(c6,c7,c8), ALL_COMB(c9,c10,c11), ALL_COMB(c12,c13,c14)}; static const double *gx10_2d[N10] = {x10_2d[0], x10_2d[1], x10_2d[2], x10_2d[3], x10_2d[4], x10_2d[5], x10_2d[6], x10_2d[7], x10_2d[8], x10_2d[9], x10_2d[10], x10_2d[11], x10_2d[12], x10_2d[13], x10_2d[14], x10_2d[15], x10_2d[16], x10_2d[17], x10_2d[18], x10_2d[19], x10_2d[20], x10_2d[21], x10_2d[22], x10_2d[23], x10_2d[24]}; static const double w10_2d[N10] = {w1, W_CYCLE(w2), W_CYCLE(w3), W_ALL_COMB(w4), W_ALL_COMB(w5), W_ALL_COMB(w6)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef c11 #undef c12 #undef c13 #undef c14 #undef w1 #undef w2 #undef w3 #undef w4 #undef w5 #undef w6 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 11 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* optimal number of points: ?, number of points: 27 */ /* only interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N11 27 #define c1 -0.069222096541517 #define c2 0.534611048270758 #define c3 0.202061394068290 #define c4 0.398969302965855 #define c5 0.593380199137435 #define c6 0.203309900431282 #define c7 0.761298175434837 #define c8 0.119350912282581 #define c9 0.935270103777448 #define c10 0.032364948111276 #define c11 0.050178138310495 #define c12 0.356620648261293 #define c13 0.593201213428213 #define c14 0.021022016536166 #define c15 0.171488980304042 #define c16 0.807489003159792 #define w1 StdVol*0.000927006328961 #define w2 StdVol*0.077149534914813 #define w3 StdVol*0.059322977380774 #define w4 StdVol*0.036184540503418 #define w5 StdVol*0.013659731002678 #define w6 StdVol*0.052337111962204 #define w7 StdVol*0.020707659639141 static const double x11_2d[N11][N_LAMBDA] = {CYCLE(c1,c2,c2), CYCLE(c3,c4,c4), CYCLE(c5,c6,c6), CYCLE(c7,c8,c8), CYCLE(c9,c10,c10), ALL_COMB(c11,c12,c13), ALL_COMB(c14,c15,c16)}; static const double *gx11_2d[N11] = {x11_2d[0], x11_2d[1], x11_2d[2], x11_2d[3], x11_2d[4], x11_2d[5], x11_2d[6], x11_2d[7], x11_2d[8], x11_2d[9], x11_2d[10], x11_2d[11], x11_2d[12], x11_2d[13], x11_2d[14], x11_2d[15], x11_2d[16], x11_2d[17], x11_2d[18], x11_2d[19], x11_2d[20], x11_2d[21], x11_2d[22], x11_2d[23], x11_2d[24], x11_2d[25], x11_2d[26]}; static const double w11_2d[N11] = {W_CYCLE(w1), W_CYCLE(w2), W_CYCLE(w3), W_CYCLE(w4), W_CYCLE(w5), W_ALL_COMB(w6), W_ALL_COMB(w7)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef c11 #undef c12 #undef c13 #undef c14 #undef c15 #undef c16 #undef w1 #undef w2 #undef w3 #undef w4 #undef w5 #undef w6 #undef w7 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 12 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* optimal number of points: 2, number of points: 25 */ /* only interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N12 33 #define c1 0.023565220452390 #define c2 0.488217389773805 #define c3 0.120551215411079 #define c4 0.439724392294460 #define c5 0.457579229975768 #define c6 0.271210385012116 #define c7 0.744847708916828 #define c8 0.127576145541586 #define c9 0.957365299093579 #define c10 0.021317350453210 #define c11 0.115343494534698 #define c12 0.275713269685514 #define c13 0.608943235779788 #define c14 0.022838332222257 #define c15 0.281325580989940 #define c16 0.695836086787803 #define c17 0.025734050548330 #define c18 0.116251915907597 #define c19 0.858014033544073 #define w1 StdVol*0.025731066440455 #define w2 StdVol*0.043692544538038 #define w3 StdVol*0.062858224217885 #define w4 StdVol*0.034796112930709 #define w5 StdVol*0.006166261051559 #define w6 StdVol*0.040371557766381 #define w7 StdVol*0.022356773202303 #define w8 StdVol*0.017316231108659 static const double x12_2d[N12][N_LAMBDA] = {CYCLE(c1,c2,c2), CYCLE(c3,c4,c4), CYCLE(c5,c6,c6), CYCLE(c7,c8,c8), CYCLE(c9,c10,c10), ALL_COMB(c11,c12,c13), ALL_COMB(c14,c15,c16), ALL_COMB(c17,c18,c19)}; static const double *gx12_2d[N12] = {x12_2d[0], x12_2d[1], x12_2d[2], x12_2d[3], x12_2d[4], x12_2d[5], x12_2d[6], x12_2d[7], x12_2d[8], x12_2d[9], x12_2d[10], x12_2d[11], x12_2d[12], x12_2d[13], x12_2d[14], x12_2d[15], x12_2d[16], x12_2d[17], x12_2d[18], x12_2d[19], x12_2d[20], x12_2d[21], x12_2d[22], x12_2d[23], x12_2d[24], x12_2d[25], x12_2d[26], x12_2d[27], x12_2d[28], x12_2d[29], x12_2d[30], x12_2d[31], x12_2d[32]}; static const double w12_2d[N12] = {W_CYCLE(w1), W_CYCLE(w2), W_CYCLE(w3), W_CYCLE(w4), W_CYCLE(w5), W_ALL_COMB(w6), W_ALL_COMB(w7), W_ALL_COMB(w8)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef c11 #undef c12 #undef c13 #undef c14 #undef c15 #undef c16 #undef c17 #undef c18 #undef c19 #undef w1 #undef w2 #undef w3 #undef w4 #undef w5 #undef w6 #undef w7 #undef w8 /*--------------------------------------------------------------------------*/ /* quadrature exact on P 17 */ /* Dunavant, D.A.: High degree efficient symmetrical Gaussian quadrature */ /* rules for the triangle. Int. J. Numer. Methods Eng. 21, 1129-1148 (1985) */ /* nealy optimal number of (interior) points, positive wheights (PI) */ /* optimal number of points: ?, number of points: 61 */ /* only interior points, completly symmetric in barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define N17 61 #define c1 1.0/3.0 #define c2 0.005658918886452 #define c3 0.497170540556774 #define c4 0.035647354750751 #define c5 0.482176322624625 #define c6 0.099520061958437 #define c7 0.450239969020782 #define c8 0.199467521245206 #define c9 0.400266239377397 #define c10 0.495717464058095 #define c11 0.252141267970953 #define c12 0.675905990683077 #define c13 0.162047004658461 #define c14 0.848248235478508 #define c15 0.075875882260746 #define c16 0.968690546064356 #define c17 0.015654726967822 #define c18 0.010186928826919 #define c19 0.334319867363658 #define c20 0.655493203809423 #define c21 0.135440871671036 #define c22 0.292221537796944 #define c23 0.572337590532020 #define c24 0.054423924290583 #define c25 0.319574885423190 #define c26 0.626001190286228 #define c27 0.012868560833637 #define c28 0.190704224192292 #define c29 0.796427214974071 #define c30 0.067165782413524 #define c31 0.180483211648746 #define c32 0.752351005937729 #define c33 0.014663182224828 #define c34 0.080711313679564 #define c35 0.904625504095608 #define w1 StdVol*0.033437199290803 #define w2 StdVol*0.005093415440507 #define w3 StdVol*0.014670864527638 #define w4 StdVol*0.024350878353672 #define w5 StdVol*0.031107550868969 #define w6 StdVol*0.031257111218620 #define w7 StdVol*0.024815654339665 #define w8 StdVol*0.014056073070557 #define w9 StdVol*0.003194676173779 #define w10 StdVol*0.008119655318993 #define w11 StdVol*0.026805742283163 #define w12 StdVol*0.018459993210822 #define w13 StdVol*0.008476868534328 #define w14 StdVol*0.018292796770025 #define w15 StdVol*0.006665632004165 static const double x17_2d[N17][N_LAMBDA] = {{c1, c1, c1, 0.0}, CYCLE(c2,c3,c3), CYCLE(c4,c5,c5), CYCLE(c6,c7,c7), CYCLE(c8,c9,c9), CYCLE(c10,c11,c11), CYCLE(c12,c13,c13), CYCLE(c14,c15,c15), CYCLE(c16,c17,c17), ALL_COMB(c18,c19,c20), ALL_COMB(c21,c22,c23), ALL_COMB(c24,c25,c26), ALL_COMB(c27,c28,c29), ALL_COMB(c30,c31,c32), ALL_COMB(c33,c34,c35)}; static const double *gx17_2d[N17] = {x17_2d[0], x17_2d[1], x17_2d[2], x17_2d[3], x17_2d[4], x17_2d[5], x17_2d[6], x17_2d[7], x17_2d[8], x17_2d[9], x17_2d[10], x17_2d[11], x17_2d[12], x17_2d[13], x17_2d[14], x17_2d[15], x17_2d[16], x17_2d[17], x17_2d[18], x17_2d[19], x17_2d[20], x17_2d[21], x17_2d[22], x17_2d[23], x17_2d[24], x17_2d[25], x17_2d[26], x17_2d[27], x17_2d[28], x17_2d[29], x17_2d[30], x17_2d[31], x17_2d[32], x17_2d[33], x17_2d[34], x17_2d[35], x17_2d[36], x17_2d[37], x17_2d[38], x17_2d[39], x17_2d[40], x17_2d[41], x17_2d[42], x17_2d[43], x17_2d[44], x17_2d[45], x17_2d[46], x17_2d[47], x17_2d[48], x17_2d[49], x17_2d[50], x17_2d[51], x17_2d[52], x17_2d[53], x17_2d[54], x17_2d[55], x17_2d[56], x17_2d[57], x17_2d[58], x17_2d[59], x17_2d[60]}; static const double w17_2d[N17] = {w1, W_CYCLE(w2), W_CYCLE(w3), W_CYCLE(w4), W_CYCLE(w5), W_CYCLE(w6), W_CYCLE(w7), W_CYCLE(w8), W_CYCLE(w9), W_ALL_COMB(w10), W_ALL_COMB(w11), W_ALL_COMB(w12), W_ALL_COMB(w13), W_ALL_COMB(w14), W_ALL_COMB(w15)}; #undef c1 #undef c2 #undef c3 #undef c4 #undef c5 #undef c6 #undef c7 #undef c8 #undef c9 #undef c10 #undef c11 #undef c12 #undef c13 #undef c14 #undef c15 #undef c16 #undef c17 #undef c18 #undef c19 #undef c20 #undef c21 #undef c22 #undef c23 #undef c24 #undef c25 #undef c26 #undef c27 #undef c28 #undef c29 #undef c30 #undef c31 #undef c32 #undef c33 #undef c34 #undef c35 #undef w1 #undef w2 #undef w3 #undef w4 #undef w5 #undef w6 #undef w7 #undef w8 #undef w9 #undef w10 #undef w11 #undef w12 #undef w13 #undef w14 #undef w15 static QUAD quad_2d[MAX_QUAD_DEG_2d+1] = { {"2d-P_1", 1, 2, N1, gx1_2d, w1_2d}, /* P 0 */ {"2d-P_1", 1, 2, N1, gx1_2d, w1_2d}, /* P 1 */ {"2d Stroud: P_2", 2, 2, N2, gx2_2d, w2_2d}, /* P 2 */ {"2d Stroud: P_3", 3, 2, N3, gx3_2d, w3_2d}, /* P 3 */ {"2d Dunavant: P_4", 4, 2, N4, gx4_2d, w4_2d}, /* P 4 */ {"2d Dunavant: P_5", 5, 2, N5, gx5_2d, w5_2d}, /* P 5 */ {"2d Gattermann: P_7", 7, 2, N7, gx7_2d, w7_2d}, /* P 6 */ {"2d Gattermann: P_7", 7, 2, N7, gx7_2d, w7_2d}, /* P 7 */ {"2d Dunavant: P_8", 8, 2, N8, gx8_2d, w8_2d}, /* P 8 */ {"2d Dunavant: P_9", 9, 2, N9, gx9_2d, w9_2d}, /* P 9 */ {"2d Dunavant: P_10", 10, 2, N10, gx10_2d, w10_2d},/* P 10 */ {"2d Dunavant: P_11", 11, 2, N11, gx11_2d, w11_2d},/* P 11 */ {"2d Dunavant: P_12", 12, 2, N12, gx12_2d, w12_2d},/* P 12 */ {"2d Dunavant: P_17", 17, 2, N17, gx17_2d, w17_2d},/* P 13 */ {"2d Dunavant: P_17", 17, 2, N17, gx17_2d, w17_2d},/* P 14 */ {"2d Dunavant: P_17", 17, 2, N17, gx17_2d, w17_2d},/* P 15 */ {"2d Dunavant: P_17", 17, 2, N17, gx17_2d, w17_2d},/* P 16 */ {"2d Dunavant: P_17", 17, 2, N17, gx17_2d, w17_2d} /* P 17 */ }; #undef StdVol #undef N1 #undef N2 #undef N3 #undef N4 #undef N5 #undef N6 #undef N7 #undef N8 #undef N9 #undef N10 #undef N11 #undef N12 #undef N17 /*--------------------------------------------------------------------------*/ /* 3d quadrature formulas using 4 barycentric coordinates */ /*--------------------------------------------------------------------------*/ #define MAX_QUAD_DEG_3d 7 #define StdVol (1.0/6.0) /*--------------------------------------------------------------------------*/ /* quadrature exact on P_1 */ /*--------------------------------------------------------------------------*/ static const double x1_3d[N_LAMBDA] = {quart, quart, quart, quart}; static const double *gx1_3d[1] = {x1_3d}; static const double w1_3d[1] = {StdVol*one}; /*--------------------------------------------------------------------------*/ /* Quad quadrature exact on P_2 */ /*--------------------------------------------------------------------------*/ #define c14 0.585410196624969 #define c15 0.138196601125011 static const double x2_3d[4][N_LAMBDA] = {{c14, c15, c15, c15}, {c15, c14, c15, c15}, {c15, c15, c14, c15}, {c15, c15, c15, c14}}; static const double *gx2_3d[4] = {x2_3d[0], x2_3d[1], x2_3d[2], x2_3d[3]}; static double w2_3d[4] = {StdVol*quart, StdVol*quart, StdVol*quart, StdVol*quart}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_3 */ /*--------------------------------------------------------------------------*/ #define w8 1.0/40.0 #define w9 9.0/40.0 static const double x3_3d[8][N_LAMBDA] = {{one, zero, zero, zero}, {zero, one, zero, zero}, {zero, zero, one, zero}, {zero, zero, zero, one}, {zero, third, third, third}, {third, zero, third, third}, {third, third, zero, third}, {third, third, third, zero}}; static const double *gx3_3d[8] = {x3_3d[0], x3_3d[1], x3_3d[2], x3_3d[3], x3_3d[4], x3_3d[5], x3_3d[6], x3_3d[7]}; static const double w3_3d[8] = {StdVol*w8, StdVol*w8, StdVol*w8, StdVol*w8, StdVol*w9, StdVol*w9, StdVol*w9, StdVol*w9}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_5 */ /*--------------------------------------------------------------------------*/ static const double x5_3d[15][N_LAMBDA] = {{0.250000000000000, 0.250000000000000, 0.250000000000000, 0.250000000000000}, {0.091971078052723, 0.091971078052723, 0.091971078052723, 0.724086765841831}, {0.724086765841831, 0.091971078052723, 0.091971078052723, 0.091971078052723}, {0.091971078052723, 0.724086765841831, 0.091971078052723, 0.091971078052723}, {0.091971078052723, 0.091971078052723, 0.724086765841831, 0.091971078052723}, {0.319793627829630, 0.319793627829630, 0.319793627829630, 0.040619116511110}, {0.040619116511110, 0.319793627829630, 0.319793627829630, 0.319793627829630}, {0.319793627829630, 0.040619116511110, 0.319793627829630, 0.319793627829630}, {0.319793627829630, 0.319793627829630, 0.040619116511110, 0.319793627829630}, {0.443649167310371, 0.056350832689629, 0.056350832689629, 0.443649167310371}, {0.056350832689629, 0.443649167310371, 0.056350832689629, 0.443649167310371}, {0.056350832689629, 0.056350832689629, 0.443649167310371, 0.443649167310371}, {0.443649167310371, 0.056350832689629, 0.443649167310371, 0.056350832689629}, {0.443649167310371, 0.443649167310371, 0.056350832689629, 0.056350832689629}, {0.056350832689629, 0.443649167310371, 0.443649167310371, 0.056350832689629}}; static const double *gx5_3d[15] = {x5_3d[0], x5_3d[1], x5_3d[2], x5_3d[3], x5_3d[4], x5_3d[5], x5_3d[6], x5_3d[7], x5_3d[8], x5_3d[9], x5_3d[10], x5_3d[11], x5_3d[12], x5_3d[13], x5_3d[14]}; static const double w5_3d[15] = {StdVol*0.118518518518519, StdVol*0.071937083779019, StdVol*0.071937083779019, StdVol*0.071937083779019, StdVol*0.071937083779019, StdVol*0.069068207226272, StdVol*0.069068207226272, StdVol*0.069068207226272, StdVol*0.069068207226272, StdVol*0.052910052910053, StdVol*0.052910052910053, StdVol*0.052910052910053, StdVol*0.052910052910053, StdVol*0.052910052910053, StdVol*0.052910052910053}; /*--------------------------------------------------------------------------*/ /* quadrature exact on P_7 */ /*--------------------------------------------------------------------------*/ static const double x7_3d[64][N_LAMBDA] = {{0.0485005494, 0.0543346112, 0.0622918076, 0.8348730318}, {0.0485005494, 0.0543346112, 0.2960729005, 0.6010919389}, {0.0485005494, 0.0543346112, 0.6010919389, 0.2960729005}, {0.0485005494, 0.0543346112, 0.8348730300, 0.0622918093}, {0.0485005494, 0.2634159753, 0.0477749033, 0.6403085720}, {0.0485005494, 0.2634159753, 0.2270740686, 0.4610094066}, {0.0485005494, 0.2634159753, 0.4610094066, 0.2270740686}, {0.0485005494, 0.2634159753, 0.6403085706, 0.0477749047}, {0.0485005494, 0.5552859758, 0.0275098315, 0.3687036433}, {0.0485005494, 0.5552859758, 0.1307542021, 0.2654592727}, {0.0485005494, 0.5552859758, 0.2654592727, 0.1307542021}, {0.0485005494, 0.5552859758, 0.3687036425, 0.0275098323}, {0.0485005494, 0.8185180165, 0.0092331459, 0.1237482881}, {0.0485005494, 0.8185180165, 0.0438851337, 0.0890963004}, {0.0485005494, 0.8185180165, 0.0890963004, 0.0438851337}, {0.0485005494, 0.8185180165, 0.1237482879, 0.0092331462}, {0.2386007376, 0.0434790928, 0.0498465199, 0.6680736497}, {0.2386007376, 0.0434790928, 0.2369204606, 0.4809997090}, {0.2386007376, 0.0434790928, 0.4809997090, 0.2369204606}, {0.2386007376, 0.0434790928, 0.6680736482, 0.0498465214}, {0.2386007376, 0.2107880664, 0.0382299497, 0.5123812464}, {0.2386007376, 0.2107880664, 0.1817069135, 0.3689042825}, {0.2386007376, 0.2107880664, 0.3689042825, 0.1817069135}, {0.2386007376, 0.2107880664, 0.5123812453, 0.0382299508}, {0.2386007376, 0.4443453248, 0.0220136390, 0.2950402987}, {0.2386007376, 0.4443453248, 0.1046308045, 0.2124231331}, {0.2386007376, 0.4443453248, 0.2124231331, 0.1046308045}, {0.2386007376, 0.4443453248, 0.2950402980, 0.0220136396}, {0.2386007376, 0.6549862048, 0.0073884546, 0.0990246030}, {0.2386007376, 0.6549862048, 0.0351173176, 0.0712957400}, {0.2386007376, 0.6549862048, 0.0712957400, 0.0351173176}, {0.2386007376, 0.6549862048, 0.0990246028, 0.0073884548}, {0.5170472951, 0.0275786260, 0.0316174612, 0.4237566177}, {0.5170472951, 0.0275786260, 0.1502777622, 0.3050963168}, {0.5170472951, 0.0275786260, 0.3050963168, 0.1502777622}, {0.5170472951, 0.0275786260, 0.4237566168, 0.0316174621}, {0.5170472951, 0.1337020823, 0.0242491141, 0.3250015085}, {0.5170472951, 0.1337020823, 0.1152560157, 0.2339946069}, {0.5170472951, 0.1337020823, 0.2339946069, 0.1152560157}, {0.5170472951, 0.1337020823, 0.3250015078, 0.0242491148}, {0.5170472951, 0.2818465779, 0.0139631689, 0.1871429581}, {0.5170472951, 0.2818465779, 0.0663669280, 0.1347391990}, {0.5170472951, 0.2818465779, 0.1347391990, 0.0663669280}, {0.5170472951, 0.2818465779, 0.1871429577, 0.0139631693}, {0.5170472951, 0.4154553004, 0.0046864691, 0.0628109354}, {0.5170472951, 0.4154553004, 0.0222747832, 0.0452226213}, {0.5170472951, 0.4154553004, 0.0452226213, 0.0222747832}, {0.5170472951, 0.4154553004, 0.0628109352, 0.0046864693}, {0.7958514179, 0.0116577407, 0.0133649937, 0.1791258477}, {0.7958514179, 0.0116577407, 0.0635238021, 0.1289670393}, {0.7958514179, 0.0116577407, 0.1289670393, 0.0635238021}, {0.7958514179, 0.0116577407, 0.1791258473, 0.0133649941}, {0.7958514179, 0.0565171087, 0.0102503252, 0.1373811482}, {0.7958514179, 0.0565171087, 0.0487197855, 0.0989116879}, {0.7958514179, 0.0565171087, 0.0989116879, 0.0487197855}, {0.7958514179, 0.0565171087, 0.1373811479, 0.0102503255}, {0.7958514179, 0.1191391593, 0.0059023608, 0.0791070620}, {0.7958514179, 0.1191391593, 0.0280539153, 0.0569555075}, {0.7958514179, 0.1191391593, 0.0569555075, 0.0280539153}, {0.7958514179, 0.1191391593, 0.0791070618, 0.0059023610}, {0.7958514179, 0.1756168040, 0.0019810139, 0.0265507642}, {0.7958514179, 0.1756168040, 0.0094157572, 0.0191160209}, {0.7958514179, 0.1756168040, 0.0191160209, 0.0094157572}, {0.7958514179, 0.1756168040, 0.0265507642, 0.0019810140}}; static const double *gx7_3d[64] = {x7_3d[0], x7_3d[1], x7_3d[2], x7_3d[3], x7_3d[4], x7_3d[5], x7_3d[6], x7_3d[7], x7_3d[8], x7_3d[9], x7_3d[10], x7_3d[11], x7_3d[12], x7_3d[13], x7_3d[14], x7_3d[15], x7_3d[16], x7_3d[17], x7_3d[18], x7_3d[19], x7_3d[20], x7_3d[21], x7_3d[22], x7_3d[23], x7_3d[24], x7_3d[25], x7_3d[26], x7_3d[27], x7_3d[28], x7_3d[29], x7_3d[30], x7_3d[31], x7_3d[32], x7_3d[33], x7_3d[34], x7_3d[35], x7_3d[36], x7_3d[37], x7_3d[38], x7_3d[39], x7_3d[40], x7_3d[41], x7_3d[42], x7_3d[43], x7_3d[44], x7_3d[45], x7_3d[46], x7_3d[47], x7_3d[48], x7_3d[49], x7_3d[50], x7_3d[51], x7_3d[52], x7_3d[53], x7_3d[54], x7_3d[55], x7_3d[56], x7_3d[57], x7_3d[58], x7_3d[59], x7_3d[60], x7_3d[61], x7_3d[62], x7_3d[63]}; static const double w7_3d[64] = {StdVol*0.0156807540, StdVol*0.0293976870, StdVol*0.0293976870, StdVol*0.0156807540, StdVol*0.0235447608, StdVol*0.0441408300, StdVol*0.0441408300, StdVol*0.0235447608, StdVol*0.0150258564, StdVol*0.0281699100, StdVol*0.0281699100, StdVol*0.0150258564, StdVol*0.0036082374, StdVol*0.0067645878, StdVol*0.0067645878, StdVol*0.0036082374, StdVol*0.0202865376, StdVol*0.0380324358, StdVol*0.0380324358, StdVol*0.0202865376, StdVol*0.0304603764, StdVol*0.0571059660, StdVol*0.0571059660, StdVol*0.0304603764, StdVol*0.0194392824, StdVol*0.0364440336, StdVol*0.0364440336, StdVol*0.0194392824, StdVol*0.0046680564, StdVol*0.0087514968, StdVol*0.0087514968, StdVol*0.0046680564, StdVol*0.0097055322, StdVol*0.0181955664, StdVol*0.0181955664, StdVol*0.0097055322, StdVol*0.0145729242, StdVol*0.0273207684, StdVol*0.0273207684, StdVol*0.0145729242, StdVol*0.0093001866, StdVol*0.0174356394, StdVol*0.0174356394, StdVol*0.0093001866, StdVol*0.0022333026, StdVol*0.0041869110, StdVol*0.0041869110, StdVol*0.0022333026, StdVol*0.0014639124, StdVol*0.0027444882, StdVol*0.0027444882, StdVol*0.0014639124, StdVol*0.0021980748, StdVol*0.0041208678, StdVol*0.0041208678, StdVol*0.0021980748, StdVol*0.0014027730, StdVol*0.0026298660, StdVol*0.0026298660, StdVol*0.0014027730, StdVol*0.0003368550, StdVol*0.0006315234, StdVol*0.0006315234, StdVol*0.0003368550}; /*--------------------------------------------------------------------------*/ /* build a vector of Quad' quadrature formulars. For quadrature of degree */ /* use that of degree (only on function evaluation also) */ /*--------------------------------------------------------------------------*/ static QUAD quad_3d[MAX_QUAD_DEG_3d+1] = { {"3d Stroud: P_1", 1, 3, 1, gx1_3d, w1_3d}, /* P_0 */ {"3d Stroud: P_1", 1, 3, 1, gx1_3d, w1_3d}, /* P_1 */ {"3d Stroud: P_2", 2, 3, 4, gx2_3d, w2_3d}, /* P_2 */ {"3d Stroud: P_3", 3, 3, 8, gx3_3d, w3_3d}, /* P_3 */ {"3d ???: P_5", 5, 3, 15, gx5_3d, w5_3d}, /* P_4 */ {"3d ???: P_5", 5, 3, 15, gx5_3d, w5_3d}, /* P_5 */ {"3d ???: P_7", 7, 3, 64, gx7_3d, w7_3d}, /* P_6 */ {"3d ???: P_7", 7, 3, 64, gx7_3d, w7_3d} /* P_7 */ }; #undef StdVol /*--------------------------------------------------------------------------*/ /* integration in different dimensions */ /*--------------------------------------------------------------------------*/ static QUAD *quad_nd[4] = {quad_0d, quad_1d, quad_2d, quad_3d}; static const U_CHAR max_quad_deg[4] = {MAX_QUAD_DEG_0d, MAX_QUAD_DEG_1d, MAX_QUAD_DEG_2d, MAX_QUAD_DEG_3d}; const QUAD *get_quadrature(int dim, int degree) { FUNCNAME("get_quadrature"); TEST_EXIT((dim >= 0) && (dim < 4), "Bad dim %d - must be between 0 and 3!\n"); degree = MAX(0, degree); if(degree > max_quad_deg[dim]) { MSG("degree %d too large; changing to %d\n", degree, max_quad_deg[dim]); degree = max_quad_deg[dim]; } return((const QUAD *) (quad_nd[dim] + degree)); } /*---8<---------------------------------------------------------------------*/ /*--- ---*/ /*--------------------------------------------------------------------->8---*/ const QUAD *get_lumping_quadrature(int dim) { FUNCNAME("get_lumping_quadrature"); static const double lambda_0[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; static const double lambda_1[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; static const double lambda_2[N_LAMBDA] = {0.0, 0.0, 1.0, 0.0}; static const double lambda_3[N_LAMBDA] = {0.0, 0.0, 0.0, 1.0}; #define StdVol 1.0 static const double *lambda0[1] = {lambda_0}; static const double weight0[1] = {StdVol*1.0}; static const double *lambda1[2] = {lambda_0, lambda_1}; static const double weight1[2] = {StdVol*0.5, StdVol*0.5}; #undef StdVol #define StdVol 0.5 static const double *lambda2[3] = {lambda_0, lambda_1, lambda_2}; static const double weight2[3] = {StdVol/3.0, StdVol/3.0, StdVol/3.0}; #undef StdVol #define StdVol (1.0/6.0) static const double *lambda3[4] = {lambda_0, lambda_1, lambda_2, lambda_3}; static const double weight3[4] = {StdVol/4.0, StdVol/4.0, StdVol/4.0, StdVol/4.0}; #undef StdVol static const QUAD lumping[4]={{ "lump0", 1, 0, 1, lambda0, weight0}, { "lump1", 1, 1, 2, lambda1, weight1}, { "lump2", 1, 2, 3, lambda2, weight2}, { "lump3", 1, 3, 4, lambda3, weight3}}; TEST_EXIT(dim >= 0 && dim < 4,"invalid dim: %d\n", dim); return(lumping+dim); } /*--------------------------------------------------------------------------*/ /* integrate f over reference simplex in R^(dim+1) */ /*--------------------------------------------------------------------------*/ REAL integrate_std_simp(const QUAD *quad, REAL (*f)(const REAL *)) { FUNCNAME("integrate_std_simp"); double val; int i; if (!quad || !f) { if (!quad) ERROR("quad is pointer to nil; return value is 0.0\n"); if (!f) ERROR("f() is pointer to nil; return value is 0.0\n"); return(0.0); } for (val = i = 0; i < quad->n_points; i++) val += quad->w[i]*(*f)(quad->lambda[i]); return(val); } /*--------------------------------------------------------------------------*/ /* initialize values of a function f in local coordinates at the */ /* quadrature points */ /*--------------------------------------------------------------------------*/ const REAL *f_at_qp(const QUAD *quad, REAL (*f)(const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("f_at_qp"); static REAL *quad_vec = nil; static size_t size = 0; REAL *val; int i; if (vec) { val = vec; } else { if (size < (size_t) quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL); size = new_size; } val = quad_vec; } for (i = 0; i < quad->n_points; i++) val[i] = (*f)(quad->lambda[i]); return((const REAL *) val); } const REAL_D *f_d_at_qp(const QUAD *quad, const REAL *(*f)(const REAL[N_LAMBDA]), REAL_D *vec) { FUNCNAME("f_d_at_qp"); static REAL_D *quad_vec = nil; static size_t size = 0; REAL_D *val; const REAL *val_iq; int iq, k; if (vec) { val = vec; } else { if (size < (size_t) quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, quad->n_points); quad_vec = MEM_REALLOC(quad_vec, size, new_size, REAL_D); size = new_size; } val = quad_vec; } for (iq = 0; iq < quad->n_points; iq++) { val_iq = (*f)(quad->lambda[iq]); for (k = 0; k < DIM_OF_WORLD; k++) val[iq][k] = val_iq[k]; } return((const REAL_D *) val); } /*--------------------------------------------------------------------------*/ /* initialize gradient values of a function f in local coordinates at the */ /* quadrature points */ /*--------------------------------------------------------------------------*/ const REAL_D *grd_f_at_qp(const QUAD *quad, const REAL *(*f)(const REAL [N_LAMBDA]), REAL_D *vec) { FUNCNAME("grd_f_at_qp"); static REAL_D *quad_vec_d = nil; static size_t size = 0; REAL_D *val; int i, j; const REAL *grd; if (vec) { val = vec; } else { if (size < (size_t) quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, quad->n_points); quad_vec_d = MEM_REALLOC(quad_vec_d, size, new_size, REAL_D); size = new_size; } val = quad_vec_d; } for (i = 0; i < quad->n_points; i++) { grd = (*f)(quad->lambda[i]); for (j = 0; j < DIM_OF_WORLD; j++) val[i][j] = grd[j]; } return((const REAL_D *) val); } const REAL_DD *grd_f_d_at_qp(const QUAD *quad, const REAL_D *(*f)(const REAL [N_LAMBDA]), REAL_DD *vec) { FUNCNAME("grd_f_d_at_qp"); static REAL_DD *quad_vec_dd = nil; static size_t size = 0; REAL_DD *val; int i, j, n; const REAL_D *grd_d; if (vec) { val = vec; } else { if (size < (size_t) quad->n_points) { size_t new_size = MAX(MAX_N_QUAD_POINTS, quad->n_points); quad_vec_dd = MEM_REALLOC(quad_vec_dd, size, new_size, REAL_DD); size = new_size; } val = quad_vec_dd; } for (i = 0; i < quad->n_points; i++) { grd_d = (*f)(quad->lambda[i]); for (n = 0; n < DIM_OF_WORLD; n++) for (j = 0; j < DIM_OF_WORLD; j++) val[i][n][j] = grd_d[n][j]; } return((const REAL_DD *) val); } struct all_fast { const QUAD *quad; const BAS_FCTS *bas_fcts; QUAD_FAST *quad_fast; struct all_fast *next; }; const QUAD_FAST *get_quad_fast(const BAS_FCTS *bas_fcts, const QUAD *quad, U_CHAR init_flag) { FUNCNAME("get_quad_fast"); static struct all_fast *first_fast = nil; /* anchor to the list */ struct all_fast *fast; QUAD_FAST *quad_fast; int i, j, k, l, n_points, n_bas_fcts; size_t size, size_p; REAL **g_phi; REAL (**g_grd_phi)[N_LAMBDA]; REAL (**g_D2_phi)[N_LAMBDA][N_LAMBDA]; const REAL *lambda; void *mem = nil, *mem_p = nil, *mem_last = nil; for (fast = first_fast; fast; fast = fast->next) if (fast->bas_fcts == bas_fcts && fast->quad == quad) break; if (fast && ((fast->quad_fast->init_flag & init_flag) == init_flag)) return(fast->quad_fast); if (init_flag & INIT_PHI && !bas_fcts->phi) { ERROR("no functions for evaluating basis functions\n"); ERROR("can not initialize quad_fast->phi\n"); return(nil); } if (init_flag & INIT_GRD_PHI && !bas_fcts->grd_phi) { ERROR("no functions for evaluating gradients of basis functions\n"); ERROR("can not initialize quad_fast->grd_phi\n"); return(nil); } if (init_flag & INIT_D2_PHI && !bas_fcts->D2_phi) { ERROR("no functions for evaluating 2nd derivatives of basis functions\n"); ERROR("can not initialize quad_fast->D2_phi\n"); return(nil); } if (quad->dim != bas_fcts->dim) { ERROR("Basis function dim == %d does not match quadrature dim == %d!\n", bas_fcts->dim, quad->dim); return(nil); } if (!fast) { quad_fast = MEM_ALLOC(1, QUAD_FAST); quad_fast->quad = quad; quad_fast->bas_fcts = bas_fcts; quad_fast->n_points = quad->n_points; quad_fast->n_bas_fcts = bas_fcts->n_bas_fcts; quad_fast->w = quad->w; quad_fast->init_flag = 0; quad_fast->phi = nil; quad_fast->grd_phi = nil; quad_fast->D2_phi = nil; fast = MEM_ALLOC(1, struct all_fast); fast->quad = quad; fast->bas_fcts = bas_fcts; fast->quad_fast = quad_fast; fast->next = first_fast; first_fast = fast; } else quad_fast = fast->quad_fast; n_points = quad->n_points; n_bas_fcts = bas_fcts->n_bas_fcts; size = size_p = 0; if (!quad_fast->phi && (init_flag & INIT_PHI)) { size += n_points*n_bas_fcts*sizeof(REAL); size_p += n_points*sizeof(REAL *); } if (!quad_fast->grd_phi && (init_flag & INIT_GRD_PHI)) { size += n_points*n_bas_fcts*sizeof(REAL [N_LAMBDA]); size_p += n_points*sizeof(REAL (*)[N_LAMBDA]); } if (!quad_fast->D2_phi && (init_flag & INIT_D2_PHI)) { size += n_points*n_bas_fcts*sizeof(REAL [N_LAMBDA][N_LAMBDA]); size_p += n_points*sizeof(REAL (*)[N_LAMBDA][N_LAMBDA]); } if (size) { mem = alberta_alloc(size, funcName, __FILE__, __LINE__); mem_last = (void *) (((char *) mem)+size); mem_p = alberta_alloc(size_p, funcName, __FILE__, __LINE__); if (!quad_fast->phi && (init_flag & INIT_PHI)) { BAS_FCT **phi = bas_fcts->phi; g_phi = quad_fast->phi = (REAL **) mem_p; mem_p = (void *) (g_phi+n_points); for (i = 0; i < n_points; i++) { lambda = quad->lambda[i]; g_phi[i] = (REAL *) mem; mem = (void *) (g_phi[i]+n_bas_fcts); for (j = 0; j < n_bas_fcts; j++) { g_phi[i][j] = phi[j](lambda); } } quad_fast->init_flag |= INIT_PHI; } if (!quad_fast->grd_phi && (init_flag & INIT_GRD_PHI)) { GRD_BAS_FCT **grd_phi = bas_fcts->grd_phi; const REAL *grd; g_grd_phi = quad_fast->grd_phi = (REAL (**)[N_LAMBDA]) mem_p; mem_p = (void *) (quad_fast->grd_phi+n_points); for (i = 0; i < n_points; i++) { lambda = quad->lambda[i]; g_grd_phi[i] = (REAL (*)[N_LAMBDA]) mem; mem = (void *) (g_grd_phi[i]+n_bas_fcts); for (j = 0; j < n_bas_fcts; j++) { grd = grd_phi[j](lambda); for (k = 0; k < N_LAMBDA; k++) { g_grd_phi[i][j][k] = grd[k]; } } } quad_fast->init_flag |= INIT_GRD_PHI; } if (!quad_fast->D2_phi && (init_flag & INIT_D2_PHI)) { D2_BAS_FCT **D2_phi = bas_fcts->D2_phi; const REAL (*D2)[N_LAMBDA]; g_D2_phi = quad_fast->D2_phi = (REAL (**)[N_LAMBDA][N_LAMBDA]) mem_p; mem_p = (void *) (quad_fast->D2_phi+n_points); for (i = 0; i < n_points; i++) { lambda = quad->lambda[i]; g_D2_phi[i] = (REAL (*)[N_LAMBDA][N_LAMBDA]) mem; mem = (void *) (g_D2_phi[i]+n_bas_fcts); for (j = 0; j < n_bas_fcts; j++) { D2 = D2_phi[j](lambda); for (k = 0; k < N_LAMBDA; k++) for (l = 0; l < N_LAMBDA; l++) g_D2_phi[i][j][k][l] = D2[k][l]; } } quad_fast->init_flag |= INIT_D2_PHI; } } if (mem > mem_last) ERROR_EXIT("allocated size too small\n"); if (mem < mem_last) ERROR_EXIT("allocated size too big\n"); if ((quad_fast->init_flag & init_flag) != init_flag) { ERROR("could not initialize quad_fast, returning pointer to nil\n"); return(nil); } return(quad_fast); } void print_quadrature(const QUAD *quad) { FUNCNAME("print_quadrature"); int i, j; MSG("quadrature %s for dimension %d exact on P_%d\n", quad->name, quad->dim, quad->degree); MSG("%d points with weights and quadrature points:\n", quad->n_points); for (i = 0; i < quad->n_points; i++) { MSG("w[%2d] = %le, lambda[%2d] = (", i, quad->w[i], i); for (j = 0; j <= quad->dim; j++) print_msg("%le%s", quad->lambda[i][j], j < quad->dim ? ", " : ")\n"); } return; } alberta-2.0.1/alberta/src/Common/oem_solve_d.c0000644000042300001440000002550510676724253016150 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: oem_solve_d.c */ /* */ /* description: matrix-vector multiplication, standard preconditioning */ /* and standard solver interface to OEM-library for decoupled */ /* vector valued problems: */ /* A u_n = f_n, n = 1,...,DIM_OF_WORLD, where */ /* A is stored in a DOF_MATRIX, u and f in DOF_REAL_D_VECs */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" struct mv_data { const DOF_MATRIX *matrix; MatrixTranspose transpose; const DOF_SCHAR_VEC *bound; struct mv_data *next; }; /*---8<---------------------------------------------------------------------*/ /*--- y <- A x or y <- A^T x ---*/ /*--------------------------------------------------------------------->8---*/ int mat_vec_d(void *ud, int dim, const REAL *x, REAL *y) { FUNCNAME("mat_vec_d"); DOF_REAL_D_VEC dof_x = {nil, nil, "x", 0, nil, nil, nil}; DOF_REAL_D_VEC dof_y = {nil, nil, "y", 0, nil, nil, nil}; struct mv_data *data = (struct mv_data *)ud; const S_CHAR *b = data->bound ? data->bound->vec : nil; const DOF_ADMIN *admin = data->matrix->row_fe_space->admin; REAL_D *xd = (REAL_D *) x, *yd = (REAL_D *) y; TEST_EXIT(dim == DIM_OF_WORLD*admin->size_used, "argument dim != DIM_OF_WORLD*data->matrix->row_fe_space->admin->size_used\n"); dof_x.fe_space = data->matrix->col_fe_space; dof_y.fe_space = data->matrix->row_fe_space; dof_x.size = dof_y.size = admin->size_used; dof_x.vec = xd; dof_y.vec = yd; dof_mv_d(data->transpose, data->matrix, &dof_x, &dof_y); if (b) { FOR_ALL_DOFS(admin, if (b[dof] > 0) COPY_DOW(xd[dof], yd[dof])); } return(0); } void *init_mat_vec_d(MatrixTranspose transpose, const DOF_MATRIX *A, const DOF_SCHAR_VEC *bound) { FUNCNAME("init_mat_vec_d"); static struct mv_data *first = nil; struct mv_data *data; for (data = first; data; data = data->next) if (data->matrix == A && data->bound == bound && data->transpose == transpose) break; if ((transpose == Transpose) && bound) ERROR_EXIT("don't know how to handle bound vector for y = A^T x\n"); if (!data) { data = MEM_ALLOC(1, struct mv_data); data->matrix = A; data->transpose = transpose; data->bound = bound; data->next = first; first = data; } return(data); } void exit_mat_vec_d(void *data) { return; } /*---8<---------------------------------------------------------------------*/ /*--- diaoganal preconditioning for decoupled vector valued problems ---*/ /*--------------------------------------------------------------------->8---*/ struct precon_data { PRECON precon; const DOF_MATRIX *matrix; const DOF_SCHAR_VEC *bound; int dim; const REAL *diag_1; size_t size_diag_1; struct precon_data *next; }; static void diag_precon_d(void *ud, int dim, REAL *r) { FUNCNAME("diag_precon_d"); struct precon_data *data = (struct precon_data *)ud; int i, n; const REAL *diag_1 = data->diag_1; REAL_D *rd = (REAL_D *) r; DEBUG_TEST_EXIT(dim == data->dim*DIM_OF_WORLD, "argument dim != precon_data->dim*DIM_OF_WORLD\n"); for (i = 0; i < data->dim; i++) { for (n = 0; n < DIM_OF_WORLD; n++) rd[i][n] *= diag_1[i]; } return; } /*--------------------------------------------------------------------------*/ /*--- initialize diagonal preconditioning --------------------------------*/ /*--------------------------------------------------------------------------*/ static int init_diag_precon_d(void *precon_data) { FUNCNAME("init_diag_precon_d"); struct precon_data *data = (struct precon_data *)precon_data; MATRIX_ROW **row = data->matrix->matrix_row; const S_CHAR *b = data->bound ? data->bound->vec : nil; const DOF_ADMIN *admin = data->matrix->row_fe_space->admin; int dim = admin->size_used; REAL *diag_1; if (data->size_diag_1 < (size_t) dim) { data->diag_1 = MEM_REALLOC(data->diag_1, data->size_diag_1, dim, REAL); data->size_diag_1 = dim; } data->dim = dim; diag_1 = (REAL *) data->diag_1; if (b) { FOR_ALL_DOFS(admin, diag_1[dof] = (row[dof] && b[dof] <= 0 && ABS(row[dof]->entry[0]) > 1.0E-20) ? 1.0/row[dof]->entry[0] : 1.0); } else { FOR_ALL_DOFS(admin, diag_1[dof] = (row[dof] && ABS(row[dof]->entry[0]) > 1.0E-20) ? 1.0/row[dof]->entry[0] : 1.0); } FOR_ALL_FREE_DOFS(admin, if (dof >= admin->size_used){ break; } diag_1[dof] = 0.0); return true; } static void exit_diag_precon_d(void *precon_data) { struct precon_data *data = (struct precon_data *)precon_data; if (data->diag_1) { MEM_FREE(data->diag_1, data->size_diag_1, REAL); data->diag_1 = nil; data->size_diag_1 = 0; } data->dim = 0; return; } const PRECON *get_diag_precon_d(const DOF_MATRIX *A, const DOF_SCHAR_VEC *bound) { static struct precon_data *first = nil; struct precon_data *data; for (data = first; data; data = data->next) if (data->matrix == A && data->bound == bound) break; if (!data) { data = MEM_CALLOC(1, struct precon_data); TEST_EXIT(A->row_fe_space == A->col_fe_space, "Row and column FE_SPACEs don't match!\n"); data->precon.precon_data = data; data->precon.init_precon = init_diag_precon_d; data->precon.precon = diag_precon_d; data->precon.exit_precon = exit_diag_precon_d; data->matrix = A; data->bound = bound; data->next = first; first = data; } return(&data->precon); } /*--------------------------------------------------------------------------*/ /*--- interface to oem solver for decoupled vector valued problems -------*/ /*--------------------------------------------------------------------------*/ int oem_solve_d(const DOF_MATRIX *A, const DOF_REAL_D_VEC *f, DOF_REAL_D_VEC *u, OEM_SOLVER solver, REAL tol, int icon, int restart, int max_iter, int info) { FUNCNAME("oem_solve_d"); int n, iter = -1, dim, size_used; size_t size; OEM_DATA oem = {nil}; const PRECON *precon = nil; WORKSPACE ws = {0, nil}; TEST_EXIT(A->row_fe_space == A->col_fe_space, "Row and column FE_SPACEs don't match!\n"); size_used = A->row_fe_space->admin->size_used; FOR_ALL_FREE_DOFS(A->row_fe_space->admin, if (dof < size_used) { for (n = 0; n < DIM_OF_WORLD; n++) u->vec[dof][n] = f->vec[dof][n] = 0.0; }); oem.mat_vec = mat_vec_d; oem.mat_vec_data = init_mat_vec_d(NoTranspose, A, nil); switch(icon) { case 0: oem.left_precon = nil; break; case 2: precon = get_HB_precon_d(A->row_fe_space, nil, 1, info); break; case 3: precon = get_BPX_precon_d(A->row_fe_space, nil, 1, info); break; default: precon = get_diag_precon_d(A, nil); break; } if (precon) { if (precon->init_precon && !(*precon->init_precon)(precon->precon_data)) { #if 0 /* init_precon() has already cleaned up after itself */ if (precon->exit_precon) { (*precon->exit_precon)(precon->precon_data); } #endif precon = nil; MSG("init_precon() failed, disabling preconditioner!\n"); } else { oem.left_precon_data = precon->precon_data; oem.left_precon = precon->precon; } } oem.ws = &ws; oem.tolerance = tol; oem.restart = 0; oem.max_iter = max_iter; oem.info = info; dim = size_used*DIM_OF_WORLD; switch (solver) { case BiCGStab: REALLOC_WORKSPACE(&ws, 5*dim*sizeof(REAL)); iter = oem_bicgstab(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case CG: REALLOC_WORKSPACE(&ws, 3*dim*sizeof(REAL)); iter = oem_cg(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case TfQMR: REALLOC_WORKSPACE(&ws, 11*dim*sizeof(REAL)); iter = oem_tfqmr(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case GMRes: oem.restart = restart = MAX(0, MIN(restart, dim)); size = ((restart+2)*dim + restart*(restart+4))*sizeof(REAL); REALLOC_WORKSPACE(&ws, size); iter = oem_gmres(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case ODir: REALLOC_WORKSPACE(&ws, 6*dim*sizeof(REAL)); iter = oem_odir(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case ORes: REALLOC_WORKSPACE(&ws, 7*dim*sizeof(REAL)); iter = oem_ores(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; default: ERROR_EXIT("unknown OEM solver %d\n", (int) solver); } CLEAR_WORKSPACE(&ws); if (precon && precon->exit_precon) (*precon->exit_precon)(precon->precon_data); return(iter); } alberta-2.0.1/alberta/src/Common/oem_solve_dowb.c0000644000042300001440000003236710676724253016664 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERT: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: oem_solve_d.c */ /* */ /* description: matrix-vector multiplication, standard preconditioning */ /* and standard solver interface to OEM-library for decoupled */ /* vector valued problems: */ /* A u_n = f_n, n = 1,...,DIM_OF_WORLD, where */ /* A is stored in a DOF_MATRIX, u and f in DOF_REAL_D_VECs */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERT */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" struct mv_data { const DOF_DOWB_MATRIX *matrix; MatrixTranspose transpose; const DOF_SCHAR_VEC *bound; struct mv_data *next; }; /*---8<---------------------------------------------------------------------*/ /*--- y <- A x or y <- A^T x ---*/ /*--------------------------------------------------------------------->8---*/ int mat_vec_dowb(void *ud, int dim, const REAL *x, REAL *y) { FUNCNAME("mat_vec_dowb"); DOF_REAL_D_VEC dof_x = {nil, nil, "x", 0, nil, nil, nil}; DOF_REAL_D_VEC dof_y = {nil, nil, "y", 0, nil, nil, nil}; struct mv_data *data = (struct mv_data *)ud; const S_CHAR *b = data->bound ? data->bound->vec : nil; const DOF_ADMIN *admin = data->matrix->row_fe_space->admin; REAL_D *xd = (REAL_D *) x, *yd = (REAL_D *) y; TEST_EXIT(dim == DIM_OF_WORLD*admin->size_used, "argument dim != DIM_OF_WORLD*data->matrix->row_fe_space->admin->size_used\n"); dof_x.fe_space = data->matrix->col_fe_space; dof_y.fe_space = data->matrix->row_fe_space; dof_x.size = dof_y.size = dim/DIM_OF_WORLD; dof_x.vec = xd; dof_y.vec = yd; dof_mv_dowb(data->transpose, data->matrix, &dof_x, &dof_y); if (b) { FOR_ALL_DOFS(admin, if (b[dof] > 0) COPY_DOW(xd[dof], yd[dof])); } return(0); } void *init_mat_vec_dowb(MatrixTranspose transpose, const DOF_DOWB_MATRIX *A, const DOF_SCHAR_VEC *bound) { FUNCNAME("init_mat_vec_dowb"); static struct mv_data *first = nil; struct mv_data *data; for (data = first; data; data = data->next) if (data->matrix == A && data->bound == bound && data->transpose == transpose) break; if ((transpose == Transpose) && bound) ERROR_EXIT("don't know how to handle bound vector for y = A^T x\n"); if (!data) { data = MEM_ALLOC(1, struct mv_data); data->matrix = A; data->transpose = transpose; data->bound = bound; data->next = first; first = data; } return(data); } void exit_mat_vec_dowb(void *data) { return; } /*---8<---------------------------------------------------------------------*/ /*--- diaoganal preconditioning for decoupled vector valued problems ---*/ /*--------------------------------------------------------------------->8---*/ struct precon_data { PRECON precon; const DOF_DOWB_MATRIX *matrix; const DOF_SCHAR_VEC *bound; int dim; const REAL_D *diag_1; size_t size_diag_1; struct precon_data *next; }; static void diag_precon_dowb(void *ud, int dim, REAL *r) { FUNCNAME("diag_precon_dowb"); struct precon_data *data = (struct precon_data *)ud; int i, n; const REAL_D *diag_1 = data->diag_1; REAL_D *rd = (REAL_D *) r; TEST_EXIT(dim == data->dim*DIM_OF_WORLD, "argument dim != precon_data->dim*DIM_OF_WORLD\n"); for (i = 0; i < data->dim; i++) { for (n = 0; n < DIM_OF_WORLD; n++) rd[i][n] *= diag_1[i][n]; } return; } /*--------------------------------------------------------------------------*/ /*--- initialize diagonal preconditioning --------------------------------*/ /*--------------------------------------------------------------------------*/ static int init_diag_precon_dowb(void *precon_data) { FUNCNAME("init_diag_precon_dowb"); struct precon_data *data = (struct precon_data *)precon_data; DOWB_MATRIX_ROW **row = data->matrix->matrix_row; const S_CHAR *b = data->bound ? data->bound->vec : nil; const DOF_ADMIN *admin = data->matrix->row_fe_space->admin; int dim = admin->size_used; REAL_D *diag_1; int i; if (data->size_diag_1 < (size_t) dim) { data->diag_1 = MEM_REALLOC(data->diag_1, data->size_diag_1, dim, const REAL_D); data->size_diag_1 = dim; } data->dim = dim; diag_1 = (REAL_D *) data->diag_1; switch (data->matrix->type) { case dowbm_full: if (b) { FOR_ALL_DOFS(admin, if (row[dof] && b[dof] <= 0) { for (i = 0; i < DIM_OF_WORLD; i++) { if(ABS(row[dof]->entry.full[0][i][i] > 1.0E-20)) diag_1[dof][i] = 1.0/row[dof]->entry.full[0][i][i]; else diag_1[dof][i] = 1.0; } } else { SET_DOW(1.0, diag_1[dof]); }); } else { FOR_ALL_DOFS(admin, if (row[dof]) { for (i = 0; i < DIM_OF_WORLD; i++) { if(ABS(row[dof]->entry.full[0][i][i] > 1.0E-20)) diag_1[dof][i] = 1.0/row[dof]->entry.full[0][i][i]; else diag_1[dof][i] = 1.0; } } else { SET_DOW(1.0, diag_1[dof]); }); } break; case dowbm_symm: if (b) { FOR_ALL_DOFS(admin, if (row[dof] && b[dof] <= 0) { for (i = 0; i < DIM_OF_WORLD; i++) { if(ABS(REAL_DDS_ENT(row[dof]->entry.symm[0], i, i)) > 1.0E-20) diag_1[dof][i] = 1.0/REAL_DDS_ENT(row[dof]->entry.symm[0], i, i); else diag_1[dof][i] = 1.0; } } else { SET_DOW(1.0, diag_1[dof]); }); } else { FOR_ALL_DOFS(admin, if (row[dof]) { for (i = 0; i < DIM_OF_WORLD; i++) { if(ABS(REAL_DDS_ENT(row[dof]->entry.symm[0], i, i)) > 1.0E-20) diag_1[dof][i] = 1.0/REAL_DDS_ENT(row[dof]->entry.symm[0], i, i); else diag_1[dof][i] = 1.0; } } else { SET_DOW(1.0, diag_1[dof]); }); } break; case dowbm_diag: if (b) { FOR_ALL_DOFS(admin, if (row[dof] && b[dof] <= 0) { for (i = 0; i < DIM_OF_WORLD; i++) { if(ABS(row[dof]->entry.diag[0][i]) > 1.0E-20) diag_1[dof][i] = 1.0/row[dof]->entry.diag[0][i]; else diag_1[dof][i] = 1.0; } } else { SET_DOW(1.0, diag_1[dof]); }); } else { FOR_ALL_DOFS(admin, if (row[dof]) { for (i = 0; i < DIM_OF_WORLD; i++) { if(ABS(row[dof]->entry.diag[0][i]) > 1.0E-20) diag_1[dof][i] = 1.0/row[dof]->entry.diag[0][i]; else diag_1[dof][i] = 1.0; } } else { SET_DOW(1.0, diag_1[dof]); }); } break; } FOR_ALL_FREE_DOFS(admin, if (dof >= admin->size_used){ break; } SET_DOW(0.0, diag_1[dof])); return true; } static void exit_diag_precon_dowb(void *precon_data) { struct precon_data *data = (struct precon_data *)precon_data; if (data->diag_1) { MEM_FREE(data->diag_1, data->size_diag_1, REAL_D); data->diag_1 = nil; data->size_diag_1 = 0; } data->dim = 0; return; } const PRECON *get_diag_precon_dowb(const DOF_DOWB_MATRIX *A, const DOF_SCHAR_VEC *bound) { static struct precon_data *first = nil; struct precon_data *data; for (data = first; data; data = data->next) if (data->matrix == A && data->bound == bound) break; if (!data) { data = MEM_CALLOC(1, struct precon_data); TEST_EXIT(A->row_fe_space == A->col_fe_space, "Row and column FE_SPACEs don't match!\n"); data->precon.precon_data = data; data->precon.init_precon = init_diag_precon_dowb; data->precon.precon = diag_precon_dowb; data->precon.exit_precon = exit_diag_precon_dowb; data->matrix = A; data->bound = bound; data->next = first; first = data; } return(&data->precon); } /*--------------------------------------------------------------------------*/ /*--- interface to oem solver for decoupled vector valued problems -------*/ /*--------------------------------------------------------------------------*/ int oem_solve_dowb(const DOF_DOWB_MATRIX *A, const DOF_REAL_D_VEC *f, DOF_REAL_D_VEC *u, OEM_SOLVER solver, REAL tol, int icon, int restart, int max_iter, int info) { FUNCNAME("oem_solve_dowb"); int iter = -1, dim, size_used; size_t size; OEM_DATA oem = {nil}; const PRECON *precon = nil; WORKSPACE ws = {0, nil}; TEST_EXIT(A->row_fe_space == A->col_fe_space, "Row and column FE_SPACEs don't match!\n"); size_used = A->row_fe_space->admin->size_used; FOR_ALL_FREE_DOFS(A->row_fe_space->admin, if (dof < size_used) { SET_DOW(0.0, u->vec[dof]); SET_DOW(0.0, f->vec[dof]); }); oem.mat_vec = mat_vec_dowb; oem.mat_vec_data = init_mat_vec_dowb(NoTranspose, A, nil); switch(icon) { case 0: oem.left_precon = nil; break; case 2: precon = get_HB_precon_d(A->row_fe_space, nil, 1, info); break; case 3: precon = get_BPX_precon_d(A->row_fe_space, nil, 1, info); break; default: precon = get_diag_precon_dowb(A, nil); break; } if (precon) { if (precon->init_precon && !(*precon->init_precon)(precon->precon_data)) { #if 0 /* init_precon() has already cleaned up after itself */ if (precon->exit_precon) { (*precon->exit_precon)(precon->precon_data); } #endif precon = nil; MSG("init_precon() failed, disabling preconditioner!\n"); } else { oem.left_precon_data = precon->precon_data; oem.left_precon = precon->precon; } } oem.ws = &ws; oem.tolerance = tol; oem.restart = 0; oem.max_iter = max_iter; oem.info = info; dim = size_used*DIM_OF_WORLD; switch (solver) { case BiCGStab: REALLOC_WORKSPACE(&ws, 5*dim*sizeof(REAL)); iter = oem_bicgstab(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case CG: REALLOC_WORKSPACE(&ws, 3*dim*sizeof(REAL)); iter = oem_cg(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case TfQMR: REALLOC_WORKSPACE(&ws, 11*dim*sizeof(REAL)); iter = oem_tfqmr(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case GMRes: oem.restart = restart = MAX(0, MIN(restart, dim)); size = ((restart+2)*dim + restart*(restart+4))*sizeof(REAL); REALLOC_WORKSPACE(&ws, size); iter = oem_gmres(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case ODir: REALLOC_WORKSPACE(&ws, 6*dim*sizeof(REAL)); iter = oem_odir(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; case ORes: REALLOC_WORKSPACE(&ws, 7*dim*sizeof(REAL)); iter = oem_ores(&oem, dim, (REAL *) f->vec, (REAL *) u->vec); break; default: ERROR_EXIT("unknown OEM solver %d\n", (int) solver); } CLEAR_WORKSPACE(&ws); if (precon && precon->exit_precon) (*precon->exit_precon)(precon->precon_data); return(iter); } alberta-2.0.1/alberta/src/Common/oem_solve_s.c0000644000042300001440000002413210676724253016162 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: oem_solve_s.c */ /* */ /* description: matrix-vector multiplication, standard preconditioning */ /* and standard solver interface to OEM-library for scalar */ /* problems. */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" struct mv_data { const DOF_MATRIX *matrix; MatrixTranspose transpose; const DOF_SCHAR_VEC *bound; struct mv_data *next; }; /*---8<---------------------------------------------------------------------*/ /*--- y <- A x or y <- A^T x ---*/ /*--------------------------------------------------------------------->8---*/ int mat_vec_s(void *ud, int dim, const REAL *x, REAL *y) { FUNCNAME("mat_vec_s"); DOF_REAL_VEC dof_x = {nil, nil, "x", 0, nil, nil, nil}; DOF_REAL_VEC dof_y = {nil, nil, "y", 0, nil, nil, nil}; struct mv_data *data = (struct mv_data *)ud; const S_CHAR *b = data->bound ? data->bound->vec : nil; const DOF_ADMIN *admin = data->matrix->row_fe_space->admin; TEST_EXIT(dim == admin->size_used, "argument dim != data->matrix->row_fe_space->admin->size_used\n"); dof_x.fe_space = data->matrix->col_fe_space; dof_y.fe_space = data->matrix->row_fe_space; dof_x.size = dof_y.size = dim; dof_x.vec = (REAL *) x; dof_y.vec = y; dof_mv(data->transpose, data->matrix, &dof_x, &dof_y); if (b) { FOR_ALL_DOFS(admin, if (b[dof] > 0) y[dof] = x[dof]); } return(0); } void *init_mat_vec_s(MatrixTranspose transpose, const DOF_MATRIX *A, const DOF_SCHAR_VEC *bound) { FUNCNAME("init_mat_vec_s"); static struct mv_data *first = nil; struct mv_data *data; for (data = first; data; data = data->next) if (data->matrix == A && data->bound == bound && data->transpose == transpose) break; if ((transpose == Transpose) && bound) ERROR_EXIT("don't know how to handle bound vector for y = A^T x\n"); if (!data) { data = MEM_ALLOC(1, struct mv_data); data->matrix = A; data->transpose = transpose; data->bound = bound; data->next = first; first = data; } return(data); } void exit_mat_vec_s(void *data) { return; } /*---8<---------------------------------------------------------------------*/ /*--- diagonal preconditioning for scalar problems ---*/ /*--------------------------------------------------------------------->8---*/ struct precon_data { PRECON precon; const DOF_MATRIX *matrix; const DOF_SCHAR_VEC *bound; int dim; const REAL *diag_1; size_t size_diag_1; struct precon_data *next; }; static void diag_precon_s(void *ud, int dim, REAL *r) { FUNCNAME("diag_precon_s"); struct precon_data *data = (struct precon_data *)ud; int i; const REAL *diag_1 = data->diag_1; TEST_EXIT(dim == data->dim, "argument dim =% d != precon_data->dim = %d\n", dim, data->dim); for (i = 0; i < dim; i++) r[i] *= diag_1[i]; return; } /*--------------------------------------------------------------------------*/ /*--- initialize diagonal preconditioning --------------------------------*/ /*--------------------------------------------------------------------------*/ static int init_diag_precon_s(void *precon_data) { FUNCNAME("init_diag_precon_s"); struct precon_data *data = (struct precon_data *)precon_data; MATRIX_ROW **row = data->matrix->matrix_row; const S_CHAR *b = data->bound ? data->bound->vec : nil; const DOF_ADMIN *admin = data->matrix->row_fe_space->admin; int dim = admin->size_used; REAL *diag_1; if (data->size_diag_1 < (size_t) dim) { data->diag_1 = MEM_REALLOC(data->diag_1, data->size_diag_1, dim, REAL); data->size_diag_1 = dim; } data->dim = dim; diag_1 = (REAL *) data->diag_1; if (b) { FOR_ALL_DOFS(admin, diag_1[dof] = (row[dof] && b[dof] <= 0 && ABS(row[dof]->entry[0]) > 1.0E-20) ? 1.0/row[dof]->entry[0] : 1.0); } else { FOR_ALL_DOFS(admin, diag_1[dof] = (row[dof] && ABS(row[dof]->entry[0]) > 1.0E-20) ? 1.0/row[dof]->entry[0] : 1.0); } FOR_ALL_FREE_DOFS(admin, if (dof >= admin->size_used){ break; } diag_1[dof] = 0.0); return true; } static void exit_diag_precon_s(void *precon_data) { struct precon_data *data = (struct precon_data *)precon_data; if (data->diag_1) { MEM_FREE(data->diag_1, data->size_diag_1, REAL); data->diag_1 = nil; data->size_diag_1 = 0; } data->dim = 0; return; } const PRECON *get_diag_precon_s(const DOF_MATRIX *A, const DOF_SCHAR_VEC *bound) { static struct precon_data *first = nil; struct precon_data *data; for (data = first; data; data = data->next) { if (data->diag_1 == nil && data->size_diag_1 == 0) break; } if (!data) { TEST_EXIT(A->row_fe_space == A->col_fe_space, "Row and column FE_SPACEs don't match!\n"); data = MEM_CALLOC(1, struct precon_data); data->next = first; first = data; } data->precon.precon_data = data; data->precon.init_precon = init_diag_precon_s; data->precon.precon = diag_precon_s; data->precon.exit_precon = exit_diag_precon_s; data->matrix = A; data->bound = bound; return(&data->precon); } /*--------------------------------------------------------------------------*/ /*--- interface to oem solver for scalar valued problems -----------------*/ /*--------------------------------------------------------------------------*/ int oem_solve_s(const DOF_MATRIX *A, const DOF_REAL_VEC *f, DOF_REAL_VEC *u, OEM_SOLVER solver, REAL tol, int icon, int restart, int max_iter, int info) { FUNCNAME("oem_solve_s"); int dim, iter = -1; size_t size; OEM_DATA oem = {nil}; const PRECON *precon = nil; WORKSPACE ws = {0, nil}; TEST_EXIT(A->row_fe_space == A->col_fe_space, "Row and column FE_SPACEs don't match!\n"); dim = A->row_fe_space->admin->size_used; FOR_ALL_FREE_DOFS(A->row_fe_space->admin, if (dof < dim) u->vec[dof] = f->vec[dof] = 0.0); oem.mat_vec = mat_vec_s; oem.mat_vec_data = init_mat_vec_s(NoTranspose, A, nil); switch(icon) { case 0: oem.left_precon = nil; break; case 2: precon = get_HB_precon_s(A->row_fe_space, nil, 1, info); break; case 3: precon = get_BPX_precon_s(A->row_fe_space, nil, 1, info); break; default: precon = get_diag_precon_s(A, nil); break; } if (precon) { if (precon->init_precon && !(*precon->init_precon)(precon->precon_data)) { precon = nil; MSG("init_precon() failed, disabling preconditioner!\n"); } else { oem.left_precon_data = precon->precon_data; oem.left_precon = precon->precon; } } oem.ws = &ws; oem.tolerance = tol; oem.restart = 0; oem.max_iter = max_iter; oem.info = info; switch (solver) { case BiCGStab: REALLOC_WORKSPACE(&ws, 5*dim*sizeof(REAL)); iter = oem_bicgstab(&oem, dim, f->vec, u->vec); break; case CG: REALLOC_WORKSPACE(&ws, 3*dim*sizeof(REAL)); iter = oem_cg(&oem, dim, f->vec, u->vec); break; case TfQMR: REALLOC_WORKSPACE(&ws, 11*dim*sizeof(REAL)); iter = oem_tfqmr(&oem, dim, f->vec, u->vec); break; case GMRes: oem.restart = restart = MAX(0, MIN(restart, dim)); size = ((restart+2)*dim + restart*(restart+4))*sizeof(REAL); REALLOC_WORKSPACE(&ws, size); iter = oem_gmres(&oem, dim, f->vec, u->vec); break; case ODir: REALLOC_WORKSPACE(&ws, 6*dim*sizeof(REAL)); iter = oem_odir(&oem, dim, f->vec, u->vec); break; case ORes: REALLOC_WORKSPACE(&ws, 7*dim*sizeof(REAL)); iter = oem_ores(&oem, dim, f->vec, u->vec); break; default: ERROR_EXIT("unknown OEM solver %d\n", (int) solver); } CLEAR_WORKSPACE(&ws); if (precon && precon->exit_precon) (*precon->exit_precon)(precon->precon_data); return(iter); } alberta-2.0.1/alberta/src/Common/parametric.c0000644000042300001440000003544110676724253016004 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: parametric.c */ /* */ /* */ /* description: Support for parametric elements. */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" typedef struct lagrange_param_data LAGRANGE_PARAM_DATA; struct lagrange_param_data { int i_am_affine; NODE_PROJECTION *n_proj; DOF_REAL_D_VEC *coords; DOF_UCHAR_VEC *touched_coords; int n_local_coords; REAL_D *local_coords; }; /*--------------------------------------------------------------------------*/ /* param_init_element: returns true iff we are on a parametric element. */ /*--------------------------------------------------------------------------*/ static int param_init_element(const EL_INFO *el_info, const PARAMETRIC *parametric) { /* FUNCNAME("param_init_element"); */ int result = 0, i; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)parametric->data; int n_local_coords = data->n_local_coords; DOF_REAL_D_VEC *coords = data->coords; REAL_D *local_coords = data->local_coords; if(parametric->not_all) { DOF_UCHAR_VEC *touched_coords = data->touched_coords; const U_CHAR *local_touched; local_touched = data->coords->fe_space->bas_fcts->get_uchar_vec (el_info->el,touched_coords,nil); for(i = 0; i < n_local_coords; i++) if(local_touched[i]) { result = 1; break; } } else result = 1; data->coords->fe_space->bas_fcts->get_real_d_vec(el_info->el, coords, local_coords); data->i_am_affine = 1-result; return result; } static void param_coord_to_world(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D *world) { int i, iq, n; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data; REAL_D *local_coords = data->local_coords; const BAS_FCTS *bas_fcts = data->coords->fe_space->bas_fcts; if (quad) { static const QUAD_FAST *quad_fast = nil; REAL **phi; if (!quad_fast || quad_fast->quad != quad || !(quad_fast->init_flag|INIT_PHI)) quad_fast = get_quad_fast(bas_fcts, quad, INIT_PHI); phi = quad_fast->phi; for (iq = 0; iq < quad->n_points; iq++) { SET_DOW(0.0, world[iq]); for (i = 0; i < quad_fast->n_bas_fcts; i++) { for (n = 0; n < DIM_OF_WORLD; n++) world[iq][n] += local_coords[i][n] * phi[iq][i]; } } } else { BAS_FCT **phi = bas_fcts->phi; REAL phi_lambda; for (iq = 0; iq < N; iq++) { SET_DOW(0.0, world[iq]); for (i = 0; i < bas_fcts->n_bas_fcts; i++) { phi_lambda = (*phi[i])(lambda[iq]); for (n = 0; n < DIM_OF_WORLD; n++) world[iq][n] += local_coords[i][n]*phi_lambda; } } } return; } #include "../1d/parametric_1d.c" #if DIM_OF_WORLD > 1 #include "../2d/parametric_2d.c" #if DIM_OF_WORLD > 2 #include "../3d/parametric_3d.c" #endif #endif #define MAX_DEG 2 static const PARAMETRIC *all_lagrange[DIM_OF_WORLD * MAX_DEG] = {&lagrange_parametric1_1d, &lagrange_parametric2_1d #if DIM_OF_WORLD > 1 ,&lagrange_parametric1_2d, &lagrange_parametric2_2d #if DIM_OF_WORLD > 2 ,&lagrange_parametric1_3d, &lagrange_parametric2_3d #endif #endif }; static void (*all_refine_interpol[DIM_OF_WORLD * MAX_DEG]) (DOF_REAL_D_VEC *, RC_LIST_EL *, int) = {refine_interpol1_1d, refine_interpol2_1d #if DIM_OF_WORLD > 1 ,refine_interpol1_2d, refine_interpol2_2d #if DIM_OF_WORLD > 2 ,refine_interpol1_3d, refine_interpol2_3d #endif #endif }; static void (*all_coarse_interpol[DIM_OF_WORLD * MAX_DEG]) (DOF_REAL_D_VEC *, RC_LIST_EL *, int) = {nil, coarse_interpol2_1d #if DIM_OF_WORLD > 1 ,nil, coarse_interpol2_2d #if DIM_OF_WORLD > 2 ,nil, coarse_interpol2_3d #endif #endif }; static void (*all_fill_coords[DIM_OF_WORLD * MAX_DEG]) (LAGRANGE_PARAM_DATA *data) = {fill_coords1_1d, fill_coords2_1d #if DIM_OF_WORLD > 1 ,fill_coords1_2d, fill_coords2_2d #if DIM_OF_WORLD > 2 ,fill_coords1_3d, fill_coords2_3d #endif #endif }; static void inherit_lagrange_parametric(MESH *slave) { FUNCNAME("inherit_lagrange_parametric"); MESH *master; PARAMETRIC *m_parametric; LAGRANGE_PARAM_DATA *m_data; DOF_INT_VEC *dof_connection; DOF_REAL_D_VEC *m_coords, *s_coords; DOF_UCHAR_VEC *m_t_coords, *s_t_coords; REAL_D *m_coord_vec, *s_coord_vec; U_CHAR *m_t_coord_vec, *s_t_coord_vec; int *master_dofs; TEST_EXIT(slave, "No slave mesh given!\n"); master = ((MESH_MEM_INFO *)slave->mem_info)->master; TEST_EXIT(master, "'%s' is not a slave mesh!\n", NAME(slave)); m_parametric = master->parametric; TEST_EXIT(m_parametric, "'%s' is not a parametric mesh!\n", NAME(master)); m_data = (LAGRANGE_PARAM_DATA *)m_parametric->data; /* Turn the slave mesh into a parametric mesh. */ use_lagrange_parametric(slave, m_data->coords->fe_space->bas_fcts->degree, m_data->n_proj, m_parametric->not_all); /* Finally, transfer coordinates and touched vertices. */ /* Touched vertices vector is only used for strategy > 0! */ m_coords = get_lagrange_coords(master); s_coords = get_lagrange_coords(slave); m_coord_vec = m_coords->vec; s_coord_vec = s_coords->vec; dof_connection = get_dof_int_vec("DOF connection", s_coords->fe_space); get_slave_dof_mapping(m_coords->fe_space, dof_connection); master_dofs = dof_connection->vec; if(m_parametric->not_all) { m_t_coords = get_lagrange_coord_flags(master); s_t_coords = get_lagrange_coord_flags(slave); m_t_coord_vec = m_t_coords->vec; s_t_coord_vec = s_t_coords->vec; FOR_ALL_DOFS(s_coords->fe_space->admin, COPY_DOW(m_coord_vec[master_dofs[dof]], s_coord_vec[dof]); s_t_coord_vec[dof] = m_t_coord_vec[master_dofs[dof]]; ); } else { FOR_ALL_DOFS(s_coords->fe_space->admin, COPY_DOW(m_coord_vec[master_dofs[dof]], s_coord_vec[dof]); ); } free_dof_int_vec(dof_connection); return; } /****************************************************************************/ /* use_lagrange_parametric(mesh, degree, n_proj, strategy): */ /* Transforms the mesh to use parametric simplices of degree "degree". */ /* All mesh elements which are affected by the node projection "n_proj" */ /* will be deformed. The parameter "strategy" determines how elements will */ /* become parametric. The following choices are available at the moment: */ /* */ /* strategy == 0: all elements of the mesh will be treated as parametric */ /* elements, implying that determinants and Jacobeans will */ /* be calculated at all quadrature points during assembly. */ /* This is useful e.g. for triangulations of embedded */ /* curved manifolds. Please note that during refinement a */ /* parent element will be split along the surface defined */ /* by the following equation */ /* */ /* lambda_0 = lambda_1 */ /* */ /* defined in the nonlinear barycentric coords lambda_i. */ /* For some meshes, this will create better shaped */ /* simplices. */ /* */ /* strategy == 1: only those elements of the mesh affected by "n_proj" */ /* will be treated as parametric elements. This enables */ /* some optimization during assembly. All children of the */ /* original curved simplices will be determined as above, */ /* implying that they too will be parametric. */ /* */ /* strategy == 2: only those elements of the mesh affected by "n_proj" */ /* will be treated as parametric elements. The children of */ /* parametric elements will only be parametric elements */ /* if they too are affected by "n_proj". Parent elements */ /* are split along straight lines or planes, which could */ /* lead to degenerate elements. The purpose of this */ /* algorithm is to keep the number of curved elements as */ /* small as possible. This is useful if one only wishes to */ /* use parametric elements to approximate a curved boundary */ /* or interface manifold. */ /****************************************************************************/ void use_lagrange_parametric(MESH *mesh, int degree, NODE_PROJECTION *n_proj, int strategy) { FUNCNAME("use_lagrange_parametric"); PARAMETRIC *parametric; DOF_REAL_D_VEC *coords; DOF_UCHAR_VEC *touched_coords = nil; REAL_D *local_coords; const BAS_FCTS *lagrange = nil; int dim, i; MESH *slave; const FE_SPACE *fe_space; const FE_SPACE *s_fe_space; const BAS_FCTS *s_bas_fcts; TEST_EXIT(mesh,"No fe_space given!\n"); TEST_EXIT(!mesh->parametric, "There is already a parametric structure defined on this mesh!\n"); dim = mesh->dim; TEST_EXIT((dim > 0) && (dim <= DIM_OF_WORLD), "Parametric elements of dimension %d are not available for DIM_OF_WORLD == %d!\n", dim, DIM_OF_WORLD); TEST_EXIT((degree > 0) && (degree < MAX_DEG+1), "Only implemented for 0 < degree < %d.\n", MAX_DEG+1); TEST_EXIT(strategy >=0 && strategy <= 2, "Only strategy 0,1,2 are implemented!\n"); lagrange = get_lagrange(dim, degree); fe_space = get_fe_space(mesh, "main space of parametric coords", nil, lagrange, false); local_coords = MEM_CALLOC(fe_space->bas_fcts->n_bas_fcts, REAL_D); coords = get_dof_real_d_vec("Lagrange parametric coordinates", fe_space); if(strategy > 0) { touched_coords = get_dof_uchar_vec("Touched parametric vertices", fe_space); FOR_ALL_DOFS(fe_space->admin, touched_coords->vec[dof] = 0); } coords->refine_interpol = all_refine_interpol[(dim-1)*MAX_DEG + degree - 1]; coords->coarse_restrict = all_coarse_interpol[(dim-1)*MAX_DEG + degree - 1]; parametric = MEM_CALLOC(1, PARAMETRIC); *parametric = *all_lagrange[(dim-1) * MAX_DEG + degree - 1]; parametric->data = MEM_ALLOC(1, LAGRANGE_PARAM_DATA); ((LAGRANGE_PARAM_DATA *)parametric->data)->n_proj = n_proj; ((LAGRANGE_PARAM_DATA *)parametric->data)->coords = coords; ((LAGRANGE_PARAM_DATA *)parametric->data)->touched_coords = touched_coords; ((LAGRANGE_PARAM_DATA *)parametric->data)->n_local_coords = fe_space->bas_fcts->n_bas_fcts; ((LAGRANGE_PARAM_DATA *)parametric->data)->local_coords = local_coords; (all_fill_coords[(dim-1)*MAX_DEG + degree - 1]) ((LAGRANGE_PARAM_DATA *)parametric->data); parametric->not_all = strategy; /* Set inheritance function. */ parametric->inherit_parametric = inherit_lagrange_parametric; mesh->parametric = parametric; /* Now handle submeshes... */ if(mesh->dim > 1) { for(i = 0; i < ((MESH_MEM_INFO *)mesh->mem_info)->n_slaves; i++) { slave = ((MESH_MEM_INFO *)mesh->mem_info)->slaves[i]; s_bas_fcts = get_lagrange(slave->dim, degree); s_fe_space = get_fe_space(slave, "slave space of parametric coords", nil, s_bas_fcts, false); use_lagrange_parametric(slave, degree, n_proj, strategy); } } return; } /****************************************************************************/ /* get_lagrange_coords(mesh): Return the DOF_REAL_D_VEC coordinate vector */ /* used to defined the Lagrange type parametric elements implemented above. */ /* USE WITH CARE, ESPECIALLY IF YOU ARE CHANGING VALUES! Problems may arise */ /* because elements are not recognized as curved elements unless the */ /* internally used "touched_coords" vector is also set. */ /****************************************************************************/ DOF_REAL_D_VEC *get_lagrange_coords(MESH *mesh) { FUNCNAME("get_lagrange_coords"); TEST_EXIT(mesh, "No mesh given!\n"); TEST_EXIT(mesh->parametric, "This is not a parametric mesh!\n"); TEST_EXIT(mesh->parametric->name, "Can not identify parametric type!\n"); TEST_EXIT(strstr(mesh->parametric->name, "Lagrange"), "This is not a Lagrange type PARAMETRIC!\n"); return ((LAGRANGE_PARAM_DATA *)mesh->parametric->data)->coords; } DOF_UCHAR_VEC *get_lagrange_coord_flags(MESH *mesh) { FUNCNAME("get_lagrange_coord_flags"); TEST_EXIT(mesh, "No mesh given!\n"); TEST_EXIT(mesh->parametric, "This is not a parametric mesh!\n"); #if 0 TEST_EXIT(mesh->parametric->name, "Can not identify parametric type!\n"); TEST_EXIT(strstr(mesh->parametric->name, "Lagrange"), "This is not a Lagrange type PARAMETRIC!\n"); #endif if(mesh->parametric->not_all == 0) WARNING("Strategy 0 used; coordinate flag vector is not used!\n"); return ((LAGRANGE_PARAM_DATA *)mesh->parametric->data)->touched_coords; } alberta-2.0.1/alberta/src/Common/read_mesh.c0000644000042300001440000007062710676724253015611 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: read_mesh.c */ /* */ /* description: reading data of mesh and vectors in machine independent */ /* and native binary formats. */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* to_do : number of dofs depending on node */ /* nach read_macro, damit dort pointer auf mel, v vorhanden sind!!! */ /* (fuers naechste Schreiben) */ /* error handling is terrible */ /*--------------------------------------------------------------------------*/ #include #include "alberta.h" #include "alberta_intern.h" static XDR *xdrp; /* WARNING: XDR routines to read/write ALBERTA types must be changed if the ALBERTA types change! current state: REAL = double U_CHAR = unsigned char S_CHAR = signed char DOF = int Another WARNING! (D.K.) XDR routines are not well documented in the "xdr" man page. Do not change anything unless you know what you are doing! */ bool_t AI_xdr_int(XDR *xdr, void *ip) { FUNCNAME("AI_xdr_int"); TEST_EXIT(sizeof(int) == 4, "sizeof(int) != 4, please start hacking!"); #if HAVE_XDR_INT32_T return (xdr_int32_t(xdr,(int *)ip)); #elif HAVE_XDR_INT return (xdr_int(xdr,(int *)ip)); #endif } bool_t AI_xdr_REAL(XDR *xdr, void *rp) { FUNCNAME("AI_xdr_REAL"); TEST_EXIT(sizeof(double) == sizeof(REAL), "sizeof(double) != sizeof(REAL), please start hacking!"); return (xdr_double(xdr,(double *)rp)); } bool_t AI_xdr_U_CHAR(XDR *xdr, void *ucp) { return (xdr_u_char(xdr,(u_char *)ucp)); } bool_t AI_xdr_S_CHAR(XDR *xdr, void *cp) { return (xdr_char(xdr,(char *)cp)); } bool_t AI_xdr_DOF(XDR *xdr, void *dp) { FUNCNAME("AI_xdr_DOF"); TEST_EXIT(sizeof(DOF) == sizeof(int), "sizeof(DOF) != sizeof(int), please start hacking!"); return (AI_xdr_int(xdr,(int *)dp)); } #if 0 static int read_xdr_file(void *file, void *buffer, u_int size) { return ((int)fread(buffer, 1, (size_t)size, (FILE *)file)); } static int write_xdr_file(void *file, void *buffer, u_int size) { return (fwrite(buffer, (size_t)size, 1, (FILE *)file) == 1 ? (int)size : 0); #endif static FILE *file; XDR *AI_xdr_open_file(const char *fn, enum xdr_op mode) { FUNCNAME("AI_xdr_open_file"); XDR *xdr; if (!(xdr = MEM_ALLOC(1,XDR))) { ERROR("can't allocate memory for xdr pointer.\n"); return NULL; } if ((file = fopen(fn, (mode == XDR_DECODE) ? "r": "w"))) { xdrstdio_create(xdr, file, mode); #if 0 xdrrec_create(xdr, 65536, 65536, (caddr_t) file, (int (*)())read_xdr_file, (int (*)())write_xdr_file); xdr->x_op = mode; xdr->x_public = (caddr_t)file; if (mode == XDR_DECODE) xdrrec_skiprecord(xdr); #endif return xdr; } else { ERROR("error opening xdr file.\n"); MEM_FREE(xdr,1,XDR); return NULL; } } int AI_xdr_close_file(XDR *xdr) { FUNCNAME("AI_xdr_close_file"); if (!xdr) { ERROR("NULL xdr pointer.\n"); return 0; } #if 0 if (xdr->x_op == XDR_ENCODE) xdrrec_endofrecord(xdr, 1); #endif xdr_destroy(xdr); if (fclose(file)) ERROR("error closing file.\n"); MEM_FREE(xdr,1,XDR); return 1; } /*--------------------------------------------------------------------------*/ static void read_REAL(REAL *val) { if(xdrp) AI_xdr_REAL(xdrp, val); else fread(val, sizeof(REAL), 1, file); } static void read_int(int *val) { if(xdrp) AI_xdr_int(xdrp, val); else fread(val, sizeof(int), 1, file); } #if 0 /* NEVER use this. If you need 64 bits, then use xdr_int64_t() */ static void read_long(long *val) { if(xdrp) xdr_long(xdrp, val); else fread(val, sizeof(long int), 1, file); } #endif static void read_string(char **string, int read_size, int strileng) { if(read_size) { read_int(&strileng); if(strileng) *string = (char *)MEM_ALLOC(strileng+1, char); } if(xdrp) xdr_string(xdrp, string, strileng+1); else fread(*string, sizeof(char), strileng+1, file); } static void read_vector(void *start, int n, size_t size, xdrproc_t xdrproc) { if(xdrp) xdr_vector(xdrp, (char *)start, n, size, xdrproc); else fread(start, size, n, file); } static void read_U_CHAR(U_CHAR *val) { if(xdrp) AI_xdr_U_CHAR(xdrp, val); else fread(val, sizeof(U_CHAR), 1, file); } /*--------------------------------------------------------------------------*/ static DOF_ADMIN *admin = nil; static MESH *mesh = nil; static int n_vert_dofs; static DOF **vert_dofs; static int n_edge_dofs; static DOF **edge_dofs; static int n_face_dofs; static DOF **face_dofs; /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* read_dofs(mesh, dof_ptr, type): Read a DOF vector of type "type" from */ /* the file. Allocate space for nonzero DOF_entries (which are overwritten */ /* with the indices from the file). */ /****************************************************************************/ static void read_dofs(MESH *mesh, DOF **dof_ptr, int type) { int n_dof = mesh->n_dof[type]; DOF temp_dofs[n_dof]; DOF_ADMIN *admin; int i, j, n, n0; read_vector(temp_dofs, n_dof, sizeof(DOF), (xdrproc_t)AI_xdr_DOF); *dof_ptr = AI_get_dof_memory(mesh, type); for (i = 0; i < mesh->n_dof_admin; i++) { admin = mesh->dof_admin[i]; n = admin->n_dof[type]; n0 = admin->n0_dof[type]; TEST_EXIT(n+n0 <= n_dof,"dof_admin \"%s\": n=%d, n0=%d too large: ndof=%d\n", admin->name, n, n0, n_dof); for (j = 0; j < n; j++) { (*dof_ptr)[n0+j] = temp_dofs[n0+j]; if(temp_dofs[n0+j] >= 0) get_dof_index(admin); /* Reserve new DOF but forget the index. */ } } return; } /*--------------------------------------------------------------------------*/ static EL *read_el_recursive(int dim, EL *parent) { FUNCNAME("read_el_recursive"); int i, j, n, node0; EL *el; U_CHAR uc, nc; el = get_element(mesh); mesh->n_hier_elements++; #if ALBERTA_DEBUG el->index = mesh->n_hier_elements; #endif read_U_CHAR(&uc); if(dim > 1) { read_U_CHAR(&nc); if (nc) { el->new_coord = get_real_d(mesh); read_vector(el->new_coord, DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); } else el->new_coord = nil; } if (mesh->n_dof[VERTEX] > 0) { node0 = mesh->node[VERTEX]; for (i = 0; i < N_VERTICES(dim); i++) { read_int(&j); TEST_EXIT(j < n_vert_dofs, "vert_dofs index too large: %d >= %d\n", j, n_vert_dofs); el->dof[node0 + i] = vert_dofs[j]; } } if (dim > 1 && mesh->n_dof[EDGE] > 0) { node0 = mesh->node[EDGE]; for (i = 0; i < N_EDGES(dim); i++) { read_int(&j); TEST_EXIT(j < n_edge_dofs, "edge_dofs index too large: %d >= %d\n", j, n_edge_dofs); if(j >= 0) el->dof[node0 + i] = edge_dofs[j]; } } if (dim == 3 && (n = mesh->n_dof[FACE]) > 0) { node0 = mesh->node[FACE]; for (i = 0; i < N_FACES_3D; i++) { read_int(&j); TEST_EXIT(j < n_face_dofs, "face_dofs index too large: %d >= %d\n", j, n_face_dofs); if(j >= 0) el->dof[node0 + i] = face_dofs[j]; } } if ((n = mesh->n_dof[CENTER]) > 0) { node0 = mesh->node[CENTER]; read_dofs(mesh, el->dof + node0, CENTER); } if (uc) { el->child[0] = read_el_recursive(dim, el); el->child[1] = read_el_recursive(dim, el); } else mesh->n_elements++; return(el); } /*--------------------------------------------------------------------------*/ static void read_dof_admins(MESH *mesh) { FUNCNAME("read_dof_admins"); int i, n_dof_admin, iadmin, used_count; int n_dof_el, n_dof[N_NODE_TYPES], n_node_el, node[N_NODE_TYPES]; int a_n_dof[N_NODE_TYPES]; U_CHAR pcd; char *name; read_int(&n_dof_el); read_vector(n_dof, N_NODE_TYPES, sizeof(int), (xdrproc_t)AI_xdr_int); read_int(&n_node_el); read_vector(node, N_NODE_TYPES, sizeof(int), (xdrproc_t)AI_xdr_int); /* use data later for check */ read_int(&n_dof_admin); for (iadmin = 0; iadmin < n_dof_admin; iadmin++) { read_vector(a_n_dof, N_NODE_TYPES, sizeof(int), (xdrproc_t)AI_xdr_int); read_int(&used_count); read_string(&name, true, 0); read_U_CHAR(&pcd); admin = AI_get_dof_admin(mesh, name, a_n_dof); admin->preserve_coarse_dofs = pcd; MEM_FREE(name, strlen(name)+1, char); if (used_count > 0) enlarge_dof_lists(admin, used_count); } /* end for (iadmin) */ for(i = 0; i < N_NODE_TYPES; i++) if(mesh->n_dof[i]) AI_get_dof_list(mesh, i); AI_get_dof_ptr_list(mesh); TEST(mesh->n_dof_el == n_dof_el,"wrong n_dof_el: %d %d\n", mesh->n_dof_el, n_dof_el); for (i = 0; i < N_NODE_TYPES; i++) TEST(mesh->n_dof[i] == n_dof[i],"wrong n_dof[%d]: %d %d\n", i, mesh->n_dof[i], n_dof[i]); TEST(mesh->n_node_el == n_node_el,"wrong n_node_el: %d %d\n", mesh->n_node_el, n_node_el); for (i = 0; i < N_NODE_TYPES; i++) TEST(mesh->node[i] == node[i],"wrong node[%d]: %d %d\n", i, mesh->node[i], node[i]); return; } /*--------------------------------------------------------------------------*/ static MESH *read_mesh_master(const int write_xdr, const char *fn, REAL *timeptr, NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int)) { FUNCNAME("read_mesh_master"); MACRO_EL *mel; int i, j, n; REAL_D *v, x_min, x_max; int neigh_i[N_NEIGH_MAX]; char *name, *s; size_t length; int dim, iDIM_OF_WORLD, ne, nv; REAL time, diam[DIM_OF_WORLD]; int n_vert, n_elements, n_hier_elements; int n_edges; int vert_i[N_VERTICES_MAX]; static int funccount=0; int n_faces, max_edge_neigh; length = MAX(strlen(ALBERTA_VERSION)+1,5); /* length with terminating \0 */ s = MEM_ALLOC(length, char); if(write_xdr) { if (!(xdrp = AI_xdr_open_file(fn, XDR_DECODE))) { ERROR("Cannot open XDR file '%s'\n",fn); goto error_exit; } } else if (!(file=fopen(fn,"rb"))) { ERROR("Cannot open file '%s'\n", fn); goto error_exit; } read_string(&s, false, strlen(ALBERTA_VERSION)); if (strcmp(s, ALBERTA_VERSION)) { ERROR("Invalid file id: \"%s\", expected \"%s\"\n",s, ALBERTA_VERSION); goto error_exit; } read_int(&dim); if (dim > DIM_OF_WORLD) { ERROR("dim==%d is greater than DIM_OF_WORLD==%d!\n", dim, DIM_OF_WORLD); goto error_exit; } read_int(&iDIM_OF_WORLD); if (iDIM_OF_WORLD != DIM_OF_WORLD) { ERROR("wrong DIM_OF_WORLD %d. abort.\n", iDIM_OF_WORLD); goto error_exit; } read_REAL(&time); if (timeptr) *timeptr = time; read_int(&i); /* length without terminating \0 */ if(i) { name = MEM_ALLOC(i+1, char); read_string(&name, false, i); } else { funccount++; i=100; name = MEM_ALLOC(i+1, char); sprintf(name, "READ_MESH%d", funccount); } read_int(&n_vert); if(dim > 1) read_int(&n_edges); read_int(&n_elements); read_int(&n_hier_elements); if(dim == 3) { read_int(&n_faces); read_int(&max_edge_neigh); } read_vector(diam, DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); mesh = GET_MESH(dim, name, nil, nil); read_dof_admins(mesh); MEM_FREE(name, i+1, char); read_int(&n_vert_dofs); if (n_vert_dofs > 0) { vert_dofs = MEM_ALLOC(n_vert_dofs, DOF *); n = mesh->n_dof[VERTEX]; for (i = 0; i < n_vert_dofs; i++) { vert_dofs[i] = get_dof(mesh, VERTEX); read_vector(vert_dofs[i], n, sizeof(DOF), (xdrproc_t)AI_xdr_DOF); } } if(dim > 1) { read_int(&n_edge_dofs); if (n_edge_dofs > 0) { edge_dofs = MEM_ALLOC(n_edge_dofs, DOF *); for (i = 0; i < n_edge_dofs; i++) read_dofs(mesh, edge_dofs + i, EDGE); } } if(dim == 3) { read_int(&n_face_dofs); if (n_face_dofs > 0) { face_dofs = MEM_ALLOC(n_face_dofs, DOF *); for (i = 0; i < n_face_dofs; i++) read_dofs(mesh, face_dofs + i, FACE); } } read_int(&ne); read_int(&nv); ((MESH_MEM_INFO *)mesh->mem_info)->count = nv; v = ((MESH_MEM_INFO *)mesh->mem_info)->coords = MEM_ALLOC(nv, REAL_D); for (i = 0; i < nv; i++) read_vector(v[i], DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); for (j = 0; j < DIM_OF_WORLD; j++) { x_min[j] = 1.E30; x_max[j] = -1.E30; } for (i = 0; i < nv; i++) for (j = 0; j < DIM_OF_WORLD; j++) { x_min[j] = MIN(x_min[j], v[i][j]); x_max[j] = MAX(x_max[j], v[i][j]); } for (j = 0; j < DIM_OF_WORLD; j++) mesh->diam[j] = x_max[j] - x_min[j]; mel = MEM_CALLOC(ne, MACRO_EL); mesh->n_macro_el = ne; mesh->macro_els = mel; for (n = 0; n < ne; n++) { mel[n].index = n; read_vector(vert_i, N_VERTICES(dim), sizeof(int), (xdrproc_t)AI_xdr_int); for (i = 0; i < N_VERTICES(dim); i++) { if ((vert_i[i] >= 0) && (vert_i[i] < nv)) mel[n].coord[i] = (REAL *)(v + (vert_i[i])); else mel[n].coord[i] = nil; } read_vector(mel[n].vertex_bound,N_VERTICES(dim),sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); if(dim == 2) { read_vector(mel[n].edge_bound, N_EDGES_2D, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); } if(dim == 3) { read_vector(mel[n].face_bound, N_FACES_3D, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); read_vector(mel[n].edge_bound, N_EDGES_3D, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); } read_vector(neigh_i, N_NEIGH(dim), sizeof(int), (xdrproc_t)AI_xdr_int); if(n_proj) mel[n].projection[0] = n_proj(mesh, mel + n, 0); for (i = 0; i < N_NEIGH(dim); i++) { if(n_proj && (dim > 1)) mel[n].projection[i+1] = n_proj(mesh, mel + n, i+1); if ((neigh_i[i] >= 0) && (neigh_i[i] < ne)) mel[n].neigh[i] = mel + (neigh_i[i]); else mel[n].neigh[i] = nil; } read_vector(mel[n].opp_vertex, N_NEIGH(dim), sizeof(U_CHAR), (xdrproc_t)AI_xdr_U_CHAR); #if DIM_OF_WORLD == 3 if(dim == 3) { read_U_CHAR(&(mel[n].el_type)); mel[n].orientation = AI_get_orientation(&mel[n]); } #endif mel[n].el = read_el_recursive(dim, nil); } /****************************************************************************/ /* The present mechanism only reads DOFs from the file which were used by */ /* at least one DOF_ADMIN. The missing element DOF pointers are filled by */ /* this routine (in memory.c). */ /****************************************************************************/ if(dim > 0) AI_fill_missing_dofs(mesh); if (n_elements != mesh->n_elements) { ERROR("n_elements != mesh->n_elements.\n"); goto error_exit; } if (n_hier_elements != mesh->n_hier_elements) { ERROR("n_hier_elements != mesh->n_hier_elements.\n"); goto error_exit; } if (mesh->n_dof[VERTEX]) { if (n_vert != n_vert_dofs) { ERROR("n_vertices == %d != %d == n_vert_dofs.\n", n_vert, n_vert_dofs); mesh->n_vertices = n_vert_dofs; goto error_exit; } } mesh->n_vertices = n_vert; if (dim > 1) mesh->n_edges = n_edges; if(dim == 3) { mesh->n_faces = n_faces; mesh->max_edge_neigh = max_edge_neigh; } for (i=0; idiam[i]-diam[i]) > (mesh->diam[i]/10000.0)) { ERROR("diam[%i] != mesh->diam[%i].\n",i,i); /* goto error_exit; */ } } /* Read the magic cookie. */ read_int(&mesh->cookie); read_string(&s, false, 4); if (strncmp(s, "EOF.", 4)) /* file end marker */ { ERROR("no FILE END MARK.\n"); goto error_exit; } else { MSG("File %s read.\n",fn); } error_exit: MEM_FREE(s, length, char); if(xdrp) AI_xdr_close_file(xdrp); else fclose(file); xdrp = nil; file = nil; return(mesh); } MESH *read_mesh_xdr(const char *fn, REAL *timeptr, NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int)) { return read_mesh_master(true, fn, timeptr, n_proj); } MESH *read_mesh(const char *fn, REAL *timeptr, NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int)) { return read_mesh_master(false, fn, timeptr, n_proj); } /*--------------------------------------------------------------------------*/ /* read DOF vectors of various types */ /*--------------------------------------------------------------------------*/ typedef DOF_REAL_VEC DOF_VEC; static const DOF_ADMIN *read_dof_vec_master(const int read_xdr, const char *fn, DOF_VEC *dv, const char *dofvectype, MESH *mesh, FE_SPACE *fe_space) { FUNCNAME("read_dof_vec_master"); int i, last; int n_dof[N_NODE_TYPES]; int cookie; const DOF_ADMIN *admin = nil; const BAS_FCTS *bas_fcts; char *name, *s; size_t length; U_CHAR pcd; TEST_EXIT(mesh,"no mesh given\n"); if(read_xdr) { if (!(xdrp = AI_xdr_open_file(fn, XDR_DECODE))) { ERROR("Cannot open XDR file '%s'\n",fn); return nil; } } else if(!(file = fopen(fn, "rb"))) { ERROR("Cannot open file '%s'\n",fn); return nil; } length = 17; /* length of dofvectype with terminating \0 */ s=MEM_ALLOC(length, char); read_string(&s, false, 16); if (strncmp(s, dofvectype, 12)) { ERROR("invalid file id; %s\n", s); goto error_exit; } read_int(&last); name = MEM_ALLOC(last+1, char); read_string(&name, false, last); read_U_CHAR(&pcd); dv->name = name; read_vector(n_dof, N_NODE_TYPES, sizeof(int), (xdrproc_t)AI_xdr_int); read_int(&last); /* length of BAS_FCTS name */ if (last) { name = MEM_ALLOC(last+1, char); read_string(&name, false, last); if (fe_space && (bas_fcts = fe_space->bas_fcts)) { if (strcmp(bas_fcts->name, name)) { ERROR("invalid name %s is not given fe_space->bas_fcts->name %s\n", name, bas_fcts->name); } } else { /* no given fe_space or no bas_fcts in given fe_space */ TEST_EXIT(bas_fcts = get_bas_fcts(name), "cannot get bas_fcts <%s>\n", name); if (fe_space) { /* use given fe_space */ fe_space->bas_fcts = bas_fcts; } else { /* create new fe_space */ TEST_EXIT(fe_space = (FE_SPACE *)get_fe_space(mesh, name, n_dof, bas_fcts, pcd), "cannot get fe_space for bas_fcts <%s>\n", name); } } for (i = 0; i < N_NODE_TYPES; i++) { TEST_EXIT(n_dof[i] == bas_fcts->n_dof[i], "wrong n_dof in bas_fcts <%s>\n", name); } } else { /* no bas_fcts.name in file */ if (fe_space) { /* use given fe_space */ TEST_EXIT(admin = fe_space->admin,"no fe_space->admin"); for (i = 0; i < N_NODE_TYPES; i++) { TEST_EXIT(n_dof[i] == admin->n_dof[i], "wrong n_dof in admin <%s>\n", NAME(admin)); } } else { /* create new fe_space */ TEST_EXIT(fe_space = (FE_SPACE *) get_fe_space(mesh, nil, n_dof, nil, pcd), "cannot get fe_space for given n_dof\n"); TEST_EXIT(admin = fe_space->admin,"no admin in new fe_space\n"); for (i = 0; i < N_NODE_TYPES; i++) { TEST_EXIT(n_dof[i] == admin->n_dof[i], "wrong n_dof in admin <%s>\n", NAME(admin)); } } } TEST_EXIT(fe_space,"still no fe_space\n"); dv->fe_space = fe_space; TEST_EXIT(admin = fe_space->admin,"still no admin\n"); dof_compress(mesh); read_int(&last); if (last != admin->size_used) { ERROR("size of dof vector `%s' == %d does not fit to size_used == %d in admin `%s'\n", dv->name, last, admin->size_used, admin->name); ERROR_EXIT("can not read incompatible data\n"); } if (last) { dv->size = last; if (!strncmp(dofvectype, "DOF_REAL_VEC ", 12)) { dv->vec = ((REAL *) alberta_alloc((size_t)(last*sizeof(double)), funcName, __FILE__, __LINE__)); read_vector(dv->vec, last, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); } else if (!strncmp(dofvectype, "DOF_REAL_D_VEC ", 12)) { dv->vec = ((REAL *) alberta_alloc((size_t)(last*DIM_OF_WORLD*sizeof(REAL)), funcName, __FILE__, __LINE__)); read_vector(dv->vec, last*DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); } else if (!strncmp(dofvectype, "DOF_INT_VEC ", 12)) { dv->vec = ((REAL *) alberta_alloc((size_t)(last*sizeof(int)), funcName, __FILE__, __LINE__)); read_vector(dv->vec, last, sizeof(int), (xdrproc_t)AI_xdr_int); } else if (!strncmp(dofvectype, "DOF_SCHAR_VEC ", 12)) { dv->vec = ((REAL *) alberta_alloc((size_t)(last*sizeof(char)), funcName, __FILE__, __LINE__)); read_vector(dv->vec, last, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); } else if (!strncmp(dofvectype, "DOF_UCHAR_VEC ", 12)) { dv->vec = ((REAL *) alberta_alloc((size_t)(last*sizeof(unsigned char)), funcName, __FILE__, __LINE__)); read_vector(dv->vec, last, sizeof(U_CHAR), (xdrproc_t)AI_xdr_U_CHAR); } else ERROR("Invalid file id '%s'\n", dofvectype); } else { ERROR("empty dof vector\n"); dv->size = 0; dv->vec = nil; } /* Read the magic cookie. */ read_int(&cookie); if (cookie != mesh->cookie) WARNING("Mesh and DOF vector do not seem to match!\n"); read_string(&s, false, 4); if (strncmp(s, "EOF.", 4)) /* file end marker */ { ERROR("no FILE END MARK.\n"); goto error_exit; } else { MSG("File '%s' read.\n",fn); } error_exit: MEM_FREE(s,length,char); if(xdrp) AI_xdr_close_file(xdrp); else fclose(file); xdrp = nil; file = nil; return(admin); } /*--------------------------------------------------------------------------*/ DOF_REAL_VEC *read_dof_real_vec_xdr(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_REAL_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_real_vec(fn, nil); admin = read_dof_vec_master(true, fn, (DOF_VEC *)dv, "DOF_REAL_VEC ", mesh, fe_space); if (admin) AI_add_dof_real_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } DOF_REAL_VEC *read_dof_real_vec(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_REAL_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_real_vec(fn, nil); admin = read_dof_vec_master(false, fn, (DOF_VEC *)dv, "DOF_REAL_VEC ", mesh, fe_space); if (admin) AI_add_dof_real_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } /*--------------------------------------------------------------------------*/ DOF_REAL_D_VEC *read_dof_real_d_vec(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_REAL_D_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_real_d_vec(fn, nil); admin = read_dof_vec_master(false, fn, (DOF_VEC *)dv, "DOF_REAL_D_VEC ", mesh, fe_space); if (admin) AI_add_dof_real_d_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } DOF_REAL_D_VEC *read_dof_real_d_vec_xdr(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_REAL_D_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_real_d_vec(fn, nil); admin = read_dof_vec_master(true, fn, (DOF_VEC *)dv, "DOF_REAL_D_VEC ", mesh, fe_space); if (admin) AI_add_dof_real_d_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } /*--------------------------------------------------------------------------*/ DOF_INT_VEC *read_dof_int_vec(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_INT_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_int_vec(fn, nil); admin = read_dof_vec_master(false, fn, (DOF_VEC *)dv, "DOF_INT_VEC ", mesh, fe_space); if (admin) AI_add_dof_int_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } DOF_INT_VEC *read_dof_int_vec_xdr(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_INT_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_int_vec(fn, nil); admin = read_dof_vec_master(true, fn, (DOF_VEC *)dv, "DOF_INT_VEC ", mesh, fe_space); if (admin) AI_add_dof_int_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } /*--------------------------------------------------------------------------*/ DOF_SCHAR_VEC *read_dof_schar_vec(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_SCHAR_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_schar_vec(fn, nil); admin = read_dof_vec_master(false, fn, (DOF_VEC *)dv, "DOF_SCHAR_VEC ", mesh, fe_space); if (admin) AI_add_dof_schar_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } DOF_SCHAR_VEC *read_dof_schar_vec_xdr(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_SCHAR_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_schar_vec(fn, nil); admin = read_dof_vec_master(true, fn, (DOF_VEC *)dv, "DOF_SCHAR_VEC ", mesh, fe_space); if (admin) AI_add_dof_schar_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } /*--------------------------------------------------------------------------*/ DOF_UCHAR_VEC *read_dof_uchar_vec(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_UCHAR_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_uchar_vec(fn, nil); admin = read_dof_vec_master(false, fn, (DOF_VEC *)dv, "DOF_UCHAR_VEC ", mesh, fe_space); if (admin) AI_add_dof_uchar_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } DOF_UCHAR_VEC *read_dof_uchar_vec_xdr(const char *fn, MESH *mesh, FE_SPACE *fe_space) { DOF_UCHAR_VEC *dv; const DOF_ADMIN *admin; dv = get_dof_uchar_vec(fn, nil); admin = read_dof_vec_master(true, fn, (DOF_VEC *)dv, "DOF_UCHAR_VEC ", mesh, fe_space); if (admin) AI_add_dof_uchar_vec_to_admin(dv, (DOF_ADMIN *)admin); return(dv); } /*--------------------------------------------------------------------------*/ alberta-2.0.1/alberta/src/Common/refine.c0000644000042300001440000004336110676724253015125 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: Common/refine.c */ /* */ /* */ /* description: Common refinement routines shared among all dimensions */ /* This file contains refine_?d.c for ? = 1,2,3 !! */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" /*--------------------------------------------------------------------------*/ /* refinement routines for global refinement: */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* global_refine_fct: */ /* sets the mark on all elements that have to be refined */ /*--------------------------------------------------------------------------*/ typedef struct refine_traverse_data { int global_refine_mark; } REFINE_TRAVERSE_DATA; static void global_refine_fct(const EL_INFO *el_info, void *data) { el_info->el->mark = ((REFINE_TRAVERSE_DATA *)data)->global_refine_mark; } /*--------------------------------------------------------------------------*/ /* global_refine: */ /* refines every element of mesh at least mark times */ /*--------------------------------------------------------------------------*/ U_CHAR global_refine(MESH *mesh, int mark) { REFINE_TRAVERSE_DATA td[1] = {{0}}; if (mark <= 0) return(0); td->global_refine_mark = mark; mesh_traverse(mesh, -1, CALL_LEAF_EL, global_refine_fct, td); return(refine(mesh)); } DOF_VEC_LIST *AI_get_dof_vec_list(MESH *mesh) { MESH_MEM_INFO *mem_info = (MESH_MEM_INFO *)mesh->mem_info; if(!mem_info->dvlist) mem_info->dvlist = MEM_CALLOC(1, DOF_VEC_LIST); return mem_info->dvlist; } void AI_free_dof_vec_list(MESH *mesh) { MESH_MEM_INFO *mem_info = (MESH_MEM_INFO *)mesh->mem_info; if(mem_info->dvlist) { MEM_FREE(mem_info->dvlist, 1, DOF_VEC_LIST); mem_info->dvlist = nil; } } static int count_refine_interpol(MESH *mesh) { FUNCNAME("count_refine_interpol"); DOF_VEC_LIST *dvlist; DOF_ADMIN *admin; int iadmin; DOF_REAL_VEC *drv; DOF_REAL_D_VEC *drdv; DOF_INT_VEC *div; DOF_DOF_VEC *ddv; DOF_UCHAR_VEC *duv; DOF_SCHAR_VEC *dsv; DOF_PTR_VEC *dpv; DOF_MATRIX *dm; DOF_DOWB_MATRIX *ddm; int nri = 0; int n_dof_int_vec=0, n_dof_dof_vec=0, n_dof_uchar_vec=0, n_dof_schar_vec=0, n_dof_real_vec=0, n_dof_real_d_vec=0, n_dof_ptr_vec=0, n_dof_matrix=0, n_dof_dowb_matrix=0; dvlist = AI_get_dof_vec_list(mesh); for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { admin = mesh->dof_admin[iadmin]; for (div = admin->dof_int_vec; div; div = div->next) { if (div->refine_interpol) n_dof_int_vec++; } for (ddv = admin->dof_dof_vec; ddv; ddv = ddv->next) { if (ddv->refine_interpol) n_dof_dof_vec++; } for (ddv = admin->int_dof_vec; ddv; ddv = ddv->next) { if (ddv->refine_interpol) n_dof_dof_vec++; } for (duv = admin->dof_uchar_vec; duv; duv = duv->next) { if (duv->refine_interpol) n_dof_uchar_vec++; } for (dsv = admin->dof_schar_vec; dsv; dsv = dsv->next) { if (dsv->refine_interpol) n_dof_schar_vec++; } for (drv = admin->dof_real_vec; drv; drv = drv->next) { if (drv->refine_interpol) n_dof_real_vec++; } for (dpv = admin->dof_ptr_vec; dpv; dpv = dpv->next) { if (dpv->refine_interpol) n_dof_ptr_vec++; } for (drdv = admin->dof_real_d_vec; drdv; drdv = drdv->next) { if (drdv->refine_interpol) n_dof_real_d_vec++; } for (dm = admin->dof_matrix; dm; dm = dm->next) { if (dm->refine_interpol) n_dof_matrix++; } for (ddm = admin->dof_dowb_matrix; ddm; ddm = ddm->next) { if (ddm->refine_interpol) n_dof_dowb_matrix++; } } nri = n_dof_int_vec + n_dof_dof_vec + n_dof_uchar_vec + n_dof_schar_vec + n_dof_real_vec + n_dof_ptr_vec + n_dof_real_d_vec + n_dof_matrix + n_dof_dowb_matrix; if (nri > 0) { if (dvlist->size < nri) { dvlist->list = MEM_REALLOC(dvlist->list, dvlist->size, nri+5, void *); dvlist->size = nri+5; } nri = 0; if (n_dof_int_vec) dvlist->dof_int_vec = (DOF_INT_VEC **)(dvlist->list+nri); else dvlist->dof_int_vec = nil; nri += n_dof_int_vec; if (n_dof_dof_vec) dvlist->dof_dof_vec = (DOF_DOF_VEC **)(dvlist->list+nri); else dvlist->dof_dof_vec = nil; nri += n_dof_dof_vec; if (n_dof_uchar_vec) dvlist->dof_uchar_vec = (DOF_UCHAR_VEC **)(dvlist->list+nri); else dvlist->dof_uchar_vec = nil; nri += n_dof_uchar_vec; if (n_dof_schar_vec) dvlist->dof_schar_vec = (DOF_SCHAR_VEC **)(dvlist->list+nri); else dvlist->dof_schar_vec = nil; nri += n_dof_schar_vec; if (n_dof_real_vec) dvlist->dof_real_vec = (DOF_REAL_VEC **)(dvlist->list+nri); else dvlist->dof_real_vec = nil; nri += n_dof_real_vec; if (n_dof_ptr_vec) dvlist->dof_ptr_vec = (DOF_PTR_VEC **)(dvlist->list+nri); else dvlist->dof_ptr_vec = nil; nri += n_dof_ptr_vec; if (n_dof_real_d_vec) dvlist->dof_real_d_vec = (DOF_REAL_D_VEC **)(dvlist->list+nri); else dvlist->dof_real_d_vec = nil; nri += n_dof_real_d_vec; if (n_dof_matrix) dvlist->dof_matrix = (DOF_MATRIX **)(dvlist->list+nri); else dvlist->dof_matrix = nil; nri += n_dof_matrix; if (n_dof_dowb_matrix) dvlist->dof_dowb_matrix= (DOF_DOWB_MATRIX **)(dvlist->list+nri); else dvlist->dof_dowb_matrix = nil; nri += n_dof_dowb_matrix; DEBUG_TEST_EXIT(nri <= dvlist->size, "error in dvlist->size"); dvlist->n_dof_int_vec = 0; dvlist->n_dof_dof_vec = 0; dvlist->n_dof_uchar_vec = 0; dvlist->n_dof_schar_vec = 0; dvlist->n_dof_real_vec = 0; dvlist->n_dof_real_d_vec = 0; dvlist->n_dof_ptr_vec = 0; dvlist->n_dof_matrix = 0; dvlist->n_dof_dowb_matrix = 0; for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { admin = mesh->dof_admin[iadmin]; for (div = admin->dof_int_vec; div; div = div->next) { if (div->refine_interpol) dvlist->dof_int_vec[dvlist->n_dof_int_vec++] = div; } for (ddv = admin->dof_dof_vec; ddv; ddv = ddv->next) { if (ddv->refine_interpol) dvlist->dof_dof_vec[dvlist->n_dof_dof_vec++] = ddv; } for (ddv = admin->int_dof_vec; ddv; ddv = ddv->next) { if (ddv->refine_interpol) dvlist->dof_dof_vec[dvlist->n_dof_dof_vec++] = ddv; } for (duv = admin->dof_uchar_vec; duv; duv = duv->next) { if (duv->refine_interpol) dvlist->dof_uchar_vec[dvlist->n_dof_uchar_vec++] = duv; } for (dsv = admin->dof_schar_vec; dsv; dsv = dsv->next) { if (dsv->refine_interpol) dvlist->dof_schar_vec[dvlist->n_dof_schar_vec++] = dsv; } for (drv = admin->dof_real_vec; drv; drv = drv->next) { if (drv->refine_interpol) dvlist->dof_real_vec[dvlist->n_dof_real_vec++] = drv; } for (drdv = admin->dof_real_d_vec; drdv; drdv = drdv->next) { if (drdv->refine_interpol) dvlist->dof_real_d_vec[dvlist->n_dof_real_d_vec++] = drdv; } for (dpv = admin->dof_ptr_vec; dpv; dpv = dpv->next) { if (dpv->refine_interpol) dvlist->dof_ptr_vec[dvlist->n_dof_ptr_vec++] = dpv; } for (dm = admin->dof_matrix; dm; dm = dm->next) { if (dm->refine_interpol) dvlist->dof_matrix[dvlist->n_dof_matrix++] = dm; } for (ddm = admin->dof_dowb_matrix; ddm; ddm = ddm->next) { if (ddm->refine_interpol) dvlist->dof_dowb_matrix[dvlist->n_dof_dowb_matrix++] = ddm; } } DEBUG_TEST_EXIT(dvlist->n_dof_int_vec == n_dof_int_vec, "error in n_dof_int_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_dof_vec == n_dof_dof_vec, "error in n_dof_dof_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_uchar_vec == n_dof_uchar_vec, "error in n_dof_uchar_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_schar_vec == n_dof_schar_vec, "error in n_dof_schar_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_real_vec == n_dof_real_vec, "error in n_dof_real_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_real_d_vec == n_dof_real_d_vec, "error in n_dof_real_d_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_ptr_vec == n_dof_ptr_vec, "error in n_dof_ptr_vec"); DEBUG_TEST_EXIT(dvlist->n_dof_matrix == n_dof_matrix, "error in n_dof_matrix"); DEBUG_TEST_EXIT(dvlist->n_dof_dowb_matrix == n_dof_dowb_matrix, "error in n_dof_dowb_matrix"); } else { dvlist->dof_int_vec = nil; dvlist->dof_dof_vec = nil; dvlist->dof_uchar_vec = nil; dvlist->dof_schar_vec = nil; dvlist->dof_real_vec = nil; dvlist->dof_real_d_vec = nil; dvlist->dof_ptr_vec = nil; dvlist->dof_matrix = nil; dvlist->dof_dowb_matrix = nil; } return(nri); } static void refine_interpol(MESH *mesh, RC_LIST_EL *list, int n_el) { DOF_VEC_LIST *dvlist; DOF_REAL_VEC *drv; DOF_REAL_D_VEC *drdv; DOF_INT_VEC *div; DOF_DOF_VEC *ddv; DOF_UCHAR_VEC *duv; DOF_SCHAR_VEC *dsv; DOF_PTR_VEC *dpv; DOF_MATRIX *dm; DOF_DOWB_MATRIX *ddm; int i; dvlist = AI_get_dof_vec_list(mesh); for (i = 0; i < dvlist->n_dof_ptr_vec; i++) { dpv = dvlist->dof_ptr_vec[i]; dpv->refine_interpol(dpv, list, n_el); } for (i = 0; i < dvlist->n_dof_int_vec; i++) { div = dvlist->dof_int_vec[i]; div->refine_interpol(div, list, n_el); } for (i = 0; i < dvlist->n_dof_dof_vec; i++) { ddv = dvlist->dof_dof_vec[i]; ddv->refine_interpol(ddv, list, n_el); } for (i = 0; i < dvlist->n_dof_uchar_vec; i++) { duv = dvlist->dof_uchar_vec[i]; duv->refine_interpol(duv, list, n_el); } for (i = 0; i < dvlist->n_dof_schar_vec; i++) { dsv = dvlist->dof_schar_vec[i]; dsv->refine_interpol(dsv, list, n_el); } for (i = 0; i < dvlist->n_dof_real_vec; i++) { drv = dvlist->dof_real_vec[i]; drv->refine_interpol(drv, list, n_el); } for (i = 0; i < dvlist->n_dof_real_d_vec; i++) { drdv = dvlist->dof_real_d_vec[i]; drdv->refine_interpol(drdv, list, n_el); } for (i = 0; i < dvlist->n_dof_matrix; i++) { dm = dvlist->dof_matrix[i]; dm->refine_interpol(dm, list, n_el); } for (i = 0; i < dvlist->n_dof_dowb_matrix; i++) { ddm = dvlist->dof_dowb_matrix[i]; ddm->refine_interpol(ddm, list, n_el); } return; } static int do_more_refine_1d = 0; static int call_refine_interpol_1d = 0; #include "refine_1d.c" #if DIM_OF_WORLD > 1 static int do_more_refine_2d = 0; static int call_refine_interpol_2d = 0; static TRAVERSE_STACK *stack_2d; #include "refine_2d.c" #if DIM_OF_WORLD > 2 static int do_more_refine_3d = 0; static int call_refine_interpol_3d = 0; static TRAVERSE_STACK *stack_3d; static RC_LIST_EL *static_ref_list_3d = nil; #include "refine_3d.c" #endif #endif /*--------------------------------------------------------------------------*/ /* refine: */ /* traversal routine for recursive refinement of a triangulation; basic */ /* refinement module; used by all other refinement routines like */ /* global_refine() */ /*--------------------------------------------------------------------------*/ static void transfer_fct(const EL_INFO *elinfo, void *data) { MESH *mesh = elinfo->mesh; EL *s_el = elinfo->el, *m_el; DOF_PTR_VEC *master_binding; const DOF_ADMIN *s_admin; if(s_el->mark > 0) { master_binding = ((MESH_MEM_INFO *)mesh->mem_info)->master_binding; s_admin = master_binding->fe_space->admin; m_el = (EL *)master_binding->vec[s_el->dof[mesh->node[CENTER]] [s_admin->n0_dof[CENTER]]]; m_el->mark = MAX(m_el->mark, 1); } return; } U_CHAR refine(MESH *mesh) { FUNCNAME("refine"); MESH_MEM_INFO *mem_info = ((MESH_MEM_INFO *)mesh->mem_info); U_CHAR mesh_refined; if(mem_info->n_slaves) { /****************************************************************************/ /* We are on a master mesh. */ /****************************************************************************/ #if DIM_OF_WORLD > 1 /****************************************************************************/ /* Check if we have an entire hierarchy of meshes. In this case, we need */ /* to set call_refine_interpol_?d to nonzero to make the triple refinement */ /* work! */ /****************************************************************************/ if(mesh->dim == 2) { int i; call_refine_interpol_1d = 0; for(i = 0; i < mem_info->n_slaves; i++) call_refine_interpol_1d += count_refine_interpol(mem_info->slaves[i]); } #if DIM_OF_WORLD == 3 if(mesh->dim == 3) { int i, j; call_refine_interpol_1d = 0; call_refine_interpol_2d = 0; for(i = 0; i < mem_info->n_slaves; i++) { call_refine_interpol_2d += count_refine_interpol(mem_info->slaves[i]); if(((MESH_MEM_INFO *)(mem_info->slaves[i]->mem_info))->n_slaves) { MESH_MEM_INFO *mem_info_2 = ((MESH_MEM_INFO *)mem_info->slaves[i]->mem_info); for(j = 0; j < mem_info_2->n_slaves; j++) call_refine_interpol_1d += count_refine_interpol(mem_info_2->slaves[j]); } } } #endif #endif } if(mem_info->master) { /****************************************************************************/ /* We are on a slave mesh. */ /****************************************************************************/ int n_slave_elements = mesh->n_elements; /* Transfer the refinement marks to the master mesh. */ do { mesh_traverse(mesh, 0, FILL_NOTHING|CALL_LEAF_EL, transfer_fct, nil); mesh_refined = refine(mem_info->master); } while (mesh_refined); return (mesh->n_elements > n_slave_elements) ? MESH_REFINED : 0; } else { /****************************************************************************/ /* We are on a top level master mesh. */ /****************************************************************************/ /* Advance cookies on this mesh and all its slaves. */ AI_advance_cookies_rec(mesh); } switch(mesh->dim) { case 0: WARNING("No refinement possible for dim==0!\n"); return 0; break; case 1: mesh_refined = refine_1d(mesh); if(mesh_refined && !mesh->parametric) AI_post_refine_1d(mesh); return mesh_refined; break; #if DIM_OF_WORLD > 1 case 2: mesh_refined = refine_2d(mesh); if(mesh_refined && !mesh->parametric) { int i; AI_post_refine_2d(mesh); for(i = 0; i < mem_info->n_slaves; i++) AI_post_refine_1d(mem_info->slaves[i]); } return mesh_refined; break; #if DIM_OF_WORLD > 2 case 3: mesh_refined = refine_3d(mesh); if(mesh_refined && !mesh->parametric) { int i, j; post_refine_3d(mesh); for(i = 0; i < mem_info->n_slaves; i++) { AI_post_refine_2d(mem_info->slaves[i]); if(((MESH_MEM_INFO *)(mem_info->slaves[i]->mem_info))->n_slaves) { MESH_MEM_INFO *mem_info_2 = ((MESH_MEM_INFO *)mem_info->slaves[i]->mem_info); for(j = 0; j < mem_info_2->n_slaves; j++) AI_post_refine_1d(mem_info_2->slaves[j]); } } } return mesh_refined; break; #endif #endif default: ERROR_EXIT("Illegal dim during refining!\n"); } return 0; /* Statement not reached! */ } alberta-2.0.1/alberta/src/Common/sor.c0000644000042300001440000002102110676724253014445 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: sor.c */ /* */ /* description: SOR-method for scalar and decoupled vector valued */ /* problems */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Alberta-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" int sor_s(DOF_MATRIX *a, const DOF_REAL_VEC *f, const DOF_SCHAR_VEC *bound, DOF_REAL_VEC *u, REAL omega, REAL tol, int max_iter, int info) { FUNCNAME("sor_s"); const REAL *fvec; REAL *uvec; const S_CHAR *bvec; REAL max = 0.0, omega1, accu, unew; int j, jcol, iter; MATRIX_ROW *row; fvec = f->vec; uvec = u->vec; bvec = bound ? bound->vec : nil; if (omega <= 0 || omega > 2) { ERROR("omega %le not in (0,2], setting omega = 1.0\n", omega); omega = 1.0; } omega1 = 1.0 - omega; if (info >= 2) MSG("omega = %.3lf, tol = %.3le, max_iter = %d\n", omega, tol, max_iter); for (iter = 0; iter < max_iter; iter++) { max = 0.0; FOR_ALL_DOFS(u->fe_space->admin, if (!bvec || bvec[dof] < DIRICHLET) { accu = 0.0; for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && (jcol != dof)) { accu += row->entry[j] * uvec[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } if ((row = a->matrix_row[dof])) { unew = omega1*uvec[dof] + omega*(fvec[dof]-accu)/row->entry[0]; } else { unew = 0.0; } max = MAX(max, ABS(uvec[dof] - unew)); uvec[dof] = unew; } ); if (info >= 4) MSG("iter %3d: max = %.3le\n",iter,max); if (max < tol) break; } if (info >= 2) { if (iter < max_iter) MSG("convergence after iter %3d: max = %.3le\n", iter, max); else MSG("NO CONVERGENCE after iter %3d: max = %.3le\n", iter, max); } return(iter); } int sor_d(DOF_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *bound, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info) { FUNCNAME("sor_d"); const REAL_D *fvec; REAL_D *uvec; const S_CHAR *bvec; REAL max = 0.0, omega1; REAL_D accu, unew; int n, j, jcol, iter; MATRIX_ROW *row; fvec = (const REAL_D *) f->vec; uvec = u->vec; bvec = bound ? bound->vec : nil; if (omega <= 0 || omega > 2) { ERROR("omega %le not in (0,2], setting omega = 1.0\n", omega); omega = 1.0; } omega1 = 1.0 - omega; if (info >= 2) MSG("omega = %.3lf, tol = %.3le, max_iter = %d\n", omega, tol, max_iter); for (iter = 0; iter < max_iter; iter++) { max = 0.0; FOR_ALL_DOFS(u->fe_space->admin, if (!bvec || bvec[dof] < DIRICHLET) { SET_DOW(0.0, accu); for (row = a->matrix_row[dof]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && (jcol != dof)) { for (n = 0; n < DIM_OF_WORLD; n++) accu[n] += row->entry[j]*uvec[jcol][n]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } if ((row = a->matrix_row[dof])) { for (n = 0; n < DIM_OF_WORLD; n++) unew[n] = (omega1*uvec[dof][n] + omega*(fvec[dof][n]-accu[n])/row->entry[0]); } else { SET_DOW(0.0,unew); } for (n = 0; n < DIM_OF_WORLD; n++) { max = MAX(max, ABS(uvec[dof][n] - unew[n])); uvec[dof][n] = unew[n]; } } ); if (info >= 4) MSG("iter %3d: max = %.3le\n",iter, max); if (max < tol) break; } if (info >= 2) { if (iter < max_iter) MSG("convergence after iter %3d: max = %.3le\n", iter, max); else MSG("NO CONVERGENCE after iter %3d: max = %.3le\n", iter, max); } return(iter); } int sor_dowb(DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *bound, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info) { FUNCNAME("sor_dowb"); const REAL_D *fvec; REAL_D *uvec; const S_CHAR *bvec; REAL max = 0.0, omega1; REAL_D accu, unew; int n, j, jcol, iter = 0; DOWB_MATRIX_ROW *row; fvec = (const REAL_D *) f->vec; uvec = u->vec; bvec = bound ? bound->vec : nil; if (omega <= 0 || omega > 2) { ERROR("omega %le not in (0,2], setting omega = 1.0\n", omega); omega = 1.0; } omega1 = 1.0 - omega; if (info >= 2) MSG("omega = %.3lf, tol = %.3le, max_iter = %d\n", omega, tol, max_iter); #undef MAT_BODY #define MAT_BODY(F, C, P, S) \ for (iter = 0; iter < max_iter; iter++) \ { \ max = 0.0; \ \ FOR_ALL_DOFS(u->fe_space->admin, \ if (!bvec || bvec[dof] < DIRICHLET) \ { \ SET_DOW(0.0, accu); \ for (row = a->matrix_row[dof]; row; row = row->next) \ { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol) && (jcol != dof)) \ { \ F##V_DOW(C P row->entry.S[j], uvec[jcol], accu); \ } \ else \ { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ if ((row = a->matrix_row[dof])) \ { \ AXPBY_DOW(omega, fvec[dof], -omega, accu, unew); \ AXPY_DOW(omega1, uvec[dof], unew); \ F##DIV_DOW(C P row->entry.S[0], unew, unew); \ } \ else \ { \ SET_DOW(0.0,unew); \ } \ for (n = 0; n < DIM_OF_WORLD; n++) \ { \ max = MAX(max, ABS(uvec[dof][n] - unew[n])); \ uvec[dof][n] = unew[n]; \ } \ } \ ); \ \ if (info >= 4) \ MSG("iter %3d: max = %.3le\n",iter, max); \ \ if (max < tol) break; \ } MAT_EMIT_BODY_SWITCH(a->type); if (info >= 2) { if (iter < max_iter) MSG("convergence after iter %3d: max = %.3le\n", iter, max); else MSG("NO CONVERGENCE after iter %3d: max = %.3le\n", iter, max); } return(iter); } alberta-2.0.1/alberta/src/Common/ssor.c0000644000042300001440000002765510676724253014653 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: sor.c */ /* */ /* description: SSOR-method for scalar and decoupled vector valued */ /* problems */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Alberta-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" int ssor_s(DOF_MATRIX *a, const DOF_REAL_VEC *f, const DOF_SCHAR_VEC *bound, DOF_REAL_VEC *u, REAL omega, REAL tol, int max_iter, int info) { FUNCNAME("ssor_s"); const REAL *fvec; REAL *uvec; S_CHAR *bvec; REAL max = 0.0, omega1, accu, unew; int i, j, jcol, iter, dim; MATRIX_ROW *row; fvec = f->vec; uvec = u->vec; bvec = bound ? bound->vec : nil; TEST_EXIT(a->row_fe_space == a->col_fe_space, "Row and column FE_SPACEs don't match!\n"); if (a->row_fe_space->admin->hole_count > 0) dof_compress(a->row_fe_space->mesh); if (omega <= 0 || omega > 2) { ERROR("omega %le not in (0,2], setting omega = 1.0\n", omega); omega = 1.0; } omega1 = 1.0 - omega; if (info >= 2) { MSG("omega = %.3lf, tol = %.3le, max_iter = %d\n", omega, tol, max_iter); } for (iter = 0; iter < max_iter; iter++) { max = 0.0; dim = u->fe_space->admin->size_used; for (i = 0; i < dim; i++) { if (!bvec || bvec[i] < DIRICHLET) { if (a->matrix_row[i]) { accu = 0.0; for (row = a->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && (jcol != i)) { accu += row->entry[j] * uvec[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } if ((row = a->matrix_row[i])) { unew = omega1 * uvec[i] + omega * (fvec[i] - accu) / row->entry[0]; } else { unew = 0.0; } max = MAX(max, ABS(uvec[i] - unew)); uvec[i] = unew; } } } for (i = dim-1; i >= 0; i--) { if (!bvec || bvec[i] < DIRICHLET) { if (a->matrix_row[i]) { accu = 0.0; for (row = a->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && (jcol != i)) { accu += row->entry[j] * uvec[jcol]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } if ((row = a->matrix_row[i])) { unew = omega1 * uvec[i] + omega * (fvec[i] - accu) / row->entry[0]; } else { unew = 0.0; } max = MAX(max, ABS(uvec[i] - unew)); uvec[i] = unew; } } } if (info >= 4) MSG("iter %3d: max = %.3le\n",iter,max); if (max < tol) break; } if (info >= 2) { if (iter < max_iter) MSG("convergence after iter %3d: max = %.3le\n", iter, max); else MSG("NO CONVERGENCE after iter %3d: max = %.3le\n", iter, max); } return(iter); } int ssor_d(DOF_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *bound, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info) { FUNCNAME("ssor_d"); const REAL_D *fvec; REAL_D *uvec; S_CHAR *bvec; REAL max = 0.0, omega1; REAL_D accu, unew; int n, i, j, jcol, iter, dim; MATRIX_ROW *row; fvec = (const REAL_D *) f->vec; uvec = u->vec; bvec = bound ? bound->vec : nil; TEST_EXIT(a->row_fe_space == a->col_fe_space, "Row and column FE_SPACEs don't match!\n"); if (a->row_fe_space->admin->hole_count > 0) dof_compress(a->row_fe_space->mesh); if (omega <= 0 || omega > 2) { WARNING("omega %le not in (0,2], setting omega = 1.0\n", omega); omega = 1.0; } omega1 = 1.0 - omega; if (info >= 2) { MSG("omega = %.3lf, tol = %.3le, max_iter = %d\n", omega, tol, max_iter); } for (iter = 0; iter < max_iter; iter++) { max = 0.0; dim = u->fe_space->admin->size_used; for (i = 0; i < dim; i++) { if (!bvec || bvec[i] < DIRICHLET) { if (a->matrix_row[i]) { SET_DOW(0.0, accu); for (row = a->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && (jcol != i)) { for (n = 0; n < DIM_OF_WORLD; n++) accu[n] += row->entry[j] * uvec[jcol][n]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } if ((row = a->matrix_row[i])) { for (n = 0; n < DIM_OF_WORLD; n++) unew[n] = (omega1*uvec[i][n] + omega*(fvec[i][n] -accu[n])/row->entry[0]); } else { SET_DOW(0.0, unew); } for (n = 0; n < DIM_OF_WORLD; n++) { max = MAX(max, ABS(uvec[i][n] - unew[n])); uvec[i][n] = unew[n]; } } } } for (i = dim-1; i >= 0; i--) { if (!bvec || bvec[i] < DIRICHLET) { if (a->matrix_row[i]) { SET_DOW(0.0, accu); for (row = a->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && (jcol != i)) { for (n = 0; n < DIM_OF_WORLD; n++) accu[n] += row->entry[j]*uvec[jcol][n]; } else { if (jcol == NO_MORE_ENTRIES) break; } } } if ((row = a->matrix_row[i])) { for (n = 0; n < DIM_OF_WORLD; n++) unew[n] = (omega1*uvec[i][n] + omega*(fvec[i][n] - accu[n])/row->entry[0]); } else { SET_DOW(0.0, unew); } for (n = 0; n < DIM_OF_WORLD; n++) { max = MAX(max, ABS(uvec[i][n] - unew[n])); uvec[i][n] = unew[n]; } } } } if (info >= 4) MSG("iter %3d: max = %.3le\n",iter,max); if (max < tol) break; } if (info >= 2) { if (iter < max_iter) MSG("convergence after iter %3d: max = %.3le\n", iter, max); else MSG("NO CONVERGENCE after iter %3d: max = %.3le\n", iter, max); } return(iter); } int ssor_dowb(DOF_DOWB_MATRIX *a, const DOF_REAL_D_VEC *f, const DOF_SCHAR_VEC *bound, DOF_REAL_D_VEC *u, REAL omega, REAL tol, int max_iter, int info) { FUNCNAME("ssor_dowb"); const REAL_D *fvec; REAL_D *uvec; S_CHAR *bvec; REAL max = 0.0, omega1; REAL_D accu, unew; int n, i, j, jcol, iter = 0, dim; DOWB_MATRIX_ROW *row; fvec = (const REAL_D *) f->vec; uvec = u->vec; bvec = bound ? bound->vec : nil; TEST_EXIT(a->row_fe_space == a->col_fe_space, "Row and column FE_SPACEs don't match!\n"); if (a->row_fe_space->admin->hole_count > 0) dof_compress(a->row_fe_space->mesh); if (omega <= 0 || omega > 2) { WARNING("omega %le not in (0,2], setting omega = 1.0\n", omega); omega = 1.0; } omega1 = 1.0 - omega; if (info >= 2) { MSG("omega = %.3lf, tol = %.3le, max_iter = %d\n", omega, tol, max_iter); } #undef MAT_BODY #define MAT_BODY(F, C, P, S) \ for (iter = 0; iter < max_iter; iter++) \ { \ max = 0.0; \ dim = u->fe_space->admin->size_used; \ \ for (i = 0; i < dim; i++) \ { \ if (!bvec || bvec[i] < DIRICHLET) \ { \ if (a->matrix_row[i]) \ { \ SET_DOW(0.0, accu); \ for (row = a->matrix_row[i]; row; row = row->next) \ { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol) && (jcol != i)) \ { \ F##V_DOW(C P row->entry.S[j], uvec[jcol], accu); \ } \ else \ { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ if ((row = a->matrix_row[i])) \ { \ AXPBY_DOW(omega, fvec[i], - omega, accu, unew); \ AXPY_DOW(omega1, uvec[i], unew); \ F##DIV_DOW(C P row->entry.S[0], unew, unew); \ } \ else \ { \ SET_DOW(0.0, unew); \ } \ \ for (n = 0; n < DIM_OF_WORLD; n++) \ { \ max = MAX(max, ABS(uvec[i][n] - unew[n])); \ uvec[i][n] = unew[n]; \ } \ } \ } \ } \ \ for (i = dim-1; i >= 0; i--) \ { \ if (!bvec || bvec[i] < DIRICHLET) \ { \ if (a->matrix_row[i]) \ { \ SET_DOW(0.0, accu); \ for (row = a->matrix_row[i]; row; row = row->next) \ { \ for (j=0; jcol[j]; \ if (ENTRY_USED(jcol) && (jcol != i)) \ { \ F##V_DOW(C P row->entry.S[j], uvec[jcol], accu); \ } \ else \ { \ if (jcol == NO_MORE_ENTRIES) \ break; \ } \ } \ } \ if ((row = a->matrix_row[i])) \ { \ AXPBY_DOW(omega, fvec[i], - omega, accu, unew); \ AXPY_DOW(omega1, uvec[i], unew); \ F##DIV_DOW(C P row->entry.S[0], unew, unew); \ } \ else \ { \ SET_DOW(0.0, unew); \ } \ for (n = 0; n < DIM_OF_WORLD; n++) \ { \ max = MAX(max, ABS(uvec[i][n] - unew[n])); \ uvec[i][n] = unew[n]; \ } \ } \ } \ } \ if (info >= 4) \ MSG("iter %3d: max = %.3le\n",iter,max); \ \ if (max < tol) break; \ } MAT_EMIT_BODY_SWITCH(a->type); if (info >= 2) { if (iter < max_iter) MSG("convergence after iter %3d: max = %.3le\n", iter, max); else MSG("NO CONVERGENCE after iter %3d: max = %.3le\n", iter, max); } return(iter); } alberta-2.0.1/alberta/src/Common/submesh.c0000644000042300001440000012650510676724253015325 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: submesh.c */ /* */ /* */ /* description: Support for master/slave meshes */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by D. Koester (2004) */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" #include "submesh_1d.c" #if DIM_OF_WORLD > 1 #include "submesh_2d.c" #if DIM_OF_WORLD > 2 #include "submesh_3d.c" #endif #endif /****************************************************************************/ /* read_submesh_gen(read_xdr, master, slave_filename, binding_method, */ /* init_boundary): */ /* Read a slave mesh from file "slave_name" and bind it to "master". Assumes*/ /* that master and slave were written at the same time. Available for native*/ /* and XDR formats. Return a pointer to the slave mesh. */ /****************************************************************************/ static MESH *read_submesh_gen(const int read_xdr, MESH *master, const char *slave_filename, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int), void *data) { FUNCNAME("read_submesh_gen"); MESH *slave = nil; MESH_MEM_INFO *s_info, *m_info; MACRO_EL *m_mel, *s_mel; const DOF_ADMIN *admin = NULL; const FE_SPACE *m_space, *s_space; DOF_PTR_VEC *m_dpv, *s_dpv; int n_dof[N_NODE_TYPES] = {}; int i, j, n, m_dim; /****************************************************************************/ /* Do the checks for obvious user errors. */ /****************************************************************************/ TEST_EXIT(master,"No master mesh given!\n"); TEST_EXIT(master->dim > 0,"Master mesh has dim == 0!\n"); m_dim = master->dim; TEST_EXIT(slave_filename,"No filename for the slave mesh given!\n"); TEST_EXIT(binding_method,"No binding method given!\n"); /****************************************************************************/ /* Read the mesh from the file. Do not use the time value pointer. */ /****************************************************************************/ if(read_xdr) slave = read_mesh_xdr(slave_filename, nil, n_proj); else slave = read_mesh(slave_filename, nil, n_proj); /****************************************************************************/ /* Set the mem_info components in master and slave. */ /****************************************************************************/ s_info = (MESH_MEM_INFO *)slave->mem_info; m_info = (MESH_MEM_INFO *)master->mem_info; m_info->slaves = MEM_REALLOC(m_info->slaves, m_info->n_slaves, m_info->n_slaves + 1, MESH *); m_info->slaves[m_info->n_slaves] = slave; m_info->n_slaves++; s_info->master = master; s_info->binding_method = binding_method; /* Check for the correct DOF_ADMINs for slave and master. */ n_dof[CENTER] = 1; for (i = 0; i < slave->n_dof_admin; i++) { admin = slave->dof_admin[i]; for (j = 0; j < N_NODE_TYPES; j++) { if (admin->n_dof[j] != n_dof[j]) goto bad_admin; } if(!admin->preserve_coarse_dofs) goto bad_admin; break; bad_admin: admin = nil; } TEST_EXIT(admin,"Slave mesh does not seem to have had a master!\n"); s_space = get_fe_space(slave, "Center dof fe_space", n_dof, nil, 1); n_dof[CENTER] = 0; switch(m_dim) { case 1: n_dof[VERTEX] = 1; break; case 2: n_dof[EDGE] = 1; break; case 3: n_dof[FACE] = 1; break; } for (i = 0; i < master->n_dof_admin; i++) { admin = master->dof_admin[i]; for (j = 0; j < N_NODE_TYPES; j++) { if (admin->n_dof[j] != n_dof[j]) goto bad_admin2; } if(!admin->preserve_coarse_dofs) goto bad_admin2; break; bad_admin2: admin = nil; } TEST_EXIT(admin,"Given master mesh does not seem to have had slaves!\n"); m_space = get_fe_space(master, "Center dof fe_space", n_dof, nil, 1); /* Allocate element pointer vectors. */ s_dpv = get_dof_ptr_vec("Slave - master pointers", s_space); s_info->master_binding = s_dpv; m_dpv = get_dof_ptr_vec("Master - slave pointers", m_space); s_info->slave_binding = m_dpv; switch(m_dim) { case 1: m_dpv->refine_interpol = master_interpol_1d; m_dpv->coarse_restrict = master_restrict_1d; break; #if DIM_OF_WORLD > 1 case 2: m_dpv->refine_interpol = master_interpol_2d; m_dpv->coarse_restrict = master_restrict_2d; break; #if DIM_OF_WORLD == 3 case 3: m_dpv->refine_interpol = master_interpol_3d; m_dpv->coarse_restrict = master_restrict_3d; #endif #endif } /****************************************************************************/ /* Set the element pointer vec entries to the correct values. */ /* This assumes that slave macro elements were allocated in the order given */ /* by the loop below. */ /****************************************************************************/ FOR_ALL_DOFS(s_dpv->fe_space->admin, s_dpv->vec[dof] = nil); FOR_ALL_DOFS(m_dpv->fe_space->admin, m_dpv->vec[dof] = nil); s_mel = slave->macro_els; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_NEIGH(m_dim); i++) if(binding_method(master, m_mel, i, data)) { TEST_EXIT(s_mel,"Ran out of slave macro elements... Wrong meshes?\n"); /* Here we take care of node projection function transfer. */ if(m_dim > 1) { if(m_mel->projection[i+1]) s_mel->projection[0] = m_mel->projection[i+1]; else s_mel->projection[0] = m_mel->projection[0]; } if(m_dim == 1) join_elements_recursive_1d(master, slave, m_dpv->fe_space->admin, s_dpv->fe_space->admin, m_dpv, s_dpv, i, m_mel->el, s_mel->el); #if DIM_OF_WORLD > 1 else if(m_dim == 2) join_elements_recursive_2d(master, slave, m_dpv->fe_space->admin, s_dpv->fe_space->admin, m_dpv, s_dpv, i, m_mel->el, s_mel->el); #if DIM_OF_WORLD == 3 else if(m_dim == 3) join_elements_recursive_3d(master, slave, m_dpv->fe_space->admin, s_dpv->fe_space->admin, m_dpv, s_dpv, i, m_mel->el, s_mel->el, m_mel->orientation, m_mel->el_type); #endif #endif s_mel++; } } return slave; } /****************************************************************************/ /* set_lambdas(m_lambda, s_lambda): Translate slave barycentric coordinates */ /* to master barycentric coordinates in the canonical fashion. */ /****************************************************************************/ static const EL_INFO *m_el_info; static int m_subsimplex; static void set_lambdas(REAL m_lambda[N_LAMBDA], const REAL s_lambda[N_LAMBDA]) { if(m_el_info->mesh->dim == 1) switch(m_subsimplex) { case 0: m_lambda[0] = 1.0; m_lambda[1] = 0.0; break; case 1: m_lambda[0] = 0.0; m_lambda[1] = 1.0; break; } #if DIM_OF_WORLD > 1 else if(m_el_info->mesh->dim == 2) switch(m_subsimplex) { case 0: m_lambda[1] = s_lambda[0]; m_lambda[2] = s_lambda[1]; break; case 1: m_lambda[0] = s_lambda[1]; m_lambda[2] = s_lambda[0]; break; case 2: m_lambda[0] = s_lambda[0]; m_lambda[1] = s_lambda[1]; break; } #if DIM_OF_WORLD == 3 else { int m_orient = (m_el_info->orientation > 0) ? 0 : 1; int m_type = (int)m_el_info->el_type; switch(m_subsimplex) { case 0: m_lambda[1] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][1]]; m_lambda[2] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][2]]; m_lambda[3] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][3]]; break; case 1: m_lambda[0] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][0]]; m_lambda[2] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][2]]; m_lambda[3] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][3]]; break; case 2: m_lambda[0] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][0]]; m_lambda[1] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][1]]; m_lambda[3] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][3]]; break; case 3: m_lambda[0] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][0]]; m_lambda[1] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][1]]; m_lambda[2] = s_lambda[slave_numbering_3d[m_type][m_orient][m_subsimplex][2]]; break; } } #endif #endif return; } /****************************************************************************/ /* trace_loc[_d](s_el_info, s_lambda): These routines perform the local */ /* trace operation on each element. Since eval_uh() is used it is possible */ /* to have different FE_SPACES on master and slave element while performing */ /* a trace operation. */ /****************************************************************************/ static DOF_REAL_VEC *m_vec; static const REAL *(*get_local_m_vec)(const EL *, const DOF_REAL_VEC *, REAL *); static REAL trace_loc(const EL_INFO *s_el_info, const REAL s_lambda[N_LAMBDA]) { const REAL *m_local_vec = get_local_m_vec(m_el_info->el, m_vec, nil); REAL m_lambda[N_LAMBDA] = {}; set_lambdas(m_lambda, s_lambda); return eval_uh(m_lambda, m_local_vec, m_vec->fe_space->bas_fcts); } static DOF_REAL_D_VEC *m_vec_d; static const REAL_D *(*get_local_m_vec_d)(const EL *, const DOF_REAL_D_VEC *, REAL_D *); static const REAL *trace_loc_d(const EL_INFO *s_el_info, const REAL s_lambda[N_LAMBDA], REAL_D val) { static REAL_D buffer; REAL *res = val ? val : buffer; const REAL_D *m_local_vec_d = get_local_m_vec_d(m_el_info->el, m_vec_d,nil); REAL m_lambda[N_LAMBDA] = {}; set_lambdas(m_lambda, s_lambda); eval_uh_d(m_lambda, m_local_vec_d, m_vec_d->fe_space->bas_fcts, res); return res; } /****************************************************************************/ /* sm_dof_connection_?d[degree-1][type in 3D][orientation in 3D] */ /* [m_subsimplex][s_dof]: */ /* assign a master DOF to each slave DOF at all subsimplices (Lagrange */ /* degree between 1 and 4). NOTE: Type 1 and 2 have equal mapping! */ /****************************************************************************/ #if DIM_OF_WORLD > 1 static const int sm_dof_connection_2d[4][3][5] = {/* p=1 */ {{1,2},{2,0},{0,1}}, /* p=2 */ {{1,2,3},{2,0,4},{0,1,5}}, /* p=3 */ {{1,2,3,4},{2,0,5,6},{0,1,7,8}}, /* p=4 */ {{1,2,3,4,5},{2,0,6,7,8},{0,1,9,10,11}}}; #if DIM_OF_WORLD > 2 static const int sm_dof_connection_3d[4][2][2][4][15] = {/*p=1*/{/*t=0*/{/*o=+*/{{3,1,2}, {2,0,3}, {0,1,3}, {1,0,2}}, /*o=-*/{{1,3,2}, {0,2,3}, {1,0,3}, {0,1,2}}}, /*t=1*/{/*o=+*/{{1,2,3}, {2,0,3}, {0,1,3}, {1,0,2}}, /*o=-*/{{2,1,3}, {0,2,3}, {1,0,3}, {0,1,2}}}}, /*p=2*/{/*t=0*/{/*o=+*/{{3,1,2,7,9,8}, {2,0,3,6,9,5}, {0,1,3,8,6,4}, {1,0,2,5,7,4}}, /*o=-*/{{1,3,2,9,7,8}, {0,2,3,9,6,5}, {1,0,3,6,8,4}, {0,1,2,7,5,4}}}, /*t=1*/{/*o=+*/{{1,2,3,9,8,7}, {2,0,3,6,9,5}, {0,1,3,8,6,4}, {1,0,2,5,7,4}}, /*o=-*/{{2,1,3,8,9,7}, {0,2,3,9,6,5}, {1,0,3,6,8,4}, {0,1,2,7,5,4}}}}, /*p=3*/{/*t=0*/{/*o=+*/{{3,1,2,10,11,14,15,13,12,16}, {2,0,3,8,9,15,14,7,6,17}, {0,1,3,12,13,9,8,4,5,18}, {1,0,2,6,7,11,10,5,4,19}}, /*o=-*/{{1,3,2,15,14,11,10,12,13,16}, {0,2,3,14,15,9,8,6,7,17}, {1,0,3,8,9,13,12,5,4,18}, {0,1,2,10,11,7,6,4,5,19}}}, /*t=1*/{/*o=+*/{{1,2,3,14,15,13,12,10,11,16}, {2,0,3,8,9,15,14,7,6,17}, {0,1,3,12,13,9,8,4,5,18}, {1,0,2,6,7,11,10,5,4,19}}, /*o=-*/{{2,1,3,12,13,15,14,11,10,16}, {0,2,3,14,15,9,8,6,7,17}, {1,0,3,8,9,13,12,5,4,18}, {0,1,2,10,11,7,6,4,5,19}}}}, /*p=4*/{/*t=0*/{/*o=+*/{{3,1,2,13,14,15,19,20,21,18,17,16,24,22,23}, {2,0,3,10,11,12,21,20,19,9,8,7,26,25,27}, {0,1,3,16,17,18,12,11,10,4,5,6,28,29,30}, {1,0,2,7,8,9,15,14,13,6,5,4,32,31,33}}, /*o=-*/{{1,3,2,21,20,19,15,14,13,16,17,18,22,24,23}, {0,2,3,19,20,21,12,11,10,7,8,9,25,26,27}, {1,0,3,10,11,12,18,17,16,6,5,4,29,28,30}, {0,1,2,13,14,15,9,8,7,4,5,6,31,32,33}}}, /*t=1*/{/*o=+*/{{1,2,3,19,20,21,18,17,16,13,14,15,22,23,24}, {2,0,3,10,11,12,21,20,19,9,8,7,26,25,27}, {0,1,3,16,17,18,12,11,10,4,5,6,28,29,30}, {1,0,2,7,8,9,15,14,13,6,5,4,32,31,33}}, /*o=-*/{{2,1,3,16,17,18,21,20,19,15,14,13,23,22,24}, {0,2,3,19,20,21,12,11,10,7,8,9,25,26,27}, {1,0,3,10,11,12,18,17,16,6,5,4,29,28,30}, {0,1,2,13,14,15,9,8,7,4,5,6,31,32,33}}}}}; #endif #endif /****************************************************************************/ /* Interface to the maintainers */ /****************************************************************************/ /****************************************************************************/ /* AI_check_slavery(master): Do a consistency check for all submeshes. */ /****************************************************************************/ void AI_check_slavery(MESH *master) { FUNCNAME("AI_check_slavery"); MESH_MEM_INFO *m_mem_info, *s_mem_info; int i, k, n_slaves, slave_el_count; MESH *slave; DOF_PTR_VEC *m_dpv, *s_dpv; TRAVERSE_STACK *stack; const DOF_ADMIN *m_admin, *s_admin; const EL_INFO *m_el_info, *s_el_info; const EL *m_el, *s_el; if(!master) { MSG("No mesh provided!\n"); return; } TEST_EXIT(m_mem_info = (MESH_MEM_INFO *)(master->mem_info), "No memory management present for \"%s\"!\n", master->name); n_slaves = m_mem_info->n_slaves; if(!n_slaves) { INFO(4,4,"Mesh \"%d\" has no slaves.\n", master->name); return; } stack = get_traverse_stack(); /****************************************************************************/ /* Run over all slave meshes. */ /****************************************************************************/ for(k = 0; k < n_slaves; k++) { slave = m_mem_info->slaves[k]; TEST_EXIT(slave,"Slave mesh no. %d not found!\n", k); INFO(6,6,"Analysing slave \"%s\"...\n", slave->name); TEST_EXIT(slave->dim + 1 == master->dim, "Bad dimension of slave!\n"); TEST_EXIT(s_mem_info = (MESH_MEM_INFO *)(slave->mem_info), "No memory management present for slave!\n"); TEST_EXIT(s_mem_info->master == master, "Wrong mem_info->master pointer on slave!\n"); TEST_EXIT(s_mem_info->binding_method, "No binding method present!\n"); TEST_EXIT(m_dpv = s_mem_info->slave_binding, "No binding vector to slave present!\n"); TEST_EXIT(s_dpv = s_mem_info->master_binding, "No binding vector to master present!\n"); INFO(8,8,"Slave mesh has %d subslaves.\n", s_mem_info->n_slaves); m_admin = m_dpv->fe_space->admin; s_admin = s_dpv->fe_space->admin; INFO(10,10,"Current master leaf elements:\n"); m_el_info = traverse_first(stack, master, -1, CALL_LEAF_EL); while(m_el_info) { INFO(10,10,"%d\n", INDEX(m_el_info->el)); m_el_info = traverse_next(stack, m_el_info); } INFO(10,10,"Current slave leaf elements:\n"); s_el_info = traverse_first(stack, slave, -1, CALL_LEAF_EL); while(s_el_info) { INFO(10,10,"%d\n", INDEX(s_el_info->el)); s_el_info = traverse_next(stack, s_el_info); } /****************************************************************************/ /* Run over the slave mesh and check correspondance to master. */ /****************************************************************************/ slave_el_count = 0; s_el_info = traverse_first(stack, slave, -1, CALL_EVERY_EL_PREORDER); while(s_el_info) { slave_el_count++; s_el = s_el_info->el; INFO(10,10,"Analysing slave el %d...\n", INDEX(s_el)); if(!IS_LEAF_EL(s_el)) INFO(10,10,"(Child elements: %d, %d)\n", INDEX(s_el->child[0]), INDEX(s_el->child[1])); TEST_EXIT(m_el = (EL *) s_dpv->vec[s_el->dof[slave->node[CENTER]] [s_admin->n0_dof[CENTER]]], "Slave element %d does not point to a master element!\n", INDEX(s_el)); INFO(10,10,"slave el %d points to master el %d\n", INDEX(s_el), INDEX(m_el)); for(i = 0; i < N_NEIGH(master->dim); i++) { if(master->dim == 2) { if(s_el == (EL *)m_dpv->vec[m_el->dof[master->node[EDGE]+i] [m_admin->n0_dof[EDGE]]]) break; } else if(s_el == (EL *)m_dpv->vec[m_el->dof[master->node[FACE]+i] [m_admin->n0_dof[FACE]]]) break; } TEST_EXIT(i < N_NEIGH(master->dim), "Master element %d does not point back to slave element %d!\n", INDEX(m_el), INDEX(s_el)); s_el_info = traverse_next(stack, s_el_info); } if(slave_el_count < slave->n_hier_elements) ERROR_EXIT("slave element count == %d < %d == slave->n_elements!\n", slave_el_count, slave->n_elements); if(slave_el_count > slave->n_hier_elements) ERROR_EXIT("slave element count == %d > %d == slave->n_elements!\n", slave_el_count, slave->n_elements); /****************************************************************************/ /* Run over the current master mesh and check correspondance to slave. */ /****************************************************************************/ m_el_info = traverse_first(stack, master, -1, CALL_EVERY_EL_PREORDER); while(m_el_info) { m_el = m_el_info->el; INFO(10,10,"Analysing master el %d...\n", INDEX(m_el)); if(!IS_LEAF_EL(m_el)) INFO(10,10,"(Child elements: %d, %d)\n", INDEX(m_el->child[0]), INDEX(m_el->child[1])); for(i = 0; i < N_NEIGH(master->dim); i++) { if(master->dim == 2) s_el = (EL *)m_dpv->vec[m_el->dof[master->node[EDGE]+i] [m_admin->n0_dof[EDGE]]]; else s_el = (EL *)m_dpv->vec[m_el->dof[master->node[FACE]+i] [m_admin->n0_dof[FACE]]]; if(s_el) { INFO(10,10,"master el %d, subsimplex %d, points to slave el %d\n", INDEX(m_el), i, INDEX(s_el)); if(IS_LEAF_EL(m_el)) TEST_EXIT(m_el == (EL *) s_dpv->vec[s_el->dof[slave->node[CENTER]] [s_admin->n0_dof[CENTER]]], "Slave element %d does not point back to master element %d!\n", INDEX(s_el), INDEX(m_el)); } } m_el_info = traverse_next(stack, m_el_info); } } INFO(4,4,"No errors found.\n"); free_traverse_stack(stack); return; } /****************************************************************************/ /* Interface to the user */ /****************************************************************************/ /****************************************************************************/ /* get_submesh(master, name, init_leaf_data, binding_method): */ /* The main allocation routine for getting slave meshes. */ /****************************************************************************/ extern MESH *get_submesh(MESH *master, const char *name, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), void *data) { FUNCNAME("get_submesh"); MESH *slave = NULL; /****************************************************************************/ /* Do the checks for obvious user errors. */ /****************************************************************************/ TEST_EXIT(master,"No master mesh specified!\n"); TEST_EXIT(master->dim > 0, "Does not make sense for dim 0 master meshes!\n"); TEST_EXIT(binding_method, "Parameter 'binding_method' must be nonzero!\n"); /****************************************************************************/ /* Do the dimension dependent stuff for the slave. */ /****************************************************************************/ if(master->dim == 1) slave = get_submesh_1d(master, name, binding_method, data); #if DIM_OF_WORLD > 1 else if (master->dim == 2) slave = get_submesh_2d(master, name, binding_method, data); #if DIM_OF_WORLD == 3 else slave = get_submesh_3d(master, name, binding_method, data); #endif #endif /****************************************************************************/ /* Turn the submesh into a parametric mesh if necessary. */ /****************************************************************************/ if(master->parametric) master->parametric->inherit_parametric(slave); return slave; } /****************************************************************************/ /* unchain_submesh(slave): This routine destroys the ties between a slave */ /* mesh and its master mesh. It DOES NOT destroy the slave mesh! That has to*/ /* be done by another call to free_mesh(). After this call, refinement and */ /* coarsening of master and slave are independent, and there is no further */ /* tie between the two meshes. */ /****************************************************************************/ extern void unchain_submesh(MESH *slave) { FUNCNAME("unchain_submesh"); MESH *master; const FE_SPACE *fe_space; MESH_MEM_INFO *master_info, *slave_info; int i; /****************************************************************************/ /* Do the checks for obvious user errors. */ /****************************************************************************/ if(!slave) { ERROR("No slave mesh specified!\n"); return; } slave_info = (MESH_MEM_INFO *)slave->mem_info; if(!(master = slave_info->master)) { ERROR("This mesh is not a slave mesh!\n"); return; } /****************************************************************************/ /* Look for the slave and the master mesh->mem_info. */ /****************************************************************************/ master_info = (MESH_MEM_INFO *)master->mem_info; for(i = 0; i < master_info->n_slaves; i++) if(master_info->slaves[i] == slave) break; TEST_EXIT(i < master_info->n_slaves, "Could not find the slave mesh in slave vector!\n"); /****************************************************************************/ /* Resize the slaves vector on the master mesh->mem_info */ /****************************************************************************/ for(; i < master_info->n_slaves - 1; i++) master_info->slaves[i] = master_info->slaves[i+1]; if(master_info->n_slaves > 1) master_info->slaves = MEM_REALLOC(master_info->slaves, master_info->n_slaves, master_info->n_slaves - 1, MESH *); else { MEM_FREE(master_info->slaves, 1, MESH *); master_info->slaves = nil; } master_info->n_slaves--; /****************************************************************************/ /* Free the DOF_PTR_VECs and fe_spaces */ /****************************************************************************/ fe_space = slave_info->master_binding->fe_space; free_dof_ptr_vec(slave_info->master_binding); free_fe_space((FE_SPACE *)fe_space); fe_space = slave_info->slave_binding->fe_space; free_dof_ptr_vec(slave_info->slave_binding); free_fe_space((FE_SPACE *)fe_space); /****************************************************************************/ /* Set the necessary pointers to nil, so that this mesh is now free. */ /****************************************************************************/ slave_info->master = nil; slave_info->master_binding = nil; slave_info->slave_binding = nil; slave_info->binding_method = nil; return; } extern MESH *read_submesh(MESH *master, const char *slave_filename, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int), void *data) { return read_submesh_gen(false, master, slave_filename, binding_method, n_proj, data); } extern MESH *read_submesh_xdr(MESH *master, const char *slave_filename, int (*binding_method)(MESH *master, MACRO_EL *el, int face, void *data), NODE_PROJECTION *(*n_proj)(MESH *, MACRO_EL *, int), void *data) { return read_submesh_gen(true, master, slave_filename, binding_method, n_proj, data); } /****************************************************************************/ /* trace_dof_real_vec[_d](slave_vec, master_vec): */ /* A routine for transporting the values of "master_vec" at DOFs along the */ /* interface to a slave mesh to "slave_vec". This could be described as a */ /* discrete trace operation. */ /****************************************************************************/ void trace_dof_real_vec(DOF_REAL_VEC *slave_vec, DOF_REAL_VEC *master_vec) { FUNCNAME("trace_dof_real_vec"); MESH *slave = nil, *master = nil; TRAVERSE_STACK *m_stack = get_traverse_stack(); EL_INFO s_el_info = {}; DOF_PTR_VEC *s_dpv, *m_dpv; const DOF_ADMIN *s_admin, *s_ptr_admin, *m_ptr_admin; const DOF *(*s_get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const REAL *(*s_interpol)(const EL_INFO *el_info, int n, const int *indices, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA]), REAL *coeff); int s_n_bas_fcts, m_dim; /****************************************************************************/ /* Check for user errors. */ /****************************************************************************/ TEST_EXIT(slave_vec,"No slave DOF_REAL_VEC given!\n"); TEST_EXIT(m_vec = master_vec,"No master DOF_REAL_VEC given!\n"); /****************************************************************************/ /* Set the necessary pointers and allocate two TRAVERSE_STACKS. */ /****************************************************************************/ slave = slave_vec->fe_space->mesh; master = master_vec->fe_space->mesh; TEST_EXIT(((MESH_MEM_INFO *)slave->mem_info)->master == master, "Master and slave vectors do not seem to fit together!\n"); m_dim = master->dim; s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; m_dpv = ((MESH_MEM_INFO *)slave->mem_info)->slave_binding; s_admin = slave_vec->fe_space->admin; s_ptr_admin = s_dpv->fe_space->admin; m_ptr_admin = m_dpv->fe_space->admin; s_n_bas_fcts = slave_vec->fe_space->bas_fcts->n_bas_fcts; TEST_EXIT(s_interpol = slave_vec->fe_space->bas_fcts->interpol, "Interpolation routine not present for slave vector!\n"); TEST_EXIT(s_get_dof_indices = slave_vec->fe_space->bas_fcts->get_dof_indices, "'get_dof_indices' routine not present for slave vector!\n"); TEST_EXIT(get_local_m_vec = master_vec->fe_space->bas_fcts->get_real_vec, "'get_real_vec' routine not present for master vector!\n"); m_el_info = traverse_first(m_stack, master, -1, CALL_LEAF_EL|FILL_ORIENTATION|FILL_EL_TYPE); s_el_info.mesh = slave; { int i; REAL s_local_vec[s_n_bas_fcts]; DOF s_local_dofs[s_n_bas_fcts]; while(m_el_info) { for(m_subsimplex = 0; m_subsimplex < N_NEIGH(m_dim); m_subsimplex++) { /****************************************************************************/ /* Look for a slave element on edge/face m_subsimplex. */ /****************************************************************************/ switch(m_dim) { case 1: if((s_el_info.el = (EL *) m_dpv->vec[m_el_info->el->dof[master->node[VERTEX] + m_subsimplex] [m_ptr_admin->n0_dof[VERTEX]]])) break; case 2: if((s_el_info.el = (EL *) m_dpv->vec[m_el_info->el->dof[master->node[EDGE] + m_subsimplex] [m_ptr_admin->n0_dof[EDGE]]])) goto found_slave_element; break; case 3: if((s_el_info.el = (EL *) m_dpv->vec[m_el_info->el->dof[master->node[FACE] + m_subsimplex] [m_ptr_admin->n0_dof[FACE]]])) goto found_slave_element; break; } continue; found_slave_element: /****************************************************************************/ /* Interpolate the master vector into s_local_vec and copy these values */ /* to the correct position in slave_vec->vec. */ /****************************************************************************/ s_get_dof_indices(s_el_info.el, s_admin, s_local_dofs); s_interpol(&s_el_info, 0, nil, nil, trace_loc, s_local_vec); for(i = 0; i < s_n_bas_fcts; i++) slave_vec->vec[s_local_dofs[i]] = s_local_vec[i]; } /****************************************************************************/ /* Advance the slave stack. */ /****************************************************************************/ m_el_info = traverse_next(m_stack, m_el_info); } } /****************************************************************************/ /* Clean up. */ /****************************************************************************/ free_traverse_stack(m_stack); return; } void trace_dof_real_d_vec(DOF_REAL_D_VEC *slave_vec, DOF_REAL_D_VEC *master_vec) { FUNCNAME("trace_dof_real_d_vec"); MESH *slave = nil, *master = nil; TRAVERSE_STACK *m_stack = get_traverse_stack(); EL_INFO s_el_info = {}; DOF_PTR_VEC *s_dpv, *m_dpv; const DOF_ADMIN *s_admin, *s_ptr_admin, *m_ptr_admin; const DOF *(*s_get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const REAL_D *(*s_interpol_d)(const EL_INFO *el_info, int n, const int *indices, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *el_info, const REAL lambda[N_LAMBDA], REAL_D val), REAL_D *coeff); int s_n_bas_fcts, m_dim; /****************************************************************************/ /* Check for user errors. */ /****************************************************************************/ TEST_EXIT(slave_vec,"No slave DOF_REAL_D_VEC given!\n"); TEST_EXIT(m_vec_d = master_vec,"No master DOF_REAL_D_VEC given!\n"); /****************************************************************************/ /* Set the necessary pointers and allocate two TRAVERSE_STACKS. */ /****************************************************************************/ slave = slave_vec->fe_space->mesh; master = master_vec->fe_space->mesh; TEST_EXIT(((MESH_MEM_INFO *)slave->mem_info)->master == master, "Master and slave vectors do not seem to fit together!\n"); m_dim = master->dim; s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; m_dpv = ((MESH_MEM_INFO *)slave->mem_info)->slave_binding; s_admin = slave_vec->fe_space->admin; s_ptr_admin = s_dpv->fe_space->admin; m_ptr_admin = m_dpv->fe_space->admin; s_n_bas_fcts = slave_vec->fe_space->bas_fcts->n_bas_fcts; TEST_EXIT(s_interpol_d = slave_vec->fe_space->bas_fcts->interpol_d, "Interpolation routine not present for slave vector!\n"); TEST_EXIT(s_get_dof_indices = slave_vec->fe_space->bas_fcts->get_dof_indices, "'get_dof_indices' routine not present for slave vector!\n"); TEST_EXIT(get_local_m_vec_d = master_vec->fe_space->bas_fcts->get_real_d_vec, "'get_real_d_vec' routine not present for master vector!\n"); m_el_info = traverse_first(m_stack, master, -1, CALL_LEAF_EL|FILL_ORIENTATION|FILL_EL_TYPE); s_el_info.mesh = slave; { int i, j; REAL_D s_local_vec_d[s_n_bas_fcts]; DOF s_local_dofs[s_n_bas_fcts]; while(m_el_info) { for(m_subsimplex = 0; m_subsimplex < N_NEIGH(m_dim); m_subsimplex++) { /****************************************************************************/ /* Look for a slave element on edge/face m_subsimplex. */ /****************************************************************************/ switch(m_dim) { case 1: if((s_el_info.el = (EL *) m_dpv->vec[m_el_info->el->dof[master->node[VERTEX] + m_subsimplex] [m_ptr_admin->n0_dof[VERTEX]]])) break; case 2: if((s_el_info.el = (EL *) m_dpv->vec[m_el_info->el->dof[master->node[EDGE] + m_subsimplex] [m_ptr_admin->n0_dof[EDGE]]])) goto found_slave_element; break; case 3: if((s_el_info.el = (EL *) m_dpv->vec[m_el_info->el->dof[master->node[FACE] + m_subsimplex] [m_ptr_admin->n0_dof[FACE]]])) goto found_slave_element; break; } continue; found_slave_element: /****************************************************************************/ /* Interpolate the master vector into s_local_vec and copy these values */ /* to the correct position in slave_vec->vec. */ /****************************************************************************/ s_get_dof_indices(s_el_info.el, s_admin, s_local_dofs); s_interpol_d(&s_el_info, 0, nil, nil, trace_loc_d, s_local_vec_d); for(i = 0; i < s_n_bas_fcts; i++) for(j = 0; j < DIM_OF_WORLD; j++) slave_vec->vec[s_local_dofs[i]][j] = s_local_vec_d[i][j]; } /****************************************************************************/ /* Advance the slave stack. */ /****************************************************************************/ m_el_info = traverse_next(m_stack, m_el_info); } } /****************************************************************************/ /* Clean up. */ /****************************************************************************/ free_traverse_stack(m_stack); return; } /****************************************************************************/ /* get_slave_dof_mapping(m_fe_space, s_map): Fill s_map on the slave mesh */ /* with the corresponding DOFs of m_fe_space. This is only implemented for */ /* Lagrange FE spaces. Master and slave fe_spaces must have the same degree.*/ /* */ /* s_map is not updated during mesh or DOF (dof_compress(master)) changes!! */ /****************************************************************************/ void get_slave_dof_mapping(const FE_SPACE *m_fe_space, DOF_INT_VEC *s_map) { FUNCNAME("get_slave_dof_mapping"); MESH *master; MESH *slave; const FE_SPACE *s_fe_space; const DOF_ADMIN *m_admin, *s_admin; int degree; DOF_PTR_VEC *m_dpv, *s_dpv; TRAVERSE_STACK *m_stack = get_traverse_stack(); const EL_INFO *m_el_info; const DOF *(*m_get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF *(*s_get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); DOF *m_local_dofs, *s_local_dofs; int m_dim, m_n_dofs, s_n_dofs, m_subsimplex; int m_n0, s_n0, m_n, s_n; const EL *s_el, *m_el; FLAGS which_elements; /****************************************************************************/ /* Check for user errors. */ /****************************************************************************/ TEST_EXIT(m_fe_space,"No master FE_SPACE given!\n"); TEST_EXIT(s_map,"No DOF_INT_VEC s_map given!\n"); s_fe_space = s_map->fe_space; TEST_EXIT(s_fe_space,"No slave FE_SPACE found!\n"); m_admin = m_fe_space->admin; s_admin = s_fe_space->admin; master = m_fe_space->mesh; slave = s_fe_space->mesh; m_dim = master->dim; TEST_EXIT(((MESH_MEM_INFO *)slave->mem_info)->master == master, "Master and slave meshes do not seem to belong together!\n"); TEST_EXIT(strstr(m_fe_space->bas_fcts->name, "lagrange") && strstr(s_fe_space->bas_fcts->name, "lagrange"), "Sorry, only implemented for Lagrange Finite Elements!\n"); degree = m_fe_space->bas_fcts->degree; if(m_dim > 1) { TEST_EXIT(degree == s_fe_space->bas_fcts->degree, "Degree of slave elements == %d != %d == degree of master elements!\n", s_fe_space->bas_fcts->degree, degree); } TEST_EXIT(degree > 0, "Degree must be at least 1!\n"); TEST_EXIT(m_admin->preserve_coarse_dofs == s_admin->preserve_coarse_dofs, "preserve_coarse_dofs entries are not equal!\n"); if(s_admin->preserve_coarse_dofs) which_elements = CALL_EVERY_EL_PREORDER; else which_elements = CALL_LEAF_EL; /****************************************************************************/ /* Initialize values. */ /****************************************************************************/ /* Mark everything as unused. */ FOR_ALL_DOFS(s_admin, s_map->vec[dof] = -1); m_dpv = ((MESH_MEM_INFO *)slave->mem_info)->slave_binding; s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; m_get_dof_indices = m_fe_space->bas_fcts->get_dof_indices; s_get_dof_indices = s_fe_space->bas_fcts->get_dof_indices; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; m_n_dofs = m_fe_space->bas_fcts->n_bas_fcts; s_n_dofs = s_fe_space->bas_fcts->n_bas_fcts; m_local_dofs = MEM_ALLOC(m_n_dofs, DOF); s_local_dofs = MEM_ALLOC(s_n_dofs, DOF); switch(m_dim) { case 1: m_n0 = m_dpv->fe_space->admin->n0_dof[VERTEX]; m_n = master->node[VERTEX]; for(m_el_info = traverse_first(m_stack, master, -1, which_elements); m_el_info; m_el_info = traverse_next(m_stack, m_el_info)) { m_el = m_el_info->el; m_get_dof_indices(m_el, m_admin, m_local_dofs); for(m_subsimplex = 0; m_subsimplex < N_NEIGH_1D; m_subsimplex++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n + m_subsimplex][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { s_get_dof_indices(s_el, s_admin, s_local_dofs); s_map->vec[s_local_dofs[0]] = m_local_dofs[m_subsimplex]; } } } break; #if DIM_OF_WORLD > 1 case 2: m_n0 = m_dpv->fe_space->admin->n0_dof[EDGE]; m_n = master->node[EDGE]; for(m_el_info = traverse_first(m_stack, master, -1, which_elements); m_el_info; m_el_info = traverse_next(m_stack, m_el_info)) { m_el = m_el_info->el; m_get_dof_indices(m_el, m_admin, m_local_dofs); for(m_subsimplex = 0; m_subsimplex < N_NEIGH_2D; m_subsimplex++) { int i; s_el = (EL *)m_dpv->vec[m_el->dof[m_n + m_subsimplex][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { s_get_dof_indices(s_el, s_admin, s_local_dofs); for(i = 0; i < s_n_dofs; i++) s_map->vec[s_local_dofs[i]] = m_local_dofs[sm_dof_connection_2d[degree-1][m_subsimplex][i]]; } } } break; #if DIM_OF_WORLD > 2 case 3: m_n0 = m_dpv->fe_space->admin->n0_dof[FACE]; m_n = master->node[FACE]; for(m_el_info = traverse_first(m_stack, master, -1, which_elements|FILL_ORIENTATION|FILL_EL_TYPE); m_el_info; m_el_info = traverse_next(m_stack, m_el_info)) { int type, i; m_el = m_el_info->el; m_get_dof_indices(m_el, m_admin, m_local_dofs); if(m_el_info->el_type == 0) type = 0; else type = 1; for(m_subsimplex = 0; m_subsimplex < N_NEIGH_3D; m_subsimplex++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n + m_subsimplex][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { s_get_dof_indices(s_el, s_admin, s_local_dofs); for(i = 0; i < s_n_dofs; i++) { if(m_el_info->orientation > 0) s_map->vec[s_local_dofs[i]] = m_local_dofs[sm_dof_connection_3d[degree-1][type][0][m_subsimplex][i]]; else s_map->vec[s_local_dofs[i]] = m_local_dofs[sm_dof_connection_3d[degree-1][type][1][m_subsimplex][i]]; } } } } break; #endif #endif default: ERROR_EXIT("Illegal dimension!\n"); } /****************************************************************************/ /* Clean up and return. */ /****************************************************************************/ free_traverse_stack(m_stack); MEM_FREE(m_local_dofs, m_n_dofs, DOF); MEM_FREE(s_local_dofs, s_n_dofs, DOF); return; } /****************************************************************************/ /* get_master(slave): Return the master of slave if present. */ /****************************************************************************/ extern MESH *get_master(MESH *slave) { return ((MESH_MEM_INFO *)slave->mem_info)->master; } /****************************************************************************/ /* get_master_binding(slave): Return the vector giving pointers to master */ /* elements. */ /****************************************************************************/ extern DOF_PTR_VEC *get_master_binding(MESH *slave) { return ((MESH_MEM_INFO *)slave->mem_info)->master_binding; } /****************************************************************************/ /* get_master_binding(slave): Return the vector giving pointers to slave */ /* elements. */ /****************************************************************************/ extern DOF_PTR_VEC *get_slave_binding(MESH *slave) { return ((MESH_MEM_INFO *)slave->mem_info)->slave_binding; } alberta-2.0.1/alberta/src/Common/trav_xy.c0000644000042300001440000002037310676724253015347 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: trav_xy.c */ /* */ /* */ /* description: Find element at position (xy) and local coordinates */ /* return 0 if xy \not\in domain. */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Oliver Kriessl */ /* Institut fuer Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" static const REAL *g_xy0, *g_xy; static REAL *g_sp; static EL_INFO final_el_info[1]; static REAL final_lambda[N_LAMBDA] = {0}; static int find_el_at_pt_recursive(EL_INFO *el_info, REAL lambda[N_LAMBDA], int outside) { FUNCNAME("find_el_at_pt_recursive"); EL *el = el_info->el; EL_INFO c_el_info[1]; REAL c_lambda[N_LAMBDA]; int i, inside, dim = el_info->mesh->dim; if (IS_LEAF_EL(el)) { *final_el_info = *el_info; if (outside < 0) { for (i=0; i<=dim; i++) final_lambda[i] = lambda[i]; return(true); } else { /* outside */ if (g_xy0) { /* find boundary point of [xy0, xy] */ REAL s; world_to_coord(el_info, g_xy0, c_lambda); s = lambda[outside] / (lambda[outside] - c_lambda[outside]); for (i=0; i<=dim; i++) { final_lambda[i] = s * c_lambda[i] + (1.0-s) * lambda[i]; } if (g_sp) *g_sp = s; if(dim == 3) MSG("outside finest level on el %d: s=%.3le\n", INDEX(el), s); return(false); /* ??? */ } else return(false); } } switch(dim) { case 1: if (lambda[0] >= lambda[1]) { fill_elinfo(0, el_info, c_el_info); if (outside >= 0) { outside = world_to_coord_1d(c_el_info, g_xy, c_lambda); if (outside >= 0) ERROR("point outside domain\n"); } else { c_lambda[0] = lambda[0] - lambda[1]; c_lambda[1] = 2.0 * lambda[1]; } } else { fill_elinfo(1, el_info, c_el_info); if (outside >= 0) { outside = world_to_coord_1d(c_el_info, g_xy, c_lambda); if (outside >= 0) ERROR("point outside domain\n"); } else { c_lambda[1] = lambda[1] - lambda[0]; c_lambda[0] = 2.0 * lambda[0]; } } break; #if DIM_OF_WORLD > 1 case 2: if (lambda[0] >= lambda[1]) { fill_elinfo(0, el_info, c_el_info); if (el->new_coord) { outside = world_to_coord_2d(c_el_info, g_xy, c_lambda); if (outside >= 0) { ERROR("outside curved boundary child 0\n"); } } else { c_lambda[0] = lambda[2]; c_lambda[1] = lambda[0] - lambda[1]; c_lambda[2] = 2.0 * lambda[1]; } } else { fill_elinfo(1, el_info, c_el_info); if (el->new_coord) { outside = world_to_coord_2d(c_el_info, g_xy, c_lambda); if (outside >= 0) { ERROR("outside curved boundary child 1\n"); } } else { c_lambda[0] = lambda[1] - lambda[0]; c_lambda[1] = lambda[2]; c_lambda[2] = 2.0 * lambda[0]; } } break; #if DIM_OF_WORLD > 2 case 3: if (el->new_coord) { int ichild, c_outside; if (lambda[0] >= lambda[1]) ichild = 0; else ichild = 1; fill_elinfo(ichild, el_info, c_el_info); c_outside = world_to_coord_3d(c_el_info, g_xy, c_lambda); if (c_outside>=0) { /* test is other child is better... */ REAL c_lambda2[N_LAMBDA]; int c_outside2; EL_INFO c_el_info2[1]; fill_elinfo(1-ichild, el_info, c_el_info2); c_outside2 = world_to_coord_3d(c_el_info2, g_xy, c_lambda2); MSG("new_coord CHILD %d: outside=%d, lambda=(%.2lf %.2lf %.2lf %.2lf)\n", ichild, c_outside, c_lambda[0],c_lambda[1],c_lambda[2],c_lambda[3]); MSG("new_coord CHILD %d: outside=%d, lambda=(%.2lf %.2lf %.2lf %.2lf)\n", 1-ichild, c_outside2, c_lambda2[0],c_lambda2[1],c_lambda2[2],c_lambda2[3]); /* if (c_lambda[0] < c_lambda2[0]) { */ if ((c_outside2 < 0) || (c_lambda2[c_outside2] > c_lambda[c_outside])) { for (i=0; i <= dim; i++) c_lambda[i] = c_lambda2[i]; c_outside = c_outside2; *c_el_info = *c_el_info2; ichild = 1 - ichild; } } outside = c_outside; /* if (outside >= 0) ERROR("outside curved boundary child 0\n"); */ } else { /* no new_coord */ if (lambda[0] >= lambda[1]) { fill_elinfo(0, el_info, c_el_info); MSG("transform lambda child 0\n"); c_lambda[0] = lambda[0] - lambda[1]; c_lambda[1] = lambda[child_vertex_3d[el_info->el_type][0][1]]; c_lambda[2] = lambda[child_vertex_3d[el_info->el_type][0][2]]; c_lambda[3] = 2.0 * lambda[1]; } else { fill_elinfo(1, el_info, c_el_info); MSG("transform lambda child 1\n"); c_lambda[0] = lambda[1] - lambda[0]; c_lambda[1] = lambda[child_vertex_3d[el_info->el_type][1][1]]; c_lambda[2] = lambda[child_vertex_3d[el_info->el_type][1][2]]; c_lambda[3] = 2.0 * lambda[0]; } } #endif #endif } inside = find_el_at_pt_recursive(c_el_info, c_lambda, outside); return(inside); } /*--------------------------------------------------------------------------*/ int find_el_at_pt(MESH *mesh, const REAL_D xy, EL_INFO **el_info_p, FLAGS flag, REAL bary[N_LAMBDA], const MACRO_EL *start_mel, const REAL_D xy0, REAL *sp) { const MACRO_EL *mel; REAL lambda[N_LAMBDA]; EL_INFO mel_info[1]; int i, k, inside, dim = mesh->dim; TEST_EXIT(el_info_p,"need pointer to pointer to an el_info structure\n"); if (start_mel) mel = start_mel; else mel = mesh->macro_els; mel_info->fill_flag = flag|FILL_COORDS; g_xy = xy; g_xy0 = xy0; g_sp = sp; fill_macro_info(mesh, mel, mel_info); while ((k = world_to_coord(mel_info, xy, lambda)) >= 0) { if (mel->neigh[k]) { mel = mel->neigh[k]; fill_macro_info(mesh, mel, mel_info); continue; } break; } /* now, descend in tree to find leaf element at point */ inside = find_el_at_pt_recursive(mel_info, lambda, k); for (i = 0; i <= dim; i++) bary[i] = final_lambda[i]; *el_info_p = final_el_info; /* if ((k>=0) || (!inside)) WAIT; */ return(inside); } alberta-2.0.1/alberta/src/Common/traverse_nr.c0000644000042300001440000005572510676724253016216 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_nr.c */ /* */ /* description: */ /* nonrecursive mesh traversal, ?d common routines */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" /*--------------------------------------------------------------------------*/ /* List of static variables for stack-based traversal */ /*--------------------------------------------------------------------------*/ /* traverse_mesh: save pointer to current mesh */ /* traverse_level: save level from traverse_first() call */ /* traverse_fill_flag: save fill flag for traversal */ /* traverse_mel: current macro element during traversal */ /* stack_size: current stack size */ /* stack_used: current level of hierarchy recursion */ /* elinfo_stack: el_info hierarchy */ /* info_stack: describe path through hierarchy tree */ /* =0: leaf of current hierarchy */ /* =1: next element is child[0] of this one */ /* =2: next element is child[1] of this one */ /* save_elinfo_stack: backup for elinfo_stack during traverse_neighbour */ /* save_info_stack: backup for info_stack during traverse_neighbour */ /*--------------------------------------------------------------------------*/ static TRAVERSE_STACK *free_stack = nil; TRAVERSE_STACK *get_traverse_stack(void) { FUNCNAME("get_traverse_stack"); TRAVERSE_STACK *stack; if (!free_stack) stack = MEM_CALLOC(1, TRAVERSE_STACK); else { stack = free_stack; free_stack = free_stack->next; stack->next = nil; } stack->marker = -1; return(stack); } void free_traverse_stack(TRAVERSE_STACK *stack) { FUNCNAME("free_traverse_stack"); if (!stack) { ERROR("stack==nil ???\n"); return; } stack->next = free_stack; free_stack = stack; return; } /*--------------------------------------------------------------------------*/ static void enlarge_traverse_stack(TRAVERSE_STACK *stack) { FUNCNAME("enlarge_traverse_stack"); int i; int new_stack_size = stack->stack_size + 10; stack->elinfo_stack = MEM_REALLOC(stack->elinfo_stack, stack->stack_size, new_stack_size, EL_INFO); if (stack->stack_size > 0) for (i=stack->stack_size; ielinfo_stack[i].fill_flag = stack->elinfo_stack[0].fill_flag; stack->info_stack = MEM_REALLOC(stack->info_stack, stack->stack_size, new_stack_size, U_CHAR); stack->save_elinfo_stack = MEM_REALLOC(stack->save_elinfo_stack, stack->stack_size, new_stack_size, EL_INFO); stack->save_info_stack = MEM_REALLOC(stack->save_info_stack, stack->stack_size, new_stack_size, U_CHAR); #if 0 MSG("increase stack at %p from %d to %d\n", stack, stack->stack_size, new_stack_size); MSG("elinfo_stack = %p\n",stack->elinfo_stack); MSG("info_stack = %p\n",stack->info_stack); MSG("save_elinfo_stack = %p\n",stack->save_elinfo_stack); MSG("save_info_stack = %p\n",stack->save_info_stack); #endif stack->stack_size = new_stack_size; } #include "traverse_nr_1d.c" #if DIM_OF_WORLD > 1 #include "traverse_nr_2d.c" #if DIM_OF_WORLD > 2 #include "traverse_nr_3d.c" #endif #endif /*--------------------------------------------------------------------------*/ /* */ /* return next element in tree traversal, starting from current one */ /* */ /*--------------------------------------------------------------------------*/ /* First the ancestor, then its children. */ static EL_INFO *traverse_every_el_preorder(TRAVERSE_STACK *stack) { FUNCNAME("traverse_every_el_preorder"); EL *el; int i; if (stack->stack_used == 0) /* first call */ { if (stack->traverse_mesh->n_macro_el == 0) return(nil); stack->traverse_mel = stack->traverse_mesh->macro_els; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mesh->macro_els, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; return(stack->elinfo_stack+stack->stack_used); } el = stack->elinfo_stack[stack->stack_used].el; /* go up in tree until we can go down again */ while((stack->stack_used > 0) && ((stack->info_stack[stack->stack_used] >= 2) || (el->child[0]==nil))) { stack->stack_used--; if (stack->marker >= 0 && stack->marker == stack->stack_used) { stack->info_stack[stack->stack_used] = 0; stack->marker = -1; return NULL; } el = stack->elinfo_stack[stack->stack_used].el; } /* goto next macro element */ if (stack->stack_used < 1) { if (stack->traverse_mel == stack->traverse_mesh->macro_els + stack->traverse_mesh->n_macro_el - 1) return(nil); else stack->traverse_mel += 1; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; return(stack->elinfo_stack+stack->stack_used); } /* go down tree */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = stack->info_stack[stack->stack_used]; stack->info_stack[stack->stack_used]++; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; DEBUG_TEST_EXIT(stack->stack_used < stack->stack_size, "stack_size=%d too small, level=%d\n", stack->stack_size, stack->elinfo_stack[stack->stack_used].level); stack->info_stack[stack->stack_used] = 0; return(stack->elinfo_stack+stack->stack_used); } static EL_INFO *traverse_every_el_inorder(TRAVERSE_STACK *stack) { FUNCNAME("traverse_every_el_inorder"); EL *el; int i; ERROR_EXIT("not yet implemented\n"); if (stack->stack_used == 0) /* first call */ { if (stack->traverse_mesh->n_macro_el == 0) return(nil); stack->traverse_mel = stack->traverse_mesh->macro_els; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mesh->macro_els, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; return(stack->elinfo_stack+stack->stack_used); } el = stack->elinfo_stack[stack->stack_used].el; /* go up in tree until we can go down again */ /* inorder !!! */ while((stack->stack_used > 0) && ((stack->info_stack[stack->stack_used] >= 2) || (el->child[0]==nil))) { stack->stack_used--; el = stack->elinfo_stack[stack->stack_used].el; } /* goto next macro element */ if (stack->stack_used < 1) { if (stack->traverse_mel == stack->traverse_mesh->macro_els + stack->traverse_mesh->n_macro_el - 1) return(nil); else stack->traverse_mel += 1; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; return(stack->elinfo_stack+stack->stack_used); } /* go down tree */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = stack->info_stack[stack->stack_used]; stack->info_stack[stack->stack_used]++; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; DEBUG_TEST_EXIT(stack->stack_used < stack->stack_size, "stack_size=%d too small, level=%d\n", stack->stack_size, stack->elinfo_stack[stack->stack_used].level); stack->info_stack[stack->stack_used] = 0; return(stack->elinfo_stack+stack->stack_used); } /* First the children, then their ancestor */ static EL_INFO *traverse_every_el_postorder(TRAVERSE_STACK *stack) { FUNCNAME("traverse_every_el_postorder"); EL *el; int i; INFO(0,2,"\n"); if (stack->stack_used == 0) /* first call */ { if (stack->traverse_mesh->n_macro_el == 0) return(nil); stack->traverse_mel = stack->traverse_mesh->macro_els; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mesh->macro_els, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; /* return(stack->elinfo_stack+stack->stack_used); ? */ } el = stack->elinfo_stack[stack->stack_used].el; /* go up in tree until we can go down again */ /* postorder!!! */ while((stack->stack_used > 0) && ((stack->info_stack[stack->stack_used] >= 3) || (el->child[0]==nil))) { stack->stack_used--; if (stack->marker >= 0&& stack->stack_used == stack->marker) { stack->info_stack[stack->stack_used] = 0; stack->marker = -1; return NULL; } el = stack->elinfo_stack[stack->stack_used].el; } /* goto next macro element */ if (stack->stack_used < 1) { if (stack->traverse_mel == stack->traverse_mesh->macro_els + stack->traverse_mesh->n_macro_el - 1) return(nil); else stack->traverse_mel += 1; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; /* return(stack->elinfo_stack+stack->stack_used); */ } /* go down tree */ while((stack->elinfo_stack+stack->stack_used)->el->child[0] && (stack->info_stack[stack->stack_used] < 2)) { if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = stack->info_stack[stack->stack_used]; stack->info_stack[stack->stack_used]++; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; stack->info_stack[stack->stack_used] = 0; } stack->info_stack[stack->stack_used]++; /* postorder!!! */ return(stack->elinfo_stack+stack->stack_used); } static EL_INFO *traverse_leaf_el(TRAVERSE_STACK *stack) { FUNCNAME("traverse_leaf_el"); EL *el; int i; if (stack->stack_used == 0) /* first call */ { if (stack->traverse_mesh->n_macro_el == 0) return(nil); stack->traverse_mel = stack->traverse_mesh->macro_els; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mesh->macro_els, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; el = stack->elinfo_stack[stack->stack_used].el; if ((el == nil) || (el->child[0] == nil)) { return(stack->elinfo_stack+stack->stack_used); } } else { el = stack->elinfo_stack[stack->stack_used].el; /* go up in tree until we can go down again */ while((stack->stack_used > 0) && ((stack->info_stack[stack->stack_used] >= 2) || (el->child[0]==nil))) { stack->stack_used--; if (stack->marker >= 0 && stack->stack_used == stack->marker) { stack->info_stack[stack->stack_used] = 0; stack->marker = -1; return NULL; } el = stack->elinfo_stack[stack->stack_used].el; } /* goto next macro element */ if (stack->stack_used < 1) { if (stack->traverse_mel == stack->traverse_mesh->macro_els + stack->traverse_mesh->n_macro_el - 1) return(nil); else stack->traverse_mel += 1; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; el = stack->elinfo_stack[stack->stack_used].el; if ((el == nil) || (el->child[0] == nil)) { return(stack->elinfo_stack+stack->stack_used); } } } /* go down tree until leaf */ while (el->child[0]) { if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = stack->info_stack[stack->stack_used]; el = el->child[i]; stack->info_stack[stack->stack_used]++; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; DEBUG_TEST_EXIT(stack->stack_used < stack->stack_size, "stack_size=%d too small, level=(%d,%d)\n", stack->stack_size, stack->elinfo_stack[stack->stack_used].level); stack->info_stack[stack->stack_used] = 0; } return(stack->elinfo_stack+stack->stack_used); } static EL_INFO *traverse_leaf_el_level(TRAVERSE_STACK *stack) { FUNCNAME("traverse_leaf_el_level"); ERROR_EXIT("not yet"); return(nil); } static EL_INFO *traverse_el_level(TRAVERSE_STACK *stack) { FUNCNAME("traverse_el_level"); ERROR_EXIT("not yet"); return(nil); } static EL_INFO *traverse_mg_level(TRAVERSE_STACK *stack) { FUNCNAME("traverse_mg_level"); ERROR_EXIT("not yet"); return(nil); } /*--------------------------------------------------------------------------*/ const EL_INFO *traverse_neighbour(TRAVERSE_STACK *stack, const EL_INFO *elinfo_old, int neighbour) { FUNCNAME("traverse_neighbour"); TEST_EXIT(stack,"No stack specified!\n"); TEST_EXIT(stack->traverse_mesh,"No traverse_mesh specified in stack!\n"); switch(stack->traverse_mesh->dim) { case 0: case 1: return traverse_neighbour_1d(stack, elinfo_old, neighbour); break; #if DIM_OF_WORLD > 1 case 2: return traverse_neighbour_2d(stack, elinfo_old, neighbour); break; #if DIM_OF_WORLD > 2 case 3: return traverse_neighbour_3d(stack, elinfo_old, neighbour); break; #endif #endif default: ERROR_EXIT("Illegal dim == %d!\n", stack->traverse_mesh->dim); } return nil; /* Statement not reached. */ } /*--------------------------------------------------------------------------*/ /* Lookup the ancestor of CHILD in the traverse-stack STACK. Return * the ancestor's EL_INFO structure or NULL if no ancestor could be * found in the traverse stack STACK. * * NOTE: the EL_INFO structure returned by this function might be * overwritten by subsequent calls to traverse_next() and so on. * * NOTE ALSO: this function does _NOT_ modify STACK, it simply looks * up the ancestor of CHILD. */ const EL_INFO *traverse_parent(const TRAVERSE_STACK *stack, const EL_INFO *child) { const EL *ancestor; int stack_pos; FUNCNAME("traverse_parent"); TEST_EXIT(stack,"No stack specified!\n"); TEST_EXIT(stack->traverse_mesh,"No traverse_mesh specified in stack!\n"); /* The parent should live somewhere on the stack, so simply * pop-off elements from the stack until we reach the parent. */ ancestor = child->parent; for (stack_pos = stack->stack_used; stack_pos; stack_pos--) { if (stack->elinfo_stack[stack_pos].el == ancestor) break; } TEST_EXIT (!ancestor || stack->stack_used > 0, "Parent not found in tree.\n"); if (!stack_pos) return NULL; /* elinfo_old must be a macro element */ return &stack->elinfo_stack[stack_pos]; } /*--------------------------------------------------------------------------*/ /* Generate a traverse stack suitable for sub-tree traversal. The * next element must be fetched via traverse_next(). DO NOT TRY TO USE * traverse_neighbour() with this stack! */ const EL_INFO *subtree_traverse_first(TRAVERSE_STACK *stack, const EL_INFO *local_root, int level, FLAGS fill_flag) { FUNCNAME("subtree_traverse_first"); int i; if (!stack) { ERROR("no traverse stack\n"); return NULL; } stack->traverse_mesh = local_root->mesh; stack->traverse_level = level; stack->traverse_fill_flag = fill_flag; if (stack->stack_size < 1) { enlarge_traverse_stack(stack); } for (i=0; i < stack->stack_size; i++) { stack->elinfo_stack[i].fill_flag = fill_flag & FILL_ANY(local_root->mesh); } if (fill_flag & CALL_LEAF_EL_LEVEL) { TEST_EXIT(level >= 0,"invalid level: %d\n",level); } stack->stack_used = 1; stack->elinfo_stack[0].mesh = local_root->mesh; stack->elinfo_stack[stack->stack_used] = *local_root; stack->info_stack[stack->stack_used] = 0; stack->traverse_mel = local_root->macro_el; stack->el_count = 1; stack->marker = 0; /* prevent traverse_next() from leaving the * sub-tree */ /* hopefully, this will work. */ return traverse_next(stack, &stack->elinfo_stack[stack->stack_used]); } /*--------------------------------------------------------------------------*/ #define CALL_EVERY_EL \ (CALL_EVERY_EL_PREORDER | CALL_EVERY_EL_INORDER | CALL_EVERY_EL_POSTORDER) const EL_INFO *traverse_next(TRAVERSE_STACK *stack, const EL_INFO *elinfo_old) { FUNCNAME("traverse_next"); EL_INFO *elinfo=nil; if (stack->stack_used) { TEST_EXIT(elinfo_old == stack->elinfo_stack+stack->stack_used, "invalid old elinfo\n"); } else { TEST_EXIT(elinfo_old == nil,"invalid old elinfo != nil\n"); } if (stack->traverse_fill_flag & CALL_LEAF_EL) elinfo = traverse_leaf_el(stack); else if (stack->traverse_fill_flag & CALL_LEAF_EL_LEVEL) elinfo = traverse_leaf_el_level(stack); else if (stack->traverse_fill_flag & CALL_EL_LEVEL) elinfo = traverse_el_level(stack); else if (stack->traverse_fill_flag & CALL_MG_LEVEL) elinfo = traverse_mg_level(stack); else if (stack->traverse_fill_flag & CALL_EVERY_EL_PREORDER) elinfo = traverse_every_el_preorder(stack); else if (stack->traverse_fill_flag & CALL_EVERY_EL_INORDER) elinfo = traverse_every_el_inorder(stack); else if (stack->traverse_fill_flag & CALL_EVERY_EL_POSTORDER) elinfo = traverse_every_el_postorder(stack); else ERROR_EXIT("invalid traverse_flag: %8x\n", stack->traverse_fill_flag); if (elinfo) { stack->el_count++; AI_run_traverse_hooks(elinfo->mesh, elinfo); } else { /* MSG("total element count:%d\n",stack->el_count); */ } return(elinfo); } #undef CALL_EVERY_EL /*--------------------------------------------------------------------------*/ /* traverse_first: */ /* --------------- */ /* initiate traversal and return first el_info */ /*--------------------------------------------------------------------------*/ const EL_INFO *traverse_first(TRAVERSE_STACK *stack, MESH *mesh, int level, FLAGS fill_flag) { FUNCNAME("traverse_first"); int i; if (!stack) { ERROR("no traverse stack\n"); return(nil); } if(mesh->parametric && !mesh->parametric->use_reference_mesh) fill_flag &= ~FILL_COORDS; stack->traverse_mesh = mesh; stack->traverse_level = level; stack->traverse_fill_flag = fill_flag; if (stack->stack_size < 1) enlarge_traverse_stack(stack); for (i=0; istack_size; i++) stack->elinfo_stack[i].fill_flag = fill_flag & FILL_ANY(mesh); stack->elinfo_stack[0].mesh = stack->elinfo_stack[1].mesh = mesh; if (fill_flag & CALL_LEAF_EL_LEVEL) { TEST_EXIT(level >= 0,"invalid level: %d\n",level); } stack->traverse_mel = nil; stack->stack_used = 0; stack->el_count = 0; return(traverse_next(stack, nil)); } /*--------------------------------------------------------------------------*/ /* test_traverse_nr_fct: */ /* ------------------ */ /* display information about an element from EL and EL_INFO structures */ /*--------------------------------------------------------------------------*/ static void test_traverse_nr_fct(const EL_INFO *elinfo) { FUNCNAME("test_traverse_nr_fct"); EL *el = elinfo->el; MSG("\n"); MSG("traversing element %d: at %p -----------------------\n", INDEX(el), el); print_msg("level: %3d\n",elinfo->level); } /*--------------------------------------------------------------------------*/ /* AI_test_traverse_nr: */ /* ----------------- */ /* display information about all elements from EL and EL_INFO structures */ /* by calling traverse with test_traverse_fct(). */ /*--------------------------------------------------------------------------*/ void AI_test_traverse_nr(MESH *mesh, int level, FLAGS fill_flag) { FUNCNAME("AI_test_traverse_nr"); const EL_INFO *elinfo; TRAVERSE_STACK *stack; MSG("with level : %3d\n", level); MSG("with fill_flag:"); if (fill_flag & FILL_ANY(mesh)) { if (fill_flag & FILL_COORDS) print_msg(" FILL_COORDS"); if (fill_flag & FILL_NEIGH) print_msg(" FILL_NEIGH"); if (fill_flag & FILL_BOUND) print_msg(" FILL_BOUND"); if (fill_flag & FILL_PROJECTION) print_msg(" FILL_PROJECTION"); if (fill_flag & FILL_OPP_COORDS) print_msg(" FILL_OPP_COORDS"); } else print_msg(" none"); print_msg("\n"); stack = get_traverse_stack(); elinfo = traverse_first(stack, mesh, level, fill_flag); while (elinfo) { test_traverse_nr_fct(elinfo); elinfo = traverse_next(stack, elinfo); } free_traverse_stack(stack); MSG("done.\n"); } alberta-2.0.1/alberta/src/Common/traverse_r.c0000644000042300001440000003650010676724253016026 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_r.c */ /* */ /* */ /* description: */ /* recursive mesh traversal routines - common ?d part */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* vertex_of_edge_?d[edge][i], i = 1,2 are the two vertices of edge */ /*--------------------------------------------------------------------------*/ int vertex_of_edge_2d[3][2] = {{1,2}, {2,0}, {0,1}}; int vertex_of_edge_3d[6][2]={{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}; /*--------------------------------------------------------------------------*/ /* child_vertex_3d[el_type][child][i] = */ /* father's local vertex index of new vertex i */ /* 4 stands for the newly generated vertex */ /*--------------------------------------------------------------------------*/ int child_vertex_3d[3][2][4] = {{{0,2,3,4},{1,3,2,4}}, {{0,2,3,4},{1,2,3,4}}, {{0,2,3,4},{1,2,3,4}}}; /*--------------------------------------------------------------------------*/ /* child_edge_3d[el_type][child][i] = */ /* father's local edge index of new edge i */ /* new edge 2 is half of old edge 0, */ /* new edges 4,5 are really new edges, and value is different: */ /* child_edge_3d[][][4,5] = index of same edge in other child */ /*--------------------------------------------------------------------------*/ int child_edge_3d[3][2][6] = {{{1,2,0,5,5,4},{4,3,0,5,5,4}}, {{1,2,0,5,4,5},{3,4,0,5,4,5}}, {{1,2,0,5,4,5},{3,4,0,5,4,5}}}; /*--------------------------------------------------------------------------*/ /* child_orientation[el_type][child] = */ /* +1 if orientation is not changed during refinement */ /* -1 if orientation is changed during refinement */ /*--------------------------------------------------------------------------*/ S_CHAR child_orientation_3d[3][2] = {{1,1}, {1,-1}, {1,-1}}; /* traverse hierarchical mesh, call el_fct() for each/some element */ typedef struct traverse_info TRAVERSE_INFO; struct traverse_info { MESH *mesh; FLAGS flag; int level; void (*el_fct)(const EL_INFO *, void *); void *data; }; void AI_run_traverse_hooks(MESH *mesh, const EL_INFO *el_info) { FLAGS acthooks = mesh->active_hooks; HOOK_QUEUE_ENUM queue; LIST_NODE *pos; queue = 0; while (acthooks) { if (acthooks & 1) { for (pos = mesh->traverse_hooks[queue].next; pos != &mesh->traverse_hooks[queue]; pos = pos->next) { TRAVERSE_HOOK *hook = LIST_ENTRY(pos, TRAVERSE_HOOK, node); hook->function(el_info, hook->data); } } acthooks >>= 1; queue ++; } } static void run_traverse_function(struct traverse_info *trinfo, const EL_INFO *el_info) { AI_run_traverse_hooks(trinfo->mesh, el_info); trinfo->el_fct(el_info, trinfo->data); } #include "traverse_r_1d.c" #if DIM_OF_WORLD > 1 #include "traverse_r_2d.c" #if DIM_OF_WORLD > 2 #include "traverse_r_3d.c" #endif #endif /*--------------------------------------------------------------------------*/ /* common traversal routines for all dimensions */ /*--------------------------------------------------------------------------*/ void fill_macro_info(MESH *mesh, const MACRO_EL *mel, EL_INFO *elinfo) { FUNCNAME("fill_macro_info"); TEST_EXIT(mesh,"No mesh specified!\n"); switch(mesh->dim) { case 0: elinfo->mesh = mesh; elinfo->macro_el = mel; elinfo->el = mel->el; elinfo->parent = nil; elinfo->level = 0; if (elinfo->fill_flag & FILL_COORDS) { int j; if (mel->coord[0]) for (j = 0; j < DIM_OF_WORLD; j++) elinfo->coord[0][j] = mel->coord[0][j]; else ERROR_EXIT("no mel->coord[0]\n"); } break; case 1: fill_macro_info_1d(mesh, mel, elinfo); break; #if DIM_OF_WORLD > 1 case 2: fill_macro_info_2d(mesh, mel, elinfo); break; #if DIM_OF_WORLD > 2 case 3: fill_macro_info_3d(mesh, mel, elinfo); break; #endif #endif default: ERROR_EXIT("Illegal dim == %d!\n", mesh->dim); } } void fill_elinfo(int ichild, const EL_INFO *parent_info, EL_INFO *elinfo) { FUNCNAME("fill_elinfo"); int dim = parent_info->mesh->dim; switch(dim) { case 1: fill_elinfo_1d(ichild, parent_info, elinfo); break; #if DIM_OF_WORLD > 1 case 2: fill_elinfo_2d(ichild, parent_info, elinfo); break; #if DIM_OF_WORLD > 2 case 3: fill_elinfo_3d(ichild, parent_info, elinfo); break; #endif #endif default: ERROR_EXIT("Illegal dim == %d!\n", dim); } } /*--------------------------------------------------------------------------*/ /* recursive_traverse: */ /* ------------------- */ /* recursively traverse the mesh hierarchy tree */ /* call the routine traverse_info->el_fct(el_info) with */ /* - all tree leaves */ /* - all tree leaves at a special level */ /* - all tree elements in pre-/in-/post-order */ /* depending on the traverse_info->level variable */ /*--------------------------------------------------------------------------*/ static void recursive_traverse(EL_INFO *elinfo, TRAVERSE_INFO *trinfo) { EL *el = elinfo->el; EL_INFO elinfo_new = {0}; int mg_level; if (trinfo->flag & CALL_LEAF_EL) { if (el->child[0]) { fill_elinfo(0, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); fill_elinfo(1, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); } else { run_traverse_function (trinfo, elinfo); } return; } if (trinfo->flag & CALL_LEAF_EL_LEVEL) { if (el->child[0]) { if ((elinfo->level >= trinfo->level)) return; fill_elinfo(0, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); fill_elinfo(1, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); } else { if (elinfo->level == trinfo->level) { run_traverse_function (trinfo, elinfo); } } return; } if (trinfo->flag & CALL_EL_LEVEL) { if (elinfo->level == trinfo->level) { run_traverse_function (trinfo, elinfo); } else { if (elinfo->level > trinfo->level) { return; } else { if (el->child[0]) { fill_elinfo(0, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); fill_elinfo(1, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); } } } return; } if (trinfo->flag & CALL_MG_LEVEL) { int dim = trinfo->mesh->dim; mg_level = (elinfo->level + dim - 1) / dim; if (mg_level > trinfo->level) return; if (!(el->child[0])) { run_traverse_function (trinfo, elinfo); return; } if ((mg_level == trinfo->level) && ((elinfo->level % dim) == 0)) { run_traverse_function (trinfo, elinfo); return; } fill_elinfo(0, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); fill_elinfo(1, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); return; } if (trinfo->flag & CALL_EVERY_EL_PREORDER) run_traverse_function (trinfo, elinfo); if (el->child[0]) { fill_elinfo(0, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); if (trinfo->flag & CALL_EVERY_EL_INORDER) run_traverse_function (trinfo, elinfo); fill_elinfo(1, elinfo, &elinfo_new); recursive_traverse(&elinfo_new, trinfo); } else { if (trinfo->flag & CALL_EVERY_EL_INORDER) run_traverse_function (trinfo, elinfo); } if (trinfo->flag & CALL_EVERY_EL_POSTORDER) run_traverse_function (trinfo, elinfo); return; } /*--------------------------------------------------------------------------*/ /* mesh_traverse: */ /* -------------- */ /* run through all macro elements and start mesh traversal */ /* call recursive_traverse() for each macro element's element */ /*--------------------------------------------------------------------------*/ void mesh_traverse(MESH *mesh, int level, FLAGS flag, void (*el_fct)(const EL_INFO *, void *data), void *data) { FUNCNAME("mesh_traverse"); int n; EL_INFO elinfo = {0}; TRAVERSE_INFO traverse_info = {0}; if (mesh==nil) return; elinfo.fill_flag = (flag & FILL_ANY(mesh)); traverse_info.mesh = mesh; traverse_info.level = level; traverse_info.el_fct = el_fct; traverse_info.flag = flag; traverse_info.data = data; elinfo.mesh = mesh; if (flag & (CALL_LEAF_EL_LEVEL | CALL_EL_LEVEL | CALL_MG_LEVEL)) TEST_EXIT(level >= 0, "invalid level: %d\n",level); if(mesh->parametric && !mesh->parametric->use_reference_mesh) flag &= ~FILL_COORDS; for(n = 0; n < mesh->n_macro_el; n++) { fill_macro_info(mesh, mesh->macro_els + n, &elinfo); if(mesh->dim > 0) recursive_traverse(&elinfo, &traverse_info); else run_traverse_function (&traverse_info, &elinfo); } } /*--------------------------------------------------------------------------*/ /* test_traverse_fct: */ /* ------------------ */ /* display information about an element from EL and EL_INFO structures */ /*--------------------------------------------------------------------------*/ static void test_traverse_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("test_traverse_fct"); EL *el = elinfo->el; int i,j, dim = elinfo->mesh->dim; MSG("\n"); MSG("traversing element %d at %p ---------------------------\n", INDEX(el), el); print_msg("level: %3d\n",elinfo->level); print_msg("macro_el: %p\n", elinfo->macro_el); if (el->child[0]) { print_msg("children: "); for (i=0;i<2;i++) if (el->child[i]) print_msg(" %3d at %p",INDEX(el->child[i]), el->child[i]); else print_msg(" ---"); print_msg("\n"); } if (elinfo->fill_flag & FILL_COORDS) { print_msg("coords: "); for (i=0; icoord[i][j], j < (DIM_OF_WORLD-1) ? ", " : ")\n"); if (i < (N_VERTICES(dim)-1)) print_msg(" "); } } if (elinfo->fill_flag & FILL_NEIGH) { #if ALBERTA_DEBUG print_msg("neigh index :"); for (i=0; ineigh[i]) print_msg(" %3d",INDEX(elinfo->neigh[i])); else print_msg(" ---"); print_msg("\n"); #endif print_msg("opp_vertex: "); for (i=0; ineigh[i]) print_msg(" %3d", elinfo->opp_vertex[i]); else print_msg(" ---"); print_msg("\n"); print_msg("neigh: "); for (i=0; ineigh[i]); print_msg("\n"); } if (elinfo->fill_flag & FILL_OPP_COORDS) { print_msg("opp_coords: "); for (i=0; ineigh[i]) { print_msg("%1d (ov=%1d): (", i, elinfo->opp_vertex[i]); for (j=0; jopp_coord[i][j], j < (DIM_OF_WORLD-1) ? ", " : ")\n"); } else { print_msg("%1d : ---\n",i); } if (i < (N_VERTICES(dim)-1)) print_msg(" "); } } if(elinfo->fill_flag & FILL_PROJECTION) { print_msg("projections:\n"); for(i = 0; i < N_NEIGH(dim) + 1; i++) print_msg(" no. %d: %p\n", i, elinfo->projections[i]); print_msg(" active projection: %p\n", elinfo->active_projection); } return; } /*--------------------------------------------------------------------------*/ /* test_traverse: */ /* -------------- */ /* display information about all elements from EL and EL_INFO structures */ /* by calling traverse with test_traverse_fct(). */ /*--------------------------------------------------------------------------*/ void test_traverse(MESH *mesh, int level, FLAGS fill_flag) { FUNCNAME("test_traverse"); if(!mesh) { ERROR("No mesh specified.\n"); return; } MSG("with level : %3d\n", level); MSG("with fill_flag:"); if (fill_flag & FILL_ANY(mesh)) { if (fill_flag & FILL_COORDS) print_msg(" FILL_COORDS"); if (fill_flag & FILL_BOUND) print_msg(" FILL_BOUND"); if (fill_flag & FILL_PROJECTION) print_msg(" FILL_PROJECTION"); if (fill_flag & FILL_NEIGH) print_msg(" FILL_NEIGH"); if (fill_flag & FILL_OPP_COORDS) print_msg(" FILL_OPP_COORDS"); } else print_msg(" none"); print_msg("\n"); mesh_traverse(mesh, level, fill_flag, test_traverse_fct, nil); MSG("done.\n"); } alberta-2.0.1/alberta/src/Common/wall_quad_fast.c0000644000042300001440000001755310676724253016647 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: wall_quad_fast.c */ /* */ /* description: Fast (i.e. caching) quadrature over walls */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Claus-Justus Heine */ /* Abteilung fuer Angewandte Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg im Breisgau, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003), */ /* C.-J. Heine (1998-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" static int fac(int dim) { int res = 1; while (dim) res *= dim--; return res; } const WALL_QUAD_FAST *get_wall_quad_fast(const BAS_FCTS *bas_fcts, const QUAD *quad, U_CHAR init_flag) { FUNCNAME("get_wall_quad_fast"); static WALL_QUAD_FAST *first = nil; WALL_QUAD_FAST *quad_fast; int qp, wall, no; const int *perm; int d, i, j, k, l, m, n_points, n_bas_fcts, dim, card_sn; REAL **g_phi; REAL (**g_grd_phi)[N_LAMBDA]; REAL (**g_D2_phi)[N_LAMBDA][N_LAMBDA]; REAL *lambda; void *mem = nil; /* ALBERTA_LOCAL_RWLOCK_DEF(fqfast_lock); */ if (quad->dim + 1 != (dim = bas_fcts->dim)) { ERROR("quad->dim+1 == %d is not %d == bas_fcts->dim!\n", quad->dim+1,dim); return(nil); } if(dim == 1) { ERROR("Not implemented for 1D!\n"); return(nil); } card_sn = fac(dim); /* ALBERTA_RDLOCK(&fqfast_lock); */ for (quad_fast = first; quad_fast; quad_fast = quad_fast->next) { if (quad_fast->quad == quad && quad_fast->bas_fcts == bas_fcts) { break; } } if (quad_fast && ((quad_fast->init_flag & init_flag) == init_flag)) { /* ALBERTA_RWUNLOCK(&fqfast_lock); */ return((const WALL_QUAD_FAST *) quad_fast); } /* ALBERTA_RWUNLOCK(&fqfast_lock); */ /* ok, remainder either will modify the qfast structure, or even add * a new one. Get the write lock. Of course, as we loose the lock in * between, it might (and will) happen that there are duplicated * quad_fast structures. But these cases will be rare. */ /* ALBERTA_WRLOCK(&fqfast_lock); */ n_points = quad->n_points; n_bas_fcts = bas_fcts->n_bas_fcts; if (!quad_fast) { quad_fast = MEM_ALLOC(1, WALL_QUAD_FAST); quad_fast->quad = quad; quad_fast->n_points = quad->n_points; quad_fast->n_bas_fcts = bas_fcts->n_bas_fcts; quad_fast->w = quad->w; quad_fast->init_flag = 0; for (i = 0; i < CARD_SN_MAX; i++) { for (j = 0; j < N_WALLS_MAX; j++) { quad_fast->lambda[i][j] = NULL; quad_fast->phi[i][j] = NULL; quad_fast->grd_phi[i][j] = NULL; quad_fast->D2_phi[i][j] = NULL; } } for (no = 0; no < card_sn; no++) { for (wall = 0; wall < N_NEIGH(dim); wall++) { quad_fast->lambda[no][wall] = MEM_ALLOC(n_points, REAL_B); } } quad_fast->next = first; quad_fast->bas_fcts = (BAS_FCTS *) bas_fcts; first = quad_fast; /* Initialize the barycentric coordinates w.r.t. to every possible * permutation. Same way as done in jump_res2() in estimator.c */ for (no = 0; no < card_sn; no++) { for (wall = 0; wall < N_NEIGH(dim); wall++) { perm = sorted_wall_indices(dim, wall, no); for (qp = 0; qp < n_points; qp++) { lambda = (REAL *)quad_fast->lambda[no][wall][qp]; lambda[wall] = 0.0; for (d = 0; d < dim; d++) { lambda[perm[d]] = quad->lambda[qp][d]; } } } } } /* initialize values of basis functions at quadrature points */ if (!quad_fast->phi[0][0] && (init_flag & INIT_PHI)) { BAS_FCT **phi = bas_fcts->phi; for (no = 0; no < card_sn; no++) { for (k = 0; k < N_NEIGH(dim); k++) { quad_fast->phi[no][k] = g_phi = MEM_ALLOC(n_points, REAL *); for (i = 0; i < n_points; i++) { lambda = (REAL *)quad_fast->lambda[no][k][i]; g_phi[i] = MEM_ALLOC(n_bas_fcts, REAL); for (j = 0; j < n_bas_fcts; j++) { g_phi[i][j] = phi[j](lambda); } } } } quad_fast->init_flag |= INIT_PHI; } if (!quad_fast->grd_phi[0][0] && (init_flag & INIT_GRD_PHI)) { GRD_BAS_FCT **grd_phi = bas_fcts->grd_phi; const REAL *grd; for (no = 0; no < card_sn; no++) { for (k = 0; k < N_NEIGH(dim); k++) { g_grd_phi = quad_fast->grd_phi[no][k] = MEM_ALLOC(n_points, REAL_B *); for (i = 0; i < n_points; i++) { lambda = (REAL *)quad_fast->lambda[no][k][i]; g_grd_phi[i] = MEM_ALLOC(n_bas_fcts, REAL_B); for (j = 0; j < n_bas_fcts; j++) { grd = grd_phi[j](lambda); for (l = 0; l < dim+1; l++) { g_grd_phi[i][j][l] = grd[l]; } } } } } quad_fast->init_flag |= INIT_GRD_PHI; } if (!quad_fast->D2_phi[0][0] && (init_flag & INIT_D2_PHI)) { D2_BAS_FCT **D2_phi = bas_fcts->D2_phi; const REAL (*D2)[N_LAMBDA]; for (no = 0; no < card_sn; no++) { for (k = 0; k < N_NEIGH(dim); k++) { g_D2_phi = quad_fast->D2_phi[no][k] = MEM_ALLOC(n_points, REAL_BB *); for (i = 0; i < n_points; i++) { lambda = (REAL *)quad_fast->lambda[no][k][i]; g_D2_phi[i] = MEM_ALLOC(n_bas_fcts, REAL_BB); mem = (void *) (g_D2_phi[i]+n_bas_fcts); for (j = 0; j < n_bas_fcts; j++) { D2 = D2_phi[j](lambda); for (m = 0; m < dim+1; m++) { for (l = 0; l < dim+1; l++) { g_D2_phi[i][j][m][l] = D2[m][l]; } } } } } } quad_fast->init_flag |= INIT_D2_PHI; } /* ALBERTA_RWUNLOCK(&fqfast_lock); */ if ((quad_fast->init_flag & init_flag) != init_flag) { ERROR("could not initialize quad_fast, returning pointer to nil\n"); return(nil); } return((const WALL_QUAD_FAST *) quad_fast); } alberta-2.0.1/alberta/src/Common/write_mesh.c0000644000042300001440000005447511067145730016023 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: write_mesh.c */ /* */ /* description: functions for writing meshes and DOF vectors in binary */ /* machine independent and native formats */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Univesitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "alberta_intern.h" static XDR *xdrp = nil; static FILE *file = nil; /* WARNING: XDR routines to read/write ALBERTA types must be changed if the ALBERTA types change! current state: REAL = double U_CHAR = unsigned char S_CHAR = signed char DOF = int Another WARNING! (D.K.) XDR routines are not well documented in the "xdr" man page. Do not change anything unless you know what you are doing! */ /*--------------------------------------------------------------------------*/ static void write_int(int val) { if(xdrp) xdr_int(xdrp, &val); else fwrite(&val, sizeof(int), 1, file); } #if 0 /* NEVER use this. If you need 64 bits, then use xdr_int64_t() */ static void write_long(long int val) { if(xdrp) xdr_long(xdrp, &val); else fwrite(&val, sizeof(long int), 1, file); } #endif static void write_REAL(REAL val) { if(xdrp) AI_xdr_REAL(xdrp, &val); else fwrite(&val, sizeof(REAL), 1, file); } static void write_string(const char *string, int write_length) { int strileng = 0; if(string) strileng = strlen(string); if(write_length) write_int(strileng); if(strileng) { if(xdrp) xdr_string(xdrp, (char **)&string, strileng+1); else fwrite(string, sizeof(char), strileng+1, file); } return; } static void write_vector(void *start, int n, size_t size, xdrproc_t xdrproc) { if(xdrp) xdr_vector(xdrp, (char *)start, n, size, xdrproc); else fwrite(start, size, n, file); } static void write_U_CHAR(U_CHAR val) { if(xdrp) AI_xdr_U_CHAR(xdrp, &val); else fwrite(&val, sizeof(U_CHAR), 1, file); } /*--------------------------------------------------------------------------*/ static int *n_dof, *node; static int n_vert_ptrs; static DOF *vert_dofs, **vert_ptrs; static DOF_ADMIN *vert_admin; static int n_edge_ptrs; static DOF *edge_dofs, **edge_ptrs; static DOF_ADMIN *edge_admin; static int n_face_ptrs; static DOF *face_dofs, **face_ptrs; static DOF_ADMIN *face_admin; static int *mesh_n_dof, *mesh_node; /*--------------------------------------------------------------------------*/ static void write_el_recursive(int dim, EL *el) { FUNCNAME("write_el_recursive"); int i, n, node0, n1; static U_CHAR uc_no = 0, uc_yes = 1; DEBUG_TEST_EXIT(el, "el == nil\n"); if (el->child[0]) { DEBUG_TEST_EXIT(el->child[1], "child 0 but no child 1\n"); write_U_CHAR(uc_yes); } else write_U_CHAR(uc_no); if(dim > 1) { if (el->new_coord) { write_U_CHAR(uc_yes); write_vector(el->new_coord, DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); } else write_U_CHAR(uc_no); } if (n_dof[VERTEX] > 0) { node0 = node[VERTEX]; n1 = vert_admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES(dim); i++) write_int(vert_dofs[el->dof[node0 + i][n1]]); } if (dim > 1 && n_dof[EDGE] > 0) { node0 = node[EDGE]; n1 = edge_admin->n0_dof[EDGE]; for (i = 0; i < N_EDGES(dim); i++) if(el->dof[node0 + i][n1] >= 0) write_int(edge_dofs[el->dof[node0 + i][n1]]); else write_int(-1); } if (dim == 3 && n_dof[FACE] > 0) { node0 = node[FACE]; n1 = face_admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) if(el->dof[node0 + i][n1] >= 0) write_int(face_dofs[el->dof[node0 + i][n1]]); else write_int(-1); } if ((n = n_dof[CENTER]) > 0) { node0 = node[CENTER]; write_vector(el->dof[node0], n, sizeof(DOF), (xdrproc_t)AI_xdr_DOF); } if (el->child[0]) for (i = 0; i < 2; i++) write_el_recursive(dim, el->child[i]); return; } /*--------------------------------------------------------------------------*/ #define OFFSET 10 /* must be > MAX(VERTEX,EDGE,FACE,CENTER) */ static void fill_dofs_fct(const EL_INFO *elinfo, void *data) { EL *el = elinfo->el; int i, n0, n1, dim = elinfo->mesh->dim; DOF *p; if (vert_admin) { n0 = mesh_node[VERTEX]; n1 = vert_admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES(dim); i++) { p = el->dof[n0+i]; vert_dofs[p[n1]] = VERTEX-OFFSET; vert_ptrs[p[n1]] = p; } } if (dim > 1 && edge_admin) { n0 = mesh_node[EDGE]; n1 = edge_admin->n0_dof[EDGE]; for (i = 0; i < N_EDGES(dim); i++) { p = el->dof[n0+i]; if(p[n1] >= 0) { edge_dofs[p[n1]] = EDGE-OFFSET; edge_ptrs[p[n1]] = p; } } } if (dim == 3 && face_admin) { n0 = mesh_node[FACE]; n1 = face_admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) { p = el->dof[n0+i]; if(p[n1] >= 0) { face_dofs[p[n1]] = FACE-OFFSET; face_ptrs[p[n1]] = p; } } } return; } /*--------------------------------------------------------------------------*/ static int write_mesh_master(const int write_xdr, MESH *mesh, const char *filename, REAL time) { FUNCNAME("write_mesh_master"); MACRO_EL *mel, *meln; DOF_ADMIN *admin; int i, j, n, m, iadmin, dim; int neigh_i[N_NEIGH_MAX]; if (!mesh) { ERROR("no mesh - no file created\n"); return(1); } n_edge_ptrs = 0; n_face_ptrs = 0; n_vert_ptrs = 0; dim = mesh->dim; dof_compress(mesh); n_dof = mesh->n_dof; node = mesh->node; if(write_xdr) { if (!(xdrp = AI_xdr_open_file(filename, XDR_ENCODE))) { ERROR("Cannot open XDR file '%s' for writing.\n",filename); return(1); } } else { if (!(file=fopen(filename,"wb"))) { ERROR("Cannot open file '%s' for writing.\n",filename); return(1); } } write_string(ALBERTA_VERSION, false); /* file marker */ write_int(dim); write_int(DIM_OF_WORLD); write_REAL(time); write_string(mesh->name, true); write_int(mesh->n_vertices); if(dim > 1) write_int(mesh->n_edges); write_int(mesh->n_elements); write_int(mesh->n_hier_elements); if(dim == 3) { write_int(mesh->n_faces); write_int(mesh->max_edge_neigh); } write_vector(mesh->diam, DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); write_int(mesh->n_dof_el); write_vector(mesh->n_dof, N_NODE_TYPES, sizeof(int), (xdrproc_t)xdr_int); write_int(mesh->n_node_el); write_vector(mesh->node, N_NODE_TYPES, sizeof(int), (xdrproc_t)xdr_int); write_int(mesh->n_dof_admin); for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { admin = mesh->dof_admin[iadmin]; DEBUG_TEST_EXIT(admin, "dof admin no. %d not found!\n", iadmin); write_vector(admin->n_dof, N_NODE_TYPES, sizeof(int), (xdrproc_t)xdr_int); write_int(admin->used_count); /* after dof_compress(), no more information is required */ write_string(admin->name, true); write_U_CHAR(admin->preserve_coarse_dofs); } if(dim == 3) { face_admin = nil; if (mesh->n_dof[FACE] > 0) { m = 99999; for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { if ((admin = mesh->dof_admin[iadmin])) { if (admin->n_dof[FACE] > 0 && (admin->n_dof[FACE] < m || admin->preserve_coarse_dofs)) { face_admin = admin; m = admin->n_dof[FACE]; } } } DEBUG_TEST_EXIT(face_admin, "no admin with face dofs?\n"); face_dofs = MEM_ALLOC(face_admin->used_count, DOF); for (i=0; iused_count; i++) face_dofs[i] = -1; face_ptrs = MEM_ALLOC(face_admin->used_count, DOF*); for (i=0; iused_count; i++) face_ptrs[i] = nil; } } if(dim > 1) { edge_admin = nil; if (mesh->n_dof[EDGE] > 0) { if (dim == 3 && face_admin && (face_admin->n_dof[EDGE] > 0) && face_admin->preserve_coarse_dofs) { edge_admin = face_admin; edge_dofs = face_dofs; edge_ptrs = face_ptrs; } else { m = 99999; for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { if ((admin = mesh->dof_admin[iadmin])) { if (admin->n_dof[EDGE] > 0 && (admin->n_dof[EDGE] < m || admin->preserve_coarse_dofs)) { edge_admin = admin; m = admin->n_dof[EDGE]; } } } DEBUG_TEST_EXIT(edge_admin, "no admin with edge dofs?\n"); edge_dofs = MEM_ALLOC(edge_admin->used_count, DOF); for (i=0; iused_count; i++) edge_dofs[i] = -1; edge_ptrs = MEM_ALLOC(edge_admin->used_count, DOF*); for (i=0; iused_count; i++) edge_ptrs[i] = nil; } } } vert_admin = nil; if (mesh->n_dof[VERTEX] > 0) { if (dim == 3 && face_admin && (face_admin->n_dof[VERTEX] > 0)) { vert_admin = face_admin; vert_dofs = face_dofs; vert_ptrs = face_ptrs; } else { if (dim > 1 && edge_admin && (edge_admin->n_dof[VERTEX] > 0)) { vert_admin = edge_admin; vert_dofs = edge_dofs; vert_ptrs = edge_ptrs; } else { m = 99999; for (iadmin = 0; iadmin < mesh->n_dof_admin; iadmin++) { if ((admin = mesh->dof_admin[iadmin])) { if (admin->n_dof[VERTEX] > 0 && admin->n_dof[VERTEX] < m) { vert_admin = admin; m = admin->n_dof[VERTEX]; } } } DEBUG_TEST_EXIT(vert_admin, "no admin with vertex dofs?\n"); vert_dofs = MEM_ALLOC(vert_admin->used_count, DOF); for (i=0; iused_count; i++) vert_dofs[i] = -1; vert_ptrs = MEM_ALLOC(vert_admin->used_count, DOF*); for (i=0; iused_count; i++) vert_ptrs[i] = nil; } } } mesh_n_dof = mesh->n_dof; mesh_node = mesh->node; mesh_traverse(mesh, 0, CALL_EVERY_EL_PREORDER|FILL_NOTHING, fill_dofs_fct, nil); if (vert_admin) { for (i = 0; i < vert_admin->used_count; i++) if (vert_dofs[i] == VERTEX-OFFSET) n_vert_ptrs++; } if (dim > 1 && edge_admin) { for (i = 0; i < edge_admin->used_count; i++) if (edge_dofs[i] == EDGE-OFFSET) n_edge_ptrs++; } if (dim == 3 && face_admin) { for (i = 0; i < face_admin->used_count; i++) if (face_dofs[i] == FACE-OFFSET) n_face_ptrs++; } write_int(n_vert_ptrs); if (n_vert_ptrs) { j = 0; n = mesh_n_dof[VERTEX]; for (i = 0; i < vert_admin->used_count; i++) { if (vert_dofs[i] == VERTEX-OFFSET) { vert_dofs[i] = j++; write_vector(vert_ptrs[i], n, sizeof(DOF), (xdrproc_t)AI_xdr_DOF); } } DEBUG_TEST_EXIT(j==n_vert_ptrs, "j != n_vert_ptrs\n"); } if(dim > 1) { write_int(n_edge_ptrs); if (n_edge_ptrs) { j = 0; n = mesh_n_dof[EDGE]; for (i = 0; i < edge_admin->used_count; i++) { if (edge_dofs[i] == EDGE-OFFSET) { edge_dofs[i] = j++; write_vector(edge_ptrs[i], n, sizeof(DOF), (xdrproc_t)AI_xdr_DOF); } } DEBUG_TEST_EXIT(j==n_edge_ptrs, "j != n_edge_ptrs\n"); } } if(dim == 3) { write_int(n_face_ptrs); if (n_face_ptrs) { j = 0; n = mesh_n_dof[FACE]; for (i = 0; i < face_admin->used_count; i++) { if (face_dofs[i] == FACE-OFFSET) { face_dofs[i] = j++; write_vector(face_ptrs[i], n, sizeof(DOF), (xdrproc_t)AI_xdr_DOF); } } DEBUG_TEST_EXIT(j==n_face_ptrs, "j != n_face_ptrs\n"); } } /*--------------------------------------------------------------------------*/ /* gather info about macro elements (vertices, ...) */ /*--------------------------------------------------------------------------*/ { typedef int intNV[N_VERTICES(dim)]; int (*mcindex)[N_VERTICES(dim)] = MEM_ALLOC(mesh->n_macro_el, intNV); REAL_D *mccoord; int mccount, m; mccount = ((MESH_MEM_INFO *)(mesh->mem_info))->count; mccoord = ((MESH_MEM_INFO *)(mesh->mem_info))->coords; for (m = 0, mel = mesh->macro_els; m < mesh->n_macro_el; m++, mel = mesh->macro_els + m) { for (i = 0; i < N_VERTICES(dim); i++) mcindex[m][i] = ((char *)(mel->coord[i]) - (char *)mccoord)/(sizeof(char)*sizeof(REAL_D)); if (mel->index != m) mel->index = m; } write_int(mesh->n_macro_el); write_int(mccount); /* number of macro coords */ for (i = 0; i < mccount; i++) write_vector(mccoord[i], DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); for (m = 0, mel = mesh->macro_els; m < mesh->n_macro_el; m++, mel = mesh->macro_els + m) { write_vector(mcindex[m], N_VERTICES(dim), sizeof(int), (xdrproc_t)xdr_int); write_vector(mel->vertex_bound, N_VERTICES(dim), sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); if(dim == 2) write_vector(mel->edge_bound, N_EDGES_2D, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); if(dim == 3) { write_vector(mel->face_bound, N_FACES_3D, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); write_vector(mel->edge_bound, N_EDGES_3D, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); } for (i = 0; i < N_NEIGH(dim); i++) { if ((meln = mel->neigh[i])) neigh_i[i] = meln->index; else neigh_i[i] = -1; } write_vector(neigh_i, N_NEIGH(dim), sizeof(int), (xdrproc_t)xdr_int); write_vector(mel->opp_vertex, N_NEIGH(dim), sizeof(U_CHAR), (xdrproc_t)AI_xdr_U_CHAR); if(dim == 3) write_U_CHAR(mel->el_type); write_el_recursive(dim, mel->el); } MEM_FREE(mcindex, mesh->n_macro_el, intNV); } /* Write the magic cookie. */ write_int(mesh->cookie); write_string("EOF.", false); /* file end marker */ if (dim == 3 && face_admin) { MEM_FREE(face_ptrs, face_admin->used_count, DOF*); MEM_FREE(face_dofs, face_admin->used_count, DOF); if (edge_admin == face_admin) edge_admin = nil; if (vert_admin == face_admin) vert_admin = nil; face_admin = nil; } if (dim > 1 && edge_admin) { MEM_FREE(edge_ptrs, edge_admin->used_count, DOF*); MEM_FREE(edge_dofs, edge_admin->used_count, DOF); if (vert_admin == edge_admin) vert_admin = nil; edge_admin = nil; } if (vert_admin) { MEM_FREE(vert_ptrs, vert_admin->used_count, DOF*); MEM_FREE(vert_dofs, vert_admin->used_count, DOF); vert_admin = nil; } if(write_xdr) { AI_xdr_close_file(xdrp); xdrp = nil; } else fclose(file); file = nil; return(0); } extern int write_mesh(MESH *mesh, const char *filename, REAL time) { return write_mesh_master(false, mesh, filename, time); } extern int write_mesh_xdr(MESH *mesh, const char *filename, REAL time) { return write_mesh_master(true, mesh, filename, time); } /*--------------------------------------------------------------------------*/ /* write DOF vectors of various types */ /*--------------------------------------------------------------------------*/ typedef DOF_REAL_VEC DOF_VEC; static int write_dof_vec_master(const int write_xdr, const DOF_VEC *dv, const char *filename, const char *dofvectype) { FUNCNAME("write_dof_vec_master"); const FE_SPACE *fe_space; const DOF_ADMIN *admin; MESH *mesh; int i, iadmin, last; if (!dv || !(fe_space = dv->fe_space)) { ERROR("no %s or fe_space - no file created\n", dofvectype); return(1); } if (!(admin = fe_space->admin) || !(mesh = admin->mesh)) { ERROR("no dof_admin or dof_admin->mesh - no file created\n"); return(1); } dof_compress(mesh); iadmin = -1; for (i = 0; i < mesh->n_dof_admin; i++) if (mesh->dof_admin[i] == admin) { iadmin = i; break; } if (iadmin < 0) { ERROR("vec->admin not in mesh->dof_admin[] - no file created\n"); return(1); } last = admin->used_count; DEBUG_TEST_EXIT(last <= dv->size, "dof_vec->size %d < admin->size_used %d\n", dv->size, last); if(write_xdr) { if (!(xdrp = AI_xdr_open_file(filename, XDR_ENCODE))) { ERROR("Cannot open XDR file '%s' for writing.\n",filename); return(1); } } else { if (!(file=fopen(filename,"wb"))) { ERROR("Cannot open file '%s' for writing.\n",filename); return(1); } } write_string(dofvectype, false); write_string(dv->name, true); write_U_CHAR(admin->preserve_coarse_dofs); write_vector((void *)admin->n_dof, N_NODE_TYPES, sizeof(int), (xdrproc_t)xdr_int); if (fe_space->bas_fcts) write_string(fe_space->bas_fcts->name, true); else write_int(0); write_int(last); if (last) { if (!strncmp(dofvectype, "DOF_REAL_VEC ", 12)) write_vector(dv->vec, last, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); else if (!strncmp(dofvectype, "DOF_REAL_D_VEC ", 12)) write_vector(dv->vec, last*DIM_OF_WORLD, sizeof(REAL), (xdrproc_t)AI_xdr_REAL); else if (!strncmp(dofvectype, "DOF_INT_VEC ", 12)) write_vector(dv->vec, last, sizeof(int), (xdrproc_t)xdr_int); else if (!strncmp(dofvectype, "DOF_SCHAR_VEC ", 12)) write_vector(dv->vec, last, sizeof(S_CHAR), (xdrproc_t)AI_xdr_S_CHAR); else if (!strncmp(dofvectype, "DOF_UCHAR_VEC ", 12)) write_vector(dv->vec, last, sizeof(U_CHAR), (xdrproc_t)AI_xdr_U_CHAR); else ERROR("Invalid file id '%s'.\n",dofvectype); } /* Write the magic cookie. */ write_int(mesh->cookie); write_string("EOF.", false); /* file end marker */ if(write_xdr) { AI_xdr_close_file(xdrp); xdrp = nil; } else fclose(file); file = nil; return(0); } /*--------------------------------------------------------------------------*/ int write_dof_real_vec_xdr(const DOF_REAL_VEC *dv, const char *fn) { return(write_dof_vec_master(true, (const DOF_VEC *)dv, fn, "DOF_REAL_VEC ")); } int write_dof_real_vec(const DOF_REAL_VEC *dv, const char *fn) { return(write_dof_vec_master(false, (const DOF_VEC *)dv, fn, "DOF_REAL_VEC ")); } int write_dof_real_d_vec_xdr(const DOF_REAL_D_VEC *dv, const char *fn) { return(write_dof_vec_master(true, (const DOF_VEC *)dv, fn, "DOF_REAL_D_VEC ")); } int write_dof_real_d_vec(const DOF_REAL_D_VEC *dv, const char *fn) { return(write_dof_vec_master(false, (const DOF_VEC *)dv, fn, "DOF_REAL_D_VEC ")); } int write_dof_int_vec_xdr(const DOF_INT_VEC *dv, const char *fn) { return(write_dof_vec_master(true, (const DOF_VEC *)dv, fn, "DOF_INT_VEC ")); } int write_dof_int_vec(const DOF_INT_VEC *dv, const char *fn) { return(write_dof_vec_master(false, (const DOF_VEC *)dv, fn, "DOF_INT_VEC ")); } int write_dof_schar_vec_xdr(const DOF_SCHAR_VEC *dv, const char *fn) { return(write_dof_vec_master(true, (const DOF_VEC *)dv, fn, "DOF_SCHAR_VEC ")); } int write_dof_schar_vec(const DOF_SCHAR_VEC *dv, const char *fn) { return(write_dof_vec_master(false, (const DOF_VEC *)dv, fn, "DOF_SCHAR_VEC ")); } int write_dof_uchar_vec_xdr(const DOF_UCHAR_VEC *dv, const char *fn) { return(write_dof_vec_master(true, (const DOF_VEC *)dv, fn, "DOF_UCHAR_VEC ")); } int write_dof_uchar_vec(const DOF_UCHAR_VEC *dv, const char *fn) { return(write_dof_vec_master(false, (const DOF_VEC *)dv, fn, "DOF_UCHAR_VEC ")); } /*--------------------------------------------------------------------------*/ /* write_dof_matrix_pbm: print matrix structure as portable bitmap */ /*--------------------------------------------------------------------------*/ int write_dof_matrix_pbm(const DOF_MATRIX *matrix, const char *filename) { FUNCNAME("write_dof_matrix_pbm"); int i, j, jcol, size; MATRIX_ROW *row; char *pbm_row; FILE *file; if (!(file=fopen(filename,"w"))) { ERROR("cannot open file %s\n",filename); return(1); } size = matrix->size + 1; pbm_row = MEM_CALLOC(size, char); fprintf(file, "P1\n"); fprintf(file, "# ALBERTA output of DOF_MATRIX %s\n", matrix->name); fprintf(file, "%d %d\n", matrix->size, matrix->size); for (i=0; isize; i++) { memset(pbm_row, '0', matrix->size); for (row = matrix->matrix_row[i]; row; row = row->next) { for (j=0; jcol[j]; if (ENTRY_USED(jcol) && row->entry[j]) pbm_row[jcol] = '1'; } } fprintf(file, "%s\n", pbm_row); } MEM_FREE(pbm_row, size, char); fclose(file); return 0; } /*--------------------------------------------------------------------------*/ alberta-2.0.1/alberta/src/Common/write_mesh_gmv.c0000644000042300001440000012377510676724253016704 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: write_mesh_gmv.c */ /* */ /* */ /* description: This program converts ALBERTA meshes and dof_real_[d_]vecs */ /* to a GMV 4.0 format (ASCII or "iecxi?r?", one of the binary */ /* format versions, NOT NECESSARILY PORTABLE) */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by D. Koester (2004) */ /*--------------------------------------------------------------------------*/ #include #include "alberta.h" #define VERT_IND(dim,i,j) ((i)*N_VERTICES(dim)+(j)) /***************************************************************************/ /* gmv_open_ascii(filenam, mesh, sim_time): open a file for ASCII GMV */ /* output. */ /***************************************************************************/ static FILE * gmv_open_ascii(const char *filenam, MESH *mesh, REAL sim_time) { /* FUNCNAME("gmv_open_ascii"); */ FILE *file = nil; file = fopen(filenam, "w"); /* Write header. */ fprintf(file, "gmvinput ascii\n"); if(mesh->name) { fprintf(file, "comments\n"); fprintf(file, "Mesh '%s'\n", mesh->name); fprintf(file, "endcomm\n"); } fprintf(file, "probtime %.6E\n", sim_time); fprintf(file, "codename ALBERTA \n"); fprintf(file, "codever 2.0 \n"); return file; } /***************************************************************************/ /* gmv_open_bin(filenam,isize,rsize,time): open a file for binary output */ /***************************************************************************/ static FILE * gmv_open_bin(const char *filenam, int isize, int rsize, REAL sim_time) { FUNCNAME("gmv_open_bin"); FILE *fp = nil; /* Check if this machine can address 64bit integers (isize = 8). */ if (isize == 8) TEST_EXIT (sizeof(long) >= 8, "Cannot write 8 byte integers on this machine.\n"); fp = fopen(filenam, "w"); /* Write header. */ fwrite("gmvinput", sizeof(char), 8, fp); if (isize == 4 && rsize == 8) { fwrite("iecxi4r8", sizeof(char), 8, fp); } else if (isize == 8 && rsize == 4) { fwrite("iecxi8r4", sizeof(char), 8, fp); } else if (isize == 8 && rsize == 8) { fwrite("iecxi8r8", sizeof(char), 8, fp); } else /* just do the normal "iecxi4r4" thing */ { fwrite("iecxi4r4", sizeof(char), 8, fp); } fwrite("probtime", sizeof(char), 8, fp); fwrite(&sim_time, sizeof(REAL), 1, fp); fwrite("codenameALBERTA codever 2.0 ", sizeof(char), 32, fp); return fp; } /***************************************************************************/ /* convert_string(in): Replace all white-space characters in "string" */ /* with underscores. */ /***************************************************************************/ static void convert_string(char *pos) { for(; *pos; pos++) if(!isgraph((int)*pos)) *pos = '_'; } /***************************************************************************/ /* write_coord_array(file, n_vert, coords, write_ascii): dump the given */ /* coordinate array to the GMV file. */ /***************************************************************************/ static void write_coord_array(FILE *file, int n_vert, REAL_D *coords, int write_ascii) { REAL *tempxyz; int i, j; if(write_ascii) { fprintf(file, "nodev %d\n", n_vert); for(i = 0; i < n_vert; i++) { for(j = 0; j < 3; j++) { if(j < DIM_OF_WORLD) fprintf(file, "%.10E ", coords[i][j]); else fprintf(file, "0.0 "); } fprintf(file, "\n"); } } else { fwrite("nodev ",sizeof(char),8, file); fwrite(&n_vert, sizeof(int), 1, file); #if DIM_OF_WORLD == 3 tempxyz = (REAL *) coords; #else tempxyz = MEM_CALLOC(n_vert * 3, REAL); for (i = 0; i < n_vert; i++) for(j = 0; j < DIM_OF_WORLD; j++) tempxyz[3*i + j] = coords[i][j]; #endif fwrite(tempxyz, sizeof(REAL), 3*n_vert, file); #if DIM_OF_WORLD < 3 MEM_FREE(tempxyz, n_vert * 3, REAL); #endif } return; } /***************************************************************************/ /* write_elem_array(file, dim, n_elem, elem, write_ascii): dump the given */ /* element array to the GMV file. */ /***************************************************************************/ static void write_elem_array(FILE *file, int dim, int n_elem, int *elem, int write_ascii) { char *cell_types[4] = {"general ", "line ", "tri ", "tet "}; int i, j, dim_1 = dim + 1, one = 1, tmp; if(write_ascii) { fprintf(file, "cells %d\n", n_elem); for(i = 0; i < n_elem; i++) { fprintf(file, "%s%d\n", cell_types[dim], dim+1); for(j = 0; j < N_VERTICES(dim); j++) { if(dim == 0) fprintf(file, "1 "); fprintf(file, "%d ", 1 + elem[VERT_IND(dim,i,j)]); } fprintf(file, "\n"); } } else { fwrite("cells ", sizeof(char), 8, file); fwrite(&n_elem, sizeof(int), 1, file); for(i = 0; i < n_elem; i++) { fwrite(cell_types[dim], sizeof(char), 8, file); fwrite(&dim_1, sizeof(int), 1, file); for(j = 0; j < N_VERTICES(dim); j++) { if(dim == 0) fwrite(&one, sizeof(int), 1, file); tmp = 1 + elem[VERT_IND(dim, i, j)]; fwrite(&tmp, sizeof(int), 1, file); } } } return; } /***************************************************************************/ /* write_mat_array(file, n_elem, mat_array, write_ascii): dump the given */ /* material array to the GMV file. */ /***************************************************************************/ static void write_mat_array(FILE *file, int n_elem, int *mat, int write_ascii) { char *mat_types[2] = {"affine ", "parametr"}; int i, tmp; if(write_ascii) { fprintf(file, "material 2 0\n"); fprintf(file, "%s\n", mat_types[0]); fprintf(file, "%s\n", mat_types[1]); for(i = 0; i < n_elem; i++) fprintf(file, "%d\n", mat[i]); } else { fwrite("material", sizeof(char), 8, file); tmp = 2; fwrite(&tmp, sizeof(int), 1, file); tmp = 0; fwrite(&tmp, sizeof(int), 1, file); fwrite(mat_types[0], sizeof(char), 32, file); fwrite(mat_types[1], sizeof(char), 32, file); fwrite(mat, sizeof(int), n_elem, file); } return; } /***************************************************************************/ /* add_mesh(file, mesh, write_ascii): Convert given ALBERTA mesh to GMV */ /* format and add the result to the output file. */ /***************************************************************************/ static void add_mesh(FILE *file, MESH *mesh, int write_ascii) { FUNCNAME("add_mesh"); MACRO_DATA *data; /* Step 1: Convert the current mesh to a macro triangulation, which */ /* has index-based information about the current triangulation. */ /* Some checks on mesh sanity are also done by this routine. */ TEST_EXIT(data = mesh2macro_data(mesh), "Could not get macro data from mesh!\n"); /* Step 2: Write the coordinate array. */ /* If DIM_OF_WORLD < 3, then pad the remaining coords with 0.0. */ write_coord_array(file, data->n_total_vertices, data->coords, write_ascii); /* Step 3: Write the element array. The offset is 1, not 0! */ write_elem_array(file, mesh->dim, data->n_macro_elements, data->mel_vertices, write_ascii); /* Step 4: If we have parametric simplices, mark these as a special */ /* material array. */ if(mesh->parametric) { int *mat_array = MEM_CALLOC(data->n_macro_elements, int); TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; int elem = 0; el_info = traverse_first(stack, mesh, -1, fill_flag); while (el_info) { if(mesh->parametric->init_element(el_info, mesh->parametric)) mat_array[elem] = 2; else mat_array[elem] = 1; el_info = traverse_next(stack, el_info); elem++; } free_traverse_stack(stack); write_mat_array(file, data->n_macro_elements, mat_array, write_ascii); MEM_FREE(mat_array, data->n_macro_elements, int); } /* Step 5: Clean up. */ free_macro_data(data); return; } /***************************************************************************/ /* add_drv(file, mesh, drv, write_ascii): Convert ALBERTA */ /* DOF_REAL_VEC drv to GMV format and append the result to the output file.*/ /***************************************************************************/ static void add_drv(FILE *file, MESH *mesh, DOF_REAL_VEC *drv, int write_ascii) { FUNCNAME("add_drv"); REAL *new_vec; int i, n0, index = 0, dim = mesh->dim; int is_node_centered; int *vert_ind = nil; char drv_name[32] = {}; const EL_INFO *el_info = nil; DOF **local_dof_ptr; DOF_INT_VEC *dof_vert_ind = nil; const DOF_ADMIN *admin = drv->fe_space->admin; TRAVERSE_STACK *stack = get_traverse_stack(); /* Step 1: We decide whether the values are node-centered or zone-centered */ /* based on the value of drv->fe_space->bas_fcts->ndof. */ if(drv->fe_space->bas_fcts->n_dof[VERTEX]) is_node_centered = 1; else if(drv->fe_space->bas_fcts->n_dof[CENTER]) is_node_centered = 0; else ERROR_EXIT("Could not determine centering type of data (n_dof[VERTEX] and n_dof[CENTER] both nil).\n"); snprintf(drv_name, 32, drv->name); convert_string((char *)drv_name); if(write_ascii) fprintf(file, "%s %d\n", drv_name, is_node_centered); else { fwrite(drv_name, sizeof(char), 32, file); fwrite(&is_node_centered, sizeof(int), 1, file); } if(is_node_centered) { new_vec = MEM_ALLOC(mesh->n_vertices, REAL); n0 = admin->n0_dof[VERTEX]; dof_vert_ind = get_dof_int_vec("vertex indices", drv->fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = 0); } else { new_vec = MEM_ALLOC(mesh->n_elements, REAL); n0 = admin->n0_dof[CENTER]; } /* Step 2: We need to copy the correct values of drv->vec into new_vec. */ for (el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); el_info; el_info=traverse_next(stack,el_info)) { local_dof_ptr = el_info->el->dof; if(is_node_centered) { for (i = 0; i < N_VERTICES(dim); i++) if (!vert_ind[local_dof_ptr[mesh->node[VERTEX] + i][n0]]) { /* assign a global index to each vertex in the same way as above. */ vert_ind[local_dof_ptr[i][n0]] = -1; new_vec[index] = drv->vec[local_dof_ptr[i][n0]]; index++; } } else { /* just use the first CENTER dof of each element. */ new_vec[index] = drv->vec[local_dof_ptr[mesh->node[CENTER]][n0]]; index++; } } /* Just another cheap check to see if everything is alright. */ if(is_node_centered) TEST_EXIT(index == mesh->n_vertices,"Wrong no. of vertices counted!\n"); else TEST_EXIT(index == mesh->n_elements,"Wrong no. of elements counted!\n"); /* Step 3: Write the values to the file. */ if(write_ascii) for(i = 0; i < index; i++) fprintf(file, "%.10E\t", new_vec[i]); else fwrite(new_vec, sizeof(REAL), index, file); /* Step 4: Clean up. */ MEM_FREE(new_vec, index, REAL); free_traverse_stack(stack); if(dof_vert_ind) free_dof_int_vec(dof_vert_ind); return; } /***************************************************************************/ /* add_drdv(file, mesh, drdv, write_ascii, as_velocity): Convert given */ /* DOF_REAL_D_VEC to GMV format and add the result to the output file. If */ /* the parameter "as_velocity" is set, then "drdv" will be written using */ /* GMVs "velocity" keyword. This implies the useful automatic generation */ /* of a field storing vector magnitude within the GMV viewer. The downside */ /* is that only one "velocity" vector is possible within a GMV file, and */ /* that "velocity" vectors always have three components. */ /* */ /* Please refer to the GMV documentation for details. */ /***************************************************************************/ static void add_drdv(FILE *file, MESH *mesh, DOF_REAL_D_VEC *drdv, int write_ascii, int as_velocity) { FUNCNAME("add_drdv"); REAL *new_vec[3] = {}; int i, j, n0, index = 0, dim = mesh->dim; int is_node_centered, n_components; int *vert_ind = nil; char drdv_name[32] = {}; const EL_INFO *el_info = nil; DOF **local_dof_ptr; DOF_INT_VEC *dof_vert_ind = nil; const DOF_ADMIN *admin = drdv->fe_space->admin; TRAVERSE_STACK *stack = get_traverse_stack(); /* Step 1: We decide whether the values are node-centered or zone-centered */ /* based on the value of drdv->fe_space->bas_fcts->ndof. */ if(drdv->fe_space->bas_fcts->n_dof[VERTEX]) is_node_centered = true; else if(drdv->fe_space->bas_fcts->n_dof[CENTER]) is_node_centered = false; else ERROR_EXIT("Could not determine centering type of data (n_dof[VERTEX] and n_dof[CENTER] both nil).\n"); if(as_velocity) { n_components = 3; if(write_ascii) fprintf(file, "velocity %d\n",is_node_centered); else { fwrite("velocity", sizeof(char), 8, file); fwrite(&is_node_centered, sizeof(int), 1, file); } } else { n_components = DIM_OF_WORLD; snprintf(drdv_name, 32, drdv->name); convert_string((char *)drdv_name); if(write_ascii) { fprintf(file, "%s %d %d %d\n", drdv_name, is_node_centered, n_components, 0); } else { i = 0; fwrite(drdv_name, sizeof(char), 32, file); fwrite(&is_node_centered, sizeof(int), 1, file); fwrite(&n_components, sizeof(int), 1, file); fwrite(&i, sizeof(int), 1, file); } } if(is_node_centered) { for(i = 0; i < n_components; i++) new_vec[i] = MEM_CALLOC(mesh->n_vertices, REAL); n0 = admin->n0_dof[VERTEX]; dof_vert_ind = get_dof_int_vec("vertex indices", drdv->fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = 0); } else { for(i = 0; i < n_components; i++) new_vec[i] = MEM_CALLOC(mesh->n_elements, REAL); n0 = admin->n0_dof[CENTER]; } /* Step 2: We need to copy the correct values of drdv->vec into new_vec. */ for (el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); el_info; el_info=traverse_next(stack,el_info)) { local_dof_ptr = el_info->el->dof; if(is_node_centered) { for (i = 0; i < N_VERTICES(dim); i++) if (!vert_ind[local_dof_ptr[mesh->node[VERTEX] + i][n0]]) { /* assign a global index to each vertex in the same way as above. */ vert_ind[local_dof_ptr[i][n0]] = -1; for (j = 0; j < DIM_OF_WORLD; j++) new_vec[j][index] = drdv->vec[local_dof_ptr[i][n0]][j]; index++; } } else { /* just use the first CENTER dof of each element. */ for (j = 0; j < DIM_OF_WORLD; j++) new_vec[j][index] = drdv->vec[local_dof_ptr[mesh->node[CENTER]][n0]][j]; index++; } } /* Just another cheap check to see if everything is alright. */ if(is_node_centered) TEST_EXIT(index == mesh->n_vertices,"Wrong no. of vertices counted!\n"); else TEST_EXIT(index == mesh->n_elements,"Wrong no. of elements counted!\n"); /* Step 3: Write the values to the file. */ if(write_ascii) { for(i = 0; i < n_components; i++) for(j = 0; j < index; j++) fprintf(file, "%.10E\t", new_vec[i][j]); } else for(i = 0; i < n_components; i++) fwrite(new_vec[i], sizeof(REAL), index, file); /* Step 4: Clean up. */ for (j = 0; j < n_components; j++) MEM_FREE(new_vec[j], index, REAL); free_traverse_stack(stack); free_dof_int_vec(dof_vert_ind); } /***************************************************************************/ /* add_refined_data(file, mesh, write_ascii, write_mesh_date, n_drv, */ /* drv_ptr, n_drdv, drdv_ptr, velocity): */ /* */ /* This routine enables us to output more information for higher order */ /* Lagrange finite elements. Since GMV only displays linear data we first */ /* perform a virtual refinement of all elements, see the array */ /* "n_sub_elements" below. The refined mesh is then output to GMV as usual.*/ /***************************************************************************/ static const int n_sub_elements[/*dimension*/ 3][/*degree*/ 3] = {{2,3,4}, {4,9,16}, {4,10,20}}; /* sub_elements[dimension][degree][max_n_elements == 20][vertex] */ static const int sub_elements[3][3][20][4] = {/*dim=1*/ {/*p=2*/ {{0,2}, {2,1}}, /*p=3*/ {{0,2}, {2,3}, {3,1}}, /*p=4*/ {{0,2}, {2,3}, {3,4}, {4,1}}}, /*dim=2*/ {/*p=2*/ {{0,5,4},{5,3,4}, {5,1,3},{4,3,2}}, /*p=3*/ {{0,7,6},{7,9,6},{7,8,9}, {6,9,5},{8,3,9},{9,4,5}, {8,1,3},{9,3,4},{5,4,2}}, /*p=4*/ {{ 0, 9, 8},{ 9,12, 8},{ 9,10,12},{ 8,12, 7}, {10,13,12},{12,14, 7},{10,11,13},{12,13,14}, { 7,14, 6},{11, 3,13},{13, 4,14},{14, 5, 6}, {11, 1, 3},{13, 3, 4},{14, 4, 5},{ 6, 5, 2}}}, /*dim=3*/ {/*p=2*/ {{ 0, 4, 5, 6},{ 4, 1, 7, 8}, { 5, 7, 2, 9}, { 6, 8, 9, 3}}, /*p=3*/ {{ 0, 4, 6, 8},{ 4, 5,19,18},{ 5, 1,10,12}, { 6,19, 7,17},{19,10,11,16}, { 7,11, 2,14}, { 8,18,17, 9},{18,12,16,13}, {17,16,14,15}, { 9,13,15, 3}}, /*p=4*/ {{ 0, 4, 7,10},{ 4, 5,31,28},{ 5, 6,32,29},{ 6, 1,13,16}, { 7,31, 8,25},{31,32,33,34},{32,13,14,22}, { 8,33, 9,26},{33,14,15,23}, { 9,15, 2,19}, {10,28,25,11},{28,29,34,30},{29,16,22,17}, {25,34,26,27},{34,22,23,24}, {26,23,19,20}, {11,30,27,12},{30,17,24,18}, {27,24,20,21}, {12,18,21, 3}}}}; static const REAL *identity(const REAL_D x, REAL_D buffer) { static REAL_D buffer2 = {}; REAL *result = buffer ? buffer : buffer2; COPY_DOW(x, result); return result; } static int add_refined_data(FILE *file, MESH *mesh, int write_ascii, int write_mesh_data, const int n_drv, DOF_REAL_VEC **drv_ptr, const int n_drdv, DOF_REAL_D_VEC **drdv_ptr, DOF_REAL_D_VEC *velocity) { FUNCNAME("add_refined_data"); int count, max_degree = 0, ne, nv, n_bas_fcts, i, j, k, n_sub; int dim = mesh->dim, index; DOF_REAL_VEC *drv = nil; DOF_REAL_D_VEC *drdv = nil; const FE_SPACE *max_fe_space = nil; DOF_INT_VEC *dof_vert_ind; DOF *local_dofs = nil; DOF **local_dof_ptr; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, int *); const REAL_D *(*interpol_d)(const EL_INFO *, int, const int *, const REAL *(*)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *); int *vert_ind = NULL, *elements; REAL_D *vertices, *local_coords, buffer; int *mat_array = nil; REAL *new_vecs[250] = {}; REAL *new_vecs_d[250][DIM_OF_WORLD] = {}; REAL *new_vel[3] = {}; REAL *local_new_vec; REAL_D *local_new_vec_d; const BAS_FCTS *new_bas_fcts; const DOF_ADMIN *new_admin; TRAVERSE_STACK *stack; const EL_INFO *el_info; char name[32] = {}; if(dim == 0) { WARNING("mesh->dim == 0, using standard output mechanism.\n"); return false; } /***************************************************************************/ /* Step 1: Look for the largest Lagrange degree of vectors on mesh. */ /* Remember the corresponding FE_SPACE, since we need a mapping from local */ /* DOFs to global indices. */ /***************************************************************************/ for(count = 0; count < n_drv; count++) { drv = drv_ptr[count]; if(!drv) { ERROR("Could not find DOF_REAL_VEC %d!\n", count); break; } if(!strstr(drv->fe_space->bas_fcts->name, "lagrange")) { WARNING("Only implemented for Lagrange Finite Elements!\n"); WARNING("Using standard output mechanism.\n"); return false; } if(drv->fe_space->bas_fcts->degree > max_degree) { max_fe_space = drv->fe_space; max_degree = max_fe_space->bas_fcts->degree; } } for(count = 0; count < n_drdv; count++) { drdv = drdv_ptr[count]; if(!drdv) { ERROR("Could not find DOF_REAL_D_VEC %d!\n", count); break; } if(!strstr(drdv->fe_space->bas_fcts->name, "lagrange")) { WARNING("Only implemented for Lagrange Finite Elements!\n"); WARNING("Using standard output mechanism.\n"); return false; } if(drdv->fe_space->bas_fcts->degree > max_degree) { max_fe_space = drdv->fe_space; max_degree = max_fe_space->bas_fcts->degree; } } if(velocity) { if(!strstr(velocity->fe_space->bas_fcts->name, "lagrange")) { WARNING("Only implemented for Lagrange Finite Elements!\n"); WARNING("Using standard output mechanism.\n"); return false; } if(velocity->fe_space->bas_fcts->degree > max_degree) { max_fe_space = velocity->fe_space; max_degree = max_fe_space->bas_fcts->degree; } } MSG("Maximal degree found:%d\n", max_degree); if(max_degree <= 1) { MSG("Using standard output mechanism.\n"); return false; } /***************************************************************************/ /* Step 2: Count the number of needed vertices and elements. Fill element */ /* and vertex arrays. */ /***************************************************************************/ n_sub = n_sub_elements[dim-1][max_degree-2]; n_bas_fcts = max_fe_space->bas_fcts->n_bas_fcts; local_dofs = MEM_ALLOC(n_bas_fcts, DOF); get_dof_indices = max_fe_space->bas_fcts->get_dof_indices; dof_vert_ind = get_dof_int_vec("vertex indices", max_fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(max_fe_space->admin, vert_ind[dof] = -1); elements = MEM_ALLOC(mesh->n_elements * n_sub * N_VERTICES(dim), int); ne = nv = 0; stack = get_traverse_stack(); for(el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); el_info; el_info = traverse_next(stack, el_info)) { get_dof_indices(el_info->el, max_fe_space->admin, local_dofs); for(i = 0; i < n_bas_fcts; i++) if (vert_ind[local_dofs[i]] == -1) { /* Assign a global index to each vertex. */ vert_ind[local_dofs[i]] = nv; nv++; } /* Assign element indices. */ for(i = 0; i < n_sub; i++) { for(j = 0; j < N_VERTICES(dim); j++) elements[VERT_IND(dim,ne,j)] = vert_ind[local_dofs[sub_elements[dim-1][max_degree-2][i][j]]]; ne++; } } /* Do a quick check on the element number. */ TEST_EXIT(ne == mesh->n_elements * n_sub, "Wrong no. of elements counted!\n"); /***************************************************************************/ /* Step 3: Allocate and fill the vertex array, as well as the DOF_REAL_VEC */ /* and DOF_REAL_D_VEC arrays. */ /***************************************************************************/ vertices = MEM_ALLOC(nv, REAL_D); local_coords = MEM_ALLOC(n_bas_fcts, REAL_D); interpol_d = max_fe_space->bas_fcts->interpol_d; local_new_vec = MEM_ALLOC(n_bas_fcts, REAL); local_new_vec_d = MEM_ALLOC(n_bas_fcts, REAL_D); for(i = 0; i < n_drv; i++) { if(!drv_ptr[i]) { ERROR("Could not find DOF_REAL_VEC %d!\n", i); break; } if(drv_ptr[i]->fe_space->bas_fcts->degree == 0) new_vecs[i] = MEM_ALLOC(ne, REAL); else new_vecs[i] = MEM_ALLOC(nv, REAL); } for(i = 0; i < n_drdv; i++) { if(!drdv_ptr[i]) { ERROR("Could not find DOF_REAL_D_VEC %d!\n", i); break; } if(drdv_ptr[i]->fe_space->bas_fcts->degree == 0) index = ne; else index = nv; for(j = 0; j < DIM_OF_WORLD; j++) new_vecs_d[i][j] = MEM_ALLOC(index, REAL); } if(velocity) { if(velocity->fe_space->bas_fcts->degree == 0) index = ne; else index = nv; for(i = 0; i < 3; i++) new_vel[i] = MEM_CALLOC(index, REAL); } stack = get_traverse_stack(); for(index = 0, el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL | FILL_COORDS); el_info; index++, el_info = traverse_next(stack, el_info)) { get_dof_indices(el_info->el, max_fe_space->admin, local_dofs); interpol_d(el_info, 0, nil, identity, nil, local_coords); for(i = 0; i < n_bas_fcts; i++) for(j = 0; j < DIM_OF_WORLD; j++) vertices[vert_ind[local_dofs[i]]][j] = local_coords[i][j]; for(i = 0; i < n_drv; i++) if(drv_ptr[i]) { new_bas_fcts = drv_ptr[i]->fe_space->bas_fcts; new_admin = drv_ptr[i]->fe_space->admin; if(new_bas_fcts->degree == 0) { int n0 = new_admin->n0_dof[CENTER]; local_dof_ptr = el_info->el->dof; for(j = 0; j < n_sub; j++) new_vecs[i][index*n_sub + j] = drv_ptr[i]->vec[local_dof_ptr[mesh->node[CENTER]][n0]]; } else { new_bas_fcts->get_real_vec(el_info->el, drv_ptr[i], local_new_vec); for(j = 0; j < n_bas_fcts; j++) new_vecs[i][vert_ind[local_dofs[j]]] = eval_uh(LAGRANGE_NODES(max_fe_space->bas_fcts)[j], local_new_vec, new_bas_fcts); } } for(i = 0; i < n_drdv; i++) if(drdv_ptr[i]) { new_bas_fcts = drdv_ptr[i]->fe_space->bas_fcts; new_admin = drdv_ptr[i]->fe_space->admin; if(new_bas_fcts->degree == 0) { int n0 = new_admin->n0_dof[CENTER]; local_dof_ptr = el_info->el->dof; for(j = 0; j < n_sub; j++) for(k = 0; k < DIM_OF_WORLD; k++) new_vecs_d[i][k][index*n_sub + j] = drdv_ptr[i]->vec[local_dof_ptr[mesh->node[CENTER]][n0]][k]; } else { new_bas_fcts->get_real_d_vec(el_info->el, drdv_ptr[i], local_new_vec_d); for(j = 0; j < n_bas_fcts; j++) { eval_uh_d(LAGRANGE_NODES(max_fe_space->bas_fcts)[j], (const REAL_D *)local_new_vec_d, new_bas_fcts, buffer); for(k = 0; k < DIM_OF_WORLD; k++) new_vecs_d[i][k][vert_ind[local_dofs[j]]] = buffer[k]; } } } if(velocity) { new_bas_fcts = velocity->fe_space->bas_fcts; new_admin = velocity->fe_space->admin; if(new_bas_fcts->degree == 0) { int n0 = new_admin->n0_dof[CENTER]; local_dof_ptr = el_info->el->dof; for(i = 0; i < n_sub; i++) for(j = 0; j < DIM_OF_WORLD; j++) new_vel[j][index*n_sub + i] = velocity->vec[local_dof_ptr[mesh->node[CENTER]][n0]][j]; } else { new_bas_fcts->get_real_d_vec(el_info->el, velocity, local_new_vec_d); for(i = 0; i < n_bas_fcts; i++) { eval_uh_d(LAGRANGE_NODES(max_fe_space->bas_fcts)[i], (const REAL_D *)local_new_vec_d, new_bas_fcts, buffer); for(j = 0; j < DIM_OF_WORLD; j++) new_vel[j][vert_ind[local_dofs[i]]] = buffer[j]; } } } } /***************************************************************************/ /* Step 5: Write a material array in the parametric case. */ /***************************************************************************/ if(mesh->parametric) { mat_array = MEM_CALLOC(ne, int); ne = 0; el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION); while (el_info) { if(mesh->parametric->init_element(el_info, mesh->parametric)) for(i = 0; i < n_sub; i++) mat_array[ne + i] = 2; else for(i = 0; i < n_sub; i++) mat_array[ne + i] = 1; ne += n_sub; el_info = traverse_next(stack, el_info); } ne = mesh->n_elements * n_sub; } /***************************************************************************/ /* Step 6: Dump all vectors to the file. */ /***************************************************************************/ if(write_mesh_data) { write_coord_array(file, nv, vertices, write_ascii); write_elem_array(file, dim, ne, elements, write_ascii); if(mesh->parametric) write_mat_array(file, ne, mat_array, write_ascii); } if(n_drv && drv_ptr) { if(write_ascii) fprintf(file, "variable\n"); else fwrite("variable",sizeof(char),8,file); } for(i = 0; i < n_drv; i++) if(new_vecs[i]) { snprintf(name, 32, drv_ptr[i]->name); convert_string(name); if(drv_ptr[i]->fe_space->bas_fcts->degree == 0) { j = 0; index = ne*n_sub; } else { j = 1; index = nv; } if(write_ascii) { fprintf(file, "%s %d\n", name, j); for(j = 0; j < index; j++) fprintf(file, "%.10E\t", new_vecs[i][j]); } else { fwrite(name, sizeof(char), 32, file); fwrite(&j, sizeof(int), 1, file); fwrite(new_vecs[i], sizeof(REAL), index, file); } } if(n_drv && drv_ptr) { if(write_ascii) fprintf(file, "endvars\n"); else fwrite("endvars ",sizeof(char),8,file); } if(n_drdv && drdv_ptr) { if(write_ascii) fprintf(file, "vectors \n"); else fwrite("vectors ",sizeof(char),8,file); } for(i = 0; i < n_drdv; i++) if(new_vecs_d[i][0]) { snprintf(name, 32, drdv_ptr[i]->name); convert_string(name); if(drdv_ptr[i]->fe_space->bas_fcts->degree == 0) { j = 0; index = ne*n_sub; } else { j = 1; index = nv; } if(write_ascii) { fprintf(file, "%s %d %d %d\n", name, j, DIM_OF_WORLD, 0); for(j = 0; j < DIM_OF_WORLD; j++) for(k = 0; k < index; k++) fprintf(file, "%.10E\t", new_vecs_d[i][j][k]); } else { fwrite(name, sizeof(char), 32, file); fwrite(&j, sizeof(int), 1, file); j = DIM_OF_WORLD; fwrite(&j, sizeof(int), 1, file); j = 0; fwrite(&j, sizeof(int), 1, file); for(j = 0; j < DIM_OF_WORLD; j++) fwrite(new_vecs_d[i][j], sizeof(REAL), index, file); } } if(n_drdv && drdv_ptr) { if(write_ascii) fprintf(file, "endvect\n"); else fwrite("endvect ",sizeof(char),8,file); } if(velocity) { if(velocity->fe_space->bas_fcts->degree == 0) { j = 0; index = ne; } else { j = 1; index = nv; } if(write_ascii) { fprintf(file, "velocity %d\n", j); for(i = 0; i < 3; i++) for(j = 0; j < index; j++) fprintf(file, "%.10E\t", new_vel[i][j]); } else { fwrite("velocity", sizeof(char), 8, file); fwrite(&j, sizeof(int), 1, file); for(i = 0; i < 3; i++) fwrite(new_vel[i], sizeof(REAL), index, file); } } /* Free all allocated memory. . */ MEM_FREE(elements, ne * N_VERTICES(dim), int); MEM_FREE(vertices, nv, REAL_D); MEM_FREE(local_dofs, n_bas_fcts, DOF); MEM_FREE(local_coords, n_bas_fcts, REAL_D); MEM_FREE(local_new_vec, n_bas_fcts, REAL); MEM_FREE(local_new_vec_d, n_bas_fcts, REAL_D); if(mesh->parametric) MEM_FREE(mat_array, ne, int); for(i = 0; i < n_drv; i++) if(new_vecs[i]) { if(drv_ptr[i]->fe_space->bas_fcts->degree == 0) MEM_FREE(new_vecs[i], ne, REAL); else MEM_FREE(new_vecs[i], nv, REAL); } for(i = 0; i < n_drdv; i++) if(new_vecs_d[i][0]) { for(j = 0; j < DIM_OF_WORLD; j++) if(drdv_ptr[i]->fe_space->bas_fcts->degree == 0) MEM_FREE(new_vecs_d[i][j], ne, REAL); else MEM_FREE(new_vecs_d[i][j], nv, REAL); } for(i = 0; i < 3; i++) if(new_vel[i]) { if(velocity->fe_space->bas_fcts->degree == 0) MEM_FREE(new_vel[i], ne, REAL); else MEM_FREE(new_vel[i], nv, REAL); } free_dof_int_vec(dof_vert_ind); free_traverse_stack(stack); return true; } /***************************************************************************/ /* User interface */ /***************************************************************************/ /***************************************************************************/ /* write_mesh_gmv(): */ /* Write mesh and vectors in GMV ASCII or binary format. */ /* We may output up to 250 DOF_REAL_VECs and 250 DOF_REAL_D_VECs into the */ /* GMV file. These are passed as lists. The "velocity" argument is treated */ /* in a special way; GMV will automatically generate a field storing the */ /* velocity magnitudes. Only the mesh and file names are mandatory. See */ /* the description of "add_refined_data()" above for an explanation of */ /* "use_refined_grid". The entry "sim_time" represents the numerical time */ /* for instationary problems. GMV can display this value together with */ /* the FEM data. */ /* */ /* Return value is 0 for OK and 1 for ERROR. */ /***************************************************************************/ int write_mesh_gmv(MESH *mesh, const char *file_name, int write_ascii, int use_refined_grid, const int n_drv, DOF_REAL_VEC **drv_ptr, const int n_drdv, DOF_REAL_D_VEC **drdv_ptr, DOF_REAL_D_VEC *velocity, REAL sim_time) { FUNCNAME("write_mesh_gmv"); FILE *file = nil; DOF_REAL_VEC *drv = nil; DOF_REAL_D_VEC *drdv = nil; int count; if(!mesh) { ERROR("no mesh - no file created!\n"); return(1); } if(n_drv < 0 || n_drv > 250) { ERROR("n_drv must be an int between 0 and 250!\n"); return(1); } if(n_drdv < 0 || n_drdv > 250) { ERROR("n_drdv must be an int between 0 and 250!\n"); return(1); } if(write_ascii) file = gmv_open_ascii(file_name, mesh, sim_time); else file = gmv_open_bin(file_name, sizeof(int), sizeof(REAL), sim_time); if(!file) { ERROR("cannot open file %s\n",file_name); return(1); } dof_compress(mesh); /* If we are using a refined Lagrange grid, then a special routine is called */ /* which takes care of mesh and vectors. */ if(!use_refined_grid || !add_refined_data(file, mesh, write_ascii, true, n_drv, drv_ptr, n_drdv, drdv_ptr, velocity)) { add_mesh(file, mesh, write_ascii); if(n_drv && drv_ptr) { if(write_ascii) fprintf(file, "variable\n"); else { fwrite("variable",sizeof(char),8,file); } for(count = 0; count < n_drv; count++) { drv = drv_ptr[count]; if(!drv) { ERROR("Could not find DOF_REAL_VEC!\n"); break; } add_drv(file, mesh, drv, write_ascii); } if(write_ascii) fprintf(file, "endvars\n"); else { fwrite("endvars ",sizeof(char),8,file); } } if(n_drdv && drdv_ptr) { if(write_ascii) fprintf(file, "vectors\n"); else { fwrite("vectors ",sizeof(char),8,file); } for(count = 0; count < n_drdv; count++) { drdv = drdv_ptr[count]; if(!drdv) { ERROR("Could not find DOF_REAL_D_VEC!\n"); break; } add_drdv(file, mesh, drdv, write_ascii, false); } if(write_ascii) fprintf(file, "endvect\n"); else { fwrite("endvect ",sizeof(char),8,file); } } if(velocity) add_drdv(file, mesh, velocity, write_ascii, true); } if(write_ascii) fprintf(file, "endgmv"); else { fwrite("endgmv ",sizeof(char),8,file); } fclose(file); return(0); } /***************************************************************************/ /* write_dof_vec_gmv(): */ /* This function is similar to the one above. However, we do not output */ /* the mesh node and element data - instead we direct GMV to access this */ /* data from the "mesh_file". This file must have been created by a */ /* previous call to write_mesh_gmv(). This way we avoid wasting time and */ /* disk space when writing full GMV files including redundant mesh */ /* information during each step of an instationary simulation, see GMV */ /* documentation. */ /* */ /* PLEASE NOTE: When using the "use_refined_grid" feature, the prior */ /* write_mesh_gmv() call must also be given DOF_REAL_[D_]VECS to */ /* determine the needed virtual refinement of the output mesh. */ /* */ /* Return value is 0 for OK and 1 for ERROR. */ /***************************************************************************/ int write_dof_vec_gmv(MESH *mesh, const char *mesh_file, const char *file_name, int write_ascii, int use_refined_grid, const int n_drv, DOF_REAL_VEC **drv_ptr, const int n_drdv, DOF_REAL_D_VEC **drdv_ptr, DOF_REAL_D_VEC *velocity, REAL sim_time) { FUNCNAME("write_mesh_gmv"); FILE *file = nil; DOF_REAL_VEC *drv = nil; DOF_REAL_D_VEC *drdv = nil; int count; if(n_drv < 0 || n_drv > 250) { ERROR("n_drv must be an int between 0 and 250!\n"); return(1); } if(n_drdv < 0 || n_drdv > 250) { ERROR("n_drdv must be an int between 0 and 250!\n"); return(1); } if(write_ascii) file = gmv_open_ascii(file_name, mesh, sim_time); else file = gmv_open_bin(file_name, sizeof(int), sizeof(REAL), sim_time); if(!file) { ERROR("cannot open file %s\n",file_name); return(1); } dof_compress(mesh); /* At this point we use the "fromfile" keyword to tell GMV about the other */ /* file storing the mesh nodes and elements. */ if(write_ascii) { fprintf(file, "nodev fromfile \"%s\"\n", mesh_file); fprintf(file, "cells fromfile \"%s\"\n", mesh_file); /* Material is only written for parametric meshes. */ if(mesh->parametric) fprintf(file, "material fromfile \"%s\"\n", mesh_file); } else { char filename[1024] = {}; TEST_EXIT(strlen(mesh_file) < 1024, "Sorry, the filename is too long, please use less than 1024 characters.\n"); snprintf(filename, 1024, "\"%s\"", mesh_file); fwrite("nodev fromfile",sizeof(char),16,file); fwrite(filename,sizeof(char),strlen(filename),file); fwrite("cells fromfile",sizeof(char),16,file); fwrite(filename,sizeof(char),strlen(filename),file); /* Material is only written for parametric meshes. */ if(mesh->parametric) { fwrite("materialfromfile",sizeof(char),16,file); fwrite(filename,sizeof(char),strlen(filename),file); } } /* If we are using a refined Lagrange grid, then a special routine is called */ /* which takes care of mesh and vectors. */ if(!use_refined_grid || !add_refined_data(file, mesh, write_ascii, false, n_drv, drv_ptr, n_drdv, drdv_ptr, velocity)) { if(n_drv && drv_ptr) { if(write_ascii) fprintf(file, "variable\n"); else { fwrite("variable",sizeof(char),8,file); } for(count = 0; count < n_drv; count++) { drv = drv_ptr[count]; if(!drv) { ERROR("Could not find DOF_REAL_VEC!\n"); break; } add_drv(file, mesh, drv, write_ascii); } if(write_ascii) fprintf(file, "endvars\n"); else { fwrite("endvars ",sizeof(char),8,file); } } if(n_drdv && drdv_ptr) { if(write_ascii) fprintf(file, "vectors\n"); else { fwrite("vectors ",sizeof(char),8,file); } for(count = 0; count < n_drdv; count++) { drdv = drdv_ptr[count]; if(!drdv) { ERROR("Could not find DOF_REAL_D_VEC!\n"); break; } add_drdv(file, mesh, drdv, write_ascii, false); } if(write_ascii) fprintf(file, "endvect\n"); else { fwrite("endvect ",sizeof(char),8,file); } } if(velocity) add_drdv(file, mesh, drdv, write_ascii, true); } if(write_ascii) fprintf(file, "endgmv"); else { fwrite("endgmv ",sizeof(char),8,file); } fclose(file); return(0); } alberta-2.0.1/alberta/src/Common/write_mesh_ps.c0000644000042300001440000001224610676724253016523 00000000000000#include "alberta.h" #define X(x) ((x-x_min)*diam_x_1) #define Y(y) ((y-y_min)*diam_y_1) void write_mesh_ps(MESH *mesh, const char *filename, const char *title, const REAL x[2], const REAL y[2], int keepaspect, int draw_bound) { FUNCNAME("write_mesh_ps"); REAL x_min, x_max, y_min, y_max, diam_x_1, diam_y_1; int i, m; MACRO_EL *mel; FILE *psFile; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; if (!mesh) return; if((mesh->dim != 2) || (DIM_OF_WORLD != 2)) { ERROR("This routine is only implemented for dim==DIM_OF_WORLD==2!\n"); return; } x_max = y_max = -LARGE; x_min = y_min = LARGE; for (m = 0; m < mesh->n_macro_el; m++) { mel = mesh->macro_els + m; for (i = 0; i < N_VERTICES_2D; i++) { x_max = MAX(x_max,mel->coord[i][0]); y_max = MAX(y_max,mel->coord[i][1]); x_min = MIN(x_min,mel->coord[i][0]); y_min = MIN(y_min,mel->coord[i][1]); } } if (x && x[0] != x[1]) { REAL xx; xx = MAX(x[1], x_min); x_max = MIN(x_max,xx); xx = MIN(x[0], x_max); x_min = MAX(x_min,xx); } if (y && y[0] != y[1]) { REAL yy; yy = MAX(y[1], y_min); y_max = MIN(y_max,yy); yy = MIN(y[0], y_max); y_min = MAX(y_min,yy); } diam_x_1 = x_max - x_min ? 1.0/(x_max - x_min) : 1.0; diam_y_1 = y_max - y_min ? 1.0/(y_max - y_min) : 1.0; if (keepaspect) diam_x_1 = diam_y_1 = MIN(diam_x_1, diam_y_1); if (!(psFile = fopen(filename, "w"))) { MSG("cannot open PS file for writing\n"); return; } fprintf(psFile,"%%!PS-Adobe-2.0 EPSF-1.2\n"); fprintf(psFile,"%%%%Creator: ALBERTAPostScript driver for 2d\n"); fprintf(psFile,"%%%%Title: %s\n", title ? title : "ALBERTAOutput"); fprintf(psFile,"%%%%Pages: 1\n"); fprintf(psFile,"%%%%DocumentFonts: Times-Roman\n"); fprintf(psFile,"%%%%BoundingBox: 200 200 %.3f %.3f\n", 200.0*(1.0 + X(x_max)), 200.0*(1.0 + Y(y_max))); fprintf(psFile,"%%%%EndComments\n"); fprintf(psFile,"%%begin(plot)\n"); fprintf(psFile,"200 200 translate\n"); fprintf(psFile,"200 200 scale %% 72 = 1in, 200 ~ 7cm\n"); fprintf(psFile,"/mm { 0.01132 mul } def\n"); fprintf(psFile,"/m { moveto } def\n"); fprintf(psFile,"/l { lineto } def\n"); fprintf(psFile," %.3f %.3f m\n", 0.0, 0.0); fprintf(psFile," %.3f %.3f l\n", X(x_max), 0.0); fprintf(psFile," %.3f %.3f l\n", X(x_max), Y(y_max)); fprintf(psFile," %.3f %.3f l\n", 0.0, Y(y_max)); fprintf(psFile,"closepath\n"); if (!draw_bound) fprintf(psFile, "%%"); fprintf(psFile,"gsave 0.5 mm setlinewidth stroke grestore\n"); fprintf(psFile,"clip\n"); fprintf(psFile, "0.25 mm setlinewidth 1 setlinejoin 1 setlinecap\n"); fprintf(psFile," 0 0 0 setrgbcolor\n"); fprintf(psFile, "/Times-Roman findfont 5 mm scalefont setfont 0 setgray\n"); fprintf(psFile,"%% ENDE DES PROLOGS XXXXXXXXXXXXXXXXXXX\n"); if (title) fprintf(psFile,"0.1 1.05 m\n (%s) show\n",title); fprintf(psFile, "0.25 mm setlinewidth 1 setlinejoin 1 setlinecap\n"); for (m = 0; m < mesh->n_macro_el; m++) { mel = mesh->macro_els + m; for (i = 0; i < N_EDGES_2D; i++) { if (!IS_INTERIOR(mel->edge_bound[i])) { fprintf(psFile,"newpath\n"); fprintf(psFile,"%f %f m\n", X(mel->coord[(i+1)%3][0]), Y(mel->coord[(i+1)%3][1])); fprintf(psFile,"%f %f l\n", X(mel->coord[(i+2)%3][0]), Y(mel->coord[(i+2)%3][1])); fprintf(psFile,"stroke\n"); } } } fprintf(psFile, "0.25 mm setlinewidth 1 setlinejoin 1 setlinecap\n"); if (draw_bound) { fprintf(psFile,"%% begin domains boundary\n"); #if 1 for (m = 0; m < mesh->n_macro_el; m++) { mel = mesh->macro_els + m; for (i = 0; i < N_EDGES_2D; i++) { if (!IS_INTERIOR(mel->edge_bound[i])) { fprintf(psFile,"newpath\n"); fprintf(psFile,"%f %f m\n", X(mel->coord[(i+1)%3][0]), Y(mel->coord[(i+1)%3][1])); fprintf(psFile,"%f %f l\n", X(mel->coord[(i+2)%3][0]), Y(mel->coord[(i+2)%3][1])); fprintf(psFile,"stroke\n"); } } } #else fprintf(psFile,"newpath\n"); fprintf(psFile,"%f %f m\n", X(x_min), Y(y_min)); fprintf(psFile,"%f %f l\n", X(x_max), Y(y_min)); fprintf(psFile,"%f %f l\n", X(x_max), Y(y_max)); fprintf(psFile,"%f %f l\n", X(x_min), Y(y_max)); fprintf(psFile,"%f %f l\n", X(x_min), Y(y_min)); fprintf(psFile,"stroke\n"); #endif fprintf(psFile,"%% begin domains boundary\n"); } el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); while(el_info) { REAL x, y; int i; for (i = 0; i < N_VERTICES_2D; i++) { x = X(el_info->coord[i][0]); y = Y(el_info->coord[i][1]); if (x >= 0.0 && x <= 1.0 && y >= 0.0 && y <= 1.0) break; } if (i < N_VERTICES_2D) { fprintf(psFile,"newpath\n"); fprintf(psFile,"%f %f m\n", X(el_info->coord[0][0]), Y(el_info->coord[0][1])); fprintf(psFile,"%f %f l\n", X(el_info->coord[1][0]), Y(el_info->coord[1][1])); fprintf(psFile,"%f %f l\n", X(el_info->coord[2][0]), Y(el_info->coord[2][1])); fprintf(psFile,"stroke\n"); } el_info = traverse_next(stack, el_info); } fprintf(psFile,"showpage\n"); fclose(psFile); return; } alberta-2.0.1/alberta/src/Common/gltools.c0000644000042300001440000007413010676724253015336 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: gltools.c */ /* */ /* */ /* description: interface to gltools-2-4 */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #include "glrnd.h" #include "glmesh.h" /*--------------------------------------------------------------------------*/ /* vector for storing the additional coordinates, and vector with pointers */ /* to all these coordinates; the first three have to be set on each */ /* element to the element's vertices */ /*--------------------------------------------------------------------------*/ typedef struct gltools_info GLTOOLS_INFO; struct gltools_info { const DOF_REAL_VEC *u; const DOF_REAL_D_VEC *ud; const DOF_REAL_D_VEC *displacement; int degree; int refinement; int scalar; /* 0:vector, 1:scalar, 2:vector_norm */ MESH *mesh; REAL (*get_est)(EL *); double min, max; GLTOOLS_INFO *next; }; static GLTOOLS_INFO *key_P_info = nil; static int glrKeyAction_P(glRenderer rnd, int mask) { switch (key_P_info->degree) { case 0: case 1: return(GL_FALSE); default: key_P_info->refinement = (key_P_info->refinement + 1)%(key_P_info->degree+1); return(GL_TRUE); } } /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ typedef struct cell_info CELL_INFO; struct cell_info { int dim; const REAL *coords[N_VERTICES_MAX]; const REAL *bary[N_LAMBDA]; REAL f[N_VERTICES_MAX]; int el_type; }; static const EL_INFO *cell_el_info; static const BAS_FCTS *cell_bas_fcts; static const REAL *cell_uh = nil; static const REAL_D *cell_uh_d = nil; static const BAS_FCTS *cell_disp_bas_fcts; static REAL_D *cell_displacement = nil; static int cell_displacement_size = 0; static int cell_f_scalar=1; /* 0:vector, 1:scalar, 2:vector_norm */ static void (*cell_coord_to_world)(const EL_INFO *info, const QUAD *quad, int n, const REAL lambda[][N_LAMBDA], REAL_D *world); static REAL_D glm_cellflux = {0.0}; static int cell_count = 0; static int const_cell_dofs[N_VERTICES_MAX]={0}; static int local_cell_dofs[N_VERTICES_MAX]={0,1,2,3}; static const REAL vertex_bary[N_VERTICES_MAX][N_LAMBDA] = {{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}, {0.0,0.0,0.0,1.0}}; static const REAL center_bary[4][N_LAMBDA] = {{0.0, 0.0, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0}, {1.0/3.0, 1.0/3.0, 1.0/3.0, 0.0}, {0.25,0.25,0.25,0.25}}; static int child_vertex_2d[2][3] = {{2, 0, -1},{1, 2, -1}}; #define STIP_WIDTH 0.2 /* plot two triangles for each 1D simplex */ static void simplex_1d_2d(glMesh m, int cell_count, REAL *f, int nf, REAL **coords, glmSimplexCallback sxf) { FUNCNAME("simplex_1d_2d"); static REAL coords_1d_2d[4][2]={{0.0,0.0},{1.0,0.0}, {0.0,STIP_WIDTH},{1.0,STIP_WIDTH}}; static REAL *cell_coords_1d_2d[2][3] ={{coords_1d_2d[1],coords_1d_2d[2],coords_1d_2d[0]}, {coords_1d_2d[2],coords_1d_2d[1],coords_1d_2d[3]}}; static int local_cell_dofs_1d_2d[2][3]={{1,0,0},{0,1,1}}; static int const_cell_dofs_1d_2d[3]={0,0,0}; DEBUG_TEST_EXIT(coords, "no coords"); #if DIM_OF_WORLD == 1 coords_1d_2d[0][0] = coords_1d_2d[2][0] = coords[0][0]; coords_1d_2d[1][0] = coords_1d_2d[3][0] = coords[1][0]; #else { REAL len, normal[2]; normal[0] = coords[1][1] - coords[0][1]; normal[1] = coords[0][0] - coords[1][0]; len = STIP_WIDTH * 0.3 / (sqrt(SQR(normal[0])+SQR(normal[1]))); normal[0] *= len; normal[1] *= len; coords_1d_2d[0][0] = coords[0][0]; coords_1d_2d[0][1] = coords[0][1]; coords_1d_2d[1][0] = coords[1][0]; coords_1d_2d[1][1] = coords[1][1]; coords_1d_2d[2][0] = coords[0][0] + normal[0]; coords_1d_2d[2][1] = coords[0][1] + normal[1]; coords_1d_2d[3][0] = coords[1][0] + normal[0]; coords_1d_2d[3][1] = coords[1][1] + normal[1]; } #endif if (nf >= 3) { sxf(m, cell_count, 1, f, local_cell_dofs_1d_2d[0], cell_coords_1d_2d[0]); sxf(m, cell_count, 1, f, local_cell_dofs_1d_2d[1], cell_coords_1d_2d[1]); } else { sxf(m, cell_count, 1, f, const_cell_dofs_1d_2d, cell_coords_1d_2d[0]); sxf(m, cell_count, 1, f, const_cell_dofs_1d_2d, cell_coords_1d_2d[1]); } return; } static void recursive_cell(glMesh m, glmSimplexCallback sxf, int level, CELL_INFO *cell_info) { if (level <= 0) { if(cell_info->dim == 1) simplex_1d_2d(m, cell_count, cell_info->f, 3, (REAL **)cell_info->coords, sxf); else if (cell_f_scalar) sxf(m, cell_count, 1, cell_info->f, local_cell_dofs, (REAL **)cell_info->coords); else { eval_uh_d(center_bary[cell_info->dim], cell_uh_d, cell_bas_fcts, glm_cellflux); sxf(m, 0, 1, glm_cellflux, const_cell_dofs, (REAL **)cell_info->coords); } } else { CELL_INFO child_info; REAL_D new_coords; REAL new_bary[1][N_LAMBDA], new_f; int i, ichild; for (i = 0; i <= cell_info->dim; i++) new_bary[0][i] = 0.5*(cell_info->bary[0][i] + cell_info->bary[1][i]); if (cell_coord_to_world) { cell_coord_to_world(cell_el_info, nil, 1, (const REAL (*)[N_LAMBDA])new_bary, &new_coords); } else { if (0 && cell_disp_bas_fcts) { eval_uh_d(new_bary[0], (const REAL_D *)cell_displacement, cell_disp_bas_fcts, new_coords); } else { for (i = 0; i <= cell_info->dim; i++) new_coords[i] = 0.5*(cell_info->coords[0][i] + cell_info->coords[1][i]); } } switch (cell_f_scalar) { case 1: new_f = eval_uh(new_bary[0], cell_uh, cell_bas_fcts); break; case 2: { REAL_D f_d; eval_uh_d(new_bary[0], cell_uh_d, cell_bas_fcts, f_d); new_f = NORM_DOW(f_d); break; } default: new_f = 0.0; } child_info.dim = cell_info->dim; for (ichild = 0; ichild < 2; ++ichild) { switch(cell_info->dim) { case 1: child_info.coords[ichild] = cell_info->coords[ichild]; child_info.coords[1-ichild] = new_coords; child_info.bary[ichild] = cell_info->bary[ichild]; child_info.bary[1-ichild] = new_bary[0]; child_info.f[ichild] = cell_info->f[ichild]; child_info.f[1-ichild] = new_f; break; case 2: for (i = 0; i < 2; i++) { int j = child_vertex_2d[ichild][i]; child_info.coords[i] = cell_info->coords[j]; child_info.bary[i] = cell_info->bary[j]; child_info.f[i] = cell_info->f[j]; } child_info.coords[2] = new_coords; child_info.bary[2] = new_bary[0]; child_info.f[2] = new_f; break; case 3: for (i = 0; i < 3; i++) { int j = child_vertex_3d[cell_info->el_type][ichild][i]; child_info.coords[i] = cell_info->coords[j]; child_info.bary[i] = cell_info->bary[j]; child_info.f[i] = cell_info->f[j]; } child_info.coords[3] = new_coords; child_info.bary[3] = new_bary[0]; child_info.f[3] = new_f; child_info.el_type = (cell_info->el_type + 1) % 3; } recursive_cell(m, sxf, level-1, &child_info); } } return; } static void m_cell_loop(glMesh m, void *data, glmSimplexCallback sxf) { FUNCNAME("m_cell_loop"); CELL_INFO cell_info[1]; GLTOOLS_INFO *info = (GLTOOLS_INFO *) data; const DOF_REAL_VEC *u = NULL; const DOF_REAL_D_VEC *ud = NULL; MESH *mesh; PARAMETRIC *parametric; const DOF_ADMIN *admin; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; REAL_D wc[N_VERTICES_MAX]; int i, j, dim; cell_f_scalar = info->scalar; if (cell_f_scalar==1) { u = info->u; if (!u) { ERROR("no dof_real_vec\n"); return; } mesh = u->fe_space->mesh; admin = u->fe_space->admin; cell_bas_fcts = u->fe_space->bas_fcts; } else { ud = info->ud; if (!ud) { ERROR("no dof_real_d_vec\n"); return; } mesh = ud->fe_space->mesh; admin = ud->fe_space->admin; cell_bas_fcts = ud->fe_space->bas_fcts; } parametric = mesh->parametric; dim = mesh->dim; if (info->displacement) { cell_disp_bas_fcts = info->displacement->fe_space->bas_fcts; } else { cell_disp_bas_fcts = nil; } cell_count=1; for (el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); el_info; el_info=traverse_next(stack,el_info)) { cell_el_info = el_info; if (cell_f_scalar==1) { cell_uh = cell_bas_fcts->get_real_vec(el_info->el, u, nil); } else { cell_uh_d = cell_bas_fcts->get_real_d_vec(el_info->el, ud, nil); } cell_info->dim = dim; /* correct element coordinates for parametric elements */ if (parametric) { parametric->init_element(el_info, parametric); cell_coord_to_world = parametric->coord_to_world; cell_coord_to_world(el_info, nil, N_VERTICES(dim), vertex_bary, wc); for(i = 0; i < N_VERTICES(dim);i++) cell_info->coords[i] = wc[i]; } else { cell_coord_to_world = nil; if (info->displacement) { /* add displacements */ if (cell_displacement_size < cell_disp_bas_fcts->n_bas_fcts) { cell_displacement = MEM_REALLOC(cell_displacement, cell_displacement_size, cell_disp_bas_fcts->n_bas_fcts, REAL_D); } cell_disp_bas_fcts->get_real_d_vec(el_info->el, info->displacement, cell_displacement); for(i = 0; i < N_VERTICES(dim);i++) { eval_uh_d(vertex_bary[i], (const REAL_D *)cell_displacement, cell_disp_bas_fcts, wc[i]); for (j=0; jcoord[i][j]; cell_info->coords[i] = wc[i]; } } else { cell_coord_to_world = nil; for(i = 0; i < N_VERTICES(dim);i++) cell_info->coords[i] = el_info->coord[i]; } } for (i = 0; i < N_VERTICES(dim);i++) cell_info->bary[i] = vertex_bary[i]; if (cell_f_scalar==1) { for (i = 0; i < N_VERTICES(dim);i++) cell_info->f[i] = eval_uh(vertex_bary[i], cell_uh, cell_bas_fcts); } else if (cell_f_scalar==2) { REAL_D f_d; for (i = 0; i < N_VERTICES(dim);i++) { eval_uh_d(vertex_bary[i], cell_uh_d, cell_bas_fcts, f_d); cell_info->f[i] = NORM_DOW(f_d); } } if(dim == 3) cell_info->el_type = el_info->el_type; if (info->refinement) recursive_cell(m, sxf, dim*info->refinement, cell_info); else recursive_cell(m, sxf, 0, cell_info); ++cell_count; } free_traverse_stack(stack); return; } static int next_dialog = 1; /* Next two functions meant for external add-ons, s.t. those can get * hold of the dialog switch. */ int gltools_get_next_dialog(void) { return next_dialog; } void gltools_set_next_dialog(int dialog) { next_dialog = dialog; } static int glrKeyAction_Q(glRenderer rnd, int mask) { int dialog; glrGetDialog(rnd, &dialog); glrSetDialog(rnd, !dialog); next_dialog = 0; return GL_TRUE; } static int glrKeyAction_q(glRenderer rnd, int mask) { int dialog; glrGetDialog(rnd, &dialog); glrSetDialog(rnd, !dialog); next_dialog = 1; return GL_TRUE; } static int glrKeyAction_s(glRenderer rnd, int mask) { glrSetDialog(rnd, 1); next_dialog = 1; return GL_TRUE; } static int glrKeyAction_X(glRenderer rnd, int mask) { exit(0); return GL_TRUE; } static void xmin_xmax(MESH *mesh, REAL_D xmin, REAL_D xmax) { PARAMETRIC *parametric; EL_INFO mel_info[1]; MACRO_EL *mel; int m, n, i, dim = mesh->dim; if (!mesh) return; parametric = mesh->parametric; mel_info->fill_flag = FILL_COORDS; if(parametric) mel_info->fill_flag |= FILL_PROJECTION; for (n = 0; n < DIM_OF_WORLD; n++) { xmin[n] = LARGE; xmax[n] = -LARGE; } for (m = 0; m < mesh->n_macro_el; m++) { mel = mesh->macro_els + m; fill_macro_info(mesh, mel, mel_info); /* correct element coordinates for parametric elements */ if (parametric) { parametric->init_element(mel_info, parametric); parametric->coord_to_world(mel_info, nil, N_VERTICES(dim), vertex_bary, mel_info->coord); } for (n = 0; n < DIM_OF_WORLD; n++) { for (i=0; icoord[i][n]); xmax[n] = MAX(xmax[n], mel_info->coord[i][n]); } } } return; } GLTOOLS_WINDOW open_gltools_window(const char *title, const char *geometry, const REAL *world, MESH *mesh, int dialog) { FUNCNAME("open_gltools_window"); REAL xmin[3], xmax[3]; glRenderer rnd; glRendererState state; int x = 0, y = 0, w = 300, h = 300, dim = mesh->dim; const char *s; if (dim<=0) { ERROR("Sorry, only implemented for dim > 0.\n"); return(nil); } if (dim==1 && DIM_OF_WORLD==3) { ERROR("Sorry, not implemented for dim==1 && DIM_OF_WORLD==3.\n"); return(nil); } INFO(0,2,"\n"); if (geometry) { if (strchr(geometry, 'x')) { if ((s = strchr(geometry, '+'))) { if (strchr(s+1, '+')) /* "wwxhh+xx+yy" */ sscanf(geometry, "%dx%d+%d+%d", &w, &h, &x, &y); else /* "wwxhh+xx" */ sscanf(geometry, "%dx%d+%d", &w, &h, &x); } else /* "wwxhh" */ { sscanf(geometry, "%dx%d", &w, &h); } } else { if ((s = strchr(geometry, '+'))) { if (strchr(s+1, '+')) /* "xx+yy" */ sscanf(s, "+%d+%d", &x, &y); else /* "wwxhh+xx" */ sscanf(s, "+%d", &x); } } } if (!title) title = "ALBERTA"; rnd = glrCreate((char *) title, x, y, w, h); glrSetDialog(rnd, dialog); state = glrGetRendererState(rnd); state->sensitivity *= M_SQRT2; glrRegisterKeyAction(rnd, GLW_Q, glrKeyAction_Q,"Q: quit dialog"); glrRegisterKeyAction(rnd, GLW_q, glrKeyAction_q,"q: quit"); glrRegisterKeyAction(rnd, GLW_s, glrKeyAction_s,"s: enter dialog"); glrRegisterKeyAction(rnd, GLW_X, glrKeyAction_X,"X: exit program"); if (world) { xmin[0] = world[0]; xmax[0] = world[1]; #if DIM_OF_WORLD == 2 xmin[1] = world[2]; xmax[1] = world[3]; #if DIM_OF_WORLD == 3 xmin[2] = world[4]; xmax[2] = world[5]; #endif #endif } else if (mesh) { xmin_xmax(mesh, xmin, xmax); } else { xmin[0] = 0.0; xmax[0] = 1.0; xmin[1] = 0.0; xmax[1] = 1.0; xmin[2] = 0.0; xmax[2] = 1.0; } if (dimfe_space->mesh; degree = u->fe_space->bas_fcts->degree; ndof = u->fe_space->admin->size_used; #if 0 if(mesh->dim != DIM_OF_WORLD) { ERROR("Sorry, only implemented for dim == DIM_OF_WORLD.\n"); return; } #endif for (info = first; info; info = info->next) if (info->u == u) break; if (!info) { info = MEM_CALLOC(1, GLTOOLS_INFO); info->degree = degree; info->refinement = 0; info->u = u; info->scalar = 1; info->next = first; first = info; } info->displacement = disp; glm = glmCreate(ndof, mesh->n_elements, MAX(2,DIM_OF_WORLD), info,m_cell_loop); glrRegisterKeyAction(rnd, GLW_P, glrKeyAction_P,"P: use Lagrange grid"); key_P_info = info; if (u->name) glrSetUserInfo(rnd, "%s", u->name); glmSetVoffset(glm, 0); glrSetInfoCallback(rnd, (glrDrawCallback) glmDrawInfo); if (ABS(min - max) < 1.e-25) min++; glmSetFunction(glm, u->vec, min, max); glRender(rnd, (glrDrawCallback)(glmDraw), glm); glmDestroy(glm); key_P_info = nil; glrRegisterKeyAction(rnd, GLW_P, nil, nil); glrSetDialog(rnd, next_dialog); return; } void gltools_drv(GLTOOLS_WINDOW win, const DOF_REAL_VEC *u, REAL min, REAL max) { gltools_disp_drv(win, u, min, max, nil); } void gltools_disp_drv_d(GLTOOLS_WINDOW win, const DOF_REAL_D_VEC *u, REAL min, REAL max, const DOF_REAL_D_VEC *disp) { FUNCNAME("gltools_disp_drv_d"); static GLTOOLS_INFO *first = nil; GLTOOLS_INFO *info; MESH *mesh; int degree; int ndof; glMesh glm; glRenderer rnd; INFO(0,2,"\n"); if (!u || !win) return; rnd = (glRenderer) win; glrGetDialog(rnd, &next_dialog); mesh = u->fe_space->mesh; degree = u->fe_space->bas_fcts->degree; ndof = u->fe_space->admin->size_used; if(mesh->dim != DIM_OF_WORLD) { ERROR("Sorry, only implemented for dim == DIM_OF_WORLD.\n"); return; } for (info = first; info; info = info->next) if (info->ud == u) break; if (!info) { info = MEM_CALLOC(1, GLTOOLS_INFO); info->degree = degree; info->refinement = 0; info->ud = u; info->scalar = 2; info->next = first; first = info; } info->displacement = disp; glm = glmCreate(ndof, mesh->n_elements, MAX(2,DIM_OF_WORLD), info, m_cell_loop); glrRegisterKeyAction(rnd, GLW_P, glrKeyAction_P,"P: use Lagrange grid"); key_P_info = info; if (u->name) glrSetUserInfo(rnd, "%s", u->name); glmSetVoffset(glm, 0); glrSetInfoCallback(rnd, (glrDrawCallback) glmDrawInfo); if (min >= max) { min = dof_min_d(u); max = dof_max_d(u); } glmSetFunction(glm, (REAL *)u->vec, min, max); glRender(rnd, (glrDrawCallback)(glmDraw), glm); glmDestroy(glm); key_P_info = nil; glrRegisterKeyAction(rnd, GLW_P, nil, nil); glrSetDialog(rnd, next_dialog); return; } void gltools_drv_d(GLTOOLS_WINDOW win, const DOF_REAL_D_VEC *u, REAL min, REAL max) { gltools_disp_drv_d(win, u, min, max, nil); } void gltools_disp_vec(GLTOOLS_WINDOW win, const DOF_REAL_D_VEC *u, REAL min, REAL max, const DOF_REAL_D_VEC *disp) { FUNCNAME("gltools_disp_vec"); GLTOOLS_INFO info[1] = {{0}}; MESH *mesh; int degree; int ndof; glMesh glm; glRenderer rnd; INFO(0,2,"\n"); if (!u || !win) return; rnd = (glRenderer) win; glrGetDialog(rnd, &next_dialog); mesh = u->fe_space->mesh; degree = u->fe_space->bas_fcts->degree; ndof = u->fe_space->admin->size_used; if(mesh->dim != DIM_OF_WORLD) { ERROR("Sorry, only implemented for dim == DIM_OF_WORLD.\n"); return; } info->degree = degree; info->refinement = 0; info->ud = u; info->scalar = 0; info->displacement = disp; glm = glmCreate(1, 1, MAX(2,DIM_OF_WORLD), info, m_cell_loop); glrRegisterKeyAction(rnd, GLW_P, glrKeyAction_P,"P: use Lagrange grid"); key_P_info = info; if (u->name) glrSetUserInfo(rnd, "%s", u->name); glmSetVoffset(glm, 0); glrSetInfoCallback(rnd, (glrDrawCallback) glmDrawInfo); if (min >= max) { min = dof_min_d(u); max = dof_max_d(u); } /* glmSetFunction(glm, (REAL *)u->vec, min, max); */ glmSetCellFlux(glm, glm_cellflux, min, max); glRender(rnd, (glrDrawCallback)(glmDraw), glm); glmDestroy(glm); key_P_info = nil; glrRegisterKeyAction(rnd, GLW_P, nil, nil); glrSetDialog(rnd, next_dialog); return; } void gltools_vec(GLTOOLS_WINDOW win, const DOF_REAL_D_VEC *u, REAL min, REAL max) { gltools_disp_vec(win, u, min, max, nil); } static void est_loop(glMesh m, void *data, glmSimplexCallback sxf) { GLTOOLS_INFO *info = (GLTOOLS_INFO *)data; MESH *mesh = info->mesh; PARAMETRIC *parametric = mesh->parametric; int i, j, ic = 0, dim = mesh->dim; const EL_INFO *el_info; REAL *coord[N_VERTICES_MAX], el_val; REAL_D wc[N_VERTICES_MAX]; TRAVERSE_STACK *stack = get_traverse_stack(); int dof0[N_VERTICES_MAX]={0}; if (info->displacement) cell_disp_bas_fcts = info->displacement->fe_space->bas_fcts; else cell_disp_bas_fcts = nil; el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); do { /* correct element coordinates for parametric elements */ if (parametric) { parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES(dim), vertex_bary, wc); } else { if (info->displacement) /* add displacements */ { if (cell_displacement_size < cell_disp_bas_fcts->n_bas_fcts) { cell_displacement = MEM_REALLOC(cell_displacement, cell_displacement_size, cell_disp_bas_fcts->n_bas_fcts, REAL_D); } cell_disp_bas_fcts->get_real_d_vec(el_info->el, info->displacement, cell_displacement); for(i = 0; i < N_VERTICES(dim);i++) { eval_uh_d(vertex_bary[i], (const REAL_D *)cell_displacement, cell_disp_bas_fcts, wc[i]); for (j=0; jcoord[i][j]; } } else { for (i = 0; i < N_VERTICES(dim); i++) COPY_DOW(el_info->coord[i], wc[i]); } } for (i = 0; i < N_VERTICES(dim); i++) coord[i] = wc[i]; el_val = info->get_est(el_info->el); if(dim==1) simplex_1d_2d(m, ic+1, &el_val, 1, coord, sxf); else sxf(m, ic+1, 1, &el_val, dof0, coord); ic++; } while ((el_info = traverse_next(stack,el_info))); free_traverse_stack(stack); } void gltools_disp_est(GLTOOLS_WINDOW win, MESH *mesh, REAL (*get_est)(EL *), REAL min, REAL max, const DOF_REAL_D_VEC *disp) { FUNCNAME("gltools_est"); static GLTOOLS_INFO gltools_info ={0}; glMesh glm; glRenderer rnd; int n; static REAL val=0.0; const EL_INFO *el_info; TRAVERSE_STACK *stack; INFO(0,2,"\n"); if (!mesh || !win || !get_est) return; rnd = (glRenderer) win; glrGetDialog(rnd, &next_dialog); gltools_info.mesh = mesh; gltools_info.get_est = get_est; gltools_info.displacement = disp; if(mesh->dim != DIM_OF_WORLD) { ERROR("Sorry, only implemented for dim == DIM_OF_WORLD.\n"); return; } glm=glmCreate(mesh->n_elements, mesh->n_elements, MAX(2,DIM_OF_WORLD), &gltools_info, est_loop); glmSetVoffset(glm,0); glrSetInfoCallback(rnd,(glrDrawCallback)glmDrawInfo); if (min >= max) { min = LARGE; max = -LARGE; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); n = 0; while (el_info) { REAL est = (*get_est)(el_info->el); min = MIN(min, est); max = MAX(max, est); el_info = traverse_next(stack,el_info); } free_traverse_stack(stack); } if (min > max) min = max = 0.0; gltools_info.min = min; gltools_info.max = max; glmSetFunction(glm, &val, min, max); glRender(rnd, (glrDrawCallback)(glmDraw), glm); glmDestroy(glm); glrSetDialog(rnd, next_dialog); return; } void gltools_est(GLTOOLS_WINDOW win, MESH *mesh, REAL (*get_est)(EL *), REAL min, REAL max) { /* FUNCNAME("gltools_est"); */ gltools_disp_est(win, mesh, get_est, min, max, nil); } struct mesh_loop_data { MESH *mesh; int mark; const DOF_REAL_D_VEC *displacement; }; static void mesh_loop(glMesh m, void *ud, glmSimplexCallback sxf) { struct mesh_loop_data *data = (struct mesh_loop_data *)ud; PARAMETRIC *parametric = data->mesh->parametric; int i, j, ic = 1, dim = data->mesh->dim; const EL_INFO *el_info; REAL *coord[N_VERTICES_MAX]; REAL val = 0.0; REAL_D wc[N_VERTICES_MAX]; TRAVERSE_STACK *stack = get_traverse_stack(); const REAL_D *el_displacement; const BAS_FCTS *disp_bas_fcts=nil; static int dof[N_VERTICES_MAX]={0}; if (data->displacement) { disp_bas_fcts = data->displacement->fe_space->bas_fcts; } el_info = traverse_first(stack, data->mesh, -1, CALL_LEAF_EL|FILL_COORDS); do { if (data->mark) { if (el_info->el->mark > 0) val = 1.0; else if (el_info->el->mark < 0) val = -1.0; else val = 0.0; } /* correct element coordinates for parametric elements */ if (parametric) { parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES(dim), vertex_bary, wc); } else { if (data->displacement) { el_displacement = disp_bas_fcts->get_real_d_vec(el_info->el, data->displacement, nil); for(i = 0; i < N_VERTICES(dim);i++) { eval_uh_d(vertex_bary[i], el_displacement, disp_bas_fcts, wc[i]); for (j=0; jcoord[i][j]; } } else { for (i = 0; i < N_VERTICES(dim); i++) COPY_DOW(el_info->coord[i], wc[i]); } } for(i = 0; i < N_VERTICES(dim); i++) coord[i] = wc[i]; if(dim==1) simplex_1d_2d(m, ic++, &val, 1, coord, sxf); else sxf(m, ic++, 1, &val, dof, coord); } while ((el_info = traverse_next(stack,el_info))); free_traverse_stack(stack); } void gltools_mesh(GLTOOLS_WINDOW win, MESH *mesh, int mark) { FUNCNAME("gltools_mesh"); struct mesh_loop_data data[1]; glMesh glm; glRenderer rnd; static REAL val=0.0; INFO(0,2,"\n"); if (!(data->mesh = mesh) || !win) return; if(mesh->dim != DIM_OF_WORLD) { ERROR("Sorry, only implemented for dim == DIM_OF_WORLD.\n"); return; } data->displacement = nil; rnd = (glRenderer) win; glrGetDialog(rnd, &next_dialog); if ((data->mark = mark)) { glm=glmCreate(1, mesh->n_elements, MAX(2,DIM_OF_WORLD), data, mesh_loop); glmSetVoffset(glm,0); glrSetInfoCallback(rnd,(glrDrawCallback)glmDrawInfo); glmSetFunction(glm, &val, -1.0, 1.0); } else { glm=glmCreate(1, mesh->n_elements, MAX(2,DIM_OF_WORLD), data, mesh_loop); glmSetVoffset(glm,0); glrSetInfoCallback(rnd,(glrDrawCallback)glmDrawInfo); glmSetFunction(glm, &val, 0.0, 1.0); } glRender(rnd, (glrDrawCallback)(glmDraw), glm); glmDestroy(glm); glrSetDialog(rnd, next_dialog); return; } void gltools_disp_mesh(GLTOOLS_WINDOW win, MESH *mesh, int mark, const DOF_REAL_D_VEC *disp) { FUNCNAME("gltools_disp_mesh"); struct mesh_loop_data data[1]; glMesh glm; glRenderer rnd; static REAL val=0.0; INFO(0,2,"\n"); if (!(data->mesh = mesh) || !win) return; if(mesh->dim != DIM_OF_WORLD) { ERROR("Sorry, only implemented for dim == DIM_OF_WORLD.\n"); return; } data->displacement = disp; rnd = (glRenderer) win; glrGetDialog(rnd, &next_dialog); if ((data->mark = mark)) { glm=glmCreate(1, mesh->n_elements, MAX(2,DIM_OF_WORLD), data, mesh_loop); glmSetVoffset(glm,0); glrSetInfoCallback(rnd,(glrDrawCallback)glmDrawInfo); glmSetFunction(glm, &val, -1.0, 1.0); } else { glm=glmCreate(1, mesh->n_elements, MAX(2,DIM_OF_WORLD), data, mesh_loop); glmSetVoffset(glm,0); glrSetInfoCallback(rnd,(glrDrawCallback)glmDrawInfo); glmSetFunction(glm, &val, 0.0, 1.0); } glRender(rnd, (glrDrawCallback)(glmDraw), glm); glmDestroy(glm); glrSetDialog(rnd, next_dialog); return; } alberta-2.0.1/alberta/src/Common/dxtools.c0000644000042300001440000021044010676724253015343 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: dxtools.c */ /* */ /* */ /* description: interface to IBM Data Explorer */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Oliver Kriessl */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2005) */ /* (c) by D. Koester and O.Kriessl (2001-2005) */ /* */ /* WARNING: The DX library is not thread-safe. We need to make */ /* certain that the second thread started in open_dxtools_window() never */ /* accesses DX functions concurrently with the main thread. */ /* */ /*--------------------------------------------------------------------------*/ #include #include #include #include #include #include #include "alberta.h" #include "alberta_intern.h" #define Screen dxScreen #define String dxString #define Object dxObject #undef PACKAGE #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION #undef VERSION #include #include #undef String #undef Screen #undef Object /*--------------------------------------------------------------------------*/ /* Type definitions used for the dxtools. */ /*--------------------------------------------------------------------------*/ typedef enum {DXTOOLS_NONE, DXTOOLS_MESH, DXTOOLS_FEVECTOR} DXOBJECT_TYPE; #define DXTOOLS_MAX_WINDOWS 20 #define DXTOOLS_KEY_HELP 'h' #define DXTOOLS_KEY_QUIT 'q' #define DXTOOLS_KEY_BLOCK 'b' #define DXTOOLS_KEY_PROJECTION 'p' #define DXTOOLS_KEY_HARDWARE 'f' #define DXTOOLS_KEY_LEGEND 'l' #define DXTOOLS_KEY_VIDEO 'v' #define DXTOOLS_KEY_RESET 'r' #define DXTOOLS_KEY_WRITE 'w' #define DXTOOLS_KEY_AXES 'a' #define DXTOOLS_KEY_BOX 'k' #define DXTOOLS_KEY_CUTPLANE 'c' #define DXTOOLS_KEY_CUTPLANE_PLUS '+' #define DXTOOLS_KEY_CUTPLANE_MINUS '-' #define DXTOOLS_KEY_CUTPLANE_PPLUS '>' #define DXTOOLS_KEY_CUTPLANE_MMINUS '<' #define DXTOOLS_KEY_CUTPLANE_X 'x' #define DXTOOLS_KEY_CUTPLANE_Y 'y' #define DXTOOLS_KEY_CUTPLANE_Z 'z' #define DXTOOLS_KEY_MIDDLE_BUTTON_MODE ' ' typedef struct dxtools_context DXTOOLS_CONTEXT; struct dxtools_window { /* Pointer to the context */ DXTOOLS_CONTEXT *dxc; /* Internal number of this window */ int number; /* data for window layout */ char *title; int width, height; int offsetx, offsety; /* data of the drawing area */ int draw_width, draw_height; Widget me; Window drawingarea; int use_hardware; int use_perspective; int use_legend; int use_inverse_video; int use_bounding_box; int use_axes; int use_cutplane; int middle_button_mode; /* what is being displayed (mesh, vector, leaf data, etc.) */ int dim; DXOBJECT_TYPE type; /* current window object for display */ dxObject displayobject; /* a colormap for displaying legends */ Field colormap; /* a camera object to store the initial view */ dxObject initial_camera; /* cutplane settings */ int cutplane_direction; float cutplane_level; /* entries for communication from the main thread */ /* window contents should also be dumped to a file. */ int save_me; /* window contents need to be redrawn. */ int redraw_me; /* camera view should be reset. */ int reset_me; /* this window must be opened. */ int open_me; /* should this window be closed? */ int close_me; }; struct dxtools_context { /* lock for thread_data */ pthread_mutex_t tlock; /* Condition to signal readiness of windows to the main thread */ pthread_cond_t windows_ready; /* Condition to block the main thread if desired */ pthread_cond_t block_context; /* wait for signal that windows are ready if this flag is set. */ int check_block_context; /* window list */ DXTOOLS_WINDOW *win[DXTOOLS_MAX_WINDOWS]; /* number of open windows */ int n_open_windows; /* is the thread running? */ int thread_running; XtAppContext app; Widget toplevel; }; /* code to override the DX */ /* standard UserInteractor. These functions are based on the DX file */ /* /src/exec/dxmods/definter.c */ /* */ /* NOTE: Future versions of DX could break this code. */ #define N_USER_INTERACTORS 1 static void *RPZInitMode(dxObject, int, int, int *); static void RPZEndMode(void *); static void RPZSetCamera(void *, float *, float *, float *, int, float, float); static int RPZGetCamera(void *, float *, float *, float *, int *, float *, float *); static void RPZSetRenderable(void *, dxObject); static int RPZGetRenderable(void *, dxObject *); static void RPZEventHandler(void *, DXEvent *); static UserInteractor _userInteractionTable[N_USER_INTERACTORS]; int DXDefaultUserInteractors(int *n, void *t) { _userInteractionTable[0].InitMode = RPZInitMode; _userInteractionTable[0].EndMode = RPZEndMode; _userInteractionTable[0].SetCamera = RPZSetCamera; _userInteractionTable[0].GetCamera = RPZGetCamera; _userInteractionTable[0].SetRenderable = RPZSetRenderable; _userInteractionTable[0].GetRenderable = RPZGetRenderable; _userInteractionTable[0].EventHandler = RPZEventHandler; *n = N_USER_INTERACTORS; *(long **)t = (long *)_userInteractionTable; return 1; } /***** Control similar to GMV *****/ static void StartStroke(void *, DXMouseEvent *); static void RotateEndStroke(void *, DXMouseEvent *); static void PanEndStroke(void *, DXMouseEvent *); static void TiltEndStroke(void *, DXMouseEvent *); static void ZoomEndStroke(void *, DXMouseEvent *); typedef struct RPZData { dxObject args; /* Interactor arguments */ int w, h; /* Width and height of window */ dxObject obj; /* Current object */ DXTOOLS_WINDOW *me; /* This window */ float to[3]; /* Current camera parameters */ float from[3]; float up[3]; int p; float fov; float width; float grad_r; float grad_p; float init_width; struct { int x, y; } mousePosition; int buttonStates[3]; } *RPZData; static void * RPZInitMode(dxObject args, int w, int h, int *mask) { RPZData rpzdata = (RPZData)DXAllocateZero(sizeof(struct RPZData)); if (! rpzdata) return NULL; /* Retrieve the window pointer. */ rpzdata->me = (DXTOOLS_WINDOW *)DXGetPrivateData((Private)args); /* * Grab the window size */ rpzdata->w = w; rpzdata->h = h; if (w > h) rpzdata->grad_r = rpzdata->grad_p = h / 2.0; else rpzdata->grad_r = rpzdata->grad_p = w / 2.0; rpzdata->buttonStates[0] = BUTTON_UP; rpzdata->buttonStates[1] = BUTTON_UP; rpzdata->buttonStates[2] = BUTTON_UP; *mask = DXEVENT_KEYPRESS | DXEVENT_LEFT | DXEVENT_MIDDLE | DXEVENT_RIGHT; return (void *)rpzdata; } static void RPZEndMode(void *data) { RPZData rpzdata = (RPZData)data; if (rpzdata) { if (rpzdata->args) DXDelete(rpzdata->args); if (rpzdata->obj) DXDelete(rpzdata->obj); } DXFree(data); } static void RPZSetCamera(void *data, float to[3], float from[3], float up[3], int proj, float fov, float width) { int i; RPZData rpzdata = (RPZData)data; /* * Grab the camera */ for (i = 0; i < 3; i++) rpzdata->to[i] = to[i], rpzdata->from[i] = from[i], rpzdata->up[i] = up[i]; rpzdata->p = proj; rpzdata->fov = fov; rpzdata->width = rpzdata->init_width = width; if (proj) { float dx = to[0] - from[0]; float dy = to[1] - from[1]; float dz = to[2] - from[2]; float vd = sqrtf(dx*dx + dy*dy + dz*dz); rpzdata->grad_p = (fov * vd) / rpzdata->w; } else rpzdata->grad_p = width / rpzdata->w; } static int RPZGetCamera(void *data, float to[3], float from[3], float up[3], int *proj, float *fov, float *width) { int i; RPZData rpzdata = (RPZData)data; /* * Return the camera */ for (i = 0; i < 3; i++) to[i] = rpzdata->to[i], from[i] = rpzdata->from[i], up[i] = rpzdata->up[i]; *proj = rpzdata->p; *fov = rpzdata->fov; *width = rpzdata->width; return 1; } static void RPZSetRenderable(void *data, dxObject obj) { RPZData rpzdata = (RPZData)data; DXReference(obj); if (rpzdata->obj) DXDelete(rpzdata->obj); rpzdata->obj = obj; } static int RPZGetRenderable(void *data, dxObject *obj) { RPZData rpzdata = (RPZData)data; if (rpzdata->obj) { *obj = rpzdata->obj; return 1; } else { *obj = NULL; return 0; } } static void RPZEventHandler(void *data, DXEvent *event) { RPZData rpzdata = (RPZData)data; DXTOOLS_WINDOW *win = rpzdata->me; int b = WHICH_BUTTON(event); if(!data) return; switch(event->any.event) { case DXEVENT_LEFT: switch (event->mouse.state) { case BUTTON_DOWN: StartStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_DOWN; break; case BUTTON_MOTION: if (rpzdata->buttonStates[b] == BUTTON_UP) StartStroke(data, (DXMouseEvent *)event); else RotateEndStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_DOWN; break; case BUTTON_UP: RotateEndStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_UP; break; default: break; } break; case DXEVENT_MIDDLE: switch (event->mouse.state) { case BUTTON_DOWN: StartStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_DOWN; break; case BUTTON_MOTION: if (rpzdata->buttonStates[b] == BUTTON_UP) StartStroke(data, (DXMouseEvent *)event); else { if(win->middle_button_mode == 0) PanEndStroke(data, (DXMouseEvent *)event); else TiltEndStroke(data, (DXMouseEvent *)event); } rpzdata->buttonStates[b] = BUTTON_DOWN; break; case BUTTON_UP: if(win->middle_button_mode == 0) PanEndStroke(data, (DXMouseEvent *)event); else TiltEndStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_UP; break; default: break; } break; case DXEVENT_RIGHT: switch (event->mouse.state) { case BUTTON_DOWN: StartStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_DOWN; break; case BUTTON_MOTION: if (rpzdata->buttonStates[b] == BUTTON_UP) StartStroke(data, (DXMouseEvent *)event); else ZoomEndStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_DOWN; break; case BUTTON_UP: ZoomEndStroke(data, (DXMouseEvent *)event); rpzdata->buttonStates[b] = BUTTON_UP; break; default: break; } break; case DXEVENT_KEYPRESS: switch(event->keypress.key) { int n_error; case DXTOOLS_KEY_HELP: printf("****************************************\n"); printf("Online help for DXTOOLS:\n"); printf("****************************************\n"); printf("* Mouse controls:\n"); printf("Left button: rotate\n"); printf("Middle button: pan or tilt, see below\n"); printf("Right button: zoom\n\n"); printf("* Key controls:\n"); printf("'%c': this help blurb\n", DXTOOLS_KEY_HELP); printf("'%c': close window\n", DXTOOLS_KEY_QUIT); printf("'%c': block the simulation from providing new input\n", DXTOOLS_KEY_BLOCK); printf("'%c': toggle display of legend\n", DXTOOLS_KEY_LEGEND); printf("'%c': toggle orthographic/perspective projection\n", DXTOOLS_KEY_PROJECTION); printf("'%c': toggle hardware rendering\n", DXTOOLS_KEY_HARDWARE); printf("'%c': toggle background color black/white\n", DXTOOLS_KEY_VIDEO); printf("'%c': toggle display of bounding box\n", DXTOOLS_KEY_BOX); printf("'%c': toggle display of axes box\n", DXTOOLS_KEY_AXES); printf("'%c': reset camera view\n", DXTOOLS_KEY_RESET); printf("'%c': write image to disk\n", DXTOOLS_KEY_WRITE); printf("'%c': toggle middle mouse button mode between pan/tilt\n", DXTOOLS_KEY_MIDDLE_BUTTON_MODE); break; case DXTOOLS_KEY_QUIT: win->close_me = true; break; case DXTOOLS_KEY_WRITE: win->save_me = true; break; case DXTOOLS_KEY_BLOCK: if(win->dxc->check_block_context) { win->dxc->check_block_context = false; printf("*** DXTOOLS: input UNBLOCKED\n"); n_error = pthread_cond_broadcast(&win->dxc->block_context); if(n_error) fprintf(stderr, "Signalling of condition failed!\n"); } else { win->dxc->check_block_context = true; printf("*** DXTOOLS: input BLOCKED\n"); } break; case DXTOOLS_KEY_VIDEO: if(win->use_inverse_video) { win->use_inverse_video = false; printf("*** %s: background color is BLACK\n", win->title); } else { win->use_inverse_video = true; printf("*** %s: background color is WHITE\n", win->title); } win->redraw_me = true; break; case DXTOOLS_KEY_RESET: win->reset_me = true; break; case DXTOOLS_KEY_LEGEND: if (win->use_legend) { win->use_legend = false; printf("*** %s: legend display is OFF\n", win->title); win->redraw_me = true; } else { if(win->type != DXTOOLS_FEVECTOR) { printf("*** %s: WARNING: No legend available for mesh display.\n", win->title); } else { win->use_legend = true; printf("*** %s: legend display is ON\n", win->title); win->redraw_me = true; } } break; case DXTOOLS_KEY_PROJECTION: if (win->use_perspective) { win->use_perspective = false; printf("*** %s: orthographic projection ON\n", win->title); win->reset_me = true; } else { win->use_perspective = true; printf("*** %s: perspective projection ON\n", win->title); win->reset_me = true; } break; case DXTOOLS_KEY_HARDWARE: if (win->use_hardware) { win->use_hardware = false; printf("*** %s: hardware rendering OFF\n", win->title); } else { win->use_hardware = true; printf("*** %s: hardware rendering ON\n", win->title); } win->redraw_me = true; break; case DXTOOLS_KEY_BOX: if(win->use_bounding_box) { win->use_bounding_box = false; printf("*** %s: bounding box OFF\n", win->title); } else { win->use_bounding_box = true; printf("*** %s: bounding box ON\n", win->title); } win->redraw_me = true; break; case DXTOOLS_KEY_AXES: if(win->use_axes) { win->use_axes = false; printf("*** %s: axis display OFF\n", win->title); } else { win->use_axes = true; printf("*** %s: axis display ON\n", win->title); } win->redraw_me = true; break; #if DIM_OF_WORLD == 3 case DXTOOLS_KEY_CUTPLANE: if(win->use_cutplane) { win->use_cutplane = false; printf("*** %s: cutplane display OFF\n", win->title); win->redraw_me = true; } else { if(win->type != DXTOOLS_FEVECTOR) { printf("*** %s: WARNING: cut plane only works for FE data. Operation cancelled.\n", win->title); } else { win->use_cutplane = true; printf("*** %s: cutplane display ON\n", win->title); win->redraw_me = true; } } break; case DXTOOLS_KEY_CUTPLANE_X: printf("*** %s: cutplane normal is (1,0,0)\n", win->title); win->cutplane_direction = 0; win->redraw_me = true; break; case DXTOOLS_KEY_CUTPLANE_Y: printf("*** %s: cutplane normal is (0,1,0)\n", win->title); win->cutplane_direction = 1; win->redraw_me = true; break; case DXTOOLS_KEY_CUTPLANE_Z: printf("*** %s: cutplane normal is (0,0,1)\n", win->title); win->cutplane_direction = 2; win->redraw_me = true; break; case DXTOOLS_KEY_CUTPLANE_PLUS: win->cutplane_level += 0.1f; win->cutplane_level = MIN(win->cutplane_level, 1.0f); printf("*** %s: cutplane level at %+.2f\n", win->title, win->cutplane_level); win->redraw_me = true; break; case DXTOOLS_KEY_CUTPLANE_MINUS: win->cutplane_level -= 0.1f; win->cutplane_level = MAX(win->cutplane_level, -1.0f); printf("*** %s: cutplane level at %+.2f\n", win->title, win->cutplane_level); win->redraw_me = true; break; case DXTOOLS_KEY_CUTPLANE_PPLUS: win->cutplane_level += 0.01f; win->cutplane_level = MIN(win->cutplane_level, 1.0f); printf("*** %s: cutplane level at %+.2f\n", win->title, win->cutplane_level); win->redraw_me = true; break; case DXTOOLS_KEY_CUTPLANE_MMINUS: win->cutplane_level -= 0.01f; win->cutplane_level = MAX(win->cutplane_level, -1.0f); printf("*** %s: cutplane level at %+.2f\n", win->title, win->cutplane_level); win->redraw_me = true; break; #endif case DXTOOLS_KEY_MIDDLE_BUTTON_MODE: if(win->middle_button_mode == 1) { win->middle_button_mode = 0; printf("*** %s: middle mouse button does PAN\n", win->title); } else { win->middle_button_mode = 1; printf("*** %s: middle mouse button does TILT\n", win->title); } break; default: break; } break; default: break; } } static void StartStroke(void *data, DXMouseEvent *event) { RPZData rdata = (RPZData)data; rdata->mousePosition.x = event->x; rdata->mousePosition.y = event->y; return; } static void RotateEndStroke(void *data, DXMouseEvent *event) { RPZData rdata = (RPZData)data; float ov[3], nv[3], rot[4][4]; float rt[3], up[3]; float stroke[3], axis[3], d; float a, dx, dy; float t, s, c; dx = event->x - rdata->mousePosition.x; dy = event->y - rdata->mousePosition.y; if (dx || dy) { ov[0] = rdata->from[0] - rdata->to[0]; ov[1] = rdata->from[1] - rdata->to[1]; ov[2] = rdata->from[2] - rdata->to[2]; rt[0] = ov[1]*rdata->up[2] - ov[2]*rdata->up[1]; rt[1] = ov[2]*rdata->up[0] - ov[0]*rdata->up[2]; rt[2] = ov[0]*rdata->up[1] - ov[1]*rdata->up[0]; d = sqrtf(rt[0]*rt[0] + rt[1]*rt[1] + rt[2]*rt[2]); rt[0] /= d; rt[1] /= d; rt[2] /= d; up[0] = rt[1]*ov[2] - rt[2]*ov[1]; up[1] = rt[2]*ov[0] - rt[0]*ov[2]; up[2] = rt[0]*ov[1] - rt[1]*ov[0]; d = sqrtf(up[0]*up[0] + up[1]*up[1] + up[2]*up[2]); rdata->up[0] = up[0] /= d; rdata->up[1] = up[1] /= d; rdata->up[2] = up[2] /= d; dx /= rdata->grad_r; dy /= rdata->grad_r; stroke[0] = dx*rt[0] + dy*up[0]; stroke[1] = dx*rt[1] + dy*up[1]; stroke[2] = dx*rt[2] + dy*up[2]; axis[0] = ov[1]*stroke[2] - ov[2]*stroke[1]; axis[1] = ov[2]*stroke[0] - ov[0]*stroke[2]; axis[2] = ov[0]*stroke[1] - ov[1]*stroke[0]; d = sqrtf(axis[0]*axis[0] + axis[1]*axis[1] + axis[2]*axis[2]); axis[0] /= d; axis[1] /= d; axis[2] /= d; a = sqrt(dx*dx + dy*dy); s = sinf(a); c = cosf(a); t = 1.0 - c; ROTXYZ(rot, axis[0], axis[1], axis[2], s, c, t); nv[0] = rot[0][0]*ov[0] + rot[1][0]*ov[1] + rot[2][0]*ov[2]; nv[1] = rot[0][1]*ov[0] + rot[1][1]*ov[1] + rot[2][1]*ov[2]; nv[2] = rot[0][2]*ov[0] + rot[1][2]*ov[1] + rot[2][2]*ov[2]; rdata->from[0] = rdata->to[0] + nv[0]; rdata->from[1] = rdata->to[1] + nv[1]; rdata->from[2] = rdata->to[2] + nv[2]; } rdata->mousePosition.x = event->x; rdata->mousePosition.y = event->y; return; } static void PanEndStroke(void *data, DXMouseEvent *event) { float a, u[3], r[3], v[3]; float dx, dy; RPZData pdata = (RPZData)data; if (event->x != pdata->mousePosition.x || event->y != pdata->mousePosition.y) { dx = event->x - pdata->mousePosition.x; dy = event->y - pdata->mousePosition.y; a = sqrtf(pdata->up[0]*pdata->up[0] + pdata->up[1]*pdata->up[1] + pdata->up[2]*pdata->up[2]); u[0] = pdata->up[0]/a; u[1] = pdata->up[1]/a; u[2] = pdata->up[2]/a; v[0] = pdata->from[0] - pdata->to[0]; v[1] = pdata->from[1] - pdata->to[1]; v[2] = pdata->from[2] - pdata->to[2]; r[0] = v[2]*pdata->up[1] - v[1]*pdata->up[2]; r[1] = v[0]*pdata->up[2] - v[2]*pdata->up[0]; r[2] = v[1]*pdata->up[0] - v[0]*pdata->up[1]; a = sqrtf(r[0]*r[0] + r[1]*r[1]+ r[2]*r[2]); r[0] /= a; r[1] /= a; r[2] /= a; v[0] = (-dx*r[0] + dy*u[0]) * pdata->grad_p; v[1] = (-dx*r[1] + dy*u[1]) * pdata->grad_p; v[2] = (-dx*r[2] + dy*u[2]) * pdata->grad_p; pdata->to[0] += v[0]; pdata->to[1] += v[1]; pdata->to[2] += v[2]; pdata->from[0] += v[0]; pdata->from[1] += v[1]; pdata->from[2] += v[2]; } pdata->mousePosition.x = event->x; pdata->mousePosition.y = event->y; return; } static void TiltEndStroke(void *data, DXMouseEvent *event) { RPZData tdata = (RPZData)data; float v[3], rot[4][4]; float n[3], d; float a, a0, a1; float x0, y0; float x1, y1; float t, s, c; int cx = tdata->w / 2; int cy = tdata->h / 2; if (event->x != tdata->mousePosition.x || event->y != tdata->mousePosition.y) { x0 = event->x - cx; y0 = event->y - cy; if (x0 == 0 && y0 == 0) x0 = 1.0f; d = sqrtf(x0*x0 + y0*y0); x0 /= d; y0 /= d; if (y0 < 0) a0 = acosf(x0); else a0 = (2*3.1415926) - acos(x0); x1 = tdata->mousePosition.x - cx; y1 = tdata->mousePosition.y - cy; if (x1 == 0 && y1 == 0) x1 = 1.0f; d = sqrtf(x1*x1 + y1*y1); x1 /= d; y1 /= d; if (y1 < 0) a1 = acosf(x1); else a1 = (2*3.1415926) - acos(x1); v[0] = tdata->from[0] - tdata->to[0]; v[1] = tdata->from[1] - tdata->to[1]; v[2] = tdata->from[2] - tdata->to[2]; d = sqrtf(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); v[0] /= d; v[1] /= d; v[2] /= d; a = a1 - a0; s = sinf(a); c = cosf(a); t = 1.0f - c; ROTXYZ(rot, v[0], v[1], v[2], s, c, t); n[0] = rot[0][0]*tdata->up[0] + rot[1][0]*tdata->up[1] + rot[2][0]*tdata->up[2]; n[1] = rot[0][1]*tdata->up[0] + rot[1][1]*tdata->up[1] + rot[2][1]*tdata->up[2]; n[2] = rot[0][2]*tdata->up[0] + rot[1][2]*tdata->up[1] + rot[2][2]*tdata->up[2]; tdata->up[0] = n[0]; tdata->up[1] = n[1]; tdata->up[2] = n[2]; } tdata->mousePosition.x = event->x; tdata->mousePosition.y = event->y; return; } static void ZoomEndStroke(void *data, DXMouseEvent *event) { float dy; RPZData zdata = (RPZData)data; dy = (event->y - zdata->mousePosition.y) / ((float) zdata->h); if (event->x != zdata->mousePosition.x || event->y != zdata->mousePosition.y) { if (zdata->p) { zdata->from[0] -= 0.9*dy*(zdata->to[0] - zdata->from[0]); zdata->from[1] -= 0.9*dy*(zdata->to[1] - zdata->from[1]); zdata->from[2] -= 0.9*dy*(zdata->to[2] - zdata->from[2]); } else { zdata->width += dy * zdata->init_width; } } zdata->mousePosition.x = event->x; zdata->mousePosition.y = event->y; return; } static void display_error(int n_error) { FUNCNAME("display_error"); switch(n_error) { case EFAULT: WARNING("Bad pointer. (EFAULT)\n"); break; case EAGAIN: WARNING("System lacks resources. (EAGAIN)\n"); break; case ENOMEM: WARNING("Insufficient memory. (ENOMEM)\n"); break; case EINVAL: WARNING("Invalid attributes? (EINVAL)\n"); break; case EPERM: WARNING("Caller lacks permission. (EPERM)\n"); break; case EBUSY: WARNING("Object already initialized or busy. (EBUSY)\n"); break; case EDEADLK: WARNING("Current thread already owns mutex. (EDEADLK)\n"); break; case ETIMEDOUT: WARNING("Timed out while waiting for signal. (ETIMEDOUT)\n"); break; default: WARNING("Unknown error %d.\n", n_error); } return; } static void display_dx_error() { FUNCNAME("display_dx_error"); ERROR("DX error code: %d\n", DXGetError()); ERROR("DX error message: %s\n", DXGetErrorMessage()); #if ALBERTA_DEBUG /* Paranoid error behavior. */ ERROR_EXIT("Exiting...\n"); #endif return; } /* return true on error. */ static int DX_update(DXTOOLS_WINDOW *win) { ModuleInput min[10]; ModuleOutput mout[10]; dxObject tmpobj, tmpcam, tmpwhere; dxObject events, size, displayobject, where, camera; dxObject colorbar = NULL, boundingbox = NULL; Private winobj; Array windowsize; RGBColor color = {}; int *windowsize_ptr; const int supervise_mode = 0; if(!win->displayobject) return false; if(!(windowsize = DXNewArray(TYPE_INT,CATEGORY_REAL,1, 2))) { display_dx_error(); return true; } if(!DXAddArrayData(windowsize,0,1,NULL)) { display_dx_error(); return true; } windowsize_ptr = DXGetArrayData(windowsize); windowsize_ptr[0]=win->draw_width; windowsize_ptr[1]=win->draw_height; /* call SuperviseWindow and check for events */ DXModSetObjectInput(&min[0],"size", (dxObject)windowsize); DXModSetIntegerInput(&min[1],"parent", win->drawingarea); DXModSetIntegerInput(&min[2],"sizeFlag",1); DXModSetStringInput(&min[3],"name",win->title); DXModSetObjectOutput(&mout[0],"where", &where); DXModSetObjectOutput(&mout[1],"size", &size); DXModSetObjectOutput(&mout[2],"events", &events); if(!DXCallModule("SuperviseWindow",4,min,3,mout)) { display_dx_error(); return true; } /* No events? Camera view not reset? Then leave routine. */ if(!events && !win->reset_me && !win->redraw_me && !win->save_me) { if(!DXDelete(where)) display_dx_error(); if(!DXDelete(size)) display_dx_error(); if(!DXDelete(events)) display_dx_error(); return false; } /* No initial camera set? Do so now. */ if (win->reset_me || !win->initial_camera) { if(win->initial_camera && !DXDelete(win->initial_camera)) display_dx_error(); if(!DXReference(win->displayobject)) { display_dx_error(); return true; } DXModSetObjectInput(&min[0], "object", win->displayobject); DXModSetIntegerInput(&min[1], "perspective", win->use_perspective); if(win->use_inverse_video) DXModSetStringInput(&min[2], "background", "white"); else DXModSetStringInput(&min[2], "background", "black"); DXModSetObjectOutput(&mout[0], "camera", &win->initial_camera); if(!DXCallModule("AutoCamera",3,min,1,mout)) { display_dx_error(); return true; } } if(!(winobj = DXNewPrivate((Pointer)win, NULL))) { display_dx_error(); return true; } if(!DXReference(win->displayobject)) { display_dx_error(); return true; } if(!DXReference(win->initial_camera)) { display_dx_error(); return true; } DXModSetObjectInput(&min[0],"where",where); DXModSetObjectInput(&min[1],"defaultCamera", win->initial_camera); DXModSetIntegerInput(&min[2],"resetCamera", win->reset_me ? 1: 0); win->reset_me = false; DXModSetObjectInput(&min[3],"object",win->displayobject); DXModSetIntegerInput(&min[4],"resetObject",1); DXModSetObjectInput(&min[5],"size",size); DXModSetObjectInput(&min[6],"events",events); DXModSetIntegerInput(&min[7],"mode",supervise_mode); DXModSetObjectInput(&min[8],"args",(dxObject)winobj); DXModSetObjectOutput(&mout[0],"object",&tmpobj); DXModSetObjectOutput(&mout[1],"camera",&tmpcam); DXModSetObjectOutput(&mout[2],"where",&tmpwhere); if(!DXCallModule("SuperviseState",9,min,3,mout)) { display_dx_error(); return true; } where = tmpwhere; displayobject = tmpobj; camera = tmpcam; /* Don't try to to 3D perspective volume rendering - DX can't do it. */ #if DIM_OF_WORLD == 3 if((win->type == DXTOOLS_FEVECTOR) && !win->use_hardware && win->use_perspective && !win->use_cutplane && win->dim == 3) { printf("*** %s: WARNING: DX currently does not support perspective volume rendering. Perspective projection OFF.\n", win->title); win->use_perspective = false; win->reset_me = true; if(!DXDelete(where)) display_dx_error(); return false; } #endif /* Adjust settings of camera, if necessary. */ if(win->use_inverse_video) { color.r = 1.0f; color.g = 1.0f; color.b = 1.0f; } else { color.r = 0.0f; color.g = 0.0f; color.b = 0.0; } camera = (dxObject)DXSetBackgroundColor((Camera)camera, color); /* If we have a colormap, then display of a legend is possible. */ if(win->use_legend && win->colormap) { if(!DXReference((dxObject)win->colormap)) { display_dx_error(); return true; } DXModSetObjectInput(&min[0],"colormap", (dxObject)win->colormap); if(win->use_inverse_video) { DXModSetStringInput(&min[1], "colors", "black"); DXModSetStringInput(&min[2], "annotation", "labels"); } else { DXModSetStringInput(&min[1], "colors", "white"); DXModSetStringInput(&min[2], "annotation", "labels"); } DXModSetObjectOutput(&mout[0],"colorbar", &colorbar); if(!DXCallModule("ColorBar",3,min,1,mout)) { display_dx_error(); return true; } } /* Show a bounding box if desired. */ /* for display of a cutplane with axes box, we also compute the */ /* bounding box to use it as corners input of AutoAxes. */ if(win->use_bounding_box || (win->use_axes && win->use_cutplane)) { if(!DXReference(displayobject)) { display_dx_error(); return true; } DXModSetObjectInput(&min[0],"input", displayobject); DXModSetObjectOutput(&mout[0],"box", &boundingbox); if(!DXCallModule("ShowBox",1,min,1,mout)) { display_dx_error(); return true; } } /* build a cutplane, if desired. Do this after bounding box */ /* so that these are built around the original data. */ if(win->use_cutplane) { float *array_normal_data; Array array_normal; float *array_center_data; Array array_center; Point bbox[8] = {}; float cx[3], dx[3]; int i; if(!(array_normal = DXNewArray(TYPE_FLOAT, CATEGORY_REAL, 1, 3))) { display_dx_error(); return true; } if(!DXAddArrayData(array_normal, 0, 1, NULL)) { display_dx_error(); return true; } if(!(array_normal_data = DXGetArrayData(array_normal))) { display_dx_error(); return true; } displayobject = DXBoundingBox(displayobject, bbox); cx[0] = (bbox[0].x + bbox[7].x)/2.0f; cx[1] = (bbox[0].y + bbox[7].y)/2.0f; cx[2] = (bbox[0].z + bbox[7].z)/2.0f; dx[0] = (bbox[7].x - bbox[0].x)/2.0f; dx[1] = (bbox[7].y - bbox[0].y)/2.0f; dx[2] = (bbox[7].z - bbox[0].z)/2.0f; if(!(array_center = DXNewArray(TYPE_FLOAT, CATEGORY_REAL, 1, 3))) { display_dx_error(); return true; } if(!DXAddArrayData(array_center, 0, 1, NULL)) { display_dx_error(); return true; } if(!(array_center_data = DXGetArrayData(array_center))) { display_dx_error(); return true; } for(i = 0; i < 3; i++) array_center_data[i] = cx[i]; i = win->cutplane_direction; array_center_data[i] += win->cutplane_level * dx[i]; array_normal_data[i] = 1.0f; DXModSetObjectInput(&min[0],"data", displayobject); DXModSetObjectInput(&min[1],"normal", (dxObject)array_normal); DXModSetObjectInput(&min[2],"point", (dxObject)array_center); DXModSetObjectOutput(&mout[0],"plane", &tmpobj); if(!DXCallModule("MapToPlane", 3, min, 1, mout)) { display_dx_error(); return true; } displayobject = tmpobj; /* remove the normals component as advised in the DX documentation */ /* since the shading is not that useful. */ DXModSetObjectInput(&min[0],"input", displayobject); DXModSetStringInput(&min[1],"name", "normals"); DXModSetObjectOutput(&mout[0],"output", &tmpobj); if(!DXCallModule("Remove",2,min,1,mout)) { display_dx_error(); return true; } displayobject = tmpobj; } /* Show an axes box if desired. */ if(win->use_axes) { int n_in = 0; if(!DXReference(displayobject)) { display_dx_error(); return true; } if(!DXReference(camera)) { display_dx_error(); return true; } DXModSetObjectInput(&min[n_in++],"input", displayobject); DXModSetObjectInput(&min[n_in++],"camera", camera); if(win->use_cutplane) { /* Reference the bounding box since it might also be displayed. Sigh. */ if(win->use_bounding_box) { if(!DXReference(boundingbox)) { display_dx_error(); return true; } } DXModSetObjectInput(&min[n_in++],"corners", boundingbox); } DXModSetObjectOutput(&mout[0],"axes", &tmpobj); if(!DXCallModule("AutoAxes",n_in, min, 1, mout)) { display_dx_error(); return true; } displayobject = tmpobj; } /* Collect the colorbar, bounding box, and any other objects. */ if(win->use_bounding_box || colorbar) { int n_in = 0; DXModSetObjectInput(&min[n_in++],NULL, displayobject); if(colorbar) DXModSetObjectInput(&min[n_in++],NULL, colorbar); if(win->use_bounding_box) DXModSetObjectInput(&min[n_in++],NULL, boundingbox); DXModSetObjectOutput(&mout[0],"group", &tmpobj); if(!DXCallModule("Collect",n_in, min, 1, mout)) { display_dx_error(); return true; } displayobject = tmpobj; } /* Now output the display object with Display. */ if (win->use_hardware) { DXModSetObjectInput(&min[0],"input", displayobject); DXModSetStringInput(&min[1],"attribute","rendering mode"); DXModSetStringInput(&min[2],"value","hardware"); DXModSetObjectOutput(&mout[0],"output",&tmpobj); if(!DXCallModule("Options",3,min,1,mout)) { display_dx_error(); return true; } displayobject = tmpobj; } if (win->save_me) { dxObject image; static int counter = 0; char filename[1024] = {}; char format[1024] = "eps color"; GET_PARAMETER(0, "dxtools saving file format", "%s", format); DXModSetObjectInput(&min[0],"object", displayobject); DXModSetObjectInput(&min[1],"camera", camera); DXModSetObjectOutput(&mout[0],"image", &image); if(!DXCallModule("Render",2,min,1,mout)) { display_dx_error(); return true; } if(!DXReference(image)) { display_dx_error(); return true; } snprintf(filename, 1024, "%s.%.6d", win->title, counter); DXModSetObjectInput(&min[0],"image", image); DXModSetStringInput(&min[1],"format", format); DXModSetStringInput(&min[2],"name", filename); if(!DXCallModule("WriteImage",3,min,0,mout)) { display_dx_error(); return true; } printf("*** Image saved as '%s'.\n", filename); DXModSetObjectInput(&min[0],"object", image); DXModSetObjectInput(&min[1],"where", where); if(!DXCallModule("Display",2,min,0,mout)) { display_dx_error(); return true; } win->save_me = false; counter++; } else { DXModSetObjectInput(&min[0],"object", displayobject); DXModSetObjectInput(&min[1],"camera", camera); DXModSetObjectInput(&min[2],"where", where); if(!DXCallModule("Display",3,min,0,mout)) { display_dx_error(); return true; } } win->redraw_me = false; return false; } void destroyCB(Widget w, XtPointer xp1, XtPointer xp2) { DXTOOLS_WINDOW *win = (DXTOOLS_WINDOW *)xp1; win->close_me = true; return; } /* * the following is the resize callback for the drawing area. If the * drawing area is resized, we need to send the new size to SuperviseWindow */ void drawing_resizeCB(Widget w, XtPointer xp1, XtPointer xp2) { DXTOOLS_WINDOW *win = (DXTOOLS_WINDOW *)xp1; Dimension width, height; XtVaGetValues(w, XtNwidth, &width, XtNheight, &height, NULL); win->draw_width = (int)width; win->draw_height = (int)height; win->redraw_me = true; return; } static void create_window(DXTOOLS_WINDOW *win) { Widget form, drawingarea; win->me = XtVaCreatePopupShell("DXTools", topLevelShellWidgetClass, win->dxc->toplevel, XmNtitle, win->title, XmNwidth, win->width, XmNheight, win->height, XmNx, win->offsetx, XmNy, win->offsety, NULL); form = XtVaCreateManagedWidget("form", xmFormWidgetClass, win->me, XmNfractionBase, 5, NULL); drawingarea = XtVaCreateManagedWidget("drawingarea", xmDrawingAreaWidgetClass, form, XmNtopAttachment, XmATTACH_FORM, XmNtopOffset, 5, XmNleftAttachment, XmATTACH_FORM, XmNleftOffset, 5, XmNrightAttachment, XmATTACH_FORM, XmNrightOffset, 5, XmNbottomAttachment, XmATTACH_FORM, XmNbottomOffset, 5, XmNwidth, win->draw_width, XmNheight, win->draw_height, NULL); /* add a deletion callback for the drawing area */ XtAddCallback(drawingarea, XtNdestroyCallback, (XtCallbackProc)destroyCB, (XtPointer)win); /* add a resize callback for the drawing area */ XtAddCallback(drawingarea, XmNresizeCallback, (XtCallbackProc)drawing_resizeCB, (XtPointer)win); /* Draw the window! */ XtPopup(win->me, XtGrabNonexclusive); /* get the window id of the drawing area */ /* we'll need this to pass to SuperviseWindow */ win->drawingarea = XtWindow(drawingarea); win->open_me = false; return; } static void delete_window(DXTOOLS_WINDOW *win) { int n_error, i; DXTOOLS_CONTEXT *dxc = win->dxc; XtDestroyWidget(win->me); win->drawingarea = 0; if(win->displayobject) { if(!DXDelete(win->displayobject)) display_dx_error(); win->displayobject = nil; } if(win->colormap) { if(!DXDelete((dxObject)win->colormap)) display_dx_error(); win->colormap = nil; } /* If this was the last window, send unblocking signal to the main thread.*/ if(dxc->check_block_context) { for(i = 0; i < DXTOOLS_MAX_WINDOWS; i++) if(dxc->win[i] && dxc->win[i]->displayobject) break; if(i == DXTOOLS_MAX_WINDOWS) { printf("*** No more blocking content, sending unblocking signal!\n"); dxc->check_block_context = false; n_error = pthread_cond_broadcast(&win->dxc->block_context); if(n_error) fprintf(stderr, "Signalling of condition failed!\n"); } } win->close_me = false; return; } Boolean XCheckRIH(void *data) { FUNCNAME("XCheckRIH"); DXTOOLS_CONTEXT *dxc = (DXTOOLS_CONTEXT *)data; int i, n_error; static struct timespec time_req = {0, 10000}; if(!dxc) { /* Really bad error */ ERROR("Lost DXTOOLS_CONTEXT object! Giving up.\n"); return True; } /* Lock the context manager. */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); return True; } /* Let DX handle its X events. */ DXCheckRIH(0); /* Loop through all open windows. */ for(i = 0; i < DXTOOLS_MAX_WINDOWS; i++) { if(dxc->win[i]) { /* First check if a window needs to be opened or closed. */ if(dxc->win[i]->open_me) create_window(dxc->win[i]); if(dxc->win[i]->close_me) { delete_window(dxc->win[i]); continue; } /* Now let DX check for events in drawing areas. */ if(DX_update(dxc->win[i])) { ERROR("Updating DX data failed!\n"); return True; } } } /* Now let the main thread know that some windows might ready. */ n_error = pthread_cond_broadcast(&dxc->windows_ready); if(n_error){ ERROR("Signalling of condition failed!\n"); display_error(n_error); return True; } /* Unlock the context manager. */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); return True; } /* Put the thread to sleep for a while to avoid hogging resources. */ nanosleep(&time_req, NULL); return False; } /* windows_thread(): Entry point for the thread managing windows. */ /* return true on error or false otherwise. */ static void *windows_thread(void *data) { FUNCNAME("windows_thread"); DXTOOLS_CONTEXT *dxc = (DXTOOLS_CONTEXT *)data; static int trv = true; static int zero = 0; int i, n_error = 0; #if ALBERTA_DEBUG /* Paranoid error behavior. */ DXSetErrorExit(2); #endif /* Perform necessary initialization of the X Toolkit Intrinsics. */ if(XtToolkitThreadInitialize() != True) { WARNING("X Toolkit Intrinsics do not seem to support multi-threading.\n"); return &trv; } /* Lock the context manager. */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); return &trv; } dxc->toplevel = XtVaAppInitialize (&dxc->app, "Alberta", NULL, 0, &zero, NULL, NULL, NULL); /* Unlock the context manager. */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); return &trv; } /* Add our event handler and start the event loop. This loop should */ /* not exit, the thread should keep running. */ XtAppAddWorkProc(dxc->app, (XtWorkProc)XCheckRIH, dxc); XtAppMainLoop(dxc->app); /* This should not happen normally, see context_manager() below. */ WARNING("Fell out of the X application loop! Cleaning up.\n"); /* Try to clean up. */ /* Lock the context manager. */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); return &trv; } for(i = 0; i < DXTOOLS_MAX_WINDOWS; i++) if(dxc->win[i]) delete_window(dxc->win[i]); XtDestroyApplicationContext(dxc->app); dxc->n_open_windows = 0; dxc->thread_running = false; /* Now unlock context data */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); } return &trv; } static DXTOOLS_CONTEXT *context_manager() { FUNCNAME("contex_manager"); int n_error; static pthread_t *thread = nil; static DXTOOLS_CONTEXT *dxc = nil; if(dxc) { /* Perform some checks before returning the context handle. */ if(dxc->thread_running) return dxc; else WARNING("Something went wrong, thread no longer running.\n"); if(thread) MEM_FREE(thread, 1, pthread_t); else ERROR("Thread object missing!\n"); /* Now, after complaining, just initialize again. */ /* This behavior could be changed, e.g. the thread might exit normally */ /* after closing the last window. However, I do not expect the */ /* running thread to consume many resources if no window is open. */ MEM_FREE(dxc, 1, DXTOOLS_CONTEXT); dxc = nil; } thread = MEM_CALLOC(1, pthread_t); if(!thread) { WARNING("Could not allocate thread object!\n"); return nil; } /* Perform necessary initialization of DX library. */ DXInitModules(); /* Create a context object. */ dxc = MEM_CALLOC(1, DXTOOLS_CONTEXT); if(!dxc) { WARNING("Could not allocate context object!\n"); return nil; } n_error = pthread_mutex_init(&dxc->tlock, NULL); if(n_error) { WARNING("Initialization of mutex failed!\n"); goto error_out; } n_error = pthread_cond_init(&dxc->windows_ready, NULL); if(n_error) { WARNING("Initialization of condition variable failed!\n"); display_error(n_error); goto error_out; } n_error = pthread_cond_init(&dxc->block_context, NULL); if(n_error) { WARNING("Initialization of condition variable failed!\n"); display_error(n_error); goto error_out; } /* Create a new thread for the context. Capture possible errors. */ dxc->thread_running = true; n_error = pthread_create(thread, NULL, windows_thread, dxc); if(n_error) { WARNING("Creation of thread failed!\n"); display_error(n_error); goto error_out; } return dxc; error_out: MEM_FREE(thread, 1, pthread_t); MEM_FREE(dxc, 1, DXTOOLS_CONTEXT); dxc = nil; thread = nil; return nil; } static void block_windows(DXTOOLS_CONTEXT *dxc) { FUNCNAME("block_windows"); int n_error; if(dxc->check_block_context) { MSG("*** Simulation blocked. Hit '%c' in any DXTOOLS window to unblock.\n", DXTOOLS_KEY_BLOCK); n_error = pthread_cond_wait(&dxc->block_context, &dxc->tlock); if(n_error) { ERROR("Error occured while waiting for blocking window thread.\n"); display_error(n_error); } } return; } /****************************************************************************/ /* USER INTERFACE: */ /****************************************************************************/ extern DXTOOLS_WINDOW *open_dxtools_window(const char *title, const char *geometry) { FUNCNAME("open_dxtools_window"); DXTOOLS_CONTEXT *dxc; DXTOOLS_WINDOW *win = nil; int i, n_error; char wtitle[170]; struct timespec abstime = {}; /* Get a context manager and start the graphics thread. */ if(!(dxc = context_manager())) return nil; /* Lock the context manager. */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); return nil; } if(dxc->n_open_windows >= DXTOOLS_MAX_WINDOWS) { WARNING("Sorry, only %d DXTOOLS windows available!\n", DXTOOLS_MAX_WINDOWS); return(nil); } /* Create a new DXTOOLS_WINDOW. */ for(i = 0; i < DXTOOLS_MAX_WINDOWS; i++) { if(!dxc->win[i]) { dxc->win[i] = win = MEM_CALLOC(1, DXTOOLS_WINDOW); if(!win) { WARNING("Unable to allocate DXTOOLS_WINDOW object!\n"); return(nil); } dxc->n_open_windows++; break; } } DEBUG_TEST_EXIT(i < DXTOOLS_MAX_WINDOWS, "Inconsistency detected: n_open_windows was apparently small than the number of windows in use!\n"); /* set window data */ win->dxc = dxc; win->number = i; GET_PARAMETER(0, "dxtools window use perspective", "%d", &win->use_perspective); GET_PARAMETER(0, "dxtools window use hardware rendering", "%d", &win->use_hardware); if (geometry) { int w, h, x = 0, y = 0, size = 1, offset = 1; char *s; if (strchr(geometry, 'x')) { if ((s = strchr(geometry, '+'))) { /* "wwxhh+xx+yy" */ if (strchr(s+1, '+')) sscanf(geometry, "%dx%d+%d+%d", &w, &h, &x, &y); /* "wwxhh+xx" */ else { sscanf(geometry, "%dx%d+%d", &w, &h, &x); y = x; } } /* "wwxhh" */ else { sscanf(geometry, "%dx%d", &w, &h); offset = 0; } } else { size = 0; if ((s = strchr(geometry, '+'))) { /* "xx+yy" */ if (strchr(s+1, '+')) sscanf(s, "+%d+%d", &x, &y); /* "wwxhh+xx" */ else { sscanf(s, "+%d", &x); y = x; } } } if (size) { win->width = w; win->height = h; } win->offsetx = x; win->offsety = y; } else win->width = win->height = 500; win->draw_width = win->width; win->draw_height = win->height; /* create unique title */ if (title) snprintf(wtitle, 170, "%s", title); /* cut too long titles */ else snprintf(wtitle, 170, "DXTOOLS Window [%d]", i+1); win->title = strdup(wtitle); /* trigger opening of this window. */ win->open_me = true; /* Now wait until the window is ready. */ /* Wait at most 60 seconds (time is money for numerical simulations) */ n_error = clock_gettime(CLOCK_REALTIME, &abstime); if(n_error) { ERROR("Could not get absolute system time!\n"); display_error(n_error); return nil; } abstime.tv_sec += 60; while (win->open_me == true) { n_error = pthread_cond_timedwait(&dxc->windows_ready, &dxc->tlock, &abstime); if(n_error) { ERROR("Waiting for window opening failed!\n"); display_error(n_error); return nil; } } /* Now unlock context data */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); } return((DXTOOLS_WINDOW *) win); } extern void close_dxtools_window(DXTOOLS_WINDOW *win) { FUNCNAME("close_dxtools_window"); DXTOOLS_CONTEXT *dxc; int i, n_error; struct timespec abstime = {}; if (!win) return; dxc = win->dxc; /* Lock the context manager. */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); return; } /* first check if the context is blocked. */ block_windows(dxc); /* trigger thread to close the window */ win->close_me = true; /* Now wait until the window is ready. */ /* Wait at most 60 seconds (time is money for numerical simulations) */ n_error = clock_gettime(CLOCK_REALTIME, &abstime); if(n_error) { ERROR("Could not get absolute system time!\n"); display_error(n_error); } abstime.tv_sec += 60; while (win->close_me == true) { n_error = pthread_cond_timedwait(&dxc->windows_ready, &dxc->tlock, &abstime); if(n_error) { ERROR("Error occured while waiting for window to close.\n"); display_error(n_error); /* We can not safely deallocate the DXTOOLS_WINDOW object */ /* at this point, this could cause the graphics backround routines to */ /* crash. We just set the dxc->win[i] pointer to nil which will */ /* cause this window to be ignored in the event loop. */ } } /* Now update entries in the context. */ for(i = 0; i < DXTOOLS_MAX_WINDOWS; i++) { if(win == dxc->win[i]) { if(!n_error) { free(win->title); MEM_FREE(win, 1, DXTOOLS_WINDOW); } dxc->win[i] = nil; dxc->n_open_windows--; break; } } DEBUG_TEST_EXIT(i < DXTOOLS_MAX_WINDOWS, "Did not find window in list!\n"); /* Unlock the context manager. */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); } return; } static int create_field_components(MESH *mesh, const DOF_REAL_VEC *drv, const DOF_REAL_D_VEC *drdv, Array *coordinates, Array *connections, Array *data) { FUNCNAME("create_field_components"); TRAVERSE_STACK *stack = nil; static const REAL vertex_bary[N_VERTICES_MAX][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}}; float coord[DIM_OF_WORLD], value; int conn[N_VERTICES_MAX]; const DOF_ADMIN *admin = nil; const EL_INFO *el_info = nil; DOF_INT_VEC *dof_vert_ind = nil; FE_SPACE fe_space = {"vertex fe_space", nil, nil}; PARAMETRIC *parametric = nil; int dim, n0, nv, ne, i, j, *vert_ind = nil; REAL *data_vec = nil; DOF dof; /* Dimension */ dim = mesh->dim; /* Create Arrays for coordinates, connections, and data */ if(!(*coordinates = DXNewArray(TYPE_FLOAT, CATEGORY_REAL, 1,DIM_OF_WORLD))) { display_dx_error(); goto error_out; } if(!(*connections = DXNewArray(TYPE_INT, CATEGORY_REAL, 1, dim+1))) { display_dx_error(); goto error_out; } if(data) { if(drv) *data = DXNewArray(TYPE_FLOAT, CATEGORY_REAL, 1, 1); else *data = DXNewArray(TYPE_FLOAT, CATEGORY_REAL, 1, DIM_OF_WORLD); if(!*data) { display_dx_error(); goto error_out; } } /* allocate memory for coordinates, connections, and data */ if(!DXAddArrayData(*coordinates, 0, mesh->n_vertices, nil)) { display_dx_error(); goto error_out; } if(!DXAddArrayData(*connections, 0, mesh->n_elements, nil)) { display_dx_error(); goto error_out; } if(data) { if(!DXAddArrayData(*data, 0, mesh->n_vertices, nil)) { display_dx_error(); goto error_out; } if(drv) data_vec = drv->vec; else if(drdv) data_vec = (REAL *)drdv->vec; else goto error_out; if(!data_vec) goto error_out; } /* get dof_admin for vertex count */ admin = get_vertex_admin(mesh); fe_space.admin = admin; /* get offset for the dofs */ n0 = admin->n0_dof[VERTEX]; /* pointer for parametric mesh */ parametric = mesh->parametric; /* get dof vector for vertex indices and initialize with -1 */ dof_vert_ind = get_dof_int_vec("vertex indices", &fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = -1); nv = ne = 0; stack = get_traverse_stack(); /*------------------------------------------------------------------------*/ /* The first pass counts elements and vertices, checks these against the */ /* entries of mesh->n_elements, mesh->n_vertices, and fills coordinates */ /* and data. */ /*------------------------------------------------------------------------*/ for(el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL | FILL_COORDS); el_info; el_info = traverse_next(stack, el_info)) { if (parametric) { parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES(dim), vertex_bary, (REAL_D *)el_info->coord); } for (i = 0; i < N_VERTICES(dim); i++) { dof = el_info->el->dof[i][n0]; if (vert_ind[dof] == -1) { /* assign a global index to each vertex */ vert_ind[dof] = nv; /* insert coordinate into the field (ATTENTION: must be float!) */ for (j = 0; j < DIM_OF_WORLD; j++) coord[j] = (float)el_info->coord[i][j]; if(!DXAddArrayData(*coordinates, nv, 1, coord)) { display_dx_error(); goto error_out; } if(data_vec){ if(drv) value = (float)data_vec[dof]; else value = (float)data_vec[dof*DIM_OF_WORLD]; if(!DXAddArrayData(*data, nv, 1, &value)) { display_dx_error(); goto error_out; } } nv++; if (nv>mesh->n_vertices) ERROR_EXIT("mesh %s: n_vertices (==%d) is too small!\n", mesh->name, mesh->n_vertices); } } ne++; if (ne>mesh->n_elements) ERROR_EXIT("mesh %s: n_elements (==%d) is too small!\n", mesh->name, mesh->n_elements); } if (nen_elements) ERROR_EXIT("mesh %s: n_elements (==%d) is too large!\n", mesh->name, mesh->n_elements, ne); if (nvn_vertices) ERROR_EXIT("mesh %s: n_vertices (==%d) is too large\n", mesh->name, mesh->n_vertices, nv); ne = 0; /*------------------------------------------------------------------------*/ /* The second pass fills connections */ /*------------------------------------------------------------------------*/ for(el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); el_info; el_info = traverse_next(stack, el_info)) { for (i = 0; i < N_VERTICES(dim); i++) conn[i] = vert_ind[el_info->el->dof[i][n0]]; if(!DXAddArrayData(*connections, ne, 1, conn)) { display_dx_error(); goto error_out; } ne++; } free_dof_int_vec(dof_vert_ind); free_traverse_stack(stack); return false; error_out: if(dof_vert_ind) free_dof_int_vec(dof_vert_ind); if(stack) free_traverse_stack(stack); return true; } extern void dxtools_mesh(DXTOOLS_WINDOW *win, MESH *mesh) { FUNCNAME("dxtool_mesh"); DXTOOLS_CONTEXT *dxc = win->dxc; int dim, n_error = 0; REAL tube_size_real = 0.0; float tube_size = 0.0; Array coordinates = NULL, connections = NULL; Field mf = NULL; ModuleInput minput[10]; ModuleOutput moutput[10]; dxObject connectionsobject = NULL, displayobject = NULL; if (!mesh || !win) return; /* Set the tube size */ GET_PARAMETER(0, "dxtools mesh tube size", "%f", &tube_size_real); tube_size = MAX(0.0, (float)tube_size_real); /* Dimension */ dim = mesh->dim; /* lock thread data */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); } /* first check if the context is blocked. */ block_windows(dxc); if(create_field_components(mesh, nil, nil, &coordinates, &connections, nil)) goto error_out; /* Create a new field and insert the Array Data */ if(!(mf = DXNewField())) { display_dx_error(); goto error_out; } DXSetComponentValue(mf, "positions", (dxObject)coordinates); DXSetComponentValue(mf, "connections", (dxObject)connections); switch(dim) { case 1: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("lines")); break; case 2: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("triangles")); break; case 3: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("tetrahedra")); break; default: ERROR_EXIT("Bad dimension?\n"); } if(!DXEndField(mf)) { display_dx_error(); goto error_out; } /* Create Connections of the field data */ DXModSetObjectInput(&minput[0], "input", (dxObject)mf); DXModSetObjectOutput(&moutput[0], "output", &connectionsobject); if(!DXCallModule("ShowConnections", 1, minput, 1, moutput)) goto error_out; if(tube_size > 0.0) { /* Draw connections as a tube */ DXModSetObjectInput(&minput[0], "line", connectionsobject); DXModSetFloatInput(&minput[1], "diameter", tube_size); DXModSetObjectOutput(&moutput[0], "tube", &displayobject); if(!DXCallModule("Tube", 2, minput, 1, moutput)) goto error_out; } else { /* Draw connections as plain lines */ displayobject = connectionsobject; } /* Delete possible colormap objects. */ if(win->colormap) { if(!DXDelete((dxObject)win->colormap)) display_dx_error(); win->colormap = NULL; } /* Setting new object for the window */ if(win->displayobject && !DXDelete(win->displayobject)) display_dx_error(); win->displayobject = displayobject; win->type = DXTOOLS_MESH; win->dim = dim; win->redraw_me = true; /* Unlock thread data */ pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); } return; error_out: WARNING("Mesh not displayed.\n"); return; } extern void dxtools_drv(DXTOOLS_WINDOW *win, const DOF_REAL_VEC *u) { FUNCNAME("dxtools_drv"); DXTOOLS_CONTEXT *dxc = win->dxc; MESH *mesh; int mode_rubber_sheet = 0, mode_color = 1, dim, n_error = 0; int mode_glyph = 0; Array coordinates = NULL, connections = NULL; Array data = NULL; Field colormap = NULL, mf = NULL, tmp_mf = NULL; ModuleInput minput[10]; ModuleOutput moutput[10]; if (!u || !win) return; if(!strstr(u->fe_space->bas_fcts->name, "lagrange")) { WARNING("Only implemented for Lagrange Finite Elements!\n"); goto error_out; } /* Dimension */ mesh = u->fe_space->mesh; dim = mesh->dim; /* lock thread data */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); } /* first check if the context is blocked. */ block_windows(dxc); if(create_field_components(mesh, u, nil, &coordinates, &connections, &data)) goto error_out; /* Create a new field and insert the Array Data */ if(!(mf = DXNewField())) { display_dx_error(); goto error_out; } DXSetComponentValue(mf, "positions", (dxObject)coordinates); DXSetComponentValue(mf, "connections", (dxObject)connections); DXSetComponentValue(mf, "data", (dxObject)data); switch(dim) { case 1: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("lines")); break; case 2: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("triangles")); break; case 3: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("tetrahedra")); break; default: ERROR_EXIT("Bad dimension?\n"); } if(!DXEndField(mf)) { display_dx_error(); goto error_out; } GET_PARAMETER(0, "dxtools data use RubberSheet", "%d", &mode_rubber_sheet); GET_PARAMETER(0, "dxtools data use AutoColor", "%d", &mode_color); GET_PARAMETER(0, "dxtools data use AutoGlyph", "%d", &mode_glyph); /* Enable the DX "rubber sheet" effect, which is basically just a */ /* 1/2D plot of data values as height over the mesh. */ if (mode_rubber_sheet == 1) { if(dim == 3) { WARNING("Rubber sheet display mode is only available for 2D meshes.\n"); mode_rubber_sheet = 0; } else { DXModSetObjectInput(&minput[0], "data", (dxObject)mf); DXModSetObjectOutput(&moutput[0], "graph", (dxObject *)&tmp_mf); if(!DXCallModule("RubberSheet", 1, minput, 1, moutput)) { display_dx_error(); goto error_out; } mf = tmp_mf; } } /* The rubber sheet and glyph effects add color, so AutoColor is not */ /* always needed. */ if((mode_color == 1) || (mode_rubber_sheet == 0)) { DXModSetObjectInput(&minput[0], "data", (dxObject)mf); DXModSetObjectOutput(&moutput[0], "mapped", (dxObject *)&tmp_mf); DXModSetObjectOutput(&moutput[1], "colormap", (dxObject *)&colormap); if(!DXCallModule("AutoColor", 1, minput, 2, moutput)) { display_dx_error(); goto error_out; } mf = tmp_mf; } /* Apply glyphs, if desired. This includes arrows, textual display of */ /* values, etc. */ if(mode_glyph) { int n_in = 0; char glyph_type[20] = {}; GET_PARAMETER(0, "dxtools data AutoGlyph type", "%s", glyph_type); DXModSetObjectInput(&minput[n_in++], "data", (dxObject)mf); if(strlen(glyph_type)) { if(strcmp(glyph_type, "colortext")) DXModSetStringInput(&minput[n_in++], "type", glyph_type); else DXModSetStringInput(&minput[n_in++], "type", "colored text"); } DXModSetObjectOutput(&moutput[0], "glyphs", (dxObject *)&tmp_mf); if(!DXCallModule("AutoGlyph", n_in, minput, 1, moutput)) { display_dx_error(); goto error_out; } mf = tmp_mf; } /* Set new colormap for the object. */ if(colormap) { if(win->colormap && !DXDelete((dxObject)win->colormap)) display_dx_error(); win->colormap = colormap; } /* Setting new object for the window */ if(win->displayobject && !DXDelete(win->displayobject)) display_dx_error(); win->displayobject = (dxObject)mf; win->type = DXTOOLS_FEVECTOR; win->dim = dim; win->redraw_me = true; /* Unlock thread data */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); } return; error_out: WARNING("Vector not displayed.\n"); return; } extern void dxtools_drdv(DXTOOLS_WINDOW *win, const DOF_REAL_D_VEC *u) { FUNCNAME("dxtools_drdv"); DXTOOLS_CONTEXT *dxc = win->dxc; MESH *mesh; int mode_rubber_sheet = 0, mode_color = 1, dim, n_error = 0; int mode_glyph = 0; Array coordinates = NULL, connections = NULL; Array data = NULL; Field colormap = NULL, mf = NULL, tmp_mf = NULL; ModuleInput minput[10]; ModuleOutput moutput[10]; if (!u || !win) return; if(!strstr(u->fe_space->bas_fcts->name, "lagrange")) { WARNING("Only implemented for Lagrange Finite Elements!\n"); goto error_out; } /* Dimension */ mesh = u->fe_space->mesh; dim = mesh->dim; /* lock thread data */ n_error = pthread_mutex_lock(&dxc->tlock); if(n_error){ ERROR("Locking of thread failed!\n"); display_error(n_error); } /* first check if the context is blocked. */ block_windows(dxc); if(create_field_components(mesh, nil, u, &coordinates, &connections, &data)) goto error_out; /* Create a new field and insert the Array Data */ if(!(mf = DXNewField())) { display_dx_error(); goto error_out; } DXSetComponentValue(mf, "positions", (dxObject)coordinates); DXSetComponentValue(mf, "connections", (dxObject)connections); DXSetComponentValue(mf, "data", (dxObject)data); switch(dim) { case 1: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("lines")); break; case 2: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("triangles")); break; case 3: DXSetComponentAttribute(mf, "connections", "element type", (dxObject)DXNewString("tetrahedra")); break; default: ERROR_EXIT("Bad dimension?\n"); } if(!DXEndField(mf)) { display_dx_error(); goto error_out; } GET_PARAMETER(0, "dxtools data use RubberSheet", "%d", &mode_rubber_sheet); GET_PARAMETER(0, "dxtools data use AutoColor", "%d", &mode_color); GET_PARAMETER(0, "dxtools data use AutoGlyph", "%d", &mode_glyph); /* Enable the DX "rubber sheet" effect, which is basically just a */ /* 1/2D plot of data values as height over the mesh. */ if (mode_rubber_sheet == 1) { if(dim == 3) { WARNING("Rubber sheet display mode is only available for 2D meshes.\n"); mode_rubber_sheet = 0; } else { DXModSetObjectInput(&minput[0], "data", (dxObject)mf); DXModSetObjectOutput(&moutput[0], "graph", (dxObject *)&tmp_mf); if(!DXCallModule("RubberSheet", 1, minput, 1, moutput)) { display_dx_error(); goto error_out; } mf = tmp_mf; } } /* The rubber sheet and glyph effects add color, so AutoColor is not */ /* always needed. */ if((mode_color == 1) || (mode_rubber_sheet == 0)) { DXModSetObjectInput(&minput[0], "data", (dxObject)mf); DXModSetObjectOutput(&moutput[0], "mapped", (dxObject *)&tmp_mf); DXModSetObjectOutput(&moutput[1], "colormap", (dxObject *)&colormap); if(!DXCallModule("AutoColor", 1, minput, 2, moutput)) { display_dx_error(); goto error_out; } mf = tmp_mf; } /* Apply glyphs, if desired. This includes arrows, textual display of */ /* values, etc. */ if(mode_glyph) { int n_in = 0; char glyph_type[20] = {}; GET_PARAMETER(0, "dxtools data AutoGlyph type", "%s", glyph_type); DXModSetObjectInput(&minput[n_in++], "data", (dxObject)mf); if(strlen(glyph_type)) { if(strcmp(glyph_type, "colortext")) DXModSetStringInput(&minput[n_in++], "type", glyph_type); else DXModSetStringInput(&minput[n_in++], "type", "colored text"); } DXModSetObjectOutput(&moutput[0], "glyphs", (dxObject *)&tmp_mf); if(!DXCallModule("AutoGlyph", n_in, minput, 1, moutput)) { display_dx_error(); goto error_out; } mf = tmp_mf; } /* Set new colormap for the object. */ if(colormap) { if(win->colormap && !DXDelete((dxObject)win->colormap)) display_dx_error(); win->colormap = colormap; } /* Setting new object for the window */ if(win->displayobject && !DXDelete(win->displayobject)) display_dx_error(); win->displayobject = (dxObject)mf; win->type = DXTOOLS_FEVECTOR; win->dim = dim; win->redraw_me = true; /* Unlock thread data */ n_error = pthread_mutex_unlock(&dxc->tlock); if(n_error){ ERROR("Unlocking of thread failed!\n"); display_error(n_error); } return; error_out: WARNING("Vector not displayed.\n"); return; } alberta-2.0.1/alberta/src/alberta_1d/0000777000042300001440000000000011067147343014326 500000000000000alberta-2.0.1/alberta/src/alberta_1d/Makefile.am0000644000042300001440000000076510676732241016310 00000000000000## Makefile.am for libalberta_1d ## ## DO NOT EDIT, this file is automatically generated by ## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = 1 ALBERTA_DEBUG = 0 lib_LTLIBRARIES = libalberta_1d.la include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) nodist_libalberta_1d_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libalberta_1d_la_SOURCES += ../Common/gltools.c endif if HAVE_DX nodist_libalberta_1d_la_SOURCES += ../Common/dxtools.c endif alberta-2.0.1/alberta/src/alberta_1d/Makefile.in0000644000042300001440000016511411067146147016320 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../Common/Makefile.am.include \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in @HAVE_GLTOOLS_TRUE@am__append_1 = ../Common/gltools.c @HAVE_DX_TRUE@am__append_2 = ../Common/dxtools.c subdir = alberta/src/alberta_1d ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_1d_la_LIBADD = am__objects_1 = HB_precon.lo MG.lo MG_s.lo MG_s1.lo MG_s2.lo adapt.lo \ assemble.lo assemble_dowb.lo bas_fct.lo check.lo coarsen.lo \ dof_admin.lo element.lo error.lo estimator.lo \ estimator_dowb.lo eval.lo graphXO.lo l2scp.lo level.lo \ macro.lo memory.lo numint.lo oem_solve_d.lo oem_solve_dowb.lo \ oem_solve_s.lo parametric.lo read_mesh.lo refine.lo sor.lo \ ssor.lo submesh.lo trav_xy.lo traverse_nr.lo traverse_r.lo \ wall_quad_fast.lo write_mesh.lo write_mesh_gmv.lo \ write_mesh_ps.lo @HAVE_GLTOOLS_TRUE@am__objects_2 = gltools.lo @HAVE_DX_TRUE@am__objects_3 = dxtools.lo nodist_libalberta_1d_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_3) libalberta_1d_la_OBJECTS = $(nodist_libalberta_1d_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_libalberta_1d_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIM_OF_WORLD = 1 lib_LTLIBRARIES = libalberta_1d.la sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) nodist_libalberta_1d_la_SOURCES = $(sources) $(am__append_1) \ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../Common/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/alberta_1d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/alberta_1d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_1d.la: $(libalberta_1d_la_OBJECTS) $(libalberta_1d_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libalberta_1d_la_OBJECTS) $(libalberta_1d_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HB_precon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adapt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bas_fct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dof_admin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dxtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphXO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/l2scp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parametric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trav_xy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_nr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall_quad_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_gmv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_ps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< HB_precon.lo: ../Common/HB_precon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT HB_precon.lo -MD -MP -MF $(DEPDIR)/HB_precon.Tpo -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/HB_precon.Tpo $(DEPDIR)/HB_precon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/HB_precon.c' object='HB_precon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c MG.lo: ../Common/MG.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG.lo -MD -MP -MF $(DEPDIR)/MG.Tpo -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG.Tpo $(DEPDIR)/MG.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG.c' object='MG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c MG_s.lo: ../Common/MG_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s.lo -MD -MP -MF $(DEPDIR)/MG_s.Tpo -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s.Tpo $(DEPDIR)/MG_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s.c' object='MG_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c MG_s1.lo: ../Common/MG_s1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s1.lo -MD -MP -MF $(DEPDIR)/MG_s1.Tpo -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s1.Tpo $(DEPDIR)/MG_s1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s1.c' object='MG_s1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c MG_s2.lo: ../Common/MG_s2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s2.lo -MD -MP -MF $(DEPDIR)/MG_s2.Tpo -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s2.Tpo $(DEPDIR)/MG_s2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s2.c' object='MG_s2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c adapt.lo: ../Common/adapt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT adapt.lo -MD -MP -MF $(DEPDIR)/adapt.Tpo -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/adapt.Tpo $(DEPDIR)/adapt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/adapt.c' object='adapt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c assemble.lo: ../Common/assemble.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble.lo -MD -MP -MF $(DEPDIR)/assemble.Tpo -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble.Tpo $(DEPDIR)/assemble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble.c' object='assemble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c assemble_dowb.lo: ../Common/assemble_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble_dowb.lo -MD -MP -MF $(DEPDIR)/assemble_dowb.Tpo -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble_dowb.Tpo $(DEPDIR)/assemble_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble_dowb.c' object='assemble_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c bas_fct.lo: ../Common/bas_fct.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bas_fct.lo -MD -MP -MF $(DEPDIR)/bas_fct.Tpo -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bas_fct.Tpo $(DEPDIR)/bas_fct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/bas_fct.c' object='bas_fct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c check.lo: ../Common/check.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check.lo -MD -MP -MF $(DEPDIR)/check.Tpo -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/check.Tpo $(DEPDIR)/check.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/check.c' object='check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c coarsen.lo: ../Common/coarsen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coarsen.lo -MD -MP -MF $(DEPDIR)/coarsen.Tpo -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coarsen.Tpo $(DEPDIR)/coarsen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/coarsen.c' object='coarsen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c dof_admin.lo: ../Common/dof_admin.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dof_admin.lo -MD -MP -MF $(DEPDIR)/dof_admin.Tpo -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dof_admin.Tpo $(DEPDIR)/dof_admin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dof_admin.c' object='dof_admin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c element.lo: ../Common/element.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT element.lo -MD -MP -MF $(DEPDIR)/element.Tpo -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/element.Tpo $(DEPDIR)/element.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/element.c' object='element.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c error.lo: ../Common/error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c estimator.lo: ../Common/estimator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator.lo -MD -MP -MF $(DEPDIR)/estimator.Tpo -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator.Tpo $(DEPDIR)/estimator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator.c' object='estimator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c estimator_dowb.lo: ../Common/estimator_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator_dowb.lo -MD -MP -MF $(DEPDIR)/estimator_dowb.Tpo -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator_dowb.Tpo $(DEPDIR)/estimator_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator_dowb.c' object='estimator_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c eval.lo: ../Common/eval.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eval.lo -MD -MP -MF $(DEPDIR)/eval.Tpo -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eval.Tpo $(DEPDIR)/eval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/eval.c' object='eval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c graphXO.lo: ../Common/graphXO.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT graphXO.lo -MD -MP -MF $(DEPDIR)/graphXO.Tpo -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/graphXO.Tpo $(DEPDIR)/graphXO.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/graphXO.c' object='graphXO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c l2scp.lo: ../Common/l2scp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT l2scp.lo -MD -MP -MF $(DEPDIR)/l2scp.Tpo -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/l2scp.Tpo $(DEPDIR)/l2scp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/l2scp.c' object='l2scp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c level.lo: ../Common/level.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.lo -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/level.Tpo $(DEPDIR)/level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/level.c' object='level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c macro.lo: ../Common/macro.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT macro.lo -MD -MP -MF $(DEPDIR)/macro.Tpo -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/macro.Tpo $(DEPDIR)/macro.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/macro.c' object='macro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c memory.lo: ../Common/memory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c numint.lo: ../Common/numint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT numint.lo -MD -MP -MF $(DEPDIR)/numint.Tpo -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/numint.Tpo $(DEPDIR)/numint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/numint.c' object='numint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c oem_solve_d.lo: ../Common/oem_solve_d.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_d.lo -MD -MP -MF $(DEPDIR)/oem_solve_d.Tpo -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_d.Tpo $(DEPDIR)/oem_solve_d.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_d.c' object='oem_solve_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c oem_solve_dowb.lo: ../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_dowb.lo -MD -MP -MF $(DEPDIR)/oem_solve_dowb.Tpo -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_dowb.Tpo $(DEPDIR)/oem_solve_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_dowb.c' object='oem_solve_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c oem_solve_s.lo: ../Common/oem_solve_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_s.lo -MD -MP -MF $(DEPDIR)/oem_solve_s.Tpo -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_s.Tpo $(DEPDIR)/oem_solve_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_s.c' object='oem_solve_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c parametric.lo: ../Common/parametric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parametric.lo -MD -MP -MF $(DEPDIR)/parametric.Tpo -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/parametric.Tpo $(DEPDIR)/parametric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/parametric.c' object='parametric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c read_mesh.lo: ../Common/read_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_mesh.lo -MD -MP -MF $(DEPDIR)/read_mesh.Tpo -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/read_mesh.Tpo $(DEPDIR)/read_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/read_mesh.c' object='read_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c refine.lo: ../Common/refine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT refine.lo -MD -MP -MF $(DEPDIR)/refine.Tpo -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/refine.Tpo $(DEPDIR)/refine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/refine.c' object='refine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c sor.lo: ../Common/sor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sor.lo -MD -MP -MF $(DEPDIR)/sor.Tpo -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sor.Tpo $(DEPDIR)/sor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/sor.c' object='sor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c ssor.lo: ../Common/ssor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ssor.lo -MD -MP -MF $(DEPDIR)/ssor.Tpo -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ssor.Tpo $(DEPDIR)/ssor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/ssor.c' object='ssor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c submesh.lo: ../Common/submesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT submesh.lo -MD -MP -MF $(DEPDIR)/submesh.Tpo -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/submesh.Tpo $(DEPDIR)/submesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/submesh.c' object='submesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c trav_xy.lo: ../Common/trav_xy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trav_xy.lo -MD -MP -MF $(DEPDIR)/trav_xy.Tpo -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/trav_xy.Tpo $(DEPDIR)/trav_xy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/trav_xy.c' object='trav_xy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c traverse_nr.lo: ../Common/traverse_nr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_nr.lo -MD -MP -MF $(DEPDIR)/traverse_nr.Tpo -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_nr.Tpo $(DEPDIR)/traverse_nr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_nr.c' object='traverse_nr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c traverse_r.lo: ../Common/traverse_r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_r.lo -MD -MP -MF $(DEPDIR)/traverse_r.Tpo -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_r.Tpo $(DEPDIR)/traverse_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_r.c' object='traverse_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c wall_quad_fast.lo: ../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wall_quad_fast.lo -MD -MP -MF $(DEPDIR)/wall_quad_fast.Tpo -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wall_quad_fast.Tpo $(DEPDIR)/wall_quad_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/wall_quad_fast.c' object='wall_quad_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c write_mesh.lo: ../Common/write_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh.lo -MD -MP -MF $(DEPDIR)/write_mesh.Tpo -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh.Tpo $(DEPDIR)/write_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh.c' object='write_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c write_mesh_gmv.lo: ../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_gmv.lo -MD -MP -MF $(DEPDIR)/write_mesh_gmv.Tpo -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_gmv.Tpo $(DEPDIR)/write_mesh_gmv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_gmv.c' object='write_mesh_gmv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c write_mesh_ps.lo: ../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_ps.lo -MD -MP -MF $(DEPDIR)/write_mesh_ps.Tpo -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_ps.Tpo $(DEPDIR)/write_mesh_ps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_ps.c' object='write_mesh_ps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c gltools.lo: ../Common/gltools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltools.lo -MD -MP -MF $(DEPDIR)/gltools.Tpo -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltools.Tpo $(DEPDIR)/gltools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/gltools.c' object='gltools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c dxtools.lo: ../Common/dxtools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dxtools.lo -MD -MP -MF $(DEPDIR)/dxtools.Tpo -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dxtools.Tpo $(DEPDIR)/dxtools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dxtools.c' object='dxtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/alberta_1d_debug/0000777000042300001440000000000011067147343015474 500000000000000alberta-2.0.1/alberta/src/alberta_1d_debug/Makefile.am0000644000042300001440000000102010676732241017437 00000000000000## Makefile.am for libalberta_1d_debug ## ## DO NOT EDIT, this file is automatically generated by ## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = 1 ALBERTA_DEBUG = 1 lib_LTLIBRARIES = libalberta_1d_debug.la include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) nodist_libalberta_1d_debug_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libalberta_1d_debug_la_SOURCES += ../Common/gltools.c endif if HAVE_DX nodist_libalberta_1d_debug_la_SOURCES += ../Common/dxtools.c endif alberta-2.0.1/alberta/src/alberta_1d_debug/Makefile.in0000644000042300001440000016524711067146147017475 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../Common/Makefile.am.include \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in @HAVE_GLTOOLS_TRUE@am__append_1 = ../Common/gltools.c @HAVE_DX_TRUE@am__append_2 = ../Common/dxtools.c subdir = alberta/src/alberta_1d_debug ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_1d_debug_la_LIBADD = am__objects_1 = HB_precon.lo MG.lo MG_s.lo MG_s1.lo MG_s2.lo adapt.lo \ assemble.lo assemble_dowb.lo bas_fct.lo check.lo coarsen.lo \ dof_admin.lo element.lo error.lo estimator.lo \ estimator_dowb.lo eval.lo graphXO.lo l2scp.lo level.lo \ macro.lo memory.lo numint.lo oem_solve_d.lo oem_solve_dowb.lo \ oem_solve_s.lo parametric.lo read_mesh.lo refine.lo sor.lo \ ssor.lo submesh.lo trav_xy.lo traverse_nr.lo traverse_r.lo \ wall_quad_fast.lo write_mesh.lo write_mesh_gmv.lo \ write_mesh_ps.lo @HAVE_GLTOOLS_TRUE@am__objects_2 = gltools.lo @HAVE_DX_TRUE@am__objects_3 = dxtools.lo nodist_libalberta_1d_debug_la_OBJECTS = $(am__objects_1) \ $(am__objects_2) $(am__objects_3) libalberta_1d_debug_la_OBJECTS = \ $(nodist_libalberta_1d_debug_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_libalberta_1d_debug_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 1 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIM_OF_WORLD = 1 lib_LTLIBRARIES = libalberta_1d_debug.la sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ AM_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) nodist_libalberta_1d_debug_la_SOURCES = $(sources) $(am__append_1) \ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../Common/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/alberta_1d_debug/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/alberta_1d_debug/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_1d_debug.la: $(libalberta_1d_debug_la_OBJECTS) $(libalberta_1d_debug_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libalberta_1d_debug_la_OBJECTS) $(libalberta_1d_debug_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HB_precon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adapt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bas_fct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dof_admin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dxtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphXO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/l2scp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parametric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trav_xy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_nr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall_quad_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_gmv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_ps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< HB_precon.lo: ../Common/HB_precon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT HB_precon.lo -MD -MP -MF $(DEPDIR)/HB_precon.Tpo -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/HB_precon.Tpo $(DEPDIR)/HB_precon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/HB_precon.c' object='HB_precon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c MG.lo: ../Common/MG.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG.lo -MD -MP -MF $(DEPDIR)/MG.Tpo -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG.Tpo $(DEPDIR)/MG.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG.c' object='MG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c MG_s.lo: ../Common/MG_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s.lo -MD -MP -MF $(DEPDIR)/MG_s.Tpo -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s.Tpo $(DEPDIR)/MG_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s.c' object='MG_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c MG_s1.lo: ../Common/MG_s1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s1.lo -MD -MP -MF $(DEPDIR)/MG_s1.Tpo -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s1.Tpo $(DEPDIR)/MG_s1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s1.c' object='MG_s1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c MG_s2.lo: ../Common/MG_s2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s2.lo -MD -MP -MF $(DEPDIR)/MG_s2.Tpo -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s2.Tpo $(DEPDIR)/MG_s2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s2.c' object='MG_s2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c adapt.lo: ../Common/adapt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT adapt.lo -MD -MP -MF $(DEPDIR)/adapt.Tpo -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/adapt.Tpo $(DEPDIR)/adapt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/adapt.c' object='adapt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c assemble.lo: ../Common/assemble.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble.lo -MD -MP -MF $(DEPDIR)/assemble.Tpo -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble.Tpo $(DEPDIR)/assemble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble.c' object='assemble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c assemble_dowb.lo: ../Common/assemble_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble_dowb.lo -MD -MP -MF $(DEPDIR)/assemble_dowb.Tpo -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble_dowb.Tpo $(DEPDIR)/assemble_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble_dowb.c' object='assemble_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c bas_fct.lo: ../Common/bas_fct.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bas_fct.lo -MD -MP -MF $(DEPDIR)/bas_fct.Tpo -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bas_fct.Tpo $(DEPDIR)/bas_fct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/bas_fct.c' object='bas_fct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c check.lo: ../Common/check.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check.lo -MD -MP -MF $(DEPDIR)/check.Tpo -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/check.Tpo $(DEPDIR)/check.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/check.c' object='check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c coarsen.lo: ../Common/coarsen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coarsen.lo -MD -MP -MF $(DEPDIR)/coarsen.Tpo -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coarsen.Tpo $(DEPDIR)/coarsen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/coarsen.c' object='coarsen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c dof_admin.lo: ../Common/dof_admin.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dof_admin.lo -MD -MP -MF $(DEPDIR)/dof_admin.Tpo -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dof_admin.Tpo $(DEPDIR)/dof_admin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dof_admin.c' object='dof_admin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c element.lo: ../Common/element.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT element.lo -MD -MP -MF $(DEPDIR)/element.Tpo -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/element.Tpo $(DEPDIR)/element.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/element.c' object='element.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c error.lo: ../Common/error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c estimator.lo: ../Common/estimator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator.lo -MD -MP -MF $(DEPDIR)/estimator.Tpo -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator.Tpo $(DEPDIR)/estimator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator.c' object='estimator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c estimator_dowb.lo: ../Common/estimator_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator_dowb.lo -MD -MP -MF $(DEPDIR)/estimator_dowb.Tpo -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator_dowb.Tpo $(DEPDIR)/estimator_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator_dowb.c' object='estimator_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c eval.lo: ../Common/eval.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eval.lo -MD -MP -MF $(DEPDIR)/eval.Tpo -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eval.Tpo $(DEPDIR)/eval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/eval.c' object='eval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c graphXO.lo: ../Common/graphXO.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT graphXO.lo -MD -MP -MF $(DEPDIR)/graphXO.Tpo -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/graphXO.Tpo $(DEPDIR)/graphXO.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/graphXO.c' object='graphXO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c l2scp.lo: ../Common/l2scp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT l2scp.lo -MD -MP -MF $(DEPDIR)/l2scp.Tpo -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/l2scp.Tpo $(DEPDIR)/l2scp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/l2scp.c' object='l2scp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c level.lo: ../Common/level.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.lo -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/level.Tpo $(DEPDIR)/level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/level.c' object='level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c macro.lo: ../Common/macro.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT macro.lo -MD -MP -MF $(DEPDIR)/macro.Tpo -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/macro.Tpo $(DEPDIR)/macro.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/macro.c' object='macro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c memory.lo: ../Common/memory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c numint.lo: ../Common/numint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT numint.lo -MD -MP -MF $(DEPDIR)/numint.Tpo -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/numint.Tpo $(DEPDIR)/numint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/numint.c' object='numint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c oem_solve_d.lo: ../Common/oem_solve_d.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_d.lo -MD -MP -MF $(DEPDIR)/oem_solve_d.Tpo -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_d.Tpo $(DEPDIR)/oem_solve_d.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_d.c' object='oem_solve_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c oem_solve_dowb.lo: ../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_dowb.lo -MD -MP -MF $(DEPDIR)/oem_solve_dowb.Tpo -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_dowb.Tpo $(DEPDIR)/oem_solve_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_dowb.c' object='oem_solve_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c oem_solve_s.lo: ../Common/oem_solve_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_s.lo -MD -MP -MF $(DEPDIR)/oem_solve_s.Tpo -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_s.Tpo $(DEPDIR)/oem_solve_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_s.c' object='oem_solve_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c parametric.lo: ../Common/parametric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parametric.lo -MD -MP -MF $(DEPDIR)/parametric.Tpo -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/parametric.Tpo $(DEPDIR)/parametric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/parametric.c' object='parametric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c read_mesh.lo: ../Common/read_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_mesh.lo -MD -MP -MF $(DEPDIR)/read_mesh.Tpo -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/read_mesh.Tpo $(DEPDIR)/read_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/read_mesh.c' object='read_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c refine.lo: ../Common/refine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT refine.lo -MD -MP -MF $(DEPDIR)/refine.Tpo -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/refine.Tpo $(DEPDIR)/refine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/refine.c' object='refine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c sor.lo: ../Common/sor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sor.lo -MD -MP -MF $(DEPDIR)/sor.Tpo -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sor.Tpo $(DEPDIR)/sor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/sor.c' object='sor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c ssor.lo: ../Common/ssor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ssor.lo -MD -MP -MF $(DEPDIR)/ssor.Tpo -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ssor.Tpo $(DEPDIR)/ssor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/ssor.c' object='ssor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c submesh.lo: ../Common/submesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT submesh.lo -MD -MP -MF $(DEPDIR)/submesh.Tpo -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/submesh.Tpo $(DEPDIR)/submesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/submesh.c' object='submesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c trav_xy.lo: ../Common/trav_xy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trav_xy.lo -MD -MP -MF $(DEPDIR)/trav_xy.Tpo -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/trav_xy.Tpo $(DEPDIR)/trav_xy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/trav_xy.c' object='trav_xy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c traverse_nr.lo: ../Common/traverse_nr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_nr.lo -MD -MP -MF $(DEPDIR)/traverse_nr.Tpo -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_nr.Tpo $(DEPDIR)/traverse_nr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_nr.c' object='traverse_nr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c traverse_r.lo: ../Common/traverse_r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_r.lo -MD -MP -MF $(DEPDIR)/traverse_r.Tpo -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_r.Tpo $(DEPDIR)/traverse_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_r.c' object='traverse_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c wall_quad_fast.lo: ../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wall_quad_fast.lo -MD -MP -MF $(DEPDIR)/wall_quad_fast.Tpo -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wall_quad_fast.Tpo $(DEPDIR)/wall_quad_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/wall_quad_fast.c' object='wall_quad_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c write_mesh.lo: ../Common/write_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh.lo -MD -MP -MF $(DEPDIR)/write_mesh.Tpo -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh.Tpo $(DEPDIR)/write_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh.c' object='write_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c write_mesh_gmv.lo: ../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_gmv.lo -MD -MP -MF $(DEPDIR)/write_mesh_gmv.Tpo -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_gmv.Tpo $(DEPDIR)/write_mesh_gmv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_gmv.c' object='write_mesh_gmv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c write_mesh_ps.lo: ../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_ps.lo -MD -MP -MF $(DEPDIR)/write_mesh_ps.Tpo -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_ps.Tpo $(DEPDIR)/write_mesh_ps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_ps.c' object='write_mesh_ps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c gltools.lo: ../Common/gltools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltools.lo -MD -MP -MF $(DEPDIR)/gltools.Tpo -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltools.Tpo $(DEPDIR)/gltools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/gltools.c' object='gltools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c dxtools.lo: ../Common/dxtools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dxtools.lo -MD -MP -MF $(DEPDIR)/dxtools.Tpo -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dxtools.Tpo $(DEPDIR)/dxtools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dxtools.c' object='dxtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/alberta_2d/0000777000042300001440000000000011067147343014327 500000000000000alberta-2.0.1/alberta/src/alberta_2d/Makefile.am0000644000042300001440000000076510676732241016311 00000000000000## Makefile.am for libalberta_2d ## ## DO NOT EDIT, this file is automatically generated by ## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = 2 ALBERTA_DEBUG = 0 lib_LTLIBRARIES = libalberta_2d.la include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) nodist_libalberta_2d_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libalberta_2d_la_SOURCES += ../Common/gltools.c endif if HAVE_DX nodist_libalberta_2d_la_SOURCES += ../Common/dxtools.c endif alberta-2.0.1/alberta/src/alberta_2d/Makefile.in0000644000042300001440000016511411067146150016313 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../Common/Makefile.am.include \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in @HAVE_GLTOOLS_TRUE@am__append_1 = ../Common/gltools.c @HAVE_DX_TRUE@am__append_2 = ../Common/dxtools.c subdir = alberta/src/alberta_2d ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_2d_la_LIBADD = am__objects_1 = HB_precon.lo MG.lo MG_s.lo MG_s1.lo MG_s2.lo adapt.lo \ assemble.lo assemble_dowb.lo bas_fct.lo check.lo coarsen.lo \ dof_admin.lo element.lo error.lo estimator.lo \ estimator_dowb.lo eval.lo graphXO.lo l2scp.lo level.lo \ macro.lo memory.lo numint.lo oem_solve_d.lo oem_solve_dowb.lo \ oem_solve_s.lo parametric.lo read_mesh.lo refine.lo sor.lo \ ssor.lo submesh.lo trav_xy.lo traverse_nr.lo traverse_r.lo \ wall_quad_fast.lo write_mesh.lo write_mesh_gmv.lo \ write_mesh_ps.lo @HAVE_GLTOOLS_TRUE@am__objects_2 = gltools.lo @HAVE_DX_TRUE@am__objects_3 = dxtools.lo nodist_libalberta_2d_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_3) libalberta_2d_la_OBJECTS = $(nodist_libalberta_2d_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_libalberta_2d_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIM_OF_WORLD = 2 lib_LTLIBRARIES = libalberta_2d.la sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) nodist_libalberta_2d_la_SOURCES = $(sources) $(am__append_1) \ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../Common/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/alberta_2d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/alberta_2d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_2d.la: $(libalberta_2d_la_OBJECTS) $(libalberta_2d_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libalberta_2d_la_OBJECTS) $(libalberta_2d_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HB_precon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adapt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bas_fct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dof_admin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dxtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphXO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/l2scp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parametric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trav_xy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_nr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall_quad_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_gmv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_ps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< HB_precon.lo: ../Common/HB_precon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT HB_precon.lo -MD -MP -MF $(DEPDIR)/HB_precon.Tpo -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/HB_precon.Tpo $(DEPDIR)/HB_precon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/HB_precon.c' object='HB_precon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c MG.lo: ../Common/MG.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG.lo -MD -MP -MF $(DEPDIR)/MG.Tpo -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG.Tpo $(DEPDIR)/MG.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG.c' object='MG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c MG_s.lo: ../Common/MG_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s.lo -MD -MP -MF $(DEPDIR)/MG_s.Tpo -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s.Tpo $(DEPDIR)/MG_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s.c' object='MG_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c MG_s1.lo: ../Common/MG_s1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s1.lo -MD -MP -MF $(DEPDIR)/MG_s1.Tpo -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s1.Tpo $(DEPDIR)/MG_s1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s1.c' object='MG_s1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c MG_s2.lo: ../Common/MG_s2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s2.lo -MD -MP -MF $(DEPDIR)/MG_s2.Tpo -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s2.Tpo $(DEPDIR)/MG_s2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s2.c' object='MG_s2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c adapt.lo: ../Common/adapt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT adapt.lo -MD -MP -MF $(DEPDIR)/adapt.Tpo -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/adapt.Tpo $(DEPDIR)/adapt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/adapt.c' object='adapt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c assemble.lo: ../Common/assemble.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble.lo -MD -MP -MF $(DEPDIR)/assemble.Tpo -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble.Tpo $(DEPDIR)/assemble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble.c' object='assemble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c assemble_dowb.lo: ../Common/assemble_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble_dowb.lo -MD -MP -MF $(DEPDIR)/assemble_dowb.Tpo -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble_dowb.Tpo $(DEPDIR)/assemble_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble_dowb.c' object='assemble_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c bas_fct.lo: ../Common/bas_fct.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bas_fct.lo -MD -MP -MF $(DEPDIR)/bas_fct.Tpo -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bas_fct.Tpo $(DEPDIR)/bas_fct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/bas_fct.c' object='bas_fct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c check.lo: ../Common/check.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check.lo -MD -MP -MF $(DEPDIR)/check.Tpo -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/check.Tpo $(DEPDIR)/check.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/check.c' object='check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c coarsen.lo: ../Common/coarsen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coarsen.lo -MD -MP -MF $(DEPDIR)/coarsen.Tpo -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coarsen.Tpo $(DEPDIR)/coarsen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/coarsen.c' object='coarsen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c dof_admin.lo: ../Common/dof_admin.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dof_admin.lo -MD -MP -MF $(DEPDIR)/dof_admin.Tpo -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dof_admin.Tpo $(DEPDIR)/dof_admin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dof_admin.c' object='dof_admin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c element.lo: ../Common/element.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT element.lo -MD -MP -MF $(DEPDIR)/element.Tpo -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/element.Tpo $(DEPDIR)/element.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/element.c' object='element.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c error.lo: ../Common/error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c estimator.lo: ../Common/estimator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator.lo -MD -MP -MF $(DEPDIR)/estimator.Tpo -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator.Tpo $(DEPDIR)/estimator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator.c' object='estimator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c estimator_dowb.lo: ../Common/estimator_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator_dowb.lo -MD -MP -MF $(DEPDIR)/estimator_dowb.Tpo -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator_dowb.Tpo $(DEPDIR)/estimator_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator_dowb.c' object='estimator_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c eval.lo: ../Common/eval.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eval.lo -MD -MP -MF $(DEPDIR)/eval.Tpo -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eval.Tpo $(DEPDIR)/eval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/eval.c' object='eval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c graphXO.lo: ../Common/graphXO.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT graphXO.lo -MD -MP -MF $(DEPDIR)/graphXO.Tpo -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/graphXO.Tpo $(DEPDIR)/graphXO.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/graphXO.c' object='graphXO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c l2scp.lo: ../Common/l2scp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT l2scp.lo -MD -MP -MF $(DEPDIR)/l2scp.Tpo -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/l2scp.Tpo $(DEPDIR)/l2scp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/l2scp.c' object='l2scp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c level.lo: ../Common/level.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.lo -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/level.Tpo $(DEPDIR)/level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/level.c' object='level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c macro.lo: ../Common/macro.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT macro.lo -MD -MP -MF $(DEPDIR)/macro.Tpo -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/macro.Tpo $(DEPDIR)/macro.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/macro.c' object='macro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c memory.lo: ../Common/memory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c numint.lo: ../Common/numint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT numint.lo -MD -MP -MF $(DEPDIR)/numint.Tpo -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/numint.Tpo $(DEPDIR)/numint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/numint.c' object='numint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c oem_solve_d.lo: ../Common/oem_solve_d.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_d.lo -MD -MP -MF $(DEPDIR)/oem_solve_d.Tpo -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_d.Tpo $(DEPDIR)/oem_solve_d.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_d.c' object='oem_solve_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c oem_solve_dowb.lo: ../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_dowb.lo -MD -MP -MF $(DEPDIR)/oem_solve_dowb.Tpo -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_dowb.Tpo $(DEPDIR)/oem_solve_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_dowb.c' object='oem_solve_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c oem_solve_s.lo: ../Common/oem_solve_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_s.lo -MD -MP -MF $(DEPDIR)/oem_solve_s.Tpo -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_s.Tpo $(DEPDIR)/oem_solve_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_s.c' object='oem_solve_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c parametric.lo: ../Common/parametric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parametric.lo -MD -MP -MF $(DEPDIR)/parametric.Tpo -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/parametric.Tpo $(DEPDIR)/parametric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/parametric.c' object='parametric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c read_mesh.lo: ../Common/read_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_mesh.lo -MD -MP -MF $(DEPDIR)/read_mesh.Tpo -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/read_mesh.Tpo $(DEPDIR)/read_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/read_mesh.c' object='read_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c refine.lo: ../Common/refine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT refine.lo -MD -MP -MF $(DEPDIR)/refine.Tpo -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/refine.Tpo $(DEPDIR)/refine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/refine.c' object='refine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c sor.lo: ../Common/sor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sor.lo -MD -MP -MF $(DEPDIR)/sor.Tpo -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sor.Tpo $(DEPDIR)/sor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/sor.c' object='sor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c ssor.lo: ../Common/ssor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ssor.lo -MD -MP -MF $(DEPDIR)/ssor.Tpo -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ssor.Tpo $(DEPDIR)/ssor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/ssor.c' object='ssor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c submesh.lo: ../Common/submesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT submesh.lo -MD -MP -MF $(DEPDIR)/submesh.Tpo -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/submesh.Tpo $(DEPDIR)/submesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/submesh.c' object='submesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c trav_xy.lo: ../Common/trav_xy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trav_xy.lo -MD -MP -MF $(DEPDIR)/trav_xy.Tpo -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/trav_xy.Tpo $(DEPDIR)/trav_xy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/trav_xy.c' object='trav_xy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c traverse_nr.lo: ../Common/traverse_nr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_nr.lo -MD -MP -MF $(DEPDIR)/traverse_nr.Tpo -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_nr.Tpo $(DEPDIR)/traverse_nr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_nr.c' object='traverse_nr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c traverse_r.lo: ../Common/traverse_r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_r.lo -MD -MP -MF $(DEPDIR)/traverse_r.Tpo -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_r.Tpo $(DEPDIR)/traverse_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_r.c' object='traverse_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c wall_quad_fast.lo: ../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wall_quad_fast.lo -MD -MP -MF $(DEPDIR)/wall_quad_fast.Tpo -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wall_quad_fast.Tpo $(DEPDIR)/wall_quad_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/wall_quad_fast.c' object='wall_quad_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c write_mesh.lo: ../Common/write_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh.lo -MD -MP -MF $(DEPDIR)/write_mesh.Tpo -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh.Tpo $(DEPDIR)/write_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh.c' object='write_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c write_mesh_gmv.lo: ../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_gmv.lo -MD -MP -MF $(DEPDIR)/write_mesh_gmv.Tpo -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_gmv.Tpo $(DEPDIR)/write_mesh_gmv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_gmv.c' object='write_mesh_gmv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c write_mesh_ps.lo: ../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_ps.lo -MD -MP -MF $(DEPDIR)/write_mesh_ps.Tpo -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_ps.Tpo $(DEPDIR)/write_mesh_ps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_ps.c' object='write_mesh_ps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c gltools.lo: ../Common/gltools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltools.lo -MD -MP -MF $(DEPDIR)/gltools.Tpo -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltools.Tpo $(DEPDIR)/gltools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/gltools.c' object='gltools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c dxtools.lo: ../Common/dxtools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dxtools.lo -MD -MP -MF $(DEPDIR)/dxtools.Tpo -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dxtools.Tpo $(DEPDIR)/dxtools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dxtools.c' object='dxtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/alberta_2d_debug/0000777000042300001440000000000011067147343015475 500000000000000alberta-2.0.1/alberta/src/alberta_2d_debug/Makefile.am0000644000042300001440000000102010676732241017440 00000000000000## Makefile.am for libalberta_2d_debug ## ## DO NOT EDIT, this file is automatically generated by ## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = 2 ALBERTA_DEBUG = 1 lib_LTLIBRARIES = libalberta_2d_debug.la include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) nodist_libalberta_2d_debug_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libalberta_2d_debug_la_SOURCES += ../Common/gltools.c endif if HAVE_DX nodist_libalberta_2d_debug_la_SOURCES += ../Common/dxtools.c endif alberta-2.0.1/alberta/src/alberta_2d_debug/Makefile.in0000644000042300001440000016524711067146150017470 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../Common/Makefile.am.include \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in @HAVE_GLTOOLS_TRUE@am__append_1 = ../Common/gltools.c @HAVE_DX_TRUE@am__append_2 = ../Common/dxtools.c subdir = alberta/src/alberta_2d_debug ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_2d_debug_la_LIBADD = am__objects_1 = HB_precon.lo MG.lo MG_s.lo MG_s1.lo MG_s2.lo adapt.lo \ assemble.lo assemble_dowb.lo bas_fct.lo check.lo coarsen.lo \ dof_admin.lo element.lo error.lo estimator.lo \ estimator_dowb.lo eval.lo graphXO.lo l2scp.lo level.lo \ macro.lo memory.lo numint.lo oem_solve_d.lo oem_solve_dowb.lo \ oem_solve_s.lo parametric.lo read_mesh.lo refine.lo sor.lo \ ssor.lo submesh.lo trav_xy.lo traverse_nr.lo traverse_r.lo \ wall_quad_fast.lo write_mesh.lo write_mesh_gmv.lo \ write_mesh_ps.lo @HAVE_GLTOOLS_TRUE@am__objects_2 = gltools.lo @HAVE_DX_TRUE@am__objects_3 = dxtools.lo nodist_libalberta_2d_debug_la_OBJECTS = $(am__objects_1) \ $(am__objects_2) $(am__objects_3) libalberta_2d_debug_la_OBJECTS = \ $(nodist_libalberta_2d_debug_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_libalberta_2d_debug_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 1 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIM_OF_WORLD = 2 lib_LTLIBRARIES = libalberta_2d_debug.la sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ AM_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) nodist_libalberta_2d_debug_la_SOURCES = $(sources) $(am__append_1) \ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../Common/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/alberta_2d_debug/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/alberta_2d_debug/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_2d_debug.la: $(libalberta_2d_debug_la_OBJECTS) $(libalberta_2d_debug_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libalberta_2d_debug_la_OBJECTS) $(libalberta_2d_debug_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HB_precon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adapt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bas_fct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dof_admin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dxtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphXO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/l2scp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parametric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trav_xy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_nr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall_quad_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_gmv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_ps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< HB_precon.lo: ../Common/HB_precon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT HB_precon.lo -MD -MP -MF $(DEPDIR)/HB_precon.Tpo -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/HB_precon.Tpo $(DEPDIR)/HB_precon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/HB_precon.c' object='HB_precon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c MG.lo: ../Common/MG.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG.lo -MD -MP -MF $(DEPDIR)/MG.Tpo -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG.Tpo $(DEPDIR)/MG.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG.c' object='MG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c MG_s.lo: ../Common/MG_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s.lo -MD -MP -MF $(DEPDIR)/MG_s.Tpo -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s.Tpo $(DEPDIR)/MG_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s.c' object='MG_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c MG_s1.lo: ../Common/MG_s1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s1.lo -MD -MP -MF $(DEPDIR)/MG_s1.Tpo -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s1.Tpo $(DEPDIR)/MG_s1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s1.c' object='MG_s1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c MG_s2.lo: ../Common/MG_s2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s2.lo -MD -MP -MF $(DEPDIR)/MG_s2.Tpo -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s2.Tpo $(DEPDIR)/MG_s2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s2.c' object='MG_s2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c adapt.lo: ../Common/adapt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT adapt.lo -MD -MP -MF $(DEPDIR)/adapt.Tpo -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/adapt.Tpo $(DEPDIR)/adapt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/adapt.c' object='adapt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c assemble.lo: ../Common/assemble.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble.lo -MD -MP -MF $(DEPDIR)/assemble.Tpo -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble.Tpo $(DEPDIR)/assemble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble.c' object='assemble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c assemble_dowb.lo: ../Common/assemble_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble_dowb.lo -MD -MP -MF $(DEPDIR)/assemble_dowb.Tpo -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble_dowb.Tpo $(DEPDIR)/assemble_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble_dowb.c' object='assemble_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c bas_fct.lo: ../Common/bas_fct.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bas_fct.lo -MD -MP -MF $(DEPDIR)/bas_fct.Tpo -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bas_fct.Tpo $(DEPDIR)/bas_fct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/bas_fct.c' object='bas_fct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c check.lo: ../Common/check.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check.lo -MD -MP -MF $(DEPDIR)/check.Tpo -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/check.Tpo $(DEPDIR)/check.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/check.c' object='check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c coarsen.lo: ../Common/coarsen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coarsen.lo -MD -MP -MF $(DEPDIR)/coarsen.Tpo -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coarsen.Tpo $(DEPDIR)/coarsen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/coarsen.c' object='coarsen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c dof_admin.lo: ../Common/dof_admin.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dof_admin.lo -MD -MP -MF $(DEPDIR)/dof_admin.Tpo -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dof_admin.Tpo $(DEPDIR)/dof_admin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dof_admin.c' object='dof_admin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c element.lo: ../Common/element.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT element.lo -MD -MP -MF $(DEPDIR)/element.Tpo -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/element.Tpo $(DEPDIR)/element.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/element.c' object='element.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c error.lo: ../Common/error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c estimator.lo: ../Common/estimator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator.lo -MD -MP -MF $(DEPDIR)/estimator.Tpo -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator.Tpo $(DEPDIR)/estimator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator.c' object='estimator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c estimator_dowb.lo: ../Common/estimator_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator_dowb.lo -MD -MP -MF $(DEPDIR)/estimator_dowb.Tpo -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator_dowb.Tpo $(DEPDIR)/estimator_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator_dowb.c' object='estimator_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c eval.lo: ../Common/eval.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eval.lo -MD -MP -MF $(DEPDIR)/eval.Tpo -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eval.Tpo $(DEPDIR)/eval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/eval.c' object='eval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c graphXO.lo: ../Common/graphXO.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT graphXO.lo -MD -MP -MF $(DEPDIR)/graphXO.Tpo -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/graphXO.Tpo $(DEPDIR)/graphXO.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/graphXO.c' object='graphXO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c l2scp.lo: ../Common/l2scp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT l2scp.lo -MD -MP -MF $(DEPDIR)/l2scp.Tpo -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/l2scp.Tpo $(DEPDIR)/l2scp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/l2scp.c' object='l2scp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c level.lo: ../Common/level.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.lo -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/level.Tpo $(DEPDIR)/level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/level.c' object='level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c macro.lo: ../Common/macro.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT macro.lo -MD -MP -MF $(DEPDIR)/macro.Tpo -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/macro.Tpo $(DEPDIR)/macro.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/macro.c' object='macro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c memory.lo: ../Common/memory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c numint.lo: ../Common/numint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT numint.lo -MD -MP -MF $(DEPDIR)/numint.Tpo -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/numint.Tpo $(DEPDIR)/numint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/numint.c' object='numint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c oem_solve_d.lo: ../Common/oem_solve_d.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_d.lo -MD -MP -MF $(DEPDIR)/oem_solve_d.Tpo -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_d.Tpo $(DEPDIR)/oem_solve_d.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_d.c' object='oem_solve_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c oem_solve_dowb.lo: ../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_dowb.lo -MD -MP -MF $(DEPDIR)/oem_solve_dowb.Tpo -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_dowb.Tpo $(DEPDIR)/oem_solve_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_dowb.c' object='oem_solve_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c oem_solve_s.lo: ../Common/oem_solve_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_s.lo -MD -MP -MF $(DEPDIR)/oem_solve_s.Tpo -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_s.Tpo $(DEPDIR)/oem_solve_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_s.c' object='oem_solve_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c parametric.lo: ../Common/parametric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parametric.lo -MD -MP -MF $(DEPDIR)/parametric.Tpo -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/parametric.Tpo $(DEPDIR)/parametric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/parametric.c' object='parametric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c read_mesh.lo: ../Common/read_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_mesh.lo -MD -MP -MF $(DEPDIR)/read_mesh.Tpo -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/read_mesh.Tpo $(DEPDIR)/read_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/read_mesh.c' object='read_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c refine.lo: ../Common/refine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT refine.lo -MD -MP -MF $(DEPDIR)/refine.Tpo -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/refine.Tpo $(DEPDIR)/refine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/refine.c' object='refine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c sor.lo: ../Common/sor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sor.lo -MD -MP -MF $(DEPDIR)/sor.Tpo -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sor.Tpo $(DEPDIR)/sor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/sor.c' object='sor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c ssor.lo: ../Common/ssor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ssor.lo -MD -MP -MF $(DEPDIR)/ssor.Tpo -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ssor.Tpo $(DEPDIR)/ssor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/ssor.c' object='ssor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c submesh.lo: ../Common/submesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT submesh.lo -MD -MP -MF $(DEPDIR)/submesh.Tpo -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/submesh.Tpo $(DEPDIR)/submesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/submesh.c' object='submesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c trav_xy.lo: ../Common/trav_xy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trav_xy.lo -MD -MP -MF $(DEPDIR)/trav_xy.Tpo -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/trav_xy.Tpo $(DEPDIR)/trav_xy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/trav_xy.c' object='trav_xy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c traverse_nr.lo: ../Common/traverse_nr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_nr.lo -MD -MP -MF $(DEPDIR)/traverse_nr.Tpo -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_nr.Tpo $(DEPDIR)/traverse_nr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_nr.c' object='traverse_nr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c traverse_r.lo: ../Common/traverse_r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_r.lo -MD -MP -MF $(DEPDIR)/traverse_r.Tpo -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_r.Tpo $(DEPDIR)/traverse_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_r.c' object='traverse_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c wall_quad_fast.lo: ../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wall_quad_fast.lo -MD -MP -MF $(DEPDIR)/wall_quad_fast.Tpo -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wall_quad_fast.Tpo $(DEPDIR)/wall_quad_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/wall_quad_fast.c' object='wall_quad_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c write_mesh.lo: ../Common/write_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh.lo -MD -MP -MF $(DEPDIR)/write_mesh.Tpo -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh.Tpo $(DEPDIR)/write_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh.c' object='write_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c write_mesh_gmv.lo: ../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_gmv.lo -MD -MP -MF $(DEPDIR)/write_mesh_gmv.Tpo -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_gmv.Tpo $(DEPDIR)/write_mesh_gmv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_gmv.c' object='write_mesh_gmv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c write_mesh_ps.lo: ../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_ps.lo -MD -MP -MF $(DEPDIR)/write_mesh_ps.Tpo -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_ps.Tpo $(DEPDIR)/write_mesh_ps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_ps.c' object='write_mesh_ps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c gltools.lo: ../Common/gltools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltools.lo -MD -MP -MF $(DEPDIR)/gltools.Tpo -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltools.Tpo $(DEPDIR)/gltools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/gltools.c' object='gltools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c dxtools.lo: ../Common/dxtools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dxtools.lo -MD -MP -MF $(DEPDIR)/dxtools.Tpo -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dxtools.Tpo $(DEPDIR)/dxtools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dxtools.c' object='dxtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/alberta_3d/0000777000042300001440000000000011067147343014330 500000000000000alberta-2.0.1/alberta/src/alberta_3d/Makefile.am0000644000042300001440000000076510676732241016312 00000000000000## Makefile.am for libalberta_3d ## ## DO NOT EDIT, this file is automatically generated by ## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = 3 ALBERTA_DEBUG = 0 lib_LTLIBRARIES = libalberta_3d.la include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) nodist_libalberta_3d_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libalberta_3d_la_SOURCES += ../Common/gltools.c endif if HAVE_DX nodist_libalberta_3d_la_SOURCES += ../Common/dxtools.c endif alberta-2.0.1/alberta/src/alberta_3d/Makefile.in0000644000042300001440000016511411067146150016314 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../Common/Makefile.am.include \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in @HAVE_GLTOOLS_TRUE@am__append_1 = ../Common/gltools.c @HAVE_DX_TRUE@am__append_2 = ../Common/dxtools.c subdir = alberta/src/alberta_3d ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_3d_la_LIBADD = am__objects_1 = HB_precon.lo MG.lo MG_s.lo MG_s1.lo MG_s2.lo adapt.lo \ assemble.lo assemble_dowb.lo bas_fct.lo check.lo coarsen.lo \ dof_admin.lo element.lo error.lo estimator.lo \ estimator_dowb.lo eval.lo graphXO.lo l2scp.lo level.lo \ macro.lo memory.lo numint.lo oem_solve_d.lo oem_solve_dowb.lo \ oem_solve_s.lo parametric.lo read_mesh.lo refine.lo sor.lo \ ssor.lo submesh.lo trav_xy.lo traverse_nr.lo traverse_r.lo \ wall_quad_fast.lo write_mesh.lo write_mesh_gmv.lo \ write_mesh_ps.lo @HAVE_GLTOOLS_TRUE@am__objects_2 = gltools.lo @HAVE_DX_TRUE@am__objects_3 = dxtools.lo nodist_libalberta_3d_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_3) libalberta_3d_la_OBJECTS = $(nodist_libalberta_3d_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_libalberta_3d_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIM_OF_WORLD = 3 lib_LTLIBRARIES = libalberta_3d.la sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) nodist_libalberta_3d_la_SOURCES = $(sources) $(am__append_1) \ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../Common/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/alberta_3d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/alberta_3d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_3d.la: $(libalberta_3d_la_OBJECTS) $(libalberta_3d_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libalberta_3d_la_OBJECTS) $(libalberta_3d_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HB_precon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adapt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bas_fct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dof_admin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dxtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphXO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/l2scp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parametric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trav_xy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_nr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall_quad_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_gmv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_ps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< HB_precon.lo: ../Common/HB_precon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT HB_precon.lo -MD -MP -MF $(DEPDIR)/HB_precon.Tpo -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/HB_precon.Tpo $(DEPDIR)/HB_precon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/HB_precon.c' object='HB_precon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c MG.lo: ../Common/MG.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG.lo -MD -MP -MF $(DEPDIR)/MG.Tpo -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG.Tpo $(DEPDIR)/MG.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG.c' object='MG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c MG_s.lo: ../Common/MG_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s.lo -MD -MP -MF $(DEPDIR)/MG_s.Tpo -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s.Tpo $(DEPDIR)/MG_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s.c' object='MG_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c MG_s1.lo: ../Common/MG_s1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s1.lo -MD -MP -MF $(DEPDIR)/MG_s1.Tpo -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s1.Tpo $(DEPDIR)/MG_s1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s1.c' object='MG_s1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c MG_s2.lo: ../Common/MG_s2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s2.lo -MD -MP -MF $(DEPDIR)/MG_s2.Tpo -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s2.Tpo $(DEPDIR)/MG_s2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s2.c' object='MG_s2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c adapt.lo: ../Common/adapt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT adapt.lo -MD -MP -MF $(DEPDIR)/adapt.Tpo -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/adapt.Tpo $(DEPDIR)/adapt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/adapt.c' object='adapt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c assemble.lo: ../Common/assemble.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble.lo -MD -MP -MF $(DEPDIR)/assemble.Tpo -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble.Tpo $(DEPDIR)/assemble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble.c' object='assemble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c assemble_dowb.lo: ../Common/assemble_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble_dowb.lo -MD -MP -MF $(DEPDIR)/assemble_dowb.Tpo -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble_dowb.Tpo $(DEPDIR)/assemble_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble_dowb.c' object='assemble_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c bas_fct.lo: ../Common/bas_fct.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bas_fct.lo -MD -MP -MF $(DEPDIR)/bas_fct.Tpo -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bas_fct.Tpo $(DEPDIR)/bas_fct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/bas_fct.c' object='bas_fct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c check.lo: ../Common/check.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check.lo -MD -MP -MF $(DEPDIR)/check.Tpo -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/check.Tpo $(DEPDIR)/check.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/check.c' object='check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c coarsen.lo: ../Common/coarsen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coarsen.lo -MD -MP -MF $(DEPDIR)/coarsen.Tpo -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coarsen.Tpo $(DEPDIR)/coarsen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/coarsen.c' object='coarsen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c dof_admin.lo: ../Common/dof_admin.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dof_admin.lo -MD -MP -MF $(DEPDIR)/dof_admin.Tpo -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dof_admin.Tpo $(DEPDIR)/dof_admin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dof_admin.c' object='dof_admin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c element.lo: ../Common/element.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT element.lo -MD -MP -MF $(DEPDIR)/element.Tpo -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/element.Tpo $(DEPDIR)/element.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/element.c' object='element.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c error.lo: ../Common/error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c estimator.lo: ../Common/estimator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator.lo -MD -MP -MF $(DEPDIR)/estimator.Tpo -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator.Tpo $(DEPDIR)/estimator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator.c' object='estimator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c estimator_dowb.lo: ../Common/estimator_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator_dowb.lo -MD -MP -MF $(DEPDIR)/estimator_dowb.Tpo -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator_dowb.Tpo $(DEPDIR)/estimator_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator_dowb.c' object='estimator_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c eval.lo: ../Common/eval.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eval.lo -MD -MP -MF $(DEPDIR)/eval.Tpo -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eval.Tpo $(DEPDIR)/eval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/eval.c' object='eval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c graphXO.lo: ../Common/graphXO.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT graphXO.lo -MD -MP -MF $(DEPDIR)/graphXO.Tpo -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/graphXO.Tpo $(DEPDIR)/graphXO.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/graphXO.c' object='graphXO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c l2scp.lo: ../Common/l2scp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT l2scp.lo -MD -MP -MF $(DEPDIR)/l2scp.Tpo -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/l2scp.Tpo $(DEPDIR)/l2scp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/l2scp.c' object='l2scp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c level.lo: ../Common/level.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.lo -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/level.Tpo $(DEPDIR)/level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/level.c' object='level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c macro.lo: ../Common/macro.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT macro.lo -MD -MP -MF $(DEPDIR)/macro.Tpo -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/macro.Tpo $(DEPDIR)/macro.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/macro.c' object='macro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c memory.lo: ../Common/memory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c numint.lo: ../Common/numint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT numint.lo -MD -MP -MF $(DEPDIR)/numint.Tpo -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/numint.Tpo $(DEPDIR)/numint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/numint.c' object='numint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c oem_solve_d.lo: ../Common/oem_solve_d.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_d.lo -MD -MP -MF $(DEPDIR)/oem_solve_d.Tpo -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_d.Tpo $(DEPDIR)/oem_solve_d.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_d.c' object='oem_solve_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c oem_solve_dowb.lo: ../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_dowb.lo -MD -MP -MF $(DEPDIR)/oem_solve_dowb.Tpo -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_dowb.Tpo $(DEPDIR)/oem_solve_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_dowb.c' object='oem_solve_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c oem_solve_s.lo: ../Common/oem_solve_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_s.lo -MD -MP -MF $(DEPDIR)/oem_solve_s.Tpo -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_s.Tpo $(DEPDIR)/oem_solve_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_s.c' object='oem_solve_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c parametric.lo: ../Common/parametric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parametric.lo -MD -MP -MF $(DEPDIR)/parametric.Tpo -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/parametric.Tpo $(DEPDIR)/parametric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/parametric.c' object='parametric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c read_mesh.lo: ../Common/read_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_mesh.lo -MD -MP -MF $(DEPDIR)/read_mesh.Tpo -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/read_mesh.Tpo $(DEPDIR)/read_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/read_mesh.c' object='read_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c refine.lo: ../Common/refine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT refine.lo -MD -MP -MF $(DEPDIR)/refine.Tpo -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/refine.Tpo $(DEPDIR)/refine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/refine.c' object='refine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c sor.lo: ../Common/sor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sor.lo -MD -MP -MF $(DEPDIR)/sor.Tpo -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sor.Tpo $(DEPDIR)/sor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/sor.c' object='sor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c ssor.lo: ../Common/ssor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ssor.lo -MD -MP -MF $(DEPDIR)/ssor.Tpo -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ssor.Tpo $(DEPDIR)/ssor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/ssor.c' object='ssor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c submesh.lo: ../Common/submesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT submesh.lo -MD -MP -MF $(DEPDIR)/submesh.Tpo -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/submesh.Tpo $(DEPDIR)/submesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/submesh.c' object='submesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c trav_xy.lo: ../Common/trav_xy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trav_xy.lo -MD -MP -MF $(DEPDIR)/trav_xy.Tpo -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/trav_xy.Tpo $(DEPDIR)/trav_xy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/trav_xy.c' object='trav_xy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c traverse_nr.lo: ../Common/traverse_nr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_nr.lo -MD -MP -MF $(DEPDIR)/traverse_nr.Tpo -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_nr.Tpo $(DEPDIR)/traverse_nr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_nr.c' object='traverse_nr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c traverse_r.lo: ../Common/traverse_r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_r.lo -MD -MP -MF $(DEPDIR)/traverse_r.Tpo -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_r.Tpo $(DEPDIR)/traverse_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_r.c' object='traverse_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c wall_quad_fast.lo: ../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wall_quad_fast.lo -MD -MP -MF $(DEPDIR)/wall_quad_fast.Tpo -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wall_quad_fast.Tpo $(DEPDIR)/wall_quad_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/wall_quad_fast.c' object='wall_quad_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c write_mesh.lo: ../Common/write_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh.lo -MD -MP -MF $(DEPDIR)/write_mesh.Tpo -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh.Tpo $(DEPDIR)/write_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh.c' object='write_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c write_mesh_gmv.lo: ../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_gmv.lo -MD -MP -MF $(DEPDIR)/write_mesh_gmv.Tpo -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_gmv.Tpo $(DEPDIR)/write_mesh_gmv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_gmv.c' object='write_mesh_gmv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c write_mesh_ps.lo: ../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_ps.lo -MD -MP -MF $(DEPDIR)/write_mesh_ps.Tpo -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_ps.Tpo $(DEPDIR)/write_mesh_ps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_ps.c' object='write_mesh_ps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c gltools.lo: ../Common/gltools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltools.lo -MD -MP -MF $(DEPDIR)/gltools.Tpo -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltools.Tpo $(DEPDIR)/gltools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/gltools.c' object='gltools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c dxtools.lo: ../Common/dxtools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dxtools.lo -MD -MP -MF $(DEPDIR)/dxtools.Tpo -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dxtools.Tpo $(DEPDIR)/dxtools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dxtools.c' object='dxtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/alberta_3d_debug/0000777000042300001440000000000011067147343015476 500000000000000alberta-2.0.1/alberta/src/alberta_3d_debug/Makefile.am0000644000042300001440000000102010676732241017441 00000000000000## Makefile.am for libalberta_3d_debug ## ## DO NOT EDIT, this file is automatically generated by ## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = 3 ALBERTA_DEBUG = 1 lib_LTLIBRARIES = libalberta_3d_debug.la include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) nodist_libalberta_3d_debug_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libalberta_3d_debug_la_SOURCES += ../Common/gltools.c endif if HAVE_DX nodist_libalberta_3d_debug_la_SOURCES += ../Common/dxtools.c endif alberta-2.0.1/alberta/src/alberta_3d_debug/Makefile.in0000644000042300001440000016524711067146150017471 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Hey, Emacs, we're -*- makefile -*- mode! # # Makefile.am fragment shared by all builds # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../Common/Makefile.am.include \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in @HAVE_GLTOOLS_TRUE@am__append_1 = ../Common/gltools.c @HAVE_DX_TRUE@am__append_2 = ../Common/dxtools.c subdir = alberta/src/alberta_3d_debug ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libalberta_3d_debug_la_LIBADD = am__objects_1 = HB_precon.lo MG.lo MG_s.lo MG_s1.lo MG_s2.lo adapt.lo \ assemble.lo assemble_dowb.lo bas_fct.lo check.lo coarsen.lo \ dof_admin.lo element.lo error.lo estimator.lo \ estimator_dowb.lo eval.lo graphXO.lo l2scp.lo level.lo \ macro.lo memory.lo numint.lo oem_solve_d.lo oem_solve_dowb.lo \ oem_solve_s.lo parametric.lo read_mesh.lo refine.lo sor.lo \ ssor.lo submesh.lo trav_xy.lo traverse_nr.lo traverse_r.lo \ wall_quad_fast.lo write_mesh.lo write_mesh_gmv.lo \ write_mesh_ps.lo @HAVE_GLTOOLS_TRUE@am__objects_2 = gltools.lo @HAVE_DX_TRUE@am__objects_3 = dxtools.lo nodist_libalberta_3d_debug_la_OBJECTS = $(am__objects_1) \ $(am__objects_2) $(am__objects_3) libalberta_3d_debug_la_OBJECTS = \ $(nodist_libalberta_3d_debug_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_libalberta_3d_debug_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 1 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIM_OF_WORLD = 3 lib_LTLIBRARIES = libalberta_3d_debug.la sources = \ ../Common/HB_precon.c \ ../Common/MG.c \ ../Common/MG_s.c \ ../Common/MG_s1.c \ ../Common/MG_s2.c \ ../Common/adapt.c \ ../Common/assemble.c \ ../Common/assemble_dowb.c \ ../Common/bas_fct.c \ ../Common/check.c \ ../Common/coarsen.c \ ../Common/dof_admin.c \ ../Common/element.c \ ../Common/error.c \ ../Common/estimator.c \ ../Common/estimator_dowb.c \ ../Common/eval.c \ ../Common/graphXO.c \ ../Common/l2scp.c \ ../Common/level.c \ ../Common/macro.c \ ../Common/memory.c \ ../Common/numint.c \ ../Common/oem_solve_d.c \ ../Common/oem_solve_dowb.c \ ../Common/oem_solve_s.c \ ../Common/parametric.c \ ../Common/read_mesh.c \ ../Common/refine.c \ ../Common/sor.c \ ../Common/ssor.c \ ../Common/submesh.c \ ../Common/trav_xy.c \ ../Common/traverse_nr.c \ ../Common/traverse_r.c \ ../Common/wall_quad_fast.c \ ../Common/write_mesh.c \ ../Common/write_mesh_gmv.c \ ../Common/write_mesh_ps.c INCLUDES = -I$(srcdir)/../0d -I$(srcdir)/../1d -I$(srcdir)/../2d -I$(srcdir)/../3d -I$(srcdir)/../Common @GLTOOLS_INCLUDE@ @DX_INCLUDE@ -I$(top_srcdir)/alberta_util/src -I$(top_builddir)/alberta_util/src/ AM_CFLAGS = $(ALBERTA_DEBUG_CFLAGS) nodist_libalberta_3d_debug_la_SOURCES = $(sources) $(am__append_1) \ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../Common/Makefile.am.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu alberta/src/alberta_3d_debug/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu alberta/src/alberta_3d_debug/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalberta_3d_debug.la: $(libalberta_3d_debug_la_OBJECTS) $(libalberta_3d_debug_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libalberta_3d_debug_la_OBJECTS) $(libalberta_3d_debug_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HB_precon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MG_s2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adapt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assemble_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bas_fct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dof_admin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dxtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estimator_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphXO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/l2scp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_dowb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_solve_s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parametric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trav_xy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_nr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall_quad_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_gmv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_mesh_ps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< HB_precon.lo: ../Common/HB_precon.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT HB_precon.lo -MD -MP -MF $(DEPDIR)/HB_precon.Tpo -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/HB_precon.Tpo $(DEPDIR)/HB_precon.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/HB_precon.c' object='HB_precon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o HB_precon.lo `test -f '../Common/HB_precon.c' || echo '$(srcdir)/'`../Common/HB_precon.c MG.lo: ../Common/MG.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG.lo -MD -MP -MF $(DEPDIR)/MG.Tpo -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG.Tpo $(DEPDIR)/MG.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG.c' object='MG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG.lo `test -f '../Common/MG.c' || echo '$(srcdir)/'`../Common/MG.c MG_s.lo: ../Common/MG_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s.lo -MD -MP -MF $(DEPDIR)/MG_s.Tpo -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s.Tpo $(DEPDIR)/MG_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s.c' object='MG_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s.lo `test -f '../Common/MG_s.c' || echo '$(srcdir)/'`../Common/MG_s.c MG_s1.lo: ../Common/MG_s1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s1.lo -MD -MP -MF $(DEPDIR)/MG_s1.Tpo -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s1.Tpo $(DEPDIR)/MG_s1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s1.c' object='MG_s1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s1.lo `test -f '../Common/MG_s1.c' || echo '$(srcdir)/'`../Common/MG_s1.c MG_s2.lo: ../Common/MG_s2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MG_s2.lo -MD -MP -MF $(DEPDIR)/MG_s2.Tpo -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/MG_s2.Tpo $(DEPDIR)/MG_s2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/MG_s2.c' object='MG_s2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MG_s2.lo `test -f '../Common/MG_s2.c' || echo '$(srcdir)/'`../Common/MG_s2.c adapt.lo: ../Common/adapt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT adapt.lo -MD -MP -MF $(DEPDIR)/adapt.Tpo -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/adapt.Tpo $(DEPDIR)/adapt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/adapt.c' object='adapt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adapt.lo `test -f '../Common/adapt.c' || echo '$(srcdir)/'`../Common/adapt.c assemble.lo: ../Common/assemble.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble.lo -MD -MP -MF $(DEPDIR)/assemble.Tpo -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble.Tpo $(DEPDIR)/assemble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble.c' object='assemble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble.lo `test -f '../Common/assemble.c' || echo '$(srcdir)/'`../Common/assemble.c assemble_dowb.lo: ../Common/assemble_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assemble_dowb.lo -MD -MP -MF $(DEPDIR)/assemble_dowb.Tpo -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/assemble_dowb.Tpo $(DEPDIR)/assemble_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/assemble_dowb.c' object='assemble_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assemble_dowb.lo `test -f '../Common/assemble_dowb.c' || echo '$(srcdir)/'`../Common/assemble_dowb.c bas_fct.lo: ../Common/bas_fct.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bas_fct.lo -MD -MP -MF $(DEPDIR)/bas_fct.Tpo -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bas_fct.Tpo $(DEPDIR)/bas_fct.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/bas_fct.c' object='bas_fct.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bas_fct.lo `test -f '../Common/bas_fct.c' || echo '$(srcdir)/'`../Common/bas_fct.c check.lo: ../Common/check.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check.lo -MD -MP -MF $(DEPDIR)/check.Tpo -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/check.Tpo $(DEPDIR)/check.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/check.c' object='check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check.lo `test -f '../Common/check.c' || echo '$(srcdir)/'`../Common/check.c coarsen.lo: ../Common/coarsen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coarsen.lo -MD -MP -MF $(DEPDIR)/coarsen.Tpo -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/coarsen.Tpo $(DEPDIR)/coarsen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/coarsen.c' object='coarsen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coarsen.lo `test -f '../Common/coarsen.c' || echo '$(srcdir)/'`../Common/coarsen.c dof_admin.lo: ../Common/dof_admin.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dof_admin.lo -MD -MP -MF $(DEPDIR)/dof_admin.Tpo -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dof_admin.Tpo $(DEPDIR)/dof_admin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dof_admin.c' object='dof_admin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dof_admin.lo `test -f '../Common/dof_admin.c' || echo '$(srcdir)/'`../Common/dof_admin.c element.lo: ../Common/element.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT element.lo -MD -MP -MF $(DEPDIR)/element.Tpo -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/element.Tpo $(DEPDIR)/element.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/element.c' object='element.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o element.lo `test -f '../Common/element.c' || echo '$(srcdir)/'`../Common/element.c error.lo: ../Common/error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f '../Common/error.c' || echo '$(srcdir)/'`../Common/error.c estimator.lo: ../Common/estimator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator.lo -MD -MP -MF $(DEPDIR)/estimator.Tpo -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator.Tpo $(DEPDIR)/estimator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator.c' object='estimator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator.lo `test -f '../Common/estimator.c' || echo '$(srcdir)/'`../Common/estimator.c estimator_dowb.lo: ../Common/estimator_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT estimator_dowb.lo -MD -MP -MF $(DEPDIR)/estimator_dowb.Tpo -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/estimator_dowb.Tpo $(DEPDIR)/estimator_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/estimator_dowb.c' object='estimator_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o estimator_dowb.lo `test -f '../Common/estimator_dowb.c' || echo '$(srcdir)/'`../Common/estimator_dowb.c eval.lo: ../Common/eval.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eval.lo -MD -MP -MF $(DEPDIR)/eval.Tpo -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/eval.Tpo $(DEPDIR)/eval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/eval.c' object='eval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eval.lo `test -f '../Common/eval.c' || echo '$(srcdir)/'`../Common/eval.c graphXO.lo: ../Common/graphXO.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT graphXO.lo -MD -MP -MF $(DEPDIR)/graphXO.Tpo -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/graphXO.Tpo $(DEPDIR)/graphXO.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/graphXO.c' object='graphXO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphXO.lo `test -f '../Common/graphXO.c' || echo '$(srcdir)/'`../Common/graphXO.c l2scp.lo: ../Common/l2scp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT l2scp.lo -MD -MP -MF $(DEPDIR)/l2scp.Tpo -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/l2scp.Tpo $(DEPDIR)/l2scp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/l2scp.c' object='l2scp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o l2scp.lo `test -f '../Common/l2scp.c' || echo '$(srcdir)/'`../Common/l2scp.c level.lo: ../Common/level.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.lo -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/level.Tpo $(DEPDIR)/level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/level.c' object='level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.lo `test -f '../Common/level.c' || echo '$(srcdir)/'`../Common/level.c macro.lo: ../Common/macro.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT macro.lo -MD -MP -MF $(DEPDIR)/macro.Tpo -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/macro.Tpo $(DEPDIR)/macro.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/macro.c' object='macro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o macro.lo `test -f '../Common/macro.c' || echo '$(srcdir)/'`../Common/macro.c memory.lo: ../Common/memory.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.lo -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/memory.c' object='memory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.lo `test -f '../Common/memory.c' || echo '$(srcdir)/'`../Common/memory.c numint.lo: ../Common/numint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT numint.lo -MD -MP -MF $(DEPDIR)/numint.Tpo -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/numint.Tpo $(DEPDIR)/numint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/numint.c' object='numint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o numint.lo `test -f '../Common/numint.c' || echo '$(srcdir)/'`../Common/numint.c oem_solve_d.lo: ../Common/oem_solve_d.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_d.lo -MD -MP -MF $(DEPDIR)/oem_solve_d.Tpo -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_d.Tpo $(DEPDIR)/oem_solve_d.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_d.c' object='oem_solve_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_d.lo `test -f '../Common/oem_solve_d.c' || echo '$(srcdir)/'`../Common/oem_solve_d.c oem_solve_dowb.lo: ../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_dowb.lo -MD -MP -MF $(DEPDIR)/oem_solve_dowb.Tpo -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_dowb.Tpo $(DEPDIR)/oem_solve_dowb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_dowb.c' object='oem_solve_dowb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_dowb.lo `test -f '../Common/oem_solve_dowb.c' || echo '$(srcdir)/'`../Common/oem_solve_dowb.c oem_solve_s.lo: ../Common/oem_solve_s.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT oem_solve_s.lo -MD -MP -MF $(DEPDIR)/oem_solve_s.Tpo -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/oem_solve_s.Tpo $(DEPDIR)/oem_solve_s.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/oem_solve_s.c' object='oem_solve_s.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o oem_solve_s.lo `test -f '../Common/oem_solve_s.c' || echo '$(srcdir)/'`../Common/oem_solve_s.c parametric.lo: ../Common/parametric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT parametric.lo -MD -MP -MF $(DEPDIR)/parametric.Tpo -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/parametric.Tpo $(DEPDIR)/parametric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/parametric.c' object='parametric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o parametric.lo `test -f '../Common/parametric.c' || echo '$(srcdir)/'`../Common/parametric.c read_mesh.lo: ../Common/read_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT read_mesh.lo -MD -MP -MF $(DEPDIR)/read_mesh.Tpo -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/read_mesh.Tpo $(DEPDIR)/read_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/read_mesh.c' object='read_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_mesh.lo `test -f '../Common/read_mesh.c' || echo '$(srcdir)/'`../Common/read_mesh.c refine.lo: ../Common/refine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT refine.lo -MD -MP -MF $(DEPDIR)/refine.Tpo -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/refine.Tpo $(DEPDIR)/refine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/refine.c' object='refine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o refine.lo `test -f '../Common/refine.c' || echo '$(srcdir)/'`../Common/refine.c sor.lo: ../Common/sor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sor.lo -MD -MP -MF $(DEPDIR)/sor.Tpo -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sor.Tpo $(DEPDIR)/sor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/sor.c' object='sor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sor.lo `test -f '../Common/sor.c' || echo '$(srcdir)/'`../Common/sor.c ssor.lo: ../Common/ssor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ssor.lo -MD -MP -MF $(DEPDIR)/ssor.Tpo -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ssor.Tpo $(DEPDIR)/ssor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/ssor.c' object='ssor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ssor.lo `test -f '../Common/ssor.c' || echo '$(srcdir)/'`../Common/ssor.c submesh.lo: ../Common/submesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT submesh.lo -MD -MP -MF $(DEPDIR)/submesh.Tpo -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/submesh.Tpo $(DEPDIR)/submesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/submesh.c' object='submesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o submesh.lo `test -f '../Common/submesh.c' || echo '$(srcdir)/'`../Common/submesh.c trav_xy.lo: ../Common/trav_xy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trav_xy.lo -MD -MP -MF $(DEPDIR)/trav_xy.Tpo -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/trav_xy.Tpo $(DEPDIR)/trav_xy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/trav_xy.c' object='trav_xy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trav_xy.lo `test -f '../Common/trav_xy.c' || echo '$(srcdir)/'`../Common/trav_xy.c traverse_nr.lo: ../Common/traverse_nr.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_nr.lo -MD -MP -MF $(DEPDIR)/traverse_nr.Tpo -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_nr.Tpo $(DEPDIR)/traverse_nr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_nr.c' object='traverse_nr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_nr.lo `test -f '../Common/traverse_nr.c' || echo '$(srcdir)/'`../Common/traverse_nr.c traverse_r.lo: ../Common/traverse_r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT traverse_r.lo -MD -MP -MF $(DEPDIR)/traverse_r.Tpo -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/traverse_r.Tpo $(DEPDIR)/traverse_r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/traverse_r.c' object='traverse_r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o traverse_r.lo `test -f '../Common/traverse_r.c' || echo '$(srcdir)/'`../Common/traverse_r.c wall_quad_fast.lo: ../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wall_quad_fast.lo -MD -MP -MF $(DEPDIR)/wall_quad_fast.Tpo -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/wall_quad_fast.Tpo $(DEPDIR)/wall_quad_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/wall_quad_fast.c' object='wall_quad_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wall_quad_fast.lo `test -f '../Common/wall_quad_fast.c' || echo '$(srcdir)/'`../Common/wall_quad_fast.c write_mesh.lo: ../Common/write_mesh.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh.lo -MD -MP -MF $(DEPDIR)/write_mesh.Tpo -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh.Tpo $(DEPDIR)/write_mesh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh.c' object='write_mesh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh.lo `test -f '../Common/write_mesh.c' || echo '$(srcdir)/'`../Common/write_mesh.c write_mesh_gmv.lo: ../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_gmv.lo -MD -MP -MF $(DEPDIR)/write_mesh_gmv.Tpo -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_gmv.Tpo $(DEPDIR)/write_mesh_gmv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_gmv.c' object='write_mesh_gmv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_gmv.lo `test -f '../Common/write_mesh_gmv.c' || echo '$(srcdir)/'`../Common/write_mesh_gmv.c write_mesh_ps.lo: ../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT write_mesh_ps.lo -MD -MP -MF $(DEPDIR)/write_mesh_ps.Tpo -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/write_mesh_ps.Tpo $(DEPDIR)/write_mesh_ps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/write_mesh_ps.c' object='write_mesh_ps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o write_mesh_ps.lo `test -f '../Common/write_mesh_ps.c' || echo '$(srcdir)/'`../Common/write_mesh_ps.c gltools.lo: ../Common/gltools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltools.lo -MD -MP -MF $(DEPDIR)/gltools.Tpo -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltools.Tpo $(DEPDIR)/gltools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/gltools.c' object='gltools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltools.lo `test -f '../Common/gltools.c' || echo '$(srcdir)/'`../Common/gltools.c dxtools.lo: ../Common/dxtools.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dxtools.lo -MD -MP -MF $(DEPDIR)/dxtools.Tpo -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/dxtools.Tpo $(DEPDIR)/dxtools.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../Common/dxtools.c' object='dxtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dxtools.lo `test -f '../Common/dxtools.c' || echo '$(srcdir)/'`../Common/dxtools.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/alberta/src/0d/0000777000042300001440000000000011067147343012633 500000000000000alberta-2.0.1/alberta/src/0d/bas_fct_0d.c0000644000042300001440000002642610676724250014714 00000000000000/*--------------------------------------------------------------------*/ /*--- ALBERTA: an Adaptive multi Level finite element toolbox using -*/ /*--- Bisectioning refinement and Error control by Residual */ /*--- Techniques for scientific Applications ---*/ /*--- ---*/ /*--- file: bas_fct_0d.c ---*/ /*--- ---*/ /*--- description: implementation of trivial basis functions in 0d ---*/ /*--- "Honi soit qui mal y pense." ---*/ /*--- ---*/ /*--------------------------------------------------------------------*/ /*--- ---*/ /*--- author: Daniel Koester ---*/ /*--- Institut fuer Mathematik ---*/ /*--- Universitaet Augsburg ---*/ /*--- Universitaetsstr. 14 ---*/ /*--- D-86159 Augsburg, Germany ---*/ /*--- ---*/ /*--- ---*/ /*--- http://www.mathematik.uni-freiburg.de/IAM/ALBERTA ---*/ /*--- ---*/ /*--- (c) by D. Koester (2004) ---*/ /*--- ---*/ /*--------------------------------------------------------------------*/ static const REAL bary_0d[1][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /*--- basisfunction located at vertex 0 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi_1_0d(const REAL lambda[N_LAMBDA]) { return(1.0); } static const REAL *grd_phi_1_0d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0}; return(grd); } static const REAL (*D2_phi_1_0d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0}}; return(D2); } /*--------------------------------------------------------------------*/ /*--- function for accessing local DOFs on an element ---*/ /*--------------------------------------------------------------------*/ static const DOF *get_dof_indices_0d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF dof_vec[1]; DOF *rvec = idof ? idof : dof_vec; int n0, node; DOF **dof = el->dof; /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; rvec[0] = dof[node][n0]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing boundary type of DOFs ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_bound_0d(const EL_INFO *el_info, S_CHAR *vec) { static S_CHAR my_vec[1]; S_CHAR *rvec = vec ? vec : my_vec; rvec[0] = INTERIOR; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ static const REAL *interpol_0d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("interpol_0d"); static REAL my_vec[1]; REAL *rvec = vec ? vec : my_vec; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || no == 1, "only makes sense for 1 point!\n"); if(f_loc) rvec[0] = f_loc(el_info, bary_0d[0]); else { if (parametric && parametric->init_element(el_info, parametric)) { REAL_D world[1]; parametric->coord_to_world(el_info, nil, 1, (const REAL (*)[N_LAMBDA]) bary_0d, world); rvec[0] = f(world[0]); } else { const REAL *world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); world = coord_to_world(el_info, bary_0d[0], nil); rvec[0] = f(world); } } return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolation of vector functions ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *interpol_d_0d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("interpol_d_0d"); static REAL_D my_vec[1]; REAL_D *rvec = vec ? vec : my_vec; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || no == 1, "only makes sense for 1 point!\n"); if(f_loc) f_loc(el_info, bary_0d[0], rvec[0]); else { if (parametric && parametric->init_element(el_info, parametric)) { REAL_D world[1]; parametric->coord_to_world(el_info, nil, no, (const REAL (*)[N_LAMBDA]) bary_0d, world); f(world[0], rvec[0]); } else { const REAL *world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); world = coord_to_world(el_info, bary_0d[0], nil); f(world, rvec[0]); } } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_INT_VEC ---*/ /*--------------------------------------------------------------------*/ static const int *get_int_vec_0d(const EL *el, const DOF_INT_VEC *dv, int *vec) { FUNCNAME("get_int_vec_0d"); static int my_vec[1]; int *rvec = vec ? vec : my_vec; int *v = dv ? dv->vec : nil; int n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v,"no DOF_INT_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOF at vertex ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; rvec[0] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL *get_real_vec_0d(const EL *el, const DOF_REAL_VEC *dv, REAL *vec) { FUNCNAME("get_real_vec_0d"); static REAL my_vec[1]; REAL *rvec = vec ? vec : my_vec; REAL *v = dv ? dv->vec : nil; int n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v,"no DOF_REAL_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOF at vertex ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; rvec[0] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_D_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *get_real_d_vec_0d(const EL *el, const DOF_REAL_D_VEC *dv, REAL_D *vec) { FUNCNAME("get_real_d_vec_0d"); static REAL_D my_vec[1]; REAL_D *rvec = vec ? vec : my_vec; REAL_D *v = dv ? dv->vec : nil; int n, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v,"no DOF_REAL_D_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOF at vertex ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (n = 0; n < DIM_OF_WORLD; n++) rvec[0][n] = v[dof[node][n0]][n]; return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_SCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_schar_vec_0d(const EL *el, const DOF_SCHAR_VEC *dv, S_CHAR *vec) { FUNCNAME("get_schar_vec_0d"); static S_CHAR my_vec[1]; S_CHAR *rvec = vec ? vec : my_vec; S_CHAR *v = dv ? dv->vec : nil; int n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v,"no DOF_SCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOF at vertex ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; rvec[0] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_UCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const U_CHAR *get_uchar_vec_0d(const EL *el, const DOF_UCHAR_VEC *dv, U_CHAR *vec) { FUNCNAME("get_uchar_vec_0d"); static U_CHAR my_vec[1]; U_CHAR *rvec = vec ? vec : my_vec; U_CHAR *v = dv ? dv->vec : nil; int n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v,"no DOF_UCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; rvec[0] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- Collect all information about basis functions ---*/ /*--------------------------------------------------------------------*/ static BAS_FCT *phi_0d[1] ={phi_1_0d}; static GRD_BAS_FCT *grd_phi_0d[1] = {grd_phi_1_0d}; static D2_BAS_FCT *D2_phi_0d[1] = {D2_phi_1_0d}; static BAS_FCTS lagrange_0d = { "lagrange_0d", 0, 1, 1, {1, 0, 0, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi_0d, grd_phi_0d, D2_phi_0d, get_dof_indices_0d, get_bound_0d, interpol_0d, interpol_d_0d, get_int_vec_0d, get_real_vec_0d, get_real_d_vec_0d, get_uchar_vec_0d, get_schar_vec_0d, nil, nil, nil, nil, nil, nil, bary_0d, }; alberta-2.0.1/alberta/src/0d/element_0d.c0000644000042300001440000001054310676724250014735 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: element_0d.c */ /* */ /* */ /* description: routines on elements that depend on the dimension in 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /****************************************************************************/ /* Some trivial 0d stuff. */ /****************************************************************************/ int world_to_coord_0d(const EL_INFO *el_info, const REAL *x, REAL lambda[N_LAMBDA]) { FUNCNAME("world_to_coord_0d"); ERROR_EXIT("... does not make sense for dim == 0\n"); return -1; } const REAL *coord_to_world_0d(const EL_INFO *el_info, const REAL *l, REAL_D w) { FUNCNAME("coord_to_world_0d"); static REAL world[DIM_OF_WORLD]; REAL *ret; int i; DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->coord_to_world() to access the parametric mesh\n"); ret = w ? w : world; for(i = 0; i < DIM_OF_WORLD; i++) ret[i] = el_info->coord[0][i]; return((const REAL *) ret); } REAL el_grd_lambda_0d(const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]) { int i; for(i = 0; i < DIM_OF_WORLD; i++) grd_lam[0][i] = 0.0; return(1.0); } REAL el_det_0d(const EL_INFO *el_info) { return 1.0; } REAL el_volume_0d(const EL_INFO *el_info) { return 1.0; } REAL get_wall_normal_0d(const EL_INFO *el_info, int i0, REAL *normal) { FUNCNAME("get_face_normal_0d"); WARNING("Does not makes sense for dim == 0!\n"); return HUGE_VAL; } int *sorted_wall_indices_0d(int face, int permno) { FUNCNAME("sorted_face_indices_0d"); WARNING("Does not makes sense for dim == 0!\n"); return NULL; } int wall_orientation_0d(const EL *el, int face, int **vecp) { FUNCNAME("wall_orientation"); WARNING("Does not makes sense for dim == 0!\n"); return -1; } int *sort_wall_indices_0d(const EL *el, int wall, int *vec) { FUNCNAME("sort_wall_indices"); WARNING("Does not makes sense for dim == 0!\n"); return NULL; } alberta-2.0.1/alberta/src/0d/memory_0d.c0000644000042300001440000001033110676724250014607 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: memory_0d.c */ /* */ /* */ /* description: special routines for getting new FE_SPACEs, 0D-Version */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* adjust_dofs_and_dof_ptrs_0d(mesh, new_admin, old_n_node_el, */ /* old_n_dof, old_node): */ /* 1) If el->dof pointers have changed, adjust these. Keep old information! */ /* 2) Determine what types of new DOF pointers must be allocated. */ /* 3) Change all DOFs on all elements. */ /****************************************************************************/ static void adjust_dofs_and_dof_ptrs_0d(MESH *mesh, DOF_ADMIN *new_admin, int old_n_node_el, int *old_n_dof, int *old_node) { /* FUNCNAME("adjust_dofs_and_dof_ptrs_0d"); */ DOF **old_dof_ptr; int i, n, n_elements, node; int change_v_d = 0, change_c_d = 0; EL *el; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info = nil; /* Adjust the length of el->dof pointer fields. Allocate new ones if */ /* necessary and transfer old information. */ if(mesh->n_node_el > old_n_node_el) { el_info = traverse_first(stack, mesh, -1, CALL_EVERY_EL_PREORDER); while(el_info) { el = el_info->el; old_dof_ptr = el->dof; el->dof = get_dof_ptrs(mesh); if(old_n_dof[VERTEX]) for(i = 0; i < N_VERTICES_1D; i++) el->dof[mesh->node[VERTEX] + i] = old_dof_ptr[old_node[VERTEX] + i]; if(old_n_dof[CENTER]) el->dof[mesh->node[CENTER]] = old_dof_ptr[old_node[CENTER]]; el_info = traverse_next(stack, el_info); } } /* Determine which DOF types have changed on the mesh with the new admin. */ if(mesh->n_dof[VERTEX] > old_n_dof[VERTEX]) change_v_d = 1; if(mesh->n_dof[CENTER] > old_n_dof[CENTER]) change_c_d = 1; /* Change all DOFs on all elements of the mesh. */ n_elements = mesh->n_elements; for(n = 0; n < n_elements; n++) { el = mesh->macro_els[n].el; if(change_v_d) { node = mesh->node[VERTEX]; el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], VERTEX, false); } if(change_c_d) { node = mesh->node[CENTER]; el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, false); } } /* Clean up operations. */ free_traverse_stack(stack); return; } alberta-2.0.1/alberta/src/1d/0000777000042300001440000000000011067147344012635 500000000000000alberta-2.0.1/alberta/src/1d/bas_fct_1d.c0000644000042300001440000000670710676723575014727 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: bas_fct_1d.c */ /* */ /* */ /* description: Lagrange basis functions up to order 4 in 1d */ /* includes ./lagrange_[1234]_1d.c */ /* includes ./disc_lagrange_[012]_1d.c */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* discontinuous Lagrangian basisfunctions of order 0-2; these */ /* functions are evaluated in barycentric coordinates; the derivatives */ /* are those corresponding to these barycentric coordinates. */ /*--------------------------------------------------------------------------*/ #include "disc_lagrange_0_1d.c" #include "disc_lagrange_1_1d.c" #include "disc_lagrange_2_1d.c" /*--------------------------------------------------------------------------*/ /* Lagrangian basis functions of order 1-4; these */ /* functions are evaluated in barycentric coordinates; the derivatives */ /* are those corresponding to these barycentric coordinates. */ /*--------------------------------------------------------------------------*/ #include "lagrange_1_1d.c" #include "lagrange_2_1d.c" #include "lagrange_3_1d.c" #include "lagrange_4_1d.c" alberta-2.0.1/alberta/src/1d/coarsen_1d.c0000644000042300001440000001411610676724251014741 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: coarsen_1d.c */ /* */ /* description: coarsening of 1 dim. hierarchical meshes; */ /* file contains all routines depending on DIM == 1; */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* AI_coarse_recursive_1d: coarsens a single element of the coarsening */ /* patch dofs in the interior of the element are removed; dofs for higher */ /* order at the boundary or the coarsening patch still belong to */ /* the parent. Do not remove them from the mesh!!! */ /* WARNING: This function is called directly from submesh.c! */ /*--------------------------------------------------------------------------*/ int AI_coarse_recursive_1d(MESH *mesh, EL *parent) { FUNCNAME("AI_coarse_recursive_1d"); int mark; INFO(0,2,"\n"); if (!parent->child[0]) /*--- leaf element, clean element marker ---*/ { mark = parent->mark; parent->mark = 0; return(mark); } else /*--- no leaf element, first coarsen children ---*/ { EL *child[2]; int mark0 = AI_coarse_recursive_1d(mesh, parent->child[0]); int mark1 = AI_coarse_recursive_1d(mesh, parent->child[1]); mark = MAX(mark0, mark1); child[0] = parent->child[0]; child[1] = parent->child[1]; if (mark >= 0) /*--- element must not be coarsend ---*/ { parent->mark = 0; if (child[0]) child[0]->mark = child[1]->mark = 0; return(0); } /*--------------------------------------------------------------------------*/ /*--- and now coarsen child[0] and child[1] into parent ---*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--- hand DOFs from children to parent, and add DOF at center ---*/ /*--------------------------------------------------------------------------*/ if (mesh->n_dof[CENTER]) AI_reactivate_dof(mesh, parent); /*--------------------------------------------------------------------------*/ /* restrict dof vectors to the parents on the patch */ /*--------------------------------------------------------------------------*/ if (call_coarse_restrict_1d) { RC_LIST_EL coarse_list[1] = {{{0}}}; coarse_list->el_info.el = parent; coarse_restrict(mesh, coarse_list, 1); } /*--------------------------------------------------------------------------*/ /*--- remove all DOFs of children that are not used anymore ---*/ /*--------------------------------------------------------------------------*/ if (mesh->n_dof[VERTEX]) /*--- midpoint of parent ---*/ { free_dof(child[1]->dof[mesh->node[VERTEX]], mesh, VERTEX, false); } if (mesh->n_dof[CENTER]) /*--- center of the children ---*/ { free_dof(child[0]->dof[mesh->node[CENTER]], mesh, CENTER, false); free_dof(child[1]->dof[mesh->node[CENTER]], mesh, CENTER, false); } parent->child[0] = nil; parent->child[1] = (EL *)AI_get_leaf_data(mesh); if (parent->child[1] && ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->coarsen_leaf_data) ((MESH_MEM_INFO *)mesh->mem_info)-> leaf_data_info->coarsen_leaf_data(parent, child); free_element(child[0], mesh); free_element(child[1], mesh); mesh->n_elements--; mesh->n_hier_elements -= 2; mesh->n_vertices--; mark++; parent->mark = MIN(mark,0); return(parent->mark); } return(0); /*--- statement never reached ---*/ } static U_CHAR coarsen_1d(MESH *mesh) { int n_elements = mesh->n_elements; int i; call_coarse_restrict_1d = count_coarse_restrict(mesh); for(i = 0; i < mesh->n_macro_el; i++) AI_coarse_recursive_1d(mesh, mesh->macro_els[i].el); return (mesh->n_elements < n_elements) ? MESH_COARSENED : 0; } alberta-2.0.1/alberta/src/1d/disc_lagrange_0_1d.c0000644000042300001440000003055710676724251016317 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_0_1d.c */ /* */ /* description: piecewise constant discontinuous Lagrange elements in 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL d_bary0_1d[1][N_LAMBDA] = {{1.0/2.0, 1.0/2.0, 0.0, 0.0}}; static REAL d_phi0c0_1d(const REAL lambda[N_LAMBDA]) { return(1.0); } static const REAL *d_grd_phi0c0_1d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0}; return(grd); } static const REAL (*d_D2_phi0c0_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *d_get_dof_indices0_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[1]; DOF *rvec = idof ? idof : index_vec; int i = admin->mesh->node[CENTER], n0 = admin->n0_dof[CENTER]; DOF **dof = el->dof; rvec[0] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound0_1d(const EL_INFO *el_info, S_CHAR *bound) { static S_CHAR bound_vec[1]; S_CHAR *rvec = bound ? bound : bound_vec; rvec[0] = INTERIOR; return((const S_CHAR *) rvec); } static const int *d_get_int_vec0_1d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec0_1d"); static int local_vec[1]; int i, n0, *v = nil; int *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *d_get_real_vec0_1d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_v0_1d"); int i, n0; static REAL local_vec[1]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec0_1d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_vec0_1d"); int i, k, n0; static REAL_D local_vec[1]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; for (k = 0; k < DIM_OF_WORLD; k++) rvec[0][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec0_1d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec0_1d"); int i, n0; static U_CHAR local_vec[1]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec0_1d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec0_1d"); int i, n0; static S_CHAR local_vec[1]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } static const REAL *d_interpol0_1d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("d_interpol0_1d"); static REAL inter[1]; REAL *rvec = vec ? vec : inter; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no == 1), "only for one point!\n"); if(f_loc) rvec[0] = f_loc(el_info, d_bary0_1d[0]); else { if (parametric) { REAL_D world[1]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 1, d_bary0_1d, world); rvec[0] = f(world[0]); } else { REAL_D world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); coord_to_world(el_info, d_bary0_1d[0], world); rvec[0] = f(world); } } return((const REAL *) rvec); } static const REAL_D *d_interpol_d0_1d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("d_interpol_d0_1d"); static REAL_D inter[1]; REAL_D *rvec = vec ? vec : inter; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no == 1), "only for one point!\n"); if(f_loc) f_loc(el_info, d_bary0_1d[0], rvec[0]); else { if (parametric) { REAL_D world[1]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 1, d_bary0_1d, world); f(world[0], rvec[0]); } else { REAL_D world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); coord_to_world(el_info, d_bary0_1d[0], world); f(world, rvec[0]); } } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void d_real_refine_inter0_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter0_1d"); EL *el; REAL *vec = nil; int cdof, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof = el->child[0]->dof[node0][n0]; vec[cdof] = vec[pdof]; cdof = el->child[1]->dof[node0][n0]; vec[cdof] = vec[pdof]; } return; } static void d_real_coarse_inter0_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter0_1d"); EL *el; REAL *vec = nil; int cdof0, cdof1, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; vec[pdof] = 0.5*(vec[cdof0] + vec[cdof1]); } return; } static void d_real_coarse_restr0_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_restr0_1d"); EL *el; REAL *vec = nil; int cdof0, cdof1, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; vec[pdof] = vec[cdof0] + vec[cdof1]; } return; } static void d_real_d_refine_inter0_1d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_d_refine_inter0_1d"); EL *el; REAL_D *vec = nil; int cdof, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof = el->child[0]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof][k] = vec[pdof][k]; cdof = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof][k] = vec[pdof][k]; } return; } static void d_real_d_coarse_inter0_1d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter0_1d"); EL *el; REAL_D *vec = nil; int cdof0, cdof1, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[pdof][k] = 0.5*(vec[cdof0][k] + vec[cdof1][k]); } return; } static void d_real_d_coarse_restr0_1d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_d_coarse_restr0_1d"); EL *el; REAL_D *vec = nil; int cdof0, cdof1, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[pdof] [k]= vec[cdof0][k] + vec[cdof1][k]; } return; } static BAS_FCT *d_phi0_1d[1] = {d_phi0c0_1d}; static GRD_BAS_FCT *d_grd_phi0_1d[1] = {d_grd_phi0c0_1d}; static D2_BAS_FCT *d_D2_phi0_1d[1] = {d_D2_phi0c0_1d}; static BAS_FCTS disc_lagrange0_1d = {"disc_lagrange0_1d", 1, 1, 0, {0, 1, 0, 0}, nil, d_phi0_1d, d_grd_phi0_1d, d_D2_phi0_1d, d_get_dof_indices0_1d, d_get_bound0_1d, d_interpol0_1d, d_interpol_d0_1d, d_get_int_vec0_1d, d_get_real_vec0_1d, d_get_real_d_vec0_1d, d_get_uchar_vec0_1d, d_get_schar_vec0_1d, d_real_refine_inter0_1d, d_real_coarse_inter0_1d, d_real_coarse_restr0_1d, d_real_d_refine_inter0_1d, d_real_d_coarse_inter0_1d, d_real_d_coarse_restr0_1d, d_bary0_1d, }; alberta-2.0.1/alberta/src/1d/disc_lagrange_1_1d.c0000644000042300001440000002430010676724251016305 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_1_1d.c */ /* */ /* description: piecewise linear discontinuous Lagrange elements in 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL d_bary1_1d[2][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v0_1d(const REAL lambda[N_LAMBDA]) { return(lambda[0]); } static const REAL *d_grd_phi1v0_1d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v0_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v1_1d(const REAL lambda[N_LAMBDA]) { return(lambda[1]); } static const REAL *d_grd_phi1v1_1d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v1_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *d_get_dof_indices1_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_VERTICES_1D]; DOF *rvec = idof ? idof : index_vec; int i, n0 = admin->n0_dof[CENTER], node = admin->mesh->node[CENTER]; DOF **dof = el->dof; for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = dof[node][n0+i]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound1_1d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("d_get_bound1_1d"); static S_CHAR bound_vec[N_VERTICES_1D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = el_info->vertex_bound[i]; return((const S_CHAR *) rvec); } static const int *d_get_int_vec1_1d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec1_1d"); int i, n0, node; static int local_vec[N_VERTICES_1D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const int *) rvec); } static const REAL *d_get_real_vec1_1d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_v1_1d"); int i, n0, node; static REAL local_vec[N_VERTICES_1D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec1_1d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_v1_1d"); int i, k, n0, node; static REAL_D local_vec[N_VERTICES_1D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_1D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[node][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec1_1d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec1_1d"); int i, n0, node; static U_CHAR local_vec[N_VERTICES_1D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec1_1d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec1_1d"); int i, n0, node; static S_CHAR local_vec[N_VERTICES_1D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(d_,1,1,2) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(d_,1,1,2) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void d_real_refine_inter1_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter1_1d"); EL *el, *child; REAL *vec = nil, avg; DOF dofc; int n0, node; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[CENTER]; node = drv->fe_space->mesh->node[CENTER]; el = list->el_info.el; avg = 0.5*(vec[el->dof[node][n0+0]] + vec[el->dof[node][n0+1]]); child = el->child[0]; dofc = child->dof[node][n0]; vec[dofc] = vec[el->dof[node][n0]]; dofc = child->dof[node][n0+1]; /* newest vertex is 1 */ vec[dofc] = avg; child = el->child[1]; dofc = child->dof[node][n0]; /* newest vertex is 0 */ vec[dofc] = avg; dofc = child->dof[node][n0+1]; vec[dofc] = vec[el->dof[node][n0+1]]; return; } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do something */ /*--------------------------------------------------------------------------*/ static void d_real_coarse_inter1_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter1_1d"); EL *el, **child; REAL *vec = nil; int n0, node; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[CENTER]; node = drv->fe_space->mesh->node[CENTER]; el = list->el_info.el; child = el->child; vec[el->dof[node][n0+0]] = vec[child[0]->dof[node][n0+0]]; vec[el->dof[node][n0+1]] = vec[child[1]->dof[node][n0+1]]; return; } static BAS_FCT *d_phi1_1d[2] = {d_phi1v0_1d, d_phi1v1_1d}; static GRD_BAS_FCT *d_grd_phi1_1d[2] = {d_grd_phi1v0_1d, d_grd_phi1v1_1d}; static D2_BAS_FCT *d_D2_phi1_1d[2] = {d_D2_phi1v0_1d, d_D2_phi1v1_1d}; static BAS_FCTS disc_lagrange1_1d = {"disc_lagrange1_1d", 1, 2, 1, {0, 2, 0, 0}, nil, d_phi1_1d, d_grd_phi1_1d, d_D2_phi1_1d, d_get_dof_indices1_1d, d_get_bound1_1d, d_interpol1_1d, d_interpol_d1_1d, d_get_int_vec1_1d, d_get_real_vec1_1d, d_get_real_d_vec1_1d, d_get_uchar_vec1_1d, d_get_schar_vec1_1d, d_real_refine_inter1_1d, d_real_coarse_inter1_1d, nil, nil, nil, nil, d_bary1_1d, }; alberta-2.0.1/alberta/src/1d/disc_lagrange_2_1d.c0000644000042300001440000003062210676724251016312 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_2_1d.c */ /* */ /* description: piecewise quadratic discontinuous Lagrange elements in 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS_1D N_VERTICES_1D+1 static const REAL d_bary2_1d[N_BAS_1D][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0}}; /****************************************************************************/ /* basisfunction at vertex 0 */ /****************************************************************************/ static REAL d_phi2v0_1d(const REAL lambda[N_LAMBDA]) { return(lambda[0]*(2.0*lambda[0] - 1.0)); } static const REAL *d_grd_phi2v0_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[0] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v0_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 1 */ /****************************************************************************/ static REAL d_phi2v1_1d(const REAL lambda[N_LAMBDA]) { return(lambda[1]*(2.0*lambda[1] - 1.0)); } static const REAL *d_grd_phi2v1_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[1] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v1_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at center */ /****************************************************************************/ static REAL d_phi2c0_1d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[1]); } static const REAL *d_grd_phi2c0_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[1]; grd[1] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*d_D2_phi2c0_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 4, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* functions for combining basisfunctions with coefficients */ /****************************************************************************/ static const DOF *d_get_dof_indices2_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS_1D]; int i, n0, node; DOF *rvec = idof ? idof : index_vec; DOF **dof = el->dof; n0 = admin->n0_dof[CENTER]; node = admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_1D; i++) rvec[i] = dof[node][n0+i]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound2_1d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("d_get_bound2_1d"); static S_CHAR bound_vec[N_BAS_1D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); /*--------------------------------------------------------------------*/ /*--- basis functions at vertices ---*/ /*--------------------------------------------------------------------*/ for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = el_info->vertex_bound[i]; /*--------------------------------------------------------------------*/ /*--- basis functions at center ---*/ /*--------------------------------------------------------------------*/ rvec[i] = INTERIOR; return((const S_CHAR *) rvec); } static const int *d_get_int_vec2_1d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec2_1d"); int i, n0, node; static int local_vec[N_BAS_1D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const int *) rvec); } static const REAL *d_get_real_vec2_1d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_vec2_1d"); int i, n0, node; static REAL local_vec[N_BAS_1D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec2_1d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_vec2_1d"); int i, k, n0, node; static REAL_D local_vec[N_BAS_1D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_1D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[node][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec2_1d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec2_1d"); int i, n0, node; static U_CHAR local_vec[N_BAS_1D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec2_1d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec2_1d"); int i, n0, node; static S_CHAR local_vec[N_BAS_1D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_1D; i++) rvec[i] = v[dof[node][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(d_,2,1,3) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(d_,2,1,3) /****************************************************************************/ /* functions for interpolation/ restriction during refinement/coarsening */ /****************************************************************************/ static void d_real_refine_inter2_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { EL *el; const DOF *cdof; const REAL *pvec; const BAS_FCTS *bas_fcts = drv->fe_space->bas_fcts; const DOF_ADMIN *admin = drv->fe_space->admin; REAL *v = drv->vec; if (n < 1) return; el = list->el_info.el; pvec = (*bas_fcts->get_real_vec)(el, drv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); v[cdof[0]] = (pvec[0]); v[cdof[1]] = (pvec[2]); v[cdof[2]] = (0.375*pvec[0] - 0.125*pvec[1] + 0.75*pvec[2]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); v[cdof[0]] = (pvec[2]); v[cdof[1]] = (pvec[1]); v[cdof[2]] = (-0.125*pvec[0] + 0.375*pvec[1] + 0.75*pvec[2]); return; } static void d_real_coarse_inter2_1d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = drv->fe_space->bas_fcts; const DOF_ADMIN *admin = drv->fe_space->admin; REAL *v = drv->vec; if (n < 1) return; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], drv, nil); v[pdof[0]] = cvec[0]; /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], drv, nil); v[pdof[1]] = cvec[1]; v[pdof[2]] = cvec[0]; return; } static BAS_FCT *d_phi2_1d[3] = {d_phi2v0_1d, d_phi2v1_1d, d_phi2c0_1d}; static GRD_BAS_FCT *d_grd_phi2_1d[3] = {d_grd_phi2v0_1d, d_grd_phi2v1_1d, d_grd_phi2c0_1d}; static D2_BAS_FCT *d_D2_phi2_1d[3] = {d_D2_phi2v0_1d, d_D2_phi2v1_1d, d_D2_phi2c0_1d}; static BAS_FCTS disc_lagrange2_1d = {"disc_lagrange2_1d", 1, N_BAS_1D, 2, {0, N_BAS_1D, 0, 0}, nil, d_phi2_1d, d_grd_phi2_1d, d_D2_phi2_1d, d_get_dof_indices2_1d, d_get_bound2_1d, d_interpol2_1d, d_interpol_d2_1d, d_get_int_vec2_1d, d_get_real_vec2_1d, d_get_real_d_vec2_1d, d_get_uchar_vec2_1d, d_get_schar_vec2_1d, d_real_refine_inter2_1d, d_real_coarse_inter2_1d, nil, nil, nil, nil, d_bary2_1d, }; #undef N_BAS_1D alberta-2.0.1/alberta/src/1d/element_1d.c0000644000042300001440000002031510676724251014736 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: element_1d.c */ /* */ /* */ /* description: routines on elements that depend on the dimension in 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /****************************************************************************/ /* world_to_coord_1d(): return -1 if inside, otherwise index of lambda<0 */ /****************************************************************************/ int world_to_coord_1d(const EL_INFO *el_info, const REAL *x, REAL_B lambda) { FUNCNAME("world_to_coord_1d"); REAL lmin; REAL a = el_info->coord[0][0]; REAL length = (el_info->coord[1][0] - a); REAL det = ABS(length); int i, j, k; #if (DIM_OF_WORLD != 1) ERROR_EXIT("not yet for DIM_OF_WORLD != 1\n"); #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->world_to_coord() to access the parametric mesh\n"); if (det < 1.E-20) { ERROR_EXIT("length = %le; abort\n", length); return(-2); } lambda[1] = (x[0]-a)/length; lambda[0] = 1.0 - lambda[1]; k = -1; lmin = 0.0; j = 0; for (i = 0; i <= 1; i++) { if ((lambda[i]*det) < -1.E-15) { if (lambda[i] < lmin) { k = i; lmin = lambda[i]; } j++; } } return(k); } /****************************************************************************/ /* transform local coordintes l to world coordinates; if w is non nil */ /* store them at w otherwise return a pointer to some local static */ /* area containing world coordintes */ /****************************************************************************/ const REAL *coord_to_world_1d(const EL_INFO *el_info, const REAL *l, REAL_D w) { FUNCNAME("coord_to_world_1d"); static REAL world[DIM_OF_WORLD]; REAL c, *ret; const REAL *v; int i, j; DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->coord_to_world() to access the parametric mesh\n"); ret = w ? w : world; v = el_info->coord[0]; c = l[0]; for (j = 0; j < DIM_OF_WORLD; j++) ret[j] = c*v[j]; for (i = 1; i < N_VERTICES_1D; i++) { v = el_info->coord[i]; c = l[i]; for (j = 0; j < DIM_OF_WORLD; j++) ret[j] += c*v[j]; } return((const REAL *) ret); } /*--------------------------------------------------------------------------*/ /* compute volume of an element */ /*--------------------------------------------------------------------------*/ REAL el_det_1d(const EL_INFO *el_info) { FUNCNAME("el_det_1"); DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->det() to access the parametric mesh\n"); return(DIST_DOW(el_info->coord[0], el_info->coord[1])); } REAL el_volume_1d(const EL_INFO *el_info) { return el_det_1d(el_info); } /*--------------------------------------------------------------------------*/ /* compute gradients of barycentric coords on element; return the absolute */ /* value of the determinant of the Jacobian of the transformation to the */ /* reference element */ /* Notice: for dim < DIM_OF_WORLD grd_lam will contain the tangential */ /* derivative of the barycentric coordinates! */ /*--------------------------------------------------------------------------*/ REAL el_grd_lambda_1d(const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]) { FUNCNAME("el_grd_lambda_1d"); REAL det2; int i; DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->grd_lambda() to access the parametric mesh\n"); det2 = DST2_DOW(el_info->coord[0], el_info->coord[1]); for(i = 0; i < DIM_OF_WORLD; i++) { grd_lam[0][i] = (el_info->coord[0][i] - el_info->coord[1][i]) / det2; grd_lam[1][i] = -grd_lam[0][i]; } return(sqrt(det2)); } /*---8<---------------------------------------------------------------------*/ /*--- wall normal in 1d is really rather easy.... ---*/ /*--------------------------------------------------------------------->8---*/ REAL get_wall_normal_1d(const EL_INFO *el_info, int i0, REAL *normal) { #if DIM_OF_WORLD == 1 normal[0] = i0 ? -1.0 : 1.0; #else int n; REAL det; const REAL_D *coord = el_info->coord; DEBUG_TEST_FLAG(FILL_COORDS, el_info); for (n = 0; n < DIM_OF_WORLD; n++) normal[n] = i0? coord[0][n] - coord[1][n] : coord[1][n] - coord[0][n]; det = NORM_DOW(normal); for (n = 0; n < DIM_OF_WORLD; n++) normal[n] /= det; #endif return(1.0); } /*--------------------------------------------------------------------------*/ /* orient the vertices of walls (i.e. codim 1 subsimplexes) */ /* used by estimator for the jumps => same quadrature nodes from both sides!*/ /*--------------------------------------------------------------------------*/ int *sorted_wall_indices_1d(int wall, int permno) { static int sorted[2][1] = { {1}, {0} }; return sorted[wall]; } int wall_orientation_1d(const EL *el, int wall, int **vecp) { if (vecp) (*vecp) = sorted_wall_indices_1d(wall, 0); return 0; } int *sort_wall_indices_1d(const EL *el, int wall, int *vec) { int *ret; (void)wall_orientation_1d(el, wall, &ret); if (vec) { vec[0] = ret[0]; return vec; } else return ret; } alberta-2.0.1/alberta/src/1d/graphXO_1d.c0000644000042300001440000003432310676724251014661 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: graphXO_1d.c */ /* */ /* */ /* description: simple graphical routines in 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*--- get min and max coordinates ---*/ /*--------------------------------------------------------------------------*/ typedef struct min_max { float xmin_1d[2], xmax_1d[2]; } MIN_MAX; static void xminmax_fct_1d(const EL_INFO *el_info, void *data) { FUNCNAME("xminmax_fct_1d"); MIN_MAX *ud = (MIN_MAX *)data; int i, j; PARAMETRIC *parametric = el_info->mesh->parametric; if (parametric && parametric->init_element(el_info, parametric)) { const REAL lambda[N_VERTICES_1D][N_LAMBDA] = {{1,0,0,0}, {0,1,0,0}}; REAL_D world[N_VERTICES_1D]; parametric->coord_to_world(el_info, nil, N_VERTICES_1D, lambda, world); for (i = 0; i < N_VERTICES_1D; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { ud->xmin_1d[j] = MIN(ud->xmin_1d[j], world[i][j]); ud->xmax_1d[j] = MAX(ud->xmax_1d[j], world[i][j]); } } } else { TEST_FLAG(FILL_COORDS, el_info); for (i = 0; i < N_VERTICES_1D; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { ud->xmin_1d[j] = MIN(ud->xmin_1d[j], el_info->coord[i][j]); ud->xmax_1d[j] = MAX(ud->xmax_1d[j], el_info->coord[i][j]); } } } return; } static GRAPH_WINDOW graph_open_window_1d(const char *title, const char *geom, REAL *world, MESH *mesh) { OGL_WINDOW *winO = nil; MIN_MAX mm[1]; int i; char geometry[16]; float xdiam[2]; if (world) { mm->xmin_1d[0] = world[0]; mm->xmax_1d[0] = world[1]; mm->xmin_1d[1] = world[2]; mm->xmax_1d[1] = world[3]; xdiam[0] = MAX(mm->xmax_1d[0] - mm->xmin_1d[0], 1.E-10); xdiam[1] = MAX(mm->xmax_1d[1] - mm->xmin_1d[1], 1.E-10); } else if (mesh) { for (i = 0; i < DIM_OF_WORLD; i++) mm->xmax_1d[i] = -(mm->xmin_1d[i] = 1.0E10); mesh_traverse(mesh, -1, CALL_LEAF_EL|FILL_COORDS, xminmax_fct_1d, mm); mm->xmin_1d[1] = -1.0; mm->xmax_1d[1] = 1.0; for (i = 0; i < DIM_OF_WORLD; i++) { xdiam[i] = MAX(mm->xmax_1d[i] - mm->xmin_1d[i], 1.E-10); mm->xmin_1d[i] -= 0.1*xdiam[i]; mm->xmax_1d[i] += 0.1*xdiam[i]; xdiam[i] *= 1.2; } } else { for (i = 0; i < DIM_OF_WORLD; i++) { mm->xmin_1d[i] = -1.0; mm->xmax_1d[i] = 1.0; xdiam[i] = 2.0; } } if (!title) title = "ALBERTAgraphics"; if (!geom) { REAL size = 400.0, xsize, ysize; if (xdiam[0] >= xdiam[1]) { xsize = size; ysize = size*xdiam[1]/xdiam[0]; } else { xsize = size*xdiam[0]/xdiam[1]; ysize = size; } snprintf(geometry, 16, "%dx%d", (int)xsize, (int)ysize); geom = geometry; } if ((winO = OGL_create_window(title, geom))) { glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); for (i = 0; i < MAX(DIM_OF_WORLD,2); i++) { winO->xmin[i] = mm->xmin_1d[i]; winO->xmax[i] = mm->xmax_1d[i]; } glOrtho(winO->xmin[0], winO->xmax[0], winO->xmin[1], winO->xmax[1], -1.0, 1.0); return((GRAPH_WINDOW) winO); } return(nil); } static void graph_close_window_1d(GRAPH_WINDOW win) { OGL_destroy_window((OGL_WINDOW *)win); return; } static void graph_clear_window_1d(GRAPH_WINDOW win, const GRAPH_RGBCOLOR c) { OGL_clear_window((OGL_WINDOW *)win, c); return; } static void graph_mesh_1d(GRAPH_WINDOW win, MESH *mesh, const GRAPH_RGBCOLOR c, FLAGS flag) { TRAVERSE_STACK *stack; const EL_INFO *el_info; REAL_D world[N_VERTICES_1D]; REAL coord[N_VERTICES_1D][2]; const float *color; PARAMETRIC *parametric = nil; if (!win || !mesh) return; /* Standardfarbe setzen */ color = c ? c : rgb_black; parametric = mesh->parametric; OGL_set_std_window((OGL_WINDOW *) win); glLineWidth(1); glPointSize(3); stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS|FILL_BOUND); while (el_info) { glColor3fv(color); if (flag & GRAPH_MESH_ELEMENT_MARK) { if (el_info->el->mark > 0) glColor3fv(rgb_red); else if (el_info->el->mark < 0) glColor3fv(rgb_blue); } glBegin(GL_LINE_STRIP); if (parametric && parametric->init_element(el_info, parametric)) { const REAL lambda[N_VERTICES_1D][N_LAMBDA] = {{1,0,0,0},{0,1,0,0}}; parametric->coord_to_world(el_info, nil, N_VERTICES_1D, lambda, world); } else { world[0][0] = el_info->coord[0][0]; world[1][0] = el_info->coord[1][0]; } coord[0][0] = world[0][0]; coord[1][0] = world[1][0]; coord[0][1] = coord[1][1] = 0.0; glVertex2dv(coord[0]); glVertex2dv(coord[1]); glEnd(); /*--------------------------------------------------------------------------*/ /*--- draw element boundaries ---*/ /*--------------------------------------------------------------------------*/ if (el_info->vertex_bound[0]) { if (el_info->vertex_bound[0] > 0) glColor3fv(rgb_blue); else if (el_info->vertex_bound[0] < 0) glColor3fv(rgb_red); glPointSize(5); glBegin(GL_POINTS); glVertex2dv(coord[0]); glEnd(); } if (el_info->vertex_bound[1] > 0) glColor3fv(rgb_blue); else if (el_info->vertex_bound[1] < 0) glColor3fv(rgb_red); else glColor3fv(color); glBegin(GL_POINTS); glVertex2dv(coord[1]); glEnd(); el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); glFlush(); return; } static void graph_drv_1d(GRAPH_WINDOW win, const DOF_REAL_VEC *uh, REAL min, REAL max, int refine,const GRAPH_RGBCOLOR c) { TRAVERSE_STACK *stack; const EL_INFO *el_info; MESH *mesh; REAL_D world[N_VERTICES_1D]; double coord[2], scal; const REAL *(*get_uh_el)(const EL *el, const DOF_REAL_VEC *, REAL *); PARAMETRIC *parametric = nil; int i,n_refine; static int n_refines[6] = {1, 2, 4, 8, 16, 32}; const BAS_FCTS *bas_fcts; REAL uh_val; if (!win || !uh) return; parametric = uh->fe_space->mesh->parametric; if (parametric) WARNING("This function is not tested for parametric elements\n"); if (min >= max) { min = dof_min(uh); max = dof_max(uh); } min = ABS(min); max = ABS(max); scal = min == max ? 0.9 : 0.9/MAX(min,max); bas_fcts = uh->fe_space->bas_fcts; if (refine < 0) refine = bas_fcts->degree-1; if (refine <= 0) n_refine = 0; else if (refine > 5) refine = 5; n_refine = n_refines[refine]; OGL_set_std_window((OGL_WINDOW *) win); glLineWidth(1); glColor3fv(c ? c : rgb_black); glBegin(GL_LINE_STRIP); mesh = uh->fe_space->mesh; get_uh_el = bas_fcts->get_real_vec; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); while (el_info) { const REAL *uh_el = (*get_uh_el)(el_info->el, uh, nil); if (parametric && parametric->init_element(el_info, parametric)) { const REAL lambda[N_VERTICES_1D][N_LAMBDA] = {{1,0,0,0},{0,1,0,0}}; parametric->coord_to_world(el_info, nil, N_VERTICES_1D, lambda, world); } else { world[0][0] = el_info->coord[0][0]; world[1][0] = el_info->coord[1][0]; } coord[0] = world[0][0]; coord[1] = scal*uh_el[0]; glVertex2dv(coord); for (i=1; ife_space->mesh->parametric; if (parametric) WARNING("This function is not tested for parametric elements\n"); if (min >= max) { min = dof_min_d(uh); max = dof_max_d(uh); } scal = min == max ? 0.9 : 0.9/max; bas_fcts = uh->fe_space->bas_fcts; if (refine < 0) refine = bas_fcts->degree-1; if (refine <= 0) n_refine = 0; else if (refine > 5) refine = 5; n_refine = n_refines[refine]; OGL_set_std_window((OGL_WINDOW *) win); glLineWidth(1); glColor3fv(c ? c : rgb_black); glBegin(GL_LINE_STRIP); mesh = uh->fe_space->mesh; get_uh_d_el = bas_fcts->get_real_d_vec; stack = get_traverse_stack(); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); while (el_info) { const REAL_D *uh_d_el = (*get_uh_d_el)(el_info->el, uh, nil); if (parametric && parametric->init_element(el_info, parametric)) { const REAL lambda[N_VERTICES_1D][N_LAMBDA] = {{1,0,0,0},{0,1,0,0}}; parametric->coord_to_world(el_info, nil, N_VERTICES_1D, lambda, world); } else { world[0][0] = el_info->coord[0][0]; world[1][0] = el_info->coord[1][0]; } coord[0] = world[0][0]; coord[1] = scal*NORM_DOW(uh_d_el[0]); glVertex2dv(coord); for (i=1; iparametric; if (parametric) WARNING("This function is not tested for parametric elements\n"); stack = get_traverse_stack(); if (min >= max) { el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); while (el_info) { est = (*get_est)(el_info->el); min = MIN(min,est); max = MAX(max,est); el_info = traverse_next(stack, el_info); } } min = ABS(min); max = ABS(max); scal = min == max ? 0.9 : 0.9/MAX(min,max); OGL_set_std_window((OGL_WINDOW *) win); glLineWidth(1); glColor3fv(c ? c : rgb_black); el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); while (el_info) { est = (*get_est)(el_info->el); if (parametric && parametric->init_element(el_info, parametric)) { const REAL lambda[N_VERTICES_1D][N_LAMBDA] = {{1,0,0,0},{0,1,0,0}}; parametric->coord_to_world(el_info, nil, N_VERTICES_1D, lambda, world); } else { world[0][0] = el_info->coord[0][0]; world[1][0] = el_info->coord[1][0]; } glBegin(GL_LINE_STRIP); coord[0] = world[0][0]; coord[1] = scal*est; glVertex2dv(coord); coord[0] = world[1][0]; coord[1] = scal*est; glVertex2dv(coord); glEnd(); el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); glFlush(); return; } alberta-2.0.1/alberta/src/1d/lagrange_1_1d.c0000644000042300001440000004354710676724251015321 00000000000000/*--------------------------------------------------------------------*/ /*--- ALBERTA: an Adaptive multi Level finite element toolbox using -*/ /*--- Bisectioning refinement and Error control by Residual */ /*--- Techniques for scientific Applications ---*/ /*--- ---*/ /*--- file: lagrange_1_1d.c ---*/ /*--- ---*/ /*--- description: implementation of the basis functions ---*/ /*--- lagrange1 in 1d ---*/ /*--- ---*/ /*--- created by: kgs on host enigma ---*/ /*--- at 17:19 on 28 of March 2003 ---*/ /*--------------------------------------------------------------------*/ /*--- ---*/ /*--- authors: Alfred Schmidt ---*/ /*--- Zentrum fuer Technomathematik ---*/ /*--- Fachbereich 3 Mathematik/Informatik ---*/ /*--- Universitaet Bremen ---*/ /*--- Bibliothekstr. 2 ---*/ /*--- D-28359 Bremen, Germany ---*/ /*--- ---*/ /*--- Kunibert G. Siebert ---*/ /*--- Institut fuer Mathematik ---*/ /*--- Universitaet Augsburg ---*/ /*--- Universitaetsstr. 14 ---*/ /*--- D-86159 Augsburg, Germany ---*/ /*--- ---*/ /*--- http://www.mathematik.uni-freiburg.de/IAM/ALBERTA ---*/ /*--- ---*/ /*--- (c) by A. Schmidt and K.G. Siebert (1996-2003) ---*/ /*--- ---*/ /*--------------------------------------------------------------------*/ static const REAL bary1_1d[2][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /*--- basisfunction 0 located at vertex 0 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi1_0_1d(const REAL lambda[N_LAMBDA]) { return(lambda[0]); } static const REAL *grd_phi1_0_1d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; return(grd); } static const REAL (*D2_phi1_0_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; return(D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 1 located at vertex 1 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi1_1_1d(const REAL lambda[N_LAMBDA]) { return(lambda[1]); } static const REAL *grd_phi1_1_1d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; return(grd); } static const REAL (*D2_phi1_1_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; return(D2); } /*--------------------------------------------------------------------*/ /*--- function for accessing local DOFs on an element ---*/ /*--------------------------------------------------------------------*/ static const DOF *get_dof_indices1_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF dof_vec[2]; DOF *rvec = idof ? idof : dof_vec; int ibas = 0, i, n0, node; DOF **dof = el->dof; /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = dof[node+i][n0]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing boundary type of DOFs ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_bound1_1d(const EL_INFO *el_info, S_CHAR *vec) { FUNCNAME("get_bound1_1d"); static S_CHAR my_vec[2]; S_CHAR *rvec = vec ? vec : my_vec; int i; DEBUG_TEST_FLAG(FILL_BOUND, el_info); /*--------------------------------------------------------------------*/ /*--- basis functions at vertices ---*/ /*--------------------------------------------------------------------*/ for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = el_info->vertex_bound[i]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ static const REAL *interpol1_1d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("interpol1_1d"); static REAL my_vec[2]; REAL *rvec = vec ? vec : my_vec; int i; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= 2), "not for %d points\n", no); if(f_loc) /* Evaluation in local coordinates */ for (i = 0; i < 2; i++) rvec[i] = f_loc(el_info, bary1_1d[i]); else { /* Evaluation in world coordinates */ if (parametric) { REAL_D world[2]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 2, bary1_1d, world); for (i = 0; i < 2; i++) rvec[i] = f(world[i]); } else { /* Vertex coordinates do not have to be calculated. */ DEBUG_TEST_FLAG(FILL_COORDS, el_info); rvec[0] = f(el_info->coord[0]); rvec[1] = f(el_info->coord[1]); } } if(b_no) { /* Perform resorting if only certain indices are required. */ REAL tmp[2]; memcpy(tmp, rvec, 2 * sizeof(REAL)); for(i = 0; i < no; i++) rvec[i] = tmp[b_no[i]]; } return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *interpol_d1_1d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("interpol_d1_1d"); static REAL_D my_vec[2]; REAL_D *rvec = vec ? vec : my_vec; int i; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= 2), "not for %d points\n", no); if(f_loc) /* Evaluation in local coordinates */ for (i = 0; i < 2; i++) f_loc(el_info, bary1_1d[i], rvec[i]); else { /* Evaluation in world coordinates */ if (parametric) { REAL_D world[2]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 2, bary1_1d, world); for (i = 0; i < 2; i++) f(world[i], rvec[i]); } else { /* Vertex coordinates do not have to be calculated. */ DEBUG_TEST_FLAG(FILL_COORDS, el_info); f(el_info->coord[0], rvec[0]); f(el_info->coord[1], rvec[1]); } } if(b_no) { /* Perform resorting if only certain indices are required. */ REAL_D tmp[2]; memcpy(tmp, rvec, 2 * sizeof(REAL_D)); for(i = 0; i < no; i++) COPY_DOW(tmp[b_no[i]], rvec[i]); } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_INT_VEC ---*/ /*--------------------------------------------------------------------*/ static const int *get_int_vec1_1d(const EL *el, const DOF_INT_VEC *dv, int *vec) { FUNCNAME("get_int_vec1_1d"); static int my_vec[2]; int *rvec = vec ? vec : my_vec; int *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_INT_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL *get_real_vec1_1d(const EL *el, const DOF_REAL_VEC *dv, REAL *vec) { FUNCNAME("get_real_vec1_1d"); static REAL my_vec[2]; REAL *rvec = vec ? vec : my_vec; REAL *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_D_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *get_real_d_vec1_1d(const EL *el, const DOF_REAL_D_VEC *dv, REAL_D *vec) { FUNCNAME("get_real_d_vec1_1d"); static REAL_D my_vec[2]; REAL_D *rvec = vec ? vec : my_vec; REAL_D *v = dv ? dv->vec : nil; int ibas = 0, i, n, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_D_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) { for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node+i][n0]][n]; ibas++; } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_SCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_schar_vec1_1d(const EL *el, const DOF_SCHAR_VEC *dv, S_CHAR *vec) { FUNCNAME("get_schar_vec1_1d"); static S_CHAR my_vec[2]; S_CHAR *rvec = vec ? vec : my_vec; S_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_SCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_UCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const U_CHAR *get_uchar_vec1_1d(const EL *el, const DOF_UCHAR_VEC *dv, U_CHAR *vec) { FUNCNAME("get_uchar_vec1_1d"); static U_CHAR my_vec[2]; U_CHAR *rvec = vec ? vec : my_vec; U_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_UCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_VECs during refinement ---*/ /*--------------------------------------------------------------------*/ static void refine_inter1_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL *pvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); v[cdof[1]] = (0.5*pvec[0] + 0.5*pvec[1]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_D_VECs during refinement ---*/ /*--------------------------------------------------------------------*/ static void refine_inter_d1_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL_D *pvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_d_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[1]][n] = (0.5*pvec[0][n] + 0.5*pvec[1][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_restr1_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[0]] += (0.5*cvec[1]); v[pdof[1]] += (0.5*cvec[1]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_D_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_restr_d1_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (0.5*cvec[1][n]); v[pdof[1]][n] += (0.5*cvec[1][n]); } return; } /*--------------------------------------------------------------------*/ /*--- Collect all information about basis functions ---*/ /*--------------------------------------------------------------------*/ static BAS_FCT *phi1_1d[2] = { phi1_0_1d, phi1_1_1d }; static GRD_BAS_FCT *grd_phi1_1d[2] = { grd_phi1_0_1d, grd_phi1_1_1d }; static D2_BAS_FCT *D2_phi1_1d[2] = { D2_phi1_0_1d, D2_phi1_1_1d }; static BAS_FCTS lagrange1_1d = { "lagrange1_1d", 1, 2, 1, {1, 0, 0, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi1_1d, grd_phi1_1d, D2_phi1_1d, get_dof_indices1_1d, get_bound1_1d, interpol1_1d, interpol_d1_1d, get_int_vec1_1d, get_real_vec1_1d, get_real_d_vec1_1d, get_uchar_vec1_1d, get_schar_vec1_1d, refine_inter1_1d, nil, coarse_restr1_1d, refine_inter_d1_1d, nil, coarse_restr_d1_1d, bary1_1d, }; alberta-2.0.1/alberta/src/1d/lagrange_2_1d.c0000644000042300001440000005633710676724251015323 00000000000000/*--------------------------------------------------------------------*/ /*--- ALBERTA: an Adaptive multi Level finite element toolbox using -*/ /*--- Bisectioning refinement and Error control by Residual */ /*--- Techniques for scientific Applications ---*/ /*--- ---*/ /*--- file: langrange_2_1d.c ---*/ /*--- ---*/ /*--- description: implementation of the basis functions ---*/ /*--- lagrange2 in 1d ---*/ /*--- ---*/ /*--- created by: kgs on host enigma ---*/ /*--- at 16:14 on 28 of March 2003 ---*/ /*--------------------------------------------------------------------*/ /*--- ---*/ /*--- authors: Alfred Schmidt ---*/ /*--- Zentrum fuer Technomathematik ---*/ /*--- Fachbereich 3 Mathematik/Informatik ---*/ /*--- Universitaet Bremen ---*/ /*--- Bibliothekstr. 2 ---*/ /*--- D-28359 Bremen, Germany ---*/ /*--- ---*/ /*--- Kunibert G. Siebert ---*/ /*--- Institut fuer Mathematik ---*/ /*--- Universitaet Augsburg ---*/ /*--- Universitaetsstr. 14 ---*/ /*--- D-86159 Augsburg, Germany ---*/ /*--- ---*/ /*--- http://www.mathematik.uni-freiburg.de/IAM/ALBERTA ---*/ /*--- ---*/ /*--- (c) by A. Schmidt and K.G. Siebert (1996-2003) ---*/ /*--- ---*/ /*--------------------------------------------------------------------*/ /*---8<---------------------------------------------------------------------*/ /*--- second order ---*/ /*--------------------------------------------------------------------->8---*/ static const REAL bary2_1d[3][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /*--- basisfunction 0 located at vertex 0 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi2_0_1d(const REAL lambda[N_LAMBDA]) { return(lambda[0]*(2.0*lambda[0] - 1.0)); } static const REAL *grd_phi2_0_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = 4.0*lambda[0] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2_0_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{4.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}}; return(D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 1 located at vertex 1 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi2_1_1d(const REAL lambda[N_LAMBDA]) { return(lambda[1]*(2.0*lambda[1] - 1.0)); } static const REAL *grd_phi2_1_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[1] = 4.0*lambda[1] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2_1_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0, 0.0, 0.0, 0.0}, {0.0, 4.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}}; return(D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 2 located at the center ---*/ /*--------------------------------------------------------------------------*/ static REAL phi2_2_1d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[1]); } static const REAL *grd_phi2_2_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = 4.0*lambda[1]; grd[1] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi2_2_1d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0, 4.0, 0.0, 0.0}, {4.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0}}; return(D2); } /*--------------------------------------------------------------------*/ /*--- function for accessing local DOFs on an element ---*/ /*--------------------------------------------------------------------*/ static const DOF *get_dof_indices2_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF dof_vec[3]; DOF *rvec = idof ? idof : dof_vec; int ibas = 0, i, n0, node; DOF **dof = el->dof; /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = dof[node+i][n0]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; rvec[ibas++] = dof[node][n0]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing boundary type of DOFs ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_bound2_1d(const EL_INFO *el_info, S_CHAR *vec) { FUNCNAME("get_bound2_1d"); static S_CHAR my_vec[3]; S_CHAR *rvec = vec ? vec : my_vec; int i; DEBUG_TEST_FLAG(FILL_BOUND, el_info); /*--------------------------------------------------------------------*/ /*--- basis functions at vertices ---*/ /*--------------------------------------------------------------------*/ for (i = 0; i < N_VERTICES_1D; i++) rvec[i] = el_info->vertex_bound[i]; /*--------------------------------------------------------------------*/ /*--- basis functions at center ---*/ /*--------------------------------------------------------------------*/ rvec[i] = INTERIOR; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,2,1,3) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,2,1,3) /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_INT_VEC ---*/ /*--------------------------------------------------------------------*/ static const int *get_int_vec2_1d(const EL *el, const DOF_INT_VEC *dv, int *vec) { FUNCNAME("get_int_vec2_1d"); static int my_vec[3]; int *rvec = vec ? vec : my_vec; int *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_INT_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; rvec[ibas++] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL *get_real_vec2_1d(const EL *el, const DOF_REAL_VEC *dv, REAL *vec) { FUNCNAME("get_real_vec2_1d"); static REAL my_vec[3]; REAL *rvec = vec ? vec : my_vec; REAL *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; rvec[ibas++] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_D_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *get_real_d_vec2_1d(const EL *el, const DOF_REAL_D_VEC *dv, REAL_D *vec) { FUNCNAME("get_real_d_vec2_1d"); static REAL_D my_vec[3]; REAL_D *rvec = vec ? vec : my_vec; REAL_D *v = dv ? dv->vec : nil; int ibas = 0, i, n, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_D_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) { for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node+i][n0]][n]; ibas++; } /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node][n0]][n]; ibas++; return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_SCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_schar_vec2_1d(const EL *el, const DOF_SCHAR_VEC *dv, S_CHAR *vec) { FUNCNAME("get_schar_vec2_1d"); static S_CHAR my_vec[3]; S_CHAR *rvec = vec ? vec : my_vec; S_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_SCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; rvec[ibas++] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_UCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const U_CHAR *get_uchar_vec2_1d(const EL *el, const DOF_UCHAR_VEC *dv, U_CHAR *vec) { FUNCNAME("get_uchar_vec2_1d"); static U_CHAR my_vec[3]; U_CHAR *rvec = vec ? vec : my_vec; U_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_UCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; rvec[ibas++] = v[dof[node][n0]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_VECs during refinement ---*/ /*--------------------------------------------------------------------*/ static void refine_inter2_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL *pvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); v[cdof[1]] = (pvec[2]); v[cdof[2]] = (0.375*pvec[0] - 0.125*pvec[1] + 0.75*pvec[2]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); v[cdof[2]] = (-0.125*pvec[0] + 0.375*pvec[1] + 0.75*pvec[2]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_D_VECs during refinement -*/ /*--------------------------------------------------------------------*/ static void refine_inter_d2_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL_D *pvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_d_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[1]][n] = (pvec[2][n]); v[cdof[2]][n] = (0.375*pvec[0][n] - 0.125*pvec[1][n] + 0.75*pvec[2][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[2]][n] = (-0.125*pvec[0][n] + 0.375*pvec[1][n] + 0.75*pvec[2][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_inter2_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[2]] = (cvec[1]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], dv, nil); v[pdof[2]] = (cvec[0]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_D_VECs during coarsening -*/ /*--------------------------------------------------------------------*/ static void coarse_inter_d2_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[2]][n] = (cvec[1][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[1], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[2]][n] = (cvec[0][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for restriction of DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_restr2_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[0]] += (0.375*cvec[2]); v[pdof[1]] += (-0.125*cvec[2]); v[pdof[2]] = (cvec[1] + 0.75*cvec[2]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], dv, nil); v[pdof[0]] += (-0.125*cvec[2]); v[pdof[1]] += (0.375*cvec[2]); v[pdof[2]] += (0.75*cvec[2]); return; } /*--------------------------------------------------------------------*/ /*--- function for restriction of DOF_REAL_D_VECs during coarsening --*/ /*--------------------------------------------------------------------*/ static void coarse_restr_d2_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (0.375*cvec[2][n]); v[pdof[1]][n] += (-0.125*cvec[2][n]); v[pdof[2]][n] = (cvec[1][n] + 0.75*cvec[2][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[1], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (-0.125*cvec[2][n]); v[pdof[1]][n] += (0.375*cvec[2][n]); v[pdof[2]][n] += (0.75*cvec[2][n]); } return; } /*--------------------------------------------------------------------*/ /*--- Collect all information about basis functions ---*/ /*--------------------------------------------------------------------*/ static BAS_FCT *phi2_1d[3] = { phi2_0_1d, phi2_1_1d, phi2_2_1d }; static GRD_BAS_FCT *grd_phi2_1d[3] = { grd_phi2_0_1d, grd_phi2_1_1d, grd_phi2_2_1d }; static D2_BAS_FCT *D2_phi2_1d[3] = { D2_phi2_0_1d, D2_phi2_1_1d, D2_phi2_2_1d }; static BAS_FCTS lagrange2_1d = { "lagrange2_1d", 1, 3, 2, {1, 1, 0, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi2_1d, grd_phi2_1d, D2_phi2_1d, get_dof_indices2_1d, get_bound2_1d, interpol2_1d, interpol_d2_1d, get_int_vec2_1d, get_real_vec2_1d, get_real_d_vec2_1d, get_uchar_vec2_1d, get_schar_vec2_1d, refine_inter2_1d, coarse_inter2_1d, coarse_restr2_1d, refine_inter_d2_1d, coarse_inter_d2_1d, coarse_restr_d2_1d, bary2_1d, }; alberta-2.0.1/alberta/src/1d/lagrange_3_1d.c0000644000042300001440000006143010676724251015312 00000000000000/*--------------------------------------------------------------------*/ /*--- ALBERTA: an Adaptive multi Level finite element toolbox using -*/ /*--- Bisectioning refinement and Error control by Residual */ /*--- Techniques for scientific Applications ---*/ /*--- ---*/ /*--- file: lagrange_3_1d.c ---*/ /*--- ---*/ /*--- description: implementation of the basis functions ---*/ /*--- lagrange3 in 1d ---*/ /*--- ---*/ /*--- created by: kgs on host enigma ---*/ /*--- at 16:50 on 28 of March 2003 ---*/ /*--------------------------------------------------------------------*/ /*--- ---*/ /*--- authors: Alfred Schmidt ---*/ /*--- Zentrum fuer Technomathematik ---*/ /*--- Fachbereich 3 Mathematik/Informatik ---*/ /*--- Universitaet Bremen ---*/ /*--- Bibliothekstr. 2 ---*/ /*--- D-28359 Bremen, Germany ---*/ /*--- ---*/ /*--- Kunibert G. Siebert ---*/ /*--- Institut fuer Mathematik ---*/ /*--- Universitaet Augsburg ---*/ /*--- Universitaetsstr. 14 ---*/ /*--- D-86159 Augsburg, Germany ---*/ /*--- ---*/ /*--- http://www.mathematik.uni-freiburg.de/IAM/ALBERTA ---*/ /*--- ---*/ /*--- (c) by A. Schmidt and K.G. Siebert (1996-2003) ---*/ /*--- ---*/ /*--------------------------------------------------------------------*/ static const REAL bary3_1d[4][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {2.0/3.0,1.0/3.0, 0.0, 0.0}, {1.0/3.0,2.0/3.0, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /*--- basisfunction 0 located at vertex 0 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi3_0_1d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[0] - 1.0)*lambda[0] + 1.0)*lambda[0]); } static const REAL *grd_phi3_0_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = (13.5*lambda[0] - 9.0)*lambda[0] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3_0_1d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][0] = 27.0*lambda[0] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 1 located at vertex 1 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi3_1_1d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[1] - 1.0)*lambda[1] + 1.0)*lambda[1]); } static const REAL *grd_phi3_1_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[1] = (13.5*lambda[1] - 9.0)*lambda[1] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3_1_1d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[1][1] = 27.0*lambda[1] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 2, first at center ---*/ /*--------------------------------------------------------------------------*/ static REAL phi3_2_1d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[0] - 4.5)*lambda[0]*lambda[1]); } static const REAL *grd_phi3_2_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = (27.0*lambda[0] - 4.5)*lambda[1]; grd[1] = (13.5*lambda[0] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3_2_1d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][0] = 27.0*lambda[1]; D2[0][1] = D2[1][0] = 27.0*lambda[0] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 3, second at center ---*/ /*--------------------------------------------------------------------------*/ static REAL phi3_3_1d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[1] - 4.5)*lambda[1]*lambda[0]); } static const REAL *grd_phi3_3_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = (13.5*lambda[1] - 4.5)*lambda[1]; grd[1] = (27.0*lambda[1] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3_3_1d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][1] = D2[1][0] = 27.0*lambda[1] - 4.5; D2[1][1] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------*/ /*--- function for accessing local DOFs on an element ---*/ /*--------------------------------------------------------------------*/ static const DOF *get_dof_indices3_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF dof_vec[4]; DOF *rvec = idof ? idof : dof_vec; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = dof[node+i][n0]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; for (j = 0; j < 2; j++) rvec[ibas++] = dof[node][n0+j]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing boundary type of DOFs ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_bound3_1d(const EL_INFO *el_info, S_CHAR *vec) { FUNCNAME("get_bound3_1d"); static S_CHAR my_vec[4]; S_CHAR *rvec = vec ? vec : my_vec; int ibas = 0, i, j; DEBUG_TEST_FLAG(FILL_BOUND, el_info); /*--------------------------------------------------------------------*/ /*--- basis functions at vertices ---*/ /*--------------------------------------------------------------------*/ for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = el_info->vertex_bound[i]; /*--------------------------------------------------------------------*/ /*--- basis functions at center ---*/ /*--------------------------------------------------------------------*/ for (j = 0; j < 2; j++) rvec[ibas++] = INTERIOR; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,3,1,4) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,3,1,4) /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_INT_VEC ---*/ /*--------------------------------------------------------------------*/ static const int *get_int_vec3_1d(const EL *el, const DOF_INT_VEC *dv, int *vec) { FUNCNAME("get_int_vec3_1d"); static int my_vec[4]; int *rvec = vec ? vec : my_vec; int *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_INT_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 2; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL *get_real_vec3_1d(const EL *el, const DOF_REAL_VEC *dv, REAL *vec) { FUNCNAME("get_real_vec3_1d"); static REAL my_vec[4]; REAL *rvec = vec ? vec : my_vec; REAL *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 2; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_D_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *get_real_d_vec3_1d(const EL *el, const DOF_REAL_D_VEC *dv, REAL_D *vec) { FUNCNAME("get_real_d_vec3_1d"); static REAL_D my_vec[4]; REAL_D *rvec = vec ? vec : my_vec; REAL_D *v = dv ? dv->vec : nil; int ibas = 0, i, j, n, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_D_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) { for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node+i][n0]][n]; ibas++; } /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 2; j++) { for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node][n0+j]][n]; ibas++; } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_SCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_schar_vec3_1d(const EL *el, const DOF_SCHAR_VEC *dv, S_CHAR *vec) { FUNCNAME("get_schar_vec3_1d"); static S_CHAR my_vec[4]; S_CHAR *rvec = vec ? vec : my_vec; S_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_SCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 2; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_UCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const U_CHAR *get_uchar_vec3_1d(const EL *el, const DOF_UCHAR_VEC *dv, U_CHAR *vec) { FUNCNAME("get_uchar_vec3_1d"); static U_CHAR my_vec[4]; U_CHAR *rvec = vec ? vec : my_vec; U_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_UCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 2; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_VECs during refinement ---*/ /*--------------------------------------------------------------------*/ static void refine_inter3_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL *pvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); v[cdof[1]] = (-0.0625*pvec[0] - 0.0625*pvec[1] + 0.5625*pvec[2] + 0.5625*pvec[3]); v[cdof[2]] = (0.3125*pvec[0] + 0.0625*pvec[1] + 0.9375*pvec[2] - 0.3125*pvec[3]); v[cdof[3]] = (pvec[2]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); v[cdof[2]] = (pvec[3]); v[cdof[3]] = (0.0625*pvec[0] + 0.3125*pvec[1] - 0.3125*pvec[2] + 0.9375*pvec[3]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_D_VECs during refinement -*/ /*--------------------------------------------------------------------*/ static void refine_inter_d3_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL_D *pvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_d_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[1]][n] = (-0.0625*pvec[0][n] - 0.0625*pvec[1][n] + 0.5625*pvec[2][n] + 0.5625*pvec[3][n]); v[cdof[2]][n] = (0.3125*pvec[0][n] + 0.0625*pvec[1][n] + 0.9375*pvec[2][n] - 0.3125*pvec[3][n]); v[cdof[3]][n] = (pvec[2][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[2]][n] = (pvec[3][n]); v[cdof[3]][n] = (0.0625*pvec[0][n] + 0.3125*pvec[1][n] - 0.3125*pvec[2][n] + 0.9375*pvec[3][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_inter3_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[2]] = (cvec[3]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], dv, nil); v[pdof[3]] = (cvec[2]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton of DOF_REAL_D_VECs during coarsening -*/ /*--------------------------------------------------------------------*/ static void coarse_inter_d3_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[2]][n] = (cvec[3][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[1], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[3]][n] = (cvec[2][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for restriction of DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_restr3_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[0]] += (-0.0625*cvec[1] + 0.3125*cvec[2]); v[pdof[1]] += (-0.0625*cvec[1] + 0.0625*cvec[2]); v[pdof[2]] = (0.5625*cvec[1] + 0.9375*cvec[2] + cvec[3]); v[pdof[3]] = (0.5625*cvec[1] - 0.3125*cvec[2]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], dv, nil); v[pdof[0]] += (0.0625*cvec[3]); v[pdof[1]] += (0.3125*cvec[3]); v[pdof[2]] += (-0.3125*cvec[3]); v[pdof[3]] += (cvec[2] + 0.9375*cvec[3]); return; } /*--------------------------------------------------------------------*/ /*--- function for restriction of DOF_REAL_D_VECs during coarsening --*/ /*--------------------------------------------------------------------*/ static void coarse_restr_d3_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (-0.0625*cvec[1][n] + 0.3125*cvec[2][n]); v[pdof[1]][n] += (-0.0625*cvec[1][n] + 0.0625*cvec[2][n]); v[pdof[2]][n] = (0.5625*cvec[1][n] + 0.9375*cvec[2][n] + cvec[3][n]); v[pdof[3]][n] = (0.5625*cvec[1][n] - 0.3125*cvec[2][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[1], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (0.0625*cvec[3][n]); v[pdof[1]][n] += (0.3125*cvec[3][n]); v[pdof[2]][n] += (-0.3125*cvec[3][n]); v[pdof[3]][n] += (cvec[2][n] + 0.9375*cvec[3][n]); } return; } /*--------------------------------------------------------------------*/ /*--- Collect all information about basis functions ---*/ /*--------------------------------------------------------------------*/ static BAS_FCT *phi3_1d[4] = { phi3_0_1d, phi3_1_1d, phi3_2_1d, phi3_3_1d }; static GRD_BAS_FCT *grd_phi3_1d[4] = { grd_phi3_0_1d, grd_phi3_1_1d, grd_phi3_2_1d, grd_phi3_3_1d }; static D2_BAS_FCT *D2_phi3_1d[4] = { D2_phi3_0_1d, D2_phi3_1_1d, D2_phi3_2_1d, D2_phi3_3_1d }; static BAS_FCTS lagrange3_1d = { "lagrange3_1d", 1, 4, 3, {1, 2, 0, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi3_1d, grd_phi3_1d, D2_phi3_1d, get_dof_indices3_1d, get_bound3_1d, interpol3_1d, interpol_d3_1d, get_int_vec3_1d, get_real_vec3_1d, get_real_d_vec3_1d, get_uchar_vec3_1d, get_schar_vec3_1d, refine_inter3_1d, coarse_inter3_1d, coarse_restr3_1d, refine_inter_d3_1d, coarse_inter_d3_1d, coarse_restr_d3_1d, bary3_1d, }; alberta-2.0.1/alberta/src/1d/lagrange_4_1d.c0000644000042300001440000006644310676724251015324 00000000000000/*--------------------------------------------------------------------*/ /*--- ALBERTA: an Adaptive multi Level finite element toolbox using -*/ /*--- Bisectioning refinement and Error control by Residual */ /*--- Techniques for scientific Applications ---*/ /*--- ---*/ /*--- file: lagrange_4_1d.c ---*/ /*--- ---*/ /*--- description: implementation of the basis functions ---*/ /*--- lagrange4 in 1d ---*/ /*--- ---*/ /*--- created by: kgs on host enigma ---*/ /*--- at 16:55 on 28 of March 2003 ---*/ /*--------------------------------------------------------------------*/ /*--- ---*/ /*--- authors: Alfred Schmidt ---*/ /*--- Zentrum fuer Technomathematik ---*/ /*--- Fachbereich 3 Mathematik/Informatik ---*/ /*--- Universitaet Bremen ---*/ /*--- Bibliothekstr. 2 ---*/ /*--- D-28359 Bremen, Germany ---*/ /*--- ---*/ /*--- Kunibert G. Siebert ---*/ /*--- Institut fuer Mathematik ---*/ /*--- Universitaet Augsburg ---*/ /*--- Universitaetsstr. 14 ---*/ /*--- D-86159 Augsburg, Germany ---*/ /*--- ---*/ /*--- http://www.mathematik.uni-freiburg.de/IAM/ALBERTA ---*/ /*--- ---*/ /*--- (c) by A. Schmidt and K.G. Siebert (1996-2003) ---*/ /*--- ---*/ /*--------------------------------------------------------------------*/ static const REAL bary4_1d[5][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.75, 0.25, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0}, {0.25, 0.75, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /*--- basisfunction 0 located at vertex 0 ---*/ /*--------------------------------------------------------------------------*/ static REAL phi4_0_1d(const REAL lambda[N_LAMBDA]) { return((((32.0*lambda[0] - 48.0)*lambda[0] + 22.0)*lambda[0] - 3.0)*lambda[0]/3.0); } static const REAL *grd_phi4_0_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = ((128.0*lambda[0] - 144.0)*lambda[0] + 44.0)*lambda[0]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4_0_1d(const REAL lambda[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][0] = (128.0*lambda[0] - 96.0)*lambda[0] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 1, located at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4_1_1d(const REAL lambda[N_LAMBDA]) { return((((32.0*lambda[1] - 48.0)*lambda[1] + 22.0)*lambda[1] - 3.0)*lambda[1]/3.0); } static const REAL *grd_phi4_1_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[1] = ((128.0*lambda[1] - 144.0)*lambda[1] + 44.0)*lambda[1]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4_1_1d(const REAL lambda[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[1][1] = (128.0*lambda[1] - 96.0)*lambda[1] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 2, first at the center ---*/ /*--------------------------------------------------------------------------*/ static REAL phi4_2_1d(const REAL lambda[N_LAMBDA]) { return(((128.0*lambda[0] - 96.0)*lambda[0] + 16.0)*lambda[0]*lambda[1]/3.0); } static const REAL *grd_phi4_2_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = ((128*lambda[0] - 64.0)*lambda[0] + 16.0/3.0)*lambda[1]; grd[1] = ((128*lambda[0] - 96.0)*lambda[0] + 16.0)*lambda[0]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4_2_1d(const REAL lambda[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][0] = (256.0*lambda[0] - 64.0)*lambda[1]; D2[0][1] = D2[1][0] = (128.0*lambda[0] - 64.0)*lambda[0] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 3, second at the center ---*/ /*--------------------------------------------------------------------------*/ static REAL phi4_3_1d(const REAL lambda[N_LAMBDA]) { return((4.0*lambda[0] - 1.0)*lambda[0]*(4.0*lambda[1] - 1.0)*lambda[1]*4.0); } static const REAL *grd_phi4_3_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = 4.0*(8.0*lambda[0] - 1.0)*lambda[1]*(4.0*lambda[1] - 1.0); grd[1] = 4.0*lambda[0]*(4.0*lambda[0] - 1.0)*(8.0*lambda[1] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4_3_1d(const REAL lambda[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][0] = 32.0*lambda[1]*(4.0*lambda[1] - 1.0); D2[0][1] = D2[1][0] = 4.0*(8.0*lambda[0] - 1.0)*(8.0*lambda[1] - 1.0); D2[1][1] = 32.0*lambda[0]*(4.0*lambda[0] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /*--- basisfunction 4, third at the center ---*/ /*--------------------------------------------------------------------------*/ static REAL phi4_4_1d(const REAL lambda[N_LAMBDA]) { return(((128.0*lambda[1] - 96.0)*lambda[1] + 16.0)*lambda[1]*lambda[0]/3.0); } static const REAL *grd_phi4_4_1d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0}; grd[0] = ((128*lambda[1] - 96.0)*lambda[1] + 16.0)*lambda[1]/3.0; grd[1] = ((128*lambda[1] - 64.0)*lambda[1] + 16.0/3.0)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi4_4_1d(const REAL lambda[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[1][1] = (256.0*lambda[1] - 64.0)*lambda[0]; D2[0][1] = D2[1][0] = (128.0*lambda[1] - 64.0)*lambda[1] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------*/ /*--- function for accessing local DOFs on an element ---*/ /*--------------------------------------------------------------------*/ static const DOF *get_dof_indices4_1d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF dof_vec[5]; DOF *rvec = idof ? idof : dof_vec; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = dof[node+i][n0]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = admin->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; for (j = 0; j < 3; j++) rvec[ibas++] = dof[node][n0+j]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing boundary type of DOFs ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_bound4_1d(const EL_INFO *el_info, S_CHAR *vec) { FUNCNAME("get_bound4_1d"); static S_CHAR my_vec[5]; S_CHAR *rvec = vec ? vec : my_vec; int ibas = 0, i, j; DEBUG_TEST_FLAG(FILL_BOUND, el_info); /*--------------------------------------------------------------------*/ /*--- basis functions at vertices ---*/ /*--------------------------------------------------------------------*/ for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = el_info->vertex_bound[i]; /*--------------------------------------------------------------------*/ /*--- basis functions at center ---*/ /*--------------------------------------------------------------------*/ for (j = 0; j < 3; j++) rvec[ibas++] = INTERIOR; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,4,1,5) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,4,1,5) /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_INT_VEC ---*/ /*--------------------------------------------------------------------*/ static const int *get_int_vec4_1d(const EL *el, const DOF_INT_VEC *dv, int *vec) { FUNCNAME("get_int_vec4_1d"); static int my_vec[5]; int *rvec = vec ? vec : my_vec; int *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_INT_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 3; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL *get_real_vec4_1d(const EL *el, const DOF_REAL_VEC *dv, REAL *vec) { FUNCNAME("get_real_vec4_1d"); static REAL my_vec[5]; REAL *rvec = vec ? vec : my_vec; REAL *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 3; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_REAL_D_VEC ---*/ /*--------------------------------------------------------------------*/ static const REAL_D *get_real_d_vec4_1d(const EL *el, const DOF_REAL_D_VEC *dv, REAL_D *vec) { FUNCNAME("get_real_d_vec4_1d"); static REAL_D my_vec[5]; REAL_D *rvec = vec ? vec : my_vec; REAL_D *v = dv ? dv->vec : nil; int ibas = 0, i, j, n, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_REAL_D_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) { for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node+i][n0]][n]; ibas++; } /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 3; j++) { for (n = 0; n < DIM_OF_WORLD; n++) rvec[ibas][n] = v[dof[node][n0+j]][n]; ibas++; } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_SCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const S_CHAR *get_schar_vec4_1d(const EL *el, const DOF_SCHAR_VEC *dv, S_CHAR *vec) { FUNCNAME("get_schar_vec4_1d"); static S_CHAR my_vec[5]; S_CHAR *rvec = vec ? vec : my_vec; S_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_SCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 3; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for accessing a local DOF_UCHAR_VEC ---*/ /*--------------------------------------------------------------------*/ static const U_CHAR *get_uchar_vec4_1d(const EL *el, const DOF_UCHAR_VEC *dv, U_CHAR *vec) { FUNCNAME("get_uchar_vec4_1d"); static U_CHAR my_vec[5]; U_CHAR *rvec = vec ? vec : my_vec; U_CHAR *v = dv ? dv->vec : nil; int ibas = 0, i, j, n0, node; DOF **dof = el->dof; DEBUG_TEST_EXIT(v, "no DOF_UCHAR_VEC dv, or no dv->vec\n"); /*--------------------------------------------------------------------*/ /*--- DOFs at vertices ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[VERTEX]; n0 = dv->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_1D; i++) rvec[ibas++] = v[dof[node+i][n0]]; /*--------------------------------------------------------------------*/ /*--- DOFs at center ---*/ /*--------------------------------------------------------------------*/ node = dv->fe_space->mesh->node[CENTER]; n0 = dv->fe_space->admin->n0_dof[CENTER]; for (j = 0; j < 3; j++) rvec[ibas++] = v[dof[node][n0+j]]; return(rvec); } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_VECs during refinement ---*/ /*--------------------------------------------------------------------*/ static void refine_inter4_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL *pvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); v[cdof[1]] = (pvec[3]); v[cdof[2]] = (0.2734375*pvec[0] - 0.0390625*pvec[1] + 1.09375*pvec[2] - 0.546875*pvec[3] + 0.21875*pvec[4]); v[cdof[3]] = (pvec[2]); v[cdof[4]] = (-0.0390625*pvec[0] + 0.0234375*pvec[1] + 0.46875*pvec[2] + 0.703125*pvec[3] - 0.15625*pvec[4]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); v[cdof[2]] = (0.0234375*pvec[0] - 0.0390625*pvec[1] - 0.15625*pvec[2] + 0.703125*pvec[3] + 0.46875*pvec[4]); v[cdof[3]] = (pvec[4]); v[cdof[4]] = (-0.0390625*pvec[0] + 0.2734375*pvec[1] + 0.21875*pvec[2] - 0.546875*pvec[3] + 1.09375*pvec[4]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_D_VECs during refinement ---*/ /*--------------------------------------------------------------------*/ static void refine_inter_d4_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *cdof; const REAL_D *pvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pvec = (*bas_fcts->get_real_d_vec)(el, dv, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, first child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[0], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[1]][n] = (pvec[3][n]); v[cdof[2]][n] = (0.2734375*pvec[0][n] - 0.0390625*pvec[1][n] + 1.09375*pvec[2][n] - 0.546875*pvec[3][n] + 0.21875*pvec[4][n]); v[cdof[3]][n] = (pvec[2][n]); v[cdof[4]][n] = (-0.0390625*pvec[0][n] + 0.0234375*pvec[1][n] + 0.46875*pvec[2][n] + 0.703125*pvec[3][n] - 0.15625*pvec[4][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[cdof[2]][n] = (0.0234375*pvec[0][n] - 0.0390625*pvec[1][n] - 0.15625*pvec[2][n] + 0.703125*pvec[3][n] + 0.46875*pvec[4][n]); v[cdof[3]][n] = (pvec[4][n]); v[cdof[4]][n] = (-0.0390625*pvec[0][n] + 0.2734375*pvec[1][n] + 0.21875*pvec[2][n] - 0.546875*pvec[3][n] + 1.09375*pvec[4][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_inter4_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[2]] = (cvec[3]); v[pdof[3]] = (cvec[1]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], dv, nil); v[pdof[4]] = (cvec[3]); return; } /*--------------------------------------------------------------------*/ /*--- function for interpolaton DOF_REAL_D_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_inter_d4_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[2]][n] = (cvec[3][n]); v[pdof[3]][n] = (cvec[1][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[1], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[4]][n] = (cvec[3][n]); } return; } /*--------------------------------------------------------------------*/ /*--- function for restriction of DOF_REAL_VECs during coarsening ---*/ /*--------------------------------------------------------------------*/ static void coarse_restr4_1d(DOF_REAL_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL *cvec; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[0], dv, nil); v[pdof[0]] += (0.2734375*cvec[2] - 0.0390625*cvec[4]); v[pdof[1]] += (-0.0390625*cvec[2] + 0.0234375*cvec[4]); v[pdof[2]] = (1.09375*cvec[2] + cvec[3] + 0.46875*cvec[4]); v[pdof[3]] = (cvec[1] - 0.546875*cvec[2] + 0.703125*cvec[4]); v[pdof[4]] = (0.21875*cvec[2] - 0.15625*cvec[4]); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_vec)(el->child[1], dv, nil); v[pdof[0]] += (0.0234375*cvec[2] - 0.0390625*cvec[4]); v[pdof[1]] += (-0.0390625*cvec[2] + 0.2734375*cvec[4]); v[pdof[2]] += (-0.15625*cvec[2] + 0.21875*cvec[4]); v[pdof[3]] += (0.703125*cvec[2] - 0.546875*cvec[4]); v[pdof[4]] += (0.46875*cvec[2] + cvec[3] + 1.09375*cvec[4]); return; } /*--------------------------------------------------------------------*/ /*--- function for restriction of DOF_REAL_D_VECs during coarsening --*/ /*--------------------------------------------------------------------*/ static void coarse_restr_d4_1d(DOF_REAL_D_VEC *dv, RC_LIST_EL *list, int n_el) { EL *el; const DOF *pdof; const REAL_D *cvec; int n; const BAS_FCTS *bas_fcts = dv->fe_space->bas_fcts; const DOF_ADMIN *admin = dv->fe_space->admin; REAL_D *v = dv->vec; el = list->el_info.el; pdof = (*bas_fcts->get_dof_indices)(el, admin, nil); /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from first child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[0], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (0.2734375*cvec[2][n] - 0.0390625*cvec[4][n]); v[pdof[1]][n] += (-0.0390625*cvec[2][n] + 0.0234375*cvec[4][n]); v[pdof[2]][n] = (1.09375*cvec[2][n] + cvec[3][n] + 0.46875*cvec[4][n]); v[pdof[3]][n] = (cvec[1][n] - 0.546875*cvec[2][n] + 0.703125*cvec[4][n]); v[pdof[4]][n] = (0.21875*cvec[2][n] - 0.15625*cvec[4][n]); } /*--------------------------------------------------------------------*/ /*--- DOFs on first element, from second child ---*/ /*--------------------------------------------------------------------*/ cvec = (*bas_fcts->get_real_d_vec)(el->child[1], dv, nil); for (n = 0; n < DIM_OF_WORLD; n++) { v[pdof[0]][n] += (0.0234375*cvec[2][n] - 0.0390625*cvec[4][n]); v[pdof[1]][n] += (-0.0390625*cvec[2][n] + 0.2734375*cvec[4][n]); v[pdof[2]][n] += (-0.15625*cvec[2][n] + 0.21875*cvec[4][n]); v[pdof[3]][n] += (0.703125*cvec[2][n] - 0.546875*cvec[4][n]); v[pdof[4]][n] += (0.46875*cvec[2][n] + cvec[3][n] + 1.09375*cvec[4][n]); } return; } /*--------------------------------------------------------------------*/ /*--- Collect all information about basis functions ---*/ /*--------------------------------------------------------------------*/ static BAS_FCT *phi4_1d[5] = { phi4_0_1d, phi4_1_1d, phi4_2_1d, phi4_3_1d, phi4_4_1d }; static GRD_BAS_FCT *grd_phi4_1d[5] = { grd_phi4_0_1d, grd_phi4_1_1d, grd_phi4_2_1d, grd_phi4_3_1d, grd_phi4_4_1d }; static D2_BAS_FCT *D2_phi4_1d[5] = { D2_phi4_0_1d, D2_phi4_1_1d, D2_phi4_2_1d, D2_phi4_3_1d, D2_phi4_4_1d }; static BAS_FCTS lagrange4_1d = { "lagrange4_1d", 1, 5, 4, {1, 3, 0, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi4_1d, grd_phi4_1d, D2_phi4_1d, get_dof_indices4_1d, get_bound4_1d, interpol4_1d, interpol_d4_1d, get_int_vec4_1d, get_real_vec4_1d, get_real_d_vec4_1d, get_uchar_vec4_1d, get_schar_vec4_1d, refine_inter4_1d, coarse_inter4_1d, coarse_restr4_1d, refine_inter_d4_1d, coarse_inter_d4_1d, coarse_restr_d4_1d, bary4_1d, }; alberta-2.0.1/alberta/src/1d/macro_1d.c0000644000042300001440000001261410676724251014411 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: macro_1d.c */ /* */ /* */ /* description: dimension dependent part of reading/writing macro */ /* triangulations for 1d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* read data->bound into mel[].bound[] */ /* WARNING: Please note the index mapping used here! */ /*--------------------------------------------------------------------------*/ static void fill_bound_info_1d(MESH *mesh, const MACRO_DATA *data) { int i; MACRO_EL *mel = mesh->macro_els; for(i = 0; i < data->n_macro_elements; i++) { mel[i].vertex_bound[1] = data->boundary[NEIGH_IND(1,i,0)]; mel[i].vertex_bound[0] = data->boundary[NEIGH_IND(1,i,1)]; } return; } /*--------------------------------------------------------------------------*/ /* orientation_1d(): checks and corrects whether the element is oriented */ /* from left to right. */ /*--------------------------------------------------------------------------*/ #if DIM_OF_WORLD == 1 static U_CHAR orientation_1d(MACRO_DATA *data) { int i, vert_buffer, neigh_buffer; S_CHAR bound_buffer; U_CHAR result = false; for(i = 0; i < data->n_macro_elements; i++) { if(data->coords[data->mel_vertices[VERT_IND(1,i,0)]][0] > data->coords[data->mel_vertices[VERT_IND(1,i,1)]][0]) { result = true; vert_buffer = data->mel_vertices[VERT_IND(1,i,0)]; data->mel_vertices[VERT_IND(1,i,0)] = data->mel_vertices[VERT_IND(1,i,1)]; data->mel_vertices[VERT_IND(1,i,1)] = vert_buffer; neigh_buffer = data->neigh[NEIGH_IND(1,i,0)]; data->neigh[NEIGH_IND(1,i,0)] = data->neigh[NEIGH_IND(1,i,1)]; data->neigh[NEIGH_IND(1,i,1)] = neigh_buffer; bound_buffer = data->boundary[NEIGH_IND(1,i,0)]; data->boundary[NEIGH_IND(1,i,0)] = data->boundary[NEIGH_IND(1,i,1)]; data->boundary[NEIGH_IND(1,i,1)] = bound_buffer; } } return(result); } #endif /*--------------------------------------------------------------------------*/ /* macro_test(): In 1D only element orientation is checked (and corrected). */ /*--------------------------------------------------------------------------*/ static void macro_test_1d(MACRO_DATA *data, const char *new_name) { FUNCNAME("macro_test"); U_CHAR error_found = false; #if DIM_OF_WORLD == 1 if(orientation_1d(data)) { error_found = true; WARNING("Element orientation was corrected for some elements.\n"); } #endif if (error_found && new_name) { MSG("Attempting to write corrected macro data to file %s...\n", new_name); write_macro_data(data, new_name); } return; } alberta-2.0.1/alberta/src/1d/memory_1d.c0000644000042300001440000003273710676724251014630 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: memory_1d.c */ /* */ /* */ /* description: special routines for getting new FE_SPACEs, 1D-Version */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* LOGICAL_EL_1D: */ /* This structure defines a MESH element at any point in the hierarchy in */ /* terms of global indices for vertices and elements. This information is */ /* calculated by the routines below. A temporary representation of the */ /* entire mesh is used to fill DOF pointers on all elements. This rather */ /* general (and costly) approach was used since this information might be */ /* useful in other contexts in the future */ /* */ /* "neigh" is defined to be the neighbour on the same refinement level. */ /* If there is no such neighbour we take the corresponding neighbour of the */ /* parent element. */ /****************************************************************************/ typedef struct logical_el_1d LOGICAL_EL_1D; struct logical_el_1d { int parent; int child[2]; int neigh[N_NEIGH_1D]; int vertex[N_VERTICES_1D]; EL *el; }; /****************************************************************************/ /* fill_logical_el_rec_1d(l_els, el, current_el, index): */ /* This routine fills basic information on logical els, namely childhood */ /* relationships and EL pointers. Elements are also counted here. */ /****************************************************************************/ static void fill_logical_el_rec_1d(LOGICAL_EL_1D *l_els, EL *el, int current_el, int *index) { /* FUNCNAME("fill_logical_el_rec_1d");*/ int i_child, child_ind[2]; if(el->child[0]) { /* Fill basic child information. */ for(i_child = 0; i_child < 2; i_child++) { child_ind[i_child] = *index + i_child; l_els[current_el].child[i_child] = child_ind[i_child]; l_els[child_ind[i_child]].el = el->child[i_child]; l_els[child_ind[i_child]].parent = current_el; } *index += 2; /* Now recurse to the two children. */ fill_logical_el_rec_1d(l_els, el->child[0], child_ind[0], index); fill_logical_el_rec_1d(l_els, el->child[1], child_ind[1], index); } return; } /****************************************************************************/ /* fill_connectivity_rec_1d(l_els, current_el, v_index): */ /* This routine is the workhorse for filling a LOGICAL_EL array. It sets */ /* vertex and neighbour indices on the children of "current_el". */ /* In 1D this is possible by a simple mesh recursion of "PRE_ORDER" type. */ /****************************************************************************/ static void fill_connectivity_rec_1d(LOGICAL_EL_1D *l_els, int current_el, int *v_index) { /* FUNCNAME("fill_connectivity_rec_1d"); */ int i_child, child_ind[2], neigh; int i, neigh_child[2]; if(l_els[current_el].child[0] > -1) { for(i_child = 0; i_child < 2; i_child++) child_ind[i_child] = l_els[current_el].child[i_child]; /* Fill vertex information. Two vertices are handed down from parents. */ l_els[child_ind[0]].vertex[0] = l_els[current_el].vertex[0]; l_els[child_ind[1]].vertex[1] = l_els[current_el].vertex[1]; /* One vertex is allocated where the two children of "current_el" meet. */ l_els[child_ind[0]].vertex[1] = l_els[child_ind[1]].vertex[0] = *v_index; *v_index += 1; /* Set neighbourhood information among children of "current_el". */ l_els[child_ind[0]].neigh[0] = child_ind[1]; l_els[child_ind[1]].neigh[1] = child_ind[0]; /* Now spread neighbourhood info to the direct neighbours. */ for(i = 0; i < N_NEIGH_1D; i++) { neigh = l_els[current_el].neigh[i]; if(neigh > -1) { if(l_els[neigh].child[0] > -1) { neigh_child[0] = l_els[neigh].child[0]; neigh_child[1] = l_els[neigh].child[1]; l_els[child_ind[1-i]].neigh[i] = neigh_child[i]; l_els[neigh_child[i]].neigh[1-i] = child_ind[1-i]; } else l_els[child_ind[1-i]].neigh[i] = neigh; } } /* Now recurse to the two children. */ fill_connectivity_rec_1d(l_els, child_ind[0], v_index); fill_connectivity_rec_1d(l_els, child_ind[1], v_index); } return; } /****************************************************************************/ /* fill_logical_els_1d(mesh, n_elements, n_vertices): */ /* Return a filled array of LOGICAL_EL_1D elements corresponding to the */ /* current state of the mesh refinement tree. */ /****************************************************************************/ static LOGICAL_EL_1D *fill_logical_els_1d(MESH *mesh, int *n_elements, int *n_vertices) { FUNCNAME("fill_logical_els_1d"); REAL_D *coords = ((MESH_MEM_INFO *)mesh->mem_info)->coords; int i, j, n_els = mesh->n_hier_elements; LOGICAL_EL_1D *l_els = nil; int index, v_index = 0; MACRO_EL *mel; l_els = MEM_ALLOC(n_els, LOGICAL_EL_1D); /* Initialize everything, set neigbour and vertex information on macro */ /* elements. Make use of the fact that macro coordinates are stored in a */ /* simple linear array to get vertices! */ for(i = 0; i < n_els; i++) { l_els[i].parent = -1; l_els[i].child[0] = -1; l_els[i].child[1] = -1; if(i < mesh->n_macro_el) { mel = mesh->macro_els + i; for(j = 0; j < N_NEIGH_1D; j++) if(mel->neigh[j]) l_els[i].neigh[j] = mel->neigh[j]->index; else l_els[i].neigh[j] = -1; for(j = 0; j < N_VERTICES_1D; j++) l_els[i].vertex[j] = (REAL_D *)(mel->coord[j]) - coords; l_els[i].el = mel->el; } else { for(j = 0; j < N_NEIGH_1D; j++) l_els[i].neigh[j] = -1; for(j = 0; j < N_VERTICES_1D; j++) l_els[i].vertex[j] = -1; } } index = mesh->n_macro_el; v_index = ((MESH_MEM_INFO *)mesh->mem_info)->count; /* Now we fill basic information about all mesh elements. */ for(i = 0; i < mesh->n_macro_el; i++) fill_logical_el_rec_1d(l_els, mesh->macro_els[i].el, i, &index); /* Connectivity and vertex/edge indices are built in a "PRE_ORDER" style */ /* mesh traversal recursion. */ for(i = 0; i < mesh->n_macro_el; i++) fill_connectivity_rec_1d(l_els, i, &v_index); #if ALBERTA_DEBUG == 1 /* Do a quick and cheap check. For more checks please call check_mesh(). */ for(i = 0; i < index; i++) { for(j = 0; j < N_VERTICES_1D; j++) TEST_EXIT(l_els[i].vertex[j] > -1, "Error while checking element %d, vertex %d==-1!\n", i, j); } #endif *n_elements = index; *n_vertices = v_index; return l_els; } /****************************************************************************/ /* adjust_dofs_and_dof_ptrs_1d(mesh, new_admin, old_n_node_el, */ /* old_n_dof, old_node): */ /* 1) If el->dof pointers have changed, adjust these. Keep old information! */ /* 2) Determine what types of new DOF pointers must be allocated. */ /* 3) Build an index based mesh representation using fill_logical_els() */ /* 4) Change all DOFs on the leaf level. (non-coarse DOFs!) */ /* 5) Change all coarse DOFs on non-leaf elements. */ /****************************************************************************/ static void adjust_dofs_and_dof_ptrs_1d(MESH *mesh, DOF_ADMIN *new_admin, int old_n_node_el, int *old_n_dof, int *old_node) { FUNCNAME("adjust_dofs_and_dof_ptrs_1d"); DOF **old_dof_ptr; int i, n, n_elements = 0, n_hier_elements, n_vertices, node; int change_v_d = 0, change_c_d = 0; EL *el; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info = nil; LOGICAL_EL_1D *l_els = nil; DOF **new_vertex_dofs = nil; /* Adjust the length of el->dof pointer fields. Allocate new ones if */ /* necessary and transfer old information. */ if(mesh->n_node_el > old_n_node_el) { el_info = traverse_first(stack, mesh, -1, CALL_EVERY_EL_PREORDER); while(el_info) { el = el_info->el; old_dof_ptr = el->dof; el->dof = get_dof_ptrs(mesh); if(old_n_dof[VERTEX]) for(i = 0; i < N_VERTICES_1D; i++) el->dof[mesh->node[VERTEX] + i] = old_dof_ptr[old_node[VERTEX] + i]; if(old_n_dof[CENTER]) el->dof[mesh->node[CENTER]] = old_dof_ptr[old_node[CENTER]]; el_info = traverse_next(stack, el_info); } } /* Determine which DOF types have changed on the mesh with the new admin. */ if(mesh->n_dof[VERTEX] > old_n_dof[VERTEX]) change_v_d = 1; if(mesh->n_dof[CENTER] > old_n_dof[CENTER]) change_c_d = 1; /* Build an array containing an index based mesh representation. */ l_els = fill_logical_els_1d(mesh, &n_hier_elements, &n_vertices); /* Allocate an array containing new DOF pointers. We make use of the */ /* index based mesh representation to ensure the correct setting. */ if(change_v_d) new_vertex_dofs = MEM_CALLOC(n_vertices, DOF *); /* Change all DOFs on all elements of the mesh. */ for(n = 0; n < n_hier_elements; n++) { el = l_els[n].el; if(!el->child[0]) n_elements++; if(change_v_d) { node = mesh->node[VERTEX]; for(i = 0; i < N_VERTICES_1D; i++) { if(!new_vertex_dofs[l_els[n].vertex[i]]) new_vertex_dofs[l_els[n].vertex[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], VERTEX, false); el->dof[node + i] = new_vertex_dofs[l_els[n].vertex[i]]; } } if(change_c_d) { node = mesh->node[CENTER]; if(!el->child[0]) el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, false); else el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, true); } } /* A few checks and settings. */ TEST_EXIT(n_elements == mesh->n_elements, "Did not count correct number of leaf elements in mesh!\n"); if(mesh->n_vertices > -1) { TEST_EXIT(n_vertices == mesh->n_vertices, "Did not count correct number of vertices in mesh!\n"); } else mesh->n_vertices = n_vertices; /* Clean up operations. */ if(new_vertex_dofs) MEM_FREE(new_vertex_dofs, n_vertices, DOF *); if(l_els) MEM_FREE(l_els, n_hier_elements, LOGICAL_EL_1D); free_traverse_stack(stack); return; } /****************************************************************************/ /* fill_missing_dofs_1d(mesh): See master routine in memory.c. */ /****************************************************************************/ static void fill_missing_dofs_1d(MESH *mesh) { /* FUNCNAME("fill_missing_dofs_1d"); */ int n, n_elements, n_vertices, node; EL *el; LOGICAL_EL_1D *l_els = nil; if(!mesh->n_dof[CENTER]) return; l_els = fill_logical_els_1d(mesh, &n_elements, &n_vertices); /* All new DOFs are set to -1 (unused) by transfer_dofs(). */ for(n = 0; n < n_elements; n++) { el = l_els[n].el; if(mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; if(!el->dof[node]) el->dof[node] = transfer_dofs(mesh, nil, el->dof[node], CENTER, false); } } /* Clean up operations. */ MEM_FREE(l_els, n_elements, LOGICAL_EL_1D); return; } alberta-2.0.1/alberta/src/1d/parametric_1d.c0000644000042300001440000004475210676724251015447 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: parametric_1d.c */ /* */ /* */ /* description: Support for parametric elements in 1D */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ static const REAL_B mid_lambda_1d = { 0.5, 0.5 }; static const REAL_B vertex_bary_1d[] = { { 1.0, 0.0 }, { 0.0, 1.0 } }; /*--------------------------------------------------------------------------*/ /* Functions for affine elements as parametric elements. (suffix 1_1d) */ /*--------------------------------------------------------------------------*/ static void det1_1d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL dets[]) { REAL_D *local_coords = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data)->local_coords; REAL det; int n; det = DIST_DOW(local_coords[0], local_coords[1]); if (quad) N = quad->n_points; for (n = 0; n < N; n++) dets[n] = det; return; } static void grd_lambda1_1d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D grd_lam[][N_LAMBDA], REAL dets[]) { /* FUNCNAME("grd_lambda1_1d"); */ REAL_D *local_coords = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data)->local_coords; int i, j, n; REAL det2; REAL_D grd_lambda[N_LAMBDA]; det2 = DST2_DOW(local_coords[0], local_coords[1]); for (i = 0; i < DIM_OF_WORLD; i++) { grd_lambda[0][i] = (local_coords[0][i] - local_coords[1][i]) / det2; grd_lambda[1][i] = - grd_lambda[0][i]; } if (quad) N = quad->n_points; dets[0] = sqrt(det2); for (n = 0; n < N; n++) { for (i = 0; i <= 1; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lam[n][i][j] = grd_lambda[i][j]; dets[n] = dets[0]; } return; } /****************************************************************************/ /* fill_coords1_1d(data): initialize the DOF_REAL_D_VEC coords containing */ /* the position data of the parametric elements (coordinates of vertices in */ /* this case). */ /****************************************************************************/ static void fill_coords1_1d(LAGRANGE_PARAM_DATA *data) { DOF_REAL_D_VEC *coords = data->coords; DOF_UCHAR_VEC *touched_coords = data->touched_coords; NODE_PROJECTION *n_proj = data->n_proj, *active_proj; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; int i, n; get_dof = coords->fe_space->bas_fcts->get_dof_indices; admin = coords->fe_space->admin; el_info = traverse_first(stack, coords->fe_space->mesh, -1, fill_flag); while (el_info) { const DOF *dof = (*get_dof)(el_info->el, admin, nil); REAL *vec; for (i = 0; i < N_VERTICES_1D; i++) { vec = coords->vec[dof[i]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = el_info->coord[i][n]; /* Look for a projection function that applies to vertex[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[i]] = 0; if(n_proj && (n_proj->func)) { active_proj = el_info->projections[0]; if(active_proj == n_proj) { n_proj->func(vec, el_info, vertex_bary_1d[i]); if(touched_coords) touched_coords->vec[dof[i]] = 1; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } /****************************************************************************/ /* refine_interpol1_1d(drdv,list,n): update coords vector during refinement.*/ /****************************************************************************/ static void refine_interpol1_1d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("refine_interpol1_1d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; NODE_PROJECTION *n_proj = ((LAGRANGE_PARAM_DATA *)drdv->fe_space->mesh->parametric->data)->n_proj; int n0, j; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* left point of refinement elem. */ dof1 = el->dof[1][n0]; /* right point */ dof_new = el->child[0]->dof[1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) vec[dof_new][j] = 0.5*(vec[dof0][j] + vec[dof1][j]); if((list->el_info.active_projection == n_proj) && n_proj->func) (n_proj->func)(vec[dof_new], &list->el_info, mid_lambda_1d); return; } /*--------------------------------------------------------------------------*/ /* Common functions for higher order elements. (suffix y_1d) */ /*--------------------------------------------------------------------------*/ #define N_BAS4_1D 5 typedef struct DD_data_1d DD_DATA_1D; struct DD_data_1d { const QUAD *quad; int n_bas_fcts; REAL (*DD)[N_BAS4_1D]; DD_DATA_1D *next; }; static DD_DATA_1D *init_dd_data_1d(const QUAD *quad, const BAS_FCTS *bas_fcts) { FUNCNAME("init_dd_data_1d"); static DD_DATA_1D *first_dd_data = nil; DD_DATA_1D *data; int iq, i; const REAL *grd; DEBUG_TEST_EXIT(bas_fcts->n_bas_fcts <= N_BAS4_1D, "Sorry, only up to 5 local DOFs at the moment.\n"); for (data = first_dd_data; data; data = data->next) if (data->quad == quad) break; if (data) return(data); data = MEM_ALLOC(1, DD_DATA_1D); data->quad = quad; data->n_bas_fcts = bas_fcts->n_bas_fcts; data->next = first_dd_data; first_dd_data = data; data->DD = (REAL (*)[N_BAS4_1D])alberta_alloc(quad->n_points*sizeof(REAL [N_BAS4_1D]), funcName, __FILE__, __LINE__); for (iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < bas_fcts->n_bas_fcts; i++) { grd = (*bas_fcts->grd_phi[i])(quad->lambda[iq]); data->DD[iq][i] = grd[1] - grd[0]; } } return(data); } /*--------------------------------------------------------------------------*/ /*--- compute D^t and D^t D, return det(D^t D) ---*/ /*--------------------------------------------------------------------------*/ static REAL Dt_and_DtD_1d(REAL_D *F, REAL *DD, int n_bas, REAL_D Dt) { FUNCNAME("Dt_and_DtD_1d"); int i, n; REAL val; for (n = 0; n < DIM_OF_WORLD; n++) { for (Dt[n] = i = 0; i < n_bas; i++) Dt[n] += F[i][n]*DD[i]; } val = NRM2_DOW(Dt); if (val < 0.0) { WARNING("val = %e\n", val); for (i = 0; i < n_bas; i++) PRINT_REAL_VEC("F", F[i], DIM_OF_WORLD); WAIT_REALLY; } return(val); } static void dety_1d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL dets[]) { /* FUNCNAME("dety_1d"); */ REAL_D Dt; int iq; const BAS_FCTS *bas_fcts; LAGRANGE_PARAM_DATA *data = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data); REAL_D *local_coords = data->local_coords; /* First of all, check if we are on a parametric simplex. */ /* If not, treat this simplex as an affine simplex, even though some */ /* higher order vertices might be shifted. */ if(data->i_am_affine) { det1_1d(el_info, quad, N, lambda, dets); return; } if (quad) { static DD_DATA_1D *dd_data = nil; if (!dd_data || dd_data->quad != quad) { bas_fcts = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data) ->coords->fe_space->bas_fcts; dd_data = init_dd_data_1d(quad, bas_fcts); } for (iq = 0; iq < quad->n_points; iq++) dets[iq] = sqrt(Dt_and_DtD_1d(local_coords, dd_data->DD[iq], dd_data->n_bas_fcts, Dt)); } else { REAL DD[N_BAS4_1D]; const REAL *grd; int i, n_bas; bas_fcts = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data) ->coords->fe_space->bas_fcts; n_bas = bas_fcts->n_bas_fcts; for (iq = 0; iq < N; iq++) { for (i = 0; i < n_bas; i++) { grd = (*bas_fcts->grd_phi[i])(lambda[iq]); DD[i] = grd[1] - grd[0]; } dets[iq] = sqrt(Dt_and_DtD_1d(local_coords, DD, n_bas, Dt)); } } return; } static REAL Lambda_iq_1d(REAL_D *const F, REAL *DD, int n_bas, REAL_D Lambda[N_LAMBDA]) { REAL Dt[DIM_OF_WORLD]; REAL DFS_1[DIM_OF_WORLD]; REAL det, det_1; int n; det = Dt_and_DtD_1d(F, DD, n_bas, Dt); det_1 = 1.0/det; /*--------------------------------------------------------------------------*/ /*--- compute DF_S^{-1} = D^t D^{-1} D^t ---*/ /*--------------------------------------------------------------------------*/ for (n = 0; n < DIM_OF_WORLD; n++) DFS_1[n] = det_1*Dt[n]; /*--------------------------------------------------------------------------*/ /*--- finally, \Lambda = \hat\Lambda DF_S^{-1} ---*/ /*--------------------------------------------------------------------------*/ for (n = 0; n < DIM_OF_WORLD; n++) { Lambda[0][n] = -DFS_1[n]; Lambda[1][n] = DFS_1[n]; } return(sqrt(det)); } static void grd_lambday_1d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D Lambda[][N_LAMBDA], REAL dets[]) { /* FUNCNAME("grd_lambday"); */ int iq; const BAS_FCTS *bas_fcts; LAGRANGE_PARAM_DATA *data = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data); REAL_D *local_coords = data->local_coords; /* First of all, check if we are on a parametric simplex. */ /* If not, treat this simplex as an affine simplex, even though some */ /* higher order vertices might be shifted. */ if(data->i_am_affine) { grd_lambda1_1d(el_info,quad, N, lambda, Lambda, dets); return; } if (quad) { static DD_DATA_1D *dd_data = nil; if (!dd_data || dd_data->quad != quad) { bas_fcts = data->coords->fe_space->bas_fcts; dd_data = init_dd_data_1d(quad, bas_fcts); } for (iq = 0; iq < quad->n_points; iq++) dets[iq] = Lambda_iq_1d(local_coords, dd_data->DD[iq], dd_data->n_bas_fcts, Lambda[iq]); } else { REAL DD[N_BAS4_1D]; const REAL *grd; int i, n_bas; bas_fcts = data->coords->fe_space->bas_fcts; n_bas = bas_fcts->n_bas_fcts; for (iq = 0; iq < N; iq++) { for (i = 0; i < n_bas; i++) { grd = (*bas_fcts->grd_phi[i])(lambda[iq]); DD[i] = grd[1] - grd[0]; } dets[iq] = Lambda_iq_1d(local_coords, DD, n_bas, Lambda[iq]); } } return; } /*--------------------------------------------------------------------------*/ /* Functions for quadratic elements. (suffix 2_1d) */ /*--------------------------------------------------------------------------*/ static void refine_interpol2_1d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n_neigh) { /* FUNCNAME("refine_interpol2_1d"); */ EL *el; const DOF *cdof; DOF pdof; const REAL_D *pvec; int n, not_all; const BAS_FCTS *bas_fcts = drdv->fe_space->bas_fcts; const DOF_ADMIN *admin = drdv->fe_space->admin; NODE_PROJECTION *n_proj; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)list->el_info.mesh->parametric->data; DOF_UCHAR_VEC *touched_coords = data->touched_coords; REAL_D *vec = drdv->vec; static const REAL_B child_mid_lambda[] = { { 0.75, 0.25 }, { 0.25, 0.75 } }; el = list->el_info.el; pvec = bas_fcts->get_real_d_vec(el, drdv, nil); pdof = el->dof[drdv->fe_space->mesh->node[CENTER]] [drdv->fe_space->admin->n0_dof[CENTER]]; n_proj = data->n_proj; not_all = drdv->fe_space->mesh->parametric->not_all; /****************************************************************************/ /* DOFs on first child */ /****************************************************************************/ cdof = bas_fcts->get_dof_indices(el->child[0], admin, nil); if(not_all < 2) for (n = 0; n < DIM_OF_WORLD; n++) { vec[cdof[1]][n] = pvec[2][n]; vec[cdof[2]][n] =(0.375*pvec[0][n] - 0.125*pvec[1][n] + 0.75*pvec[2][n]); } else for (n = 0; n < DIM_OF_WORLD; n++) { vec[cdof[1]][n] = pvec[2][n]; vec[cdof[2]][n] = 0.5 * (pvec[0][n] + pvec[2][n]); } if(touched_coords) { touched_coords->vec[cdof[1]] = touched_coords->vec[pdof]; touched_coords->vec[cdof[2]] = 0; } if(n_proj && n_proj->func && (list->el_info.active_projection == n_proj)) { (n_proj->func)(vec[cdof[2]], &list->el_info, child_mid_lambda[0]); if(touched_coords) touched_coords->vec[cdof[2]] = 1; } /****************************************************************************/ /* DOF on second child */ /****************************************************************************/ cdof = (*bas_fcts->get_dof_indices)(el->child[1], admin, nil); if(not_all < 2) for (n = 0; n < DIM_OF_WORLD; n++) vec[cdof[2]][n] =(-0.125*pvec[0][n]+ 0.375*pvec[1][n] + 0.75*pvec[2][n]); else for (n = 0; n < DIM_OF_WORLD; n++) vec[cdof[2]][n] = 0.5 * (pvec[1][n]+ pvec[2][n]); if(touched_coords) touched_coords->vec[cdof[2]] = 0; if(n_proj && n_proj->func && (list->el_info.active_projection == n_proj)) { (n_proj->func)(vec[cdof[2]], &list->el_info, child_mid_lambda[1]); if(touched_coords) touched_coords->vec[cdof[2]] = 1; } return; } static void coarse_interpol2_1d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("coarse_interpol2_1d"); EL *el; REAL_D *vec = nil; int node_v, node_c, n0_v, n0_c, j; DOF cdof, pdof; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)list->el_info.mesh->parametric->data; DOF_UCHAR_VEC *touched_coords = data->touched_coords; if (n < 1) return; GET_DOF_VEC(vec, drdv); el = list->el_info.el; node_v = drdv->fe_space->mesh->node[VERTEX]; node_c = drdv->fe_space->mesh->node[CENTER]; n0_v = drdv->fe_space->admin->n0_dof[VERTEX]; n0_c = drdv->fe_space->admin->n0_dof[CENTER]; /****************************************************************************/ /* copy values at refinement vertex to the parent center DOF. */ /****************************************************************************/ cdof = el->child[0]->dof[node_v+1][n0_v]; /* newest vertex is dim */ pdof = el->dof[node_c][n0_c]; for (j = 0; j < DIM_OF_WORLD; j++) vec[pdof][j] = vec[cdof][j]; if(touched_coords) touched_coords->vec[pdof] = touched_coords->vec[cdof]; return; } static void fill_coords2_1d(LAGRANGE_PARAM_DATA *data) { DOF_REAL_D_VEC *coords = data->coords; DOF_UCHAR_VEC *touched_coords = data->touched_coords; NODE_PROJECTION *n_proj = data->n_proj, *active_proj; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; int i, n; get_dof = coords->fe_space->bas_fcts->get_dof_indices; admin = coords->fe_space->admin; el_info = traverse_first(stack, coords->fe_space->mesh, -1, fill_flag); while (el_info) { const DOF *dof = (*get_dof)(el_info->el, admin, nil); REAL *vec; /* Fill the two vertices. */ for (i = 0; i < N_VERTICES_1D; i++) { vec = coords->vec[dof[i]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = el_info->coord[i][n]; /* Look for a projection function that applies to vertex[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[i]] = 0; if(n_proj && (n_proj->func)) { active_proj = el_info->active_projection; if(active_proj == n_proj) { (n_proj->func)(vec, el_info, vertex_bary_1d[i]); if(touched_coords) touched_coords->vec[dof[i]] = 1; } } } /* Fill the midpoint. */ vec = coords->vec[dof[2]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = 0.5 * (el_info->coord[0][n] + el_info->coord[1][n]); if(touched_coords) touched_coords->vec[dof[2]] = 0; if(n_proj && (n_proj->func)) { active_proj = el_info->active_projection; if(active_proj == n_proj) { (n_proj->func)(vec, el_info, mid_lambda_1d); if(touched_coords) touched_coords->vec[dof[2]] = 1; } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } static PARAMETRIC lagrange_parametric1_1d = {"1D Lagrange parametric elements of degree 1", param_init_element, param_coord_to_world, nil, det1_1d, grd_lambda1_1d, false, false, nil}; static PARAMETRIC lagrange_parametric2_1d = {"1D Lagrange parametric elements of degree 2", param_init_element, param_coord_to_world, nil, dety_1d, grd_lambday_1d, false, false, nil}; alberta-2.0.1/alberta/src/1d/refine_1d.c0000644000042300001440000001534310676724251014562 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: refine_1d.c */ /* */ /* description: recursive refinement of 1 dim. hierarchical meshes; */ /* implementation of the newest vertex bisection */ /* file contains all routines depending on DIM == 1; */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* AI_refine_fct_1d: bisects a single element into child[0] and child[1] */ /* WARNING: This function is called directly from submesh.c! */ /*--------------------------------------------------------------------------*/ void AI_refine_fct_1d(const EL_INFO *el_info, void *data) { MESH *mesh = el_info->mesh; EL *el = el_info->el, *child[2]; if (el->mark <= 0) return; child[0] = get_element(mesh); child[1] = get_element(mesh); child[0]->mark = child[1]->mark = MAX(0, el->mark-1); el->mark = 0; /*--------------------------------------------------------------------------*/ /* transfer hidden data from parent to children */ /*--------------------------------------------------------------------------*/ if (el->child[1] && ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->refine_leaf_data) ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->refine_leaf_data(el, child); AI_free_leaf_data((void *) el->child[1], mesh); el->child[0] = child[0]; el->child[1] = child[1]; if (child[0]->mark > 0) do_more_refine_1d = true; if(mesh->n_dof[VERTEX]) { child[0]->dof[1] = child[1]->dof[0] = get_dof(mesh, VERTEX); /*--------------------------------------------------------------------------*/ /* the other vertices are handed on from the parent */ /*--------------------------------------------------------------------------*/ child[0]->dof[0] = el->dof[0]; child[1]->dof[1] = el->dof[1]; } /*--------------------------------------------------------------------------*/ /* there is one more leaf element, two hierachical elements, */ /* one more vertex */ /*--------------------------------------------------------------------------*/ mesh->n_elements++; mesh->n_vertices++; mesh->n_hier_elements += 2; if (mesh->n_dof[CENTER]) { /*--------------------------------------------------------------------------*/ /* there are dofs at the barycenter of the triangles */ /*--------------------------------------------------------------------------*/ child[0]->dof[mesh->node[CENTER]] = get_dof(mesh, CENTER); child[1]->dof[mesh->node[CENTER]] = get_dof(mesh, CENTER); } /*--------------------------------------------------------------------------*/ /* if there are functions to interpolate data to the finer grid, do so */ /*--------------------------------------------------------------------------*/ if (call_refine_interpol_1d) { RC_LIST_EL ref_list[1] = {{{0}}}; ref_list->el_info = *el_info; refine_interpol(mesh, ref_list, 1); } if (mesh->n_dof[CENTER]) free_dof(el->dof[mesh->node[CENTER]], mesh, CENTER, true); return; } /*--------------------------------------------------------------------------*/ /* AI_post_refine_1d(mesh): Projects all new vertices with user supplied */ /* projection routines. Also called from submesh_2d.c */ /*--------------------------------------------------------------------------*/ static void new_coords_fct_1d(const EL_INFO *el_info, void *data) { EL *el = el_info->el; int j; static const REAL_B mid_lambda = { 0.5, 0.5 }; if (el->child[0] && el_info->active_projection && el_info->active_projection->func && (el->new_coord == nil)) { el->new_coord = get_real_d(el_info->mesh); for (j = 0; j < DIM_OF_WORLD; j++) el->new_coord[j] = (el_info->coord[0][j] + el_info->coord[1][j])*0.5; el_info->active_projection->func(el->new_coord, el_info, mid_lambda); } return; } void AI_post_refine_1d(MESH *mesh) { FLAGS fill_flag = CALL_EVERY_EL_PREORDER|FILL_PROJECTION|FILL_COORDS; mesh_traverse(mesh, -1, fill_flag, new_coords_fct_1d, nil); return; } static U_CHAR refine_1d(MESH *mesh) { int n_elements = mesh->n_elements; FLAGS fill_flag = CALL_LEAF_EL; if(mesh->parametric) fill_flag |= FILL_PROJECTION; call_refine_interpol_1d = count_refine_interpol(mesh); do_more_refine_1d = true; while (do_more_refine_1d) { do_more_refine_1d = false; mesh_traverse(mesh, -1, fill_flag, AI_refine_fct_1d, nil); } n_elements = mesh->n_elements - n_elements; return(n_elements ? MESH_REFINED : 0); } alberta-2.0.1/alberta/src/1d/submesh_1d.c0000644000042300001440000003637510676724251014770 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: submesh_1d.c */ /* */ /* */ /* description: Support for master/slave meshes for master->dim == 1 */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* master interpolation/restriction routines. */ /* These call the corresponding refinement/coarsening routines for the slave*/ /* mesh patchwise. */ /****************************************************************************/ static void master_interpol_1d(DOF_PTR_VEC *m_dpv, RC_LIST_EL *rclist, int mn) { FUNCNAME("master_interpol_1d"); MESH_MEM_INFO *m_mem_info = (MESH_MEM_INFO *)m_dpv->fe_space->admin->mesh->mem_info; int m_n0 = m_dpv->fe_space->admin->n0_dof[VERTEX]; int m_n = m_dpv->fe_space->admin->mesh->node[VERTEX]; EL *m_el, *s_el; EL *m_child[2]; int s_n0, s_n, j, n_slaves = m_mem_info->n_slaves; MESH *slave = nil; DOF_PTR_VEC *s_dpv; /****************************************************************************/ /* Retrieve the slave mesh. Rather unelegant, sorry... */ /****************************************************************************/ for (j = 0; j < n_slaves; j++) { slave = m_mem_info->slaves[j]; if(((MESH_MEM_INFO *)slave->mem_info)->slave_binding == m_dpv) break; } DEBUG_TEST_EXIT(j < n_slaves, "Slave mesh not found!\n"); s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; /****************************************************************************/ /* Check if any vertices belong to slave elements. All necessary DOFs are */ /* set. New DOFs are set to nil, if they should not point to anything. THIS */ /* IS NOT JUST A SECURITY MEASURE - IT IS ABSOLUTELY NECESSARY! At the */ /* moment, new entries in a DOF vector can not be guaranteed to be clean. */ /****************************************************************************/ m_el = rclist->el_info.el; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; /****************************************************************************/ /* DOF pointers of the master child elements at the new vertex are */ /* set to nil. */ /****************************************************************************/ m_dpv->vec[m_child[0]->dof[m_n+1][m_n0]] = nil; m_dpv->vec[m_child[1]->dof[m_n+0][m_n0]] = nil; for(j = 0; j < N_VERTICES_1D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { m_dpv->vec[m_child[j]->dof[m_n+j][m_n0]] = s_el; s_dpv->vec[s_el->dof[s_n][s_n0]] = m_child[j]; } /****************************************************************************/ /* If there is no slave element on this refinement edge, zero the master */ /* child pointers. */ /****************************************************************************/ else if (s_el) m_dpv->vec[m_child[j]->dof[m_n+j][m_n0]] = nil; } /****************************************************************************/ /* NOTE TO MAINTAINERS: Here might be the correct place to set "newcoords" */ /* entries on the slave element. */ /****************************************************************************/ return; } static void master_restrict_1d(DOF_PTR_VEC *m_dpv, RC_LIST_EL *rclist, int mn) { FUNCNAME("master_restrict_1d"); MESH_MEM_INFO *m_mem_info = (MESH_MEM_INFO *) m_dpv->fe_space->admin->mesh->mem_info; int m_n0 = m_dpv->fe_space->admin->n0_dof[VERTEX]; int m_n = m_dpv->fe_space->admin->mesh->node[VERTEX]; EL *m_el, *s_el, *cm_el;; EL *m_child[2]; int s_n0, s_n, j, n_slaves = m_mem_info->n_slaves; MESH *slave = nil; DOF_PTR_VEC *s_dpv; /****************************************************************************/ /* Retrieve the slave mesh. Rather unelegant, sorry... */ /****************************************************************************/ for (j = 0; j < n_slaves; j++) { slave = m_mem_info->slaves[j]; if(((MESH_MEM_INFO *)slave->mem_info)->slave_binding == m_dpv) break; } DEBUG_TEST_EXIT(j < n_slaves, "Slave mesh not found!\n"); s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; /****************************************************************************/ /* Check if any edges belong to slave elements. */ /****************************************************************************/ m_el = rclist->el_info.el; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; for(j = 0; j < N_VERTICES_1D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el) { cm_el = (EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]; if (cm_el==m_child[0] || cm_el==m_child[1] || cm_el==m_el) /****************************************************************************/ /* Set the slave pointer to point to the parent master element. */ /****************************************************************************/ s_dpv->vec[s_el->dof[s_n][s_n0]] = m_el; } } return; } static void join_elements_recursive_1d(const MESH *master, const MESH *slave, const DOF_ADMIN *m_admin, const DOF_ADMIN *s_admin, const DOF_PTR_VEC *m_dpv, const DOF_PTR_VEC *s_dpv, const int subsimplex, const EL *m_el, const EL *s_el) { /* FUNCNAME("join_elements_recursive_1d"); */ s_dpv->vec[s_el->dof[slave->node[CENTER]] [s_admin->n0_dof[CENTER]]] = (void *)m_el; m_dpv->vec[m_el->dof[master->node[VERTEX] + subsimplex] [m_admin->n0_dof[VERTEX]]] = (void *)s_el; if(m_el->child[0]) { if (subsimplex == 0) /* Elements in 0D do not have children. We therefore simply pass */ /* the pointers on to master children. */ join_elements_recursive_1d(master, slave, m_admin, s_admin, m_dpv, s_dpv, 0, m_el->child[0], s_el); else join_elements_recursive_1d(master, slave, m_admin, s_admin, m_dpv, s_dpv, 1, m_el->child[1], s_el); } return; } /****************************************************************************/ /* get_submesh_1d(master, name, binding_method): returns a 0D submesh of */ /* master based on the information given by the user routine */ /* binding_method(). */ /****************************************************************************/ static MESH *get_submesh_1d(MESH *master, const char *name, int (*binding_method) (MESH *master, MACRO_EL *el, int face, void *data), void *data) { FUNCNAME("get_submesh_1d"); MACRO_DATA s_data = {}; MESH_MEM_INFO *s_info, *m_info; MESH *slave = nil; const FE_SPACE *slave_space, *master_space; DOF_PTR_VEC *slave_to_master_binding; DOF_PTR_VEC *master_to_slave_binding; int s_n_dof[N_NODE_TYPES] = {}, m_n_dof[N_NODE_TYPES] = {}; MACRO_EL *m_mel, *s_mel; const DOF_ADMIN *m_admin, *s_admin; int i, k, n, ne = 0, nv = 0, *vert_ind = nil, index; char new_name[1024]; m_info = ((MESH_MEM_INFO *)master->mem_info); /****************************************************************************/ /* Count all needed vertices and elements. */ /****************************************************************************/ s_data.dim = 0; s_data.coords = MEM_ALLOC(master->n_vertices, REAL_D); /* resized later! */ vert_ind = MEM_ALLOC(master->n_vertices, int); for(i = 0; i < master->n_vertices; i++) vert_ind[i] = -1; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_VERTICES_1D; i++) if(binding_method(master, m_mel, i, data)) { ne++; /* Make use of the slave->mem_info->coords vector to get vertex indices. */ index = (m_mel->coord[i] - m_info->coords[0]) / DIM_OF_WORLD; if (vert_ind[index] < 0) { vert_ind[index] = nv; for(k = 0; k < DIM_OF_WORLD; k++) s_data.coords[nv][k] = m_info->coords[index][k]; nv++; } } } /****************************************************************************/ /* Allocate the needed amount of macro elements and coordinates. */ /* Fill element and coordinate information. Boundary info is irrelevant in */ /* the 0D slave case. */ /****************************************************************************/ TEST_EXIT(nv,"Bad mesh: no vertices counted!\n"); TEST_EXIT(ne,"Bad mesh: no elements counted!\n"); s_data.n_total_vertices = nv; s_data.n_macro_elements = ne; s_data.coords = MEM_REALLOC(s_data.coords, master->n_vertices, nv, REAL_D); s_data.mel_vertices = MEM_ALLOC(ne, int); ne = 0; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_VERTICES_1D; i++) if(binding_method(master, m_mel, i, data)) { index = (m_mel->coord[i] - m_info->coords[0]) / DIM_OF_WORLD; nv = vert_ind[index]; s_data.mel_vertices[ne] = nv; ne++; } } /****************************************************************************/ /* Allocate a submesh. */ /****************************************************************************/ if(!name) { static int count_1d = 1; sprintf(new_name, "Submesh %d of %s", count_1d, master->name); name = new_name; count_1d++; } slave = GET_MESH(0, name, &s_data, nil); /****************************************************************************/ /* Clean up. */ /****************************************************************************/ nv = s_data.n_total_vertices; ne = s_data.n_macro_elements; MEM_FREE(s_data.coords, nv, REAL_D); MEM_FREE(s_data.mel_vertices, ne, int); MEM_FREE(vert_ind, master->n_vertices, int); /****************************************************************************/ /* Allocate special FE spaces for the slave. */ /****************************************************************************/ s_n_dof[CENTER] = 1; slave_space = get_fe_space(slave, "Center dof fe_space", s_n_dof, nil, 1); slave_to_master_binding = get_dof_ptr_vec("Slave - master pointers", slave_space); /****************************************************************************/ /* Allocate special FE spaces for master. */ /****************************************************************************/ m_n_dof[VERTEX] = 1; master_space = get_fe_space(master, "VERTEX dof fe_space", m_n_dof, nil, 1); #if ALBERTA_DEBUG == 1 check_mesh(slave); #endif /****************************************************************************/ /* Allocate special DOF_PTR_VECs for both master and slave. These serve to */ /* help find the corresponding subsimplex to each boundary master simplex */ /* during refinement and vice versa. */ /****************************************************************************/ master_to_slave_binding = get_dof_ptr_vec("Master - slave pointers", master_space); master_to_slave_binding->refine_interpol = master_interpol_1d; master_to_slave_binding->coarse_restrict = master_restrict_1d; /****************************************************************************/ /* Set the special pointers in the MESH_MEM_INFO components of both master */ /* and slave grids. */ /****************************************************************************/ s_info = (MESH_MEM_INFO *)slave->mem_info; s_info->master = master; s_info->binding_method = binding_method; s_info->slave_binding = master_to_slave_binding; s_info->master_binding = slave_to_master_binding; m_info->slaves = MEM_REALLOC(m_info->slaves, m_info->n_slaves, m_info->n_slaves + 1, MESH *); m_info->slaves[m_info->n_slaves] = slave; m_info->n_slaves++; /****************************************************************************/ /* Convert the macro data structure to a mesh. Set the correct DOFs on */ /* master and slave elements. */ /****************************************************************************/ m_admin = master_to_slave_binding->fe_space->admin; s_admin = slave_to_master_binding->fe_space->admin; FOR_ALL_DOFS(m_admin, master_to_slave_binding->vec[dof] = nil); FOR_ALL_DOFS(s_admin, slave_to_master_binding->vec[dof] = nil); s_mel = slave->macro_els; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_VERTICES_1D; i++) if(binding_method(master, m_mel, i, data)) { DEBUG_TEST_EXIT(s_mel, "Ran out of slave macro elements... Wrong meshes?\n"); join_elements_recursive_1d(master, slave, m_admin, s_admin, master_to_slave_binding, slave_to_master_binding, i, m_mel->el, s_mel->el); s_mel++; } } return slave; } alberta-2.0.1/alberta/src/1d/traverse_nr_1d.c0000644000042300001440000001754210676724251015647 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_nr_1d.c */ /* */ /* description: */ /* nonrecursive mesh traversal, 1d routines */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static int coarse_nb_1d[3][2] = {{-2,-2}, {-1,1}, {0,-1}}; /* father.neigh[coarse_nb[i][j]] == child[i-1].neigh[j] */ /*--------------------------------------------------------------------------*/ /* traverse_neighbour_1d: */ /* ------------------- */ /* walk through hierarchy tree and look for a neighbour */ /*--------------------------------------------------------------------------*/ static const EL_INFO *traverse_neighbour_1d(TRAVERSE_STACK *stack, const EL_INFO *elinfo_old, int neighbour) { FUNCNAME("traverse_neighbour_1d"); EL *el, *sav_el; EL_INFO *old_elinfo, *elinfo; int i, nb, opp_vertex; int sav_index, sav_neighbour = neighbour; DEBUG_TEST_EXIT(stack->stack_used > 0, "no current element"); DEBUG_TEST_EXIT(stack->traverse_fill_flag & CALL_LEAF_EL, "invalid traverse_fill_flag=%d", stack->traverse_fill_flag); DEBUG_TEST_EXIT(IS_LEAF_EL(elinfo_old->el), "invalid old elinfo"); DEBUG_TEST_EXIT(elinfo_old == stack->elinfo_stack+stack->stack_used, "invalid old elinfo"); DEBUG_TEST_FLAG(FILL_NEIGH, stack->elinfo_stack+stack->stack_used); el = stack->elinfo_stack[stack->stack_used].el; sav_index = INDEX(el); sav_el = el; /* save information about current element and its position in the tree */ stack->save_traverse_mel = stack->traverse_mel; stack->save_stack_used = stack->stack_used; for (i=0; i<=stack->stack_used; i++) stack->save_info_stack[i] = stack->info_stack[i]; for (i=0; i<=stack->stack_used; i++) stack->save_elinfo_stack[i] = stack->elinfo_stack[i]; old_elinfo = stack->save_elinfo_stack+stack->stack_used; opp_vertex = old_elinfo->opp_vertex[neighbour]; /*--------------------------------------------------------------------------*/ /* First phase: go up in tree until we can go down again. */ /* */ /* During this first phase, nb is the neighbour index which points from an */ /* element of the OLD hierarchy branch to the NEW branch */ /*--------------------------------------------------------------------------*/ nb = neighbour; while (stack->stack_used > 1) { stack->stack_used--; nb = coarse_nb_1d[stack->info_stack[stack->stack_used]][nb]; if (nb == -1) break; DEBUG_TEST_EXIT(nb >= 0, "invalid coarse_nb_1d %d\n",nb); } /*--------------------------------------------------------------------------*/ /* Now, goto neighbouring element at the local hierarchy entry */ /* This is either a macro element neighbour or the other child of parent. */ /* initialize nb for second phase (see below) */ /*--------------------------------------------------------------------------*/ if (nb >= 0) { /* go to macro element neighbour */ i = stack->traverse_mel->opp_vertex[nb]; stack->traverse_mel = stack->traverse_mel->neigh[nb]; if (stack->traverse_mel == nil) return(nil); nb = i; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; } else { /* goto other child */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = 2 - stack->info_stack[stack->stack_used]; stack->info_stack[stack->stack_used] = i+1; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; nb = i; /* different to 2d/3d-case!! */ } /*--------------------------------------------------------------------------*/ /* Second phase: go down in a new hierarchy branch until leaf level. */ /* Now, nb is the neighbour index which points from an element of the */ /* NEW hierarchy branch to the OLD branch. */ /*--------------------------------------------------------------------------*/ elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; while(el->child[0]) { /* go down one level in hierarchy */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); fill_elinfo(1-nb, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->info_stack[stack->stack_used] = 2-nb; stack->stack_used++; elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; } if (elinfo->neigh[opp_vertex] != old_elinfo->el) { MSG(" looking for neighbour %d of element %d at %p\n", neighbour, INDEX(old_elinfo->el), old_elinfo->el); MSG(" originally: neighbour %d of element %d at %p\n", sav_neighbour, sav_index, sav_el); MSG(" got element %d at %p with opp_vertex %d neigh %d\n", INDEX(elinfo->el), elinfo->el, opp_vertex, INDEX(elinfo->neigh[opp_vertex])); DEBUG_TEST_EXIT(elinfo->neigh[opp_vertex] == old_elinfo->el, "didn't succeed !?!?!?"); } if (elinfo->el->child[0]) { MSG(" looking for neighbour %d of element %d at %p\n", neighbour, INDEX(old_elinfo->el), old_elinfo->el); MSG(" originally: neighbour %d of element %d at %p\n", sav_neighbour, sav_index, sav_el); MSG(" got element %d at %p with opp_vertex %d neigh %d\n", INDEX(elinfo->el), elinfo->el, opp_vertex, INDEX(elinfo->neigh[opp_vertex])); MSG("got no leaf element\n"); WAIT_REALLY; } return(elinfo); } alberta-2.0.1/alberta/src/1d/traverse_r_1d.c0000644000042300001440000001573710676724251015475 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_r_1d.c */ /* */ /* description: */ /* recursive mesh traversal - 1d routines: */ /* fill_macro_info_1d(), fill_elinfo_1d() */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* fill_macro_info_1d: */ /* ---------------- */ /* fill EL_INFO structure for a macro element */ /*--------------------------------------------------------------------------*/ static void fill_macro_info_1d(MESH *mesh, const MACRO_EL *mel, EL_INFO *el_info) { FUNCNAME("fill_macro_info_1d"); EL *nb; MACRO_EL *mnb; int i, j; el_info->mesh = mesh; el_info->macro_el = mel; el_info->el = mel->el; el_info->parent = nil; el_info->level = 0; if (el_info->fill_flag & FILL_COORDS) { for (i = 0; i < N_VERTICES_1D; i++) { DEBUG_TEST_EXIT(mel->coord[i], "no mel->coord[%d]\n",i); for (j = 0; j < DIM_OF_WORLD; j++) el_info->coord[i][j] = mel->coord[i][j]; } } if (el_info->fill_flag & (FILL_NEIGH|FILL_OPP_COORDS)) { REAL_D opp_coord; for (i = 0; i < N_NEIGH_1D; i++) { nb = nil; if ((mnb = mel->neigh[i])) { if (el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) opp_coord[j] = mnb->coord[1-i][j]; } nb = mnb->el; while (nb->child[0]) /*--- make nb nearest element ---*/ { if (el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) opp_coord[j] = 0.5*(mel->coord[1-i][j] + opp_coord[j]); } nb = nb->child[i]; } if (el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) el_info->opp_coord[i][j] = opp_coord[j]; } } el_info->neigh[i] = nb; el_info->opp_vertex[i] = nb ? 1-i : -1; } } if (el_info->fill_flag & FILL_BOUND) for (i = 0; i < N_VERTICES_1D; i++) el_info->vertex_bound[i] = mel->vertex_bound[i]; if(el_info->fill_flag & FILL_PROJECTION) el_info->active_projection = mel->projection[0]; return; } /*--------------------------------------------------------------------------*/ /* fill_el_info_1d: */ /* ------------ */ /* fill EL_INFO structure for one child of an element */ /*--------------------------------------------------------------------------*/ static void fill_elinfo_1d(int ichild, const EL_INFO *el_info_old, EL_INFO *el_info) { FUNCNAME("fill_elinfo_1d"); int i, j; EL *nb; EL *el = el_info_old->el; FLAGS fill_flag = el_info_old->fill_flag; DEBUG_TEST_EXIT(el->child[0], "no children?\n"); el_info->el = el->child[ichild]; DEBUG_TEST_EXIT(el_info->el, "missing child %d?\n", ichild); el_info->macro_el = el_info_old->macro_el; el_info->fill_flag = fill_flag; el_info->mesh = el_info_old->mesh; el_info->parent = el; el_info->level = el_info_old->level + 1; if (fill_flag & FILL_COORDS) { const REAL_D *coord = el_info_old->coord; for (j = 0; j < DIM_OF_WORLD; j++) { el_info->coord[ichild][j] = coord[ichild][j]; if (el->new_coord) el_info->coord[1-ichild][j] = el->new_coord[j]; else el_info->coord[1-ichild][j] = 0.5*(coord[0][j] + coord[1][j]); } } if (fill_flag & (FILL_NEIGH|FILL_OPP_COORDS)) { REAL_D opp_coord; if (fill_flag & FILL_OPP_COORDS) { DEBUG_TEST_EXIT(fill_flag & FILL_COORDS, "FILL_OPP_COORDS only with FILL_COORDS\n"); } for (i = 0; i < N_NEIGH_1D; i++) { if (i == ichild) { nb = el->child[1-ichild]; if (nb && el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) opp_coord[j] = el_info_old->coord[1-i][j]; } } else { nb = el_info_old->neigh[i]; if (nb && el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) opp_coord[j] = el_info_old->opp_coord[i][j]; } } if (nb) { while (nb->child[0]) /*--- make nb nearest element ---*/ { if (el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) opp_coord[j] = 0.5*(el_info->coord[1-i][j] + opp_coord[j]); } nb = nb->child[i]; } if (el_info->fill_flag & FILL_OPP_COORDS) { for (j = 0; j < DIM_OF_WORLD; j++) el_info->opp_coord[i][j] = opp_coord[j]; } } el_info->neigh[i] = nb; el_info->opp_vertex[i] = nb ? 1-i : -1; } } if (fill_flag & FILL_BOUND) { el_info->vertex_bound[ichild] = el_info_old->vertex_bound[ichild]; el_info->vertex_bound[1-ichild] = INTERIOR; } if(fill_flag & FILL_PROJECTION) el_info->active_projection = el_info_old->active_projection; return; } alberta-2.0.1/alberta/src/2d/0000777000042300001440000000000011067147344012636 500000000000000alberta-2.0.1/alberta/src/2d/bas_fct_2d.c0000644000042300001440000000670610676723575014730 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: bas_fct_2d.c */ /* */ /* */ /* description: Lagrange basis functions up to order 4 in 2d */ /* includes ./lagrange_[1234]_2d.c */ /* includes ./disc_lagrange_[012]_2d.c */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* discontinuous Lagrangian basisfunctions of order 0-2; these */ /* functions are evaluated in barycentric coordinates; the derivatives */ /* are those corresponding to these barycentric coordinates. */ /*--------------------------------------------------------------------------*/ #include "disc_lagrange_0_2d.c" #include "disc_lagrange_1_2d.c" #include "disc_lagrange_2_2d.c" /*--------------------------------------------------------------------------*/ /* Lagrangian basisfunctions of order 1-4; these */ /* functions are evaluated in barycentric coordinates; the derivatives */ /* are those corresponding to these barycentric coordinates. */ /*--------------------------------------------------------------------------*/ #include "lagrange_1_2d.c" #include "lagrange_2_2d.c" #include "lagrange_3_2d.c" #include "lagrange_4_2d.c" alberta-2.0.1/alberta/src/2d/coarsen_2d.c0000644000042300001440000003543210676724251014747 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: coarsen.c */ /* */ /* description: coarsening of 2 dim. hierarchical meshes; */ /* file contains all routines depending on DIM == 2; */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* coarsen_element_2d: coarsens a single element of the coarsening patch; */ /* dofs in the interior of the element are removed; dofs for higher order */ /* at the boundary or the coarsening patch still belong to */ /* the parent. Do not remove them from the mesh!!! */ /****************************************************************************/ static void coarsen_element_2d(MESH *mesh, EL *el) { FUNCNAME("coarsen_element_2d"); EL *child[2]; child[0] = el->child[0]; child[1] = el->child[1]; DEBUG_TEST_EXIT(child[0]->mark < 0 && child[1]->mark < 0, "element %d with children[%d,%d] must not be coarsend!\n", INDEX(el), INDEX(child[0]), INDEX(child[1])); if (mesh->n_dof[EDGE]) { /****************************************************************************/ /* remove dof from common edge of child[0] and child[1] */ /****************************************************************************/ free_dof(child[0]->dof[4], mesh, EDGE, false); } if (mesh->n_dof[CENTER]) { /****************************************************************************/ /* remove dof from the barycenters of child[0] and child[1] */ /****************************************************************************/ int node = mesh->node[CENTER]; free_dof(child[0]->dof[node], mesh, CENTER, false); free_dof(child[1]->dof[node], mesh, CENTER, false); } el->child[0] = nil; el->child[1] = (EL *) AI_get_leaf_data(mesh); if (el->child[1] && ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->coarsen_leaf_data) ((MESH_MEM_INFO *)mesh->mem_info)-> leaf_data_info->coarsen_leaf_data(el, child); free_element(child[0], mesh); free_element(child[1], mesh); el->mark++; mesh->n_elements--; mesh->n_hier_elements -= 2; if(mesh->n_edges > -1) mesh->n_edges--; return; } /****************************************************************************/ /* AI_coarse_patch_2d: first rebuild the dofs on the parents then do */ /* restriction of data (if possible) and finally coarsen the patch elements*/ /* */ /* This routine is also called from submesh.c! */ /****************************************************************************/ void AI_coarse_patch_2d(MESH *mesh, RC_LIST_EL coarse_list[], int n_neigh) { EL *el = coarse_list[0].el_info.el, *neigh = coarse_list[1].el_info.el; REAL *new_coord = el->new_coord; int i; /****************************************************************************/ /* reactivate DOFs */ /****************************************************************************/ for (i = 0; i < n_neigh; i++) AI_reactivate_dof(mesh, coarse_list[i].el_info.el); if (call_coarse_restrict_2d) /****************************************************************************/ /* restrict dof vectors to the parents on the patch */ /****************************************************************************/ coarse_restrict(mesh, coarse_list, n_neigh); /****************************************************************************/ /* now, remove those dofs in the coarsening edge */ /****************************************************************************/ free_dof(el->child[0]->dof[2], mesh, VERTEX, false); if (mesh->n_dof[EDGE]) { free_dof(el->child[0]->dof[3], mesh, EDGE, false); free_dof(el->child[1]->dof[4], mesh, EDGE, false); } /*--------------------------------------------------------------------------*/ /*--- and now coarsen single elements ---*/ /*--------------------------------------------------------------------------*/ coarsen_element_2d(mesh, el); el->new_coord = nil; if (neigh) { coarsen_element_2d(mesh, neigh); neigh->new_coord = nil; } /*--------------------------------------------------------------------------*/ /*--- if there is a projected boundary node, free memory ---*/ /*--------------------------------------------------------------------------*/ if (new_coord) free_real_d(mesh, new_coord); if(mesh->n_vertices > -1) mesh->n_vertices--; mesh->n_edges--; return; } /*--------------------------------------------------------------------------*/ /* Propagate coarsening information over the whole hierarchy */ /* by POSTORDER traversal of the hierarchy tree */ /* leaves: 'increment' coarsening mark */ /* inner nodes: set coarsening mark to */ /* min(0,child[0].mark+1,child[1].mark+1) */ /*--------------------------------------------------------------------------*/ static void spread_coarsen_mark_fct_2d(const EL_INFO *el_info, void *data) { EL *el = el_info->el; S_CHAR mark; if (el->child[0]) { /*--------------------------------------------------------------------------*/ /* interior node of the tree */ /*--------------------------------------------------------------------------*/ mark = MAX(el->child[0]->mark, el->child[1]->mark); el->mark = MIN(mark + 1, 0); } else { /*--------------------------------------------------------------------------*/ /* leaf node of the tree */ /*--------------------------------------------------------------------------*/ if (el->mark < 0) el->mark -= 1; } return; } static void spread_coarsen_mark_2d(MESH *mesh) { mesh_traverse(mesh, -1, CALL_EVERY_EL_POSTORDER, spread_coarsen_mark_fct_2d, nil); return; } /*--------------------------------------------------------------------------*/ /* cleanup_after_coarsen_2d: */ /* resets the element marks */ /*--------------------------------------------------------------------------*/ static void cleanup_after_coarsen_fct_2d(const EL_INFO *el_info, void *data) { EL *el = el_info->el; el->mark = MAX(el->mark, 0); } static void cleanup_after_coarsen_2d(MESH *mesh) { mesh_traverse(mesh, -1, CALL_LEAF_EL, cleanup_after_coarsen_fct_2d, nil); return; } /*--------------------------------------------------------------------------*/ /* do_coarse_patch_2d: if patch can be coarsened return true, else false */ /* and reset the element marks */ /*--------------------------------------------------------------------------*/ static int do_coarse_patch_2d(MESH *mesh,RC_LIST_EL *coarse_list, int n_neigh) { /*FUNCNAME("do_coarse_patch_2d"); */ int i, j; EL *el; for (i = 0; i < n_neigh; i++) { el = coarse_list[i].el_info.el; if (el->mark >= 0 || el->child[0] == nil) { /*--------------------------------------------------------------------------*/ /* element must not be coarsend or element is a leaf element; reset the */ /* the coarsening flag on all those elements that have to be coarsend with */ /* this element */ /*--------------------------------------------------------------------------*/ el->mark = 0; for (j = 0; j < n_neigh; j++) if (coarse_list[j].flag) coarse_list[j].el_info.el->mark = 0; return(false); } else if (el->child[0]->mark >= 0 || el->child[1]->mark >= 0) { /*--------------------------------------------------------------------------*/ /* one of the element's children must not be coarsend; reset the coarsening*/ /* flag on all those elements that have to be coarsened with this element */ /*--------------------------------------------------------------------------*/ el->mark = 0; for (j = 0; j < n_neigh; j++) if (coarse_list[j].flag) coarse_list[j].el_info.el->mark = 0; return(false); } else if (el->child[0]->child[0] || el->child[1]->child[0]) { /*--------------------------------------------------------------------------*/ /* one of the element's children is not a leaf element; */ /* element may be coarsened after coarsening one of the children; try again*/ /*--------------------------------------------------------------------------*/ do_more_coarsen_2d = true; return(false); } #if 0 /* Removed, DK */ else { /*--------------------------------------------------------------------------*/ /* either one element is a macro element or we can coarsen the patch */ /*--------------------------------------------------------------------------*/ if (coarse_list[i].flag == 0) { int m; for(m = 0; m < mesh->n_macro_el; m++) if (mesh->macro_els[m].el == el) break; DEBUG_TEST_EXIT(m < mesh->n_macro_el, "incompatible coarsening patch found\n"); } } #endif } return(true); } /*--------------------------------------------------------------------------*/ /* coarsen_fct_2d: get the coarsen patch, starting on el_info->el, checks */ /* whether patch can be coarsend and calls AI_coarse_patch_2d if possible */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* AI_coarse_patch_2d: gets the coarsening patch via get_coarse_patch_2d()*/ /* (starting on el_info->el), checks whether patch can be coarsened or not */ /* via do_coarsen_patch(); in the first case the patch is refined by */ /* AI_coarse_patch_2d(); otherwise element marker for patch elements are */ /* reset by do_coarsen_patch_2d() and we have to return :-( */ /*--------------------------------------------------------------------------*/ static void coarsen_fct_2d(const EL_INFO *el_info) { EL *el = el_info->el; MESH *mesh = el_info->mesh; int n_neigh; RC_LIST_EL coarse_list[2]; if (el->mark >= 0) return; /* el must not be coarsend, return :-( */ if (!(el->child[0])) return; /* single leaves don't get coarsened */ if (el->child[0]->mark >= 0 || el->child[1]->mark >= 0) { /*--------------------------------------------------------------------------*/ /* one of the children must not be coarsened; return :-( */ /*--------------------------------------------------------------------------*/ el->mark = 0; return; } if (el->child[0]->child[0] || el->child[1]->child[0]) { /*--------------------------------------------------------------------------*/ /* one of the children is not a leaf element; try again later on */ /*--------------------------------------------------------------------------*/ do_more_coarsen_2d = true; return; } coarse_list[0].el_info = *el_info; coarse_list[0].flag = 1; n_neigh = 1; if ((coarse_list[1].el_info.el = el_info->neigh[2])) { n_neigh = 2; coarse_list[1].flag = el_info->opp_vertex[2] == 2; } /*--------------------------------------------------------------------------*/ /* check whether we can coarsen the patch or not */ /*--------------------------------------------------------------------------*/ if (do_coarse_patch_2d(mesh, coarse_list, n_neigh)) { AI_coarse_patch_2d(mesh, coarse_list, n_neigh); } return; } /*--------------------------------------------------------------------------*/ /* coarsen_2d: */ /* traversal routine for recursive coarsening of a 2d triangulation */ /*--------------------------------------------------------------------------*/ static U_CHAR coarsen_2d(MESH *mesh) { int n_elements; TRAVERSE_STACK *stack; FLAGS flag = CALL_EVERY_EL_POSTORDER | FILL_NEIGH; const EL_INFO *el_info; n_elements = mesh->n_elements; call_coarse_restrict_2d = count_coarse_restrict(mesh); spread_coarsen_mark_2d(mesh); stack = get_traverse_stack(); do { do_more_coarsen_2d = false; el_info = traverse_first(stack, mesh, -1, flag); while (el_info) { coarsen_fct_2d(el_info); el_info = traverse_next(stack, el_info); } } while (do_more_coarsen_2d); free_traverse_stack(stack); cleanup_after_coarsen_2d(mesh); n_elements -= mesh->n_elements; return(n_elements ? MESH_COARSENED : 0); } alberta-2.0.1/alberta/src/2d/disc_lagrange_0_2d.c0000644000042300001440000003055310676724251016315 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_0_2d.c */ /* */ /* description: piecewise constant discontinuous Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL d_bary0_2d[1][N_LAMBDA] = {{1.0/3.0, 1.0/3.0, 1.0/3.0, 0.0}}; static REAL d_phi0c0_2d(const REAL lambda[N_LAMBDA]) { return(1.0); } static const REAL *d_grd_phi0c0_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0}; return(grd); } static const REAL (*d_D2_phi0c0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *d_get_dof_indices0_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[1]; DOF *rvec = idof ? idof : index_vec; int i = admin->mesh->node[CENTER], n0 = admin->n0_dof[CENTER]; DOF **dof = el->dof; rvec[0] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound0_2d(const EL_INFO *el_info, S_CHAR *bound) { static S_CHAR bound_vec[1]; S_CHAR *rvec = bound ? bound : bound_vec; rvec[0] = INTERIOR; return((const S_CHAR *) rvec); } static const int *d_get_int_vec0_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec0_2d"); static int local_vec[1]; int i, n0, *v = nil; int *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *d_get_real_vec0_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_v0_2d"); int i, n0; static REAL local_vec[1]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec0_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_vec0_2d"); int i, k, n0; static REAL_D local_vec[1]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; for (k = 0; k < DIM_OF_WORLD; k++) rvec[0][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec0_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec0_2d"); int i, n0; static U_CHAR local_vec[1]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec0_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec0_2d"); int i, n0; static S_CHAR local_vec[1]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } static const REAL *d_interpol0_2d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("d_interpol0_2d"); static REAL inter[1]; REAL *rvec = vec ? vec : inter; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no == 1), "only for one point!\n"); if(f_loc) rvec[0] = f_loc(el_info, d_bary0_2d[0]); else { if (parametric) { REAL_D world[1]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 1, d_bary0_2d, world); rvec[0] = f(world[0]); } else { REAL_D world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); coord_to_world(el_info, d_bary0_2d[0], world); rvec[0] = f(world); } } return((const REAL *) rvec); } static const REAL_D *d_interpol_d0_2d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("d_interpol_d0_2d"); static REAL_D inter[1]; REAL_D *rvec = vec ? vec : inter; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no == 1), "only for one point!\n"); if(f_loc) f_loc(el_info, d_bary0_2d[0], rvec[0]); else { if (parametric) { REAL_D world[1]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 1, d_bary0_2d, world); f(world[0], rvec[0]); } else { REAL_D world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); coord_to_world(el_info, d_bary0_2d[0], world); f(world, rvec[0]); } } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void d_real_refine_inter0_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter0_2d"); EL *el; REAL *vec = nil; int cdof, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof = el->child[0]->dof[node0][n0]; vec[cdof] = vec[pdof]; cdof = el->child[1]->dof[node0][n0]; vec[cdof] = vec[pdof]; } return; } static void d_real_coarse_inter0_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter0_2d"); EL *el; REAL *vec = nil; int cdof0, cdof1, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; vec[pdof] = 0.5*(vec[cdof0] + vec[cdof1]); } return; } static void d_real_coarse_restr0_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_restr0_2d"); EL *el; REAL *vec = nil; int cdof0, cdof1, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; vec[pdof] = vec[cdof0] + vec[cdof1]; } return; } static void d_real_d_refine_inter0_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_d_refine_inter0_2d"); EL *el; REAL_D *vec = nil; int cdof, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof = el->child[0]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof][k] = vec[pdof][k]; cdof = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof][k] = vec[pdof][k]; } return; } static void d_real_d_coarse_inter0_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter0_2d"); EL *el; REAL_D *vec = nil; int cdof0, cdof1, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[pdof][k] = 0.5*(vec[cdof0][k] + vec[cdof1][k]); } return; } static void d_real_d_coarse_restr0_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_d_coarse_restr0_2d"); EL *el; REAL_D *vec = nil; int cdof0, cdof1, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[pdof] [k]= vec[cdof0][k] + vec[cdof1][k]; } return; } static BAS_FCT *d_phi0_2d[1] = {d_phi0c0_2d}; static GRD_BAS_FCT *d_grd_phi0_2d[1] = {d_grd_phi0c0_2d}; static D2_BAS_FCT *d_D2_phi0_2d[1] = {d_D2_phi0c0_2d}; static BAS_FCTS disc_lagrange0_2d = {"disc_lagrange0_2d", 2, 1, 0, {0, 1, 0, 0}, nil, d_phi0_2d, d_grd_phi0_2d, d_D2_phi0_2d, d_get_dof_indices0_2d, d_get_bound0_2d, d_interpol0_2d, d_interpol_d0_2d, d_get_int_vec0_2d, d_get_real_vec0_2d, d_get_real_d_vec0_2d, d_get_uchar_vec0_2d, d_get_schar_vec0_2d, d_real_refine_inter0_2d, d_real_coarse_inter0_2d, d_real_coarse_restr0_2d, d_real_d_refine_inter0_2d, d_real_d_coarse_inter0_2d, d_real_d_coarse_restr0_2d, d_bary0_2d, }; alberta-2.0.1/alberta/src/2d/disc_lagrange_1_2d.c0000644000042300001440000002632410676724251016317 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_1_2d.c */ /* */ /* description: piecewise linear discontinuous Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL d_bary1_2d[3][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v0_2d(const REAL lambda[N_LAMBDA]) { return(lambda[0]); } static const REAL *d_grd_phi1v0_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v1_2d(const REAL lambda[N_LAMBDA]) { return(lambda[1]); } static const REAL *d_grd_phi1v1_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v1_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v2_2d(const REAL lambda[N_LAMBDA]) { return(lambda[2]); } static const REAL *d_grd_phi1v2_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 0.0, 1.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v2_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *d_get_dof_indices1_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_VERTICES_2D]; DOF *rvec = idof ? idof : index_vec; int i, n0 = admin->n0_dof[CENTER], node = admin->mesh->node[CENTER]; DOF **dof = el->dof; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = dof[node][n0+i]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound1_2d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("d_get_bound1_2d"); static S_CHAR bound_vec[N_VERTICES_2D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = el_info->vertex_bound[i]; return((const S_CHAR *) rvec); } static const int *d_get_int_vec1_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec1_2d"); int i, n0, node; static int local_vec[N_VERTICES_2D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const int *) rvec); } static const REAL *d_get_real_vec1_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_v1_2d"); int i, n0, node; static REAL local_vec[N_VERTICES_2D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec1_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_v1_2d"); int i, k, n0, node; static REAL_D local_vec[N_VERTICES_2D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[node][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec1_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec1_2d"); int i, n0, node; static U_CHAR local_vec[N_VERTICES_2D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec1_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec1_2d"); int i, n0, node; static S_CHAR local_vec[N_VERTICES_2D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(d_,1,2,3) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(d_,1,2,3) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void d_real_refine_inter1_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter1_2d"); EL *el, *child; REAL *vec = nil, avg; DOF dofc; int i, n0, node; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[CENTER]; node = drv->fe_space->mesh->node[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; avg = 0.5*(vec[el->dof[node][n0+0]] + vec[el->dof[node][n0+1]]); child = el->child[0]; dofc = child->dof[node][n0]; vec[dofc] = vec[el->dof[node][n0+2]]; dofc = child->dof[node][n0+1]; vec[dofc] = vec[el->dof[node][n0+0]]; dofc = child->dof[node][n0+2]; /* newest vertex is DIM */ vec[dofc] = avg; child = el->child[1]; dofc = child->dof[node][n0]; vec[dofc] = vec[el->dof[node][n0+1]]; dofc = child->dof[node][n0+1]; vec[dofc] = vec[el->dof[node][n0+2]]; dofc = child->dof[node][n0+2]; /* newest vertex is DIM */ vec[dofc] = avg; } return; } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do something */ /*--------------------------------------------------------------------------*/ static void d_real_coarse_inter1_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter1_2d"); EL *el, **child; REAL *vec = nil, avg; int i, n0, node; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[CENTER]; node = drv->fe_space->mesh->node[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; child = el->child; avg = 0.5*(vec[child[0]->dof[node][n0]] + vec[child[1]->dof[node][n0+1]]); vec[el->dof[node][n0+0]] = vec[child[0]->dof[node][n0+1]]; vec[el->dof[node][n0+1]] = vec[child[1]->dof[node][n0+0]]; vec[el->dof[node][n0+2]] = avg; } return; } static BAS_FCT *d_phi1_2d[3] = {d_phi1v0_2d, d_phi1v1_2d, d_phi1v2_2d}; static GRD_BAS_FCT *d_grd_phi1_2d[3] = {d_grd_phi1v0_2d, d_grd_phi1v1_2d, d_grd_phi1v2_2d}; static D2_BAS_FCT *d_D2_phi1_2d[3] = {d_D2_phi1v0_2d, d_D2_phi1v1_2d, d_D2_phi1v2_2d}; static BAS_FCTS disc_lagrange1_2d = {"disc_lagrange1_2d", 2, 3, 1, {0, 3, 0, 0}, nil, d_phi1_2d, d_grd_phi1_2d, d_D2_phi1_2d, d_get_dof_indices1_2d, d_get_bound1_2d, d_interpol1_2d, d_interpol_d1_2d, d_get_int_vec1_2d, d_get_real_vec1_2d, d_get_real_d_vec1_2d, d_get_uchar_vec1_2d, d_get_schar_vec1_2d, d_real_refine_inter1_2d, d_real_coarse_inter1_2d, nil, nil, nil, nil, d_bary1_2d, }; alberta-2.0.1/alberta/src/2d/disc_lagrange_2_2d.c0000644000042300001440000003734210676724251016322 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_2_2d.c */ /* */ /* description: piecewise quadratic discontinuous Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS_2D N_VERTICES_2D+N_EDGES_2D static const REAL d_bary2_2d[6][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.5, 0.5, 0.0}, {0.5, 0.0, 0.5, 0.0}, {0.5, 0.5, 0.0, 0.0}}; /****************************************************************************/ /* basisfunction at vertex 0 */ /****************************************************************************/ static REAL d_phi2v0_2d(const REAL lambda[N_LAMBDA]) { return(lambda[0]*(2.0*lambda[0] - 1.0)); } static const REAL *d_grd_phi2v0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[0] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 1 */ /****************************************************************************/ static REAL d_phi2v1_2d(const REAL lambda[N_LAMBDA]) { return(lambda[1]*(2.0*lambda[1] - 1.0)); } static const REAL *d_grd_phi2v1_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[1] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v1_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 2 */ /****************************************************************************/ static REAL d_phi2v2_2d(const REAL lambda[N_LAMBDA]) { return(lambda[2]*(2.0*lambda[2] - 1.0)); } static const REAL *d_grd_phi2v2_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = 4.0*lambda[2] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v2_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 4, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 0 */ /****************************************************************************/ static REAL d_phi2e0_2d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[1]*lambda[2]); } static const REAL *d_grd_phi2e0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[2]; grd[2] = 4.0*lambda[1]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 4, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 1 */ /****************************************************************************/ static REAL d_phi2e1_2d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[2]); } static const REAL *d_grd_phi2e1_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[2]; grd[2] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e1_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 4, 0}, {0, 0, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 2 */ /****************************************************************************/ static REAL d_phi2e2_2d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[1]); } static const REAL *d_grd_phi2e2_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[1]; grd[1] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e2_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 4, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* functions for combining basisfunctions with coefficients */ /****************************************************************************/ static const DOF *d_get_dof_indices2_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS_2D]; int i, n0, node; DOF *rvec = idof ? idof : index_vec; DOF **dof = el->dof; n0 = admin->n0_dof[CENTER]; node = admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_2D; i++) rvec[i] = dof[node][n0+i]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound2_2d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("d_get_bound2_2d"); static S_CHAR bound_vec[N_BAS_2D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = el_info->vertex_bound[i]; for (i = 0; i < N_EDGES_2D; i++) rvec[N_VERTICES_2D+i] = el_info->edge_bound[i]; return((const S_CHAR *) rvec); } static const int *d_get_int_vec2_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec2_2d"); int i, n0, node; static int local_vec[N_BAS_2D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const int *) rvec); } static const REAL *d_get_real_vec2_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_vec2_2d"); int i, n0, node; static REAL local_vec[N_BAS_2D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec2_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_vec2_2d"); int i, k, n0, node; static REAL_D local_vec[N_BAS_2D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[node][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec2_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec2_2d"); int i, n0, node; static U_CHAR local_vec[N_BAS_2D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec2_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec2_2d"); int i, n0, node; static S_CHAR local_vec[N_BAS_2D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_2D; i++) rvec[i] = v[dof[node][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(d_,2,2,6) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(d_,2,2,6) /****************************************************************************/ /* functions for interpolation/ restriction during refinement/coarsening */ /****************************************************************************/ static void d_real_refine_inter2_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter2_2d"); EL *el, *child; REAL *vec = nil; int node, n0, i; DOF dofc; const DOF *pdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; GET_DOF_VEC(vec, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = get_dof_indices(el, admin, nil); node = drv->fe_space->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; /**** child[0] ****/ child = el->child[0]; /* vertex 0 */ dofc = child->dof[node][n0]; vec[dofc] = vec[pdof[2]]; /* vertex 1 */ dofc = child->dof[node][n0+1]; vec[dofc] = vec[pdof[0]]; /* vertex 2 */ dofc = child->dof[node][n0+2]; vec[dofc] = vec[pdof[5]]; /* side 0 */ dofc = child->dof[node][n0+3]; vec[dofc] = 0.375*vec[pdof[0]] - 0.125*vec[pdof[1]] + 0.75*vec[pdof[5]]; /* side 1 */ dofc = child->dof[node][n0+4]; vec[dofc] = -0.125*(vec[pdof[0]] + vec[pdof[1]]) + 0.25*vec[pdof[5]] + 0.5*(vec[pdof[3]] + vec[pdof[4]]); /* side 2 */ dofc = child->dof[node][n0+5]; vec[dofc] = vec[pdof[4]]; /**** child[1] ****/ child = el->child[1]; /* vertex 0 */ dofc = child->dof[node][n0]; vec[dofc] = vec[pdof[1]]; /* vertex 1 */ dofc = child->dof[node][n0+1]; vec[dofc] = vec[pdof[2]]; /* vertex 2 */ dofc = child->dof[node][n0+2]; vec[dofc] = vec[pdof[5]]; /* side 0 */ dofc = child->dof[node][n0+3]; vec[dofc] = -0.125*(vec[pdof[0]] + vec[pdof[1]]) + 0.25*vec[pdof[5]] + 0.5*(vec[pdof[3]] + vec[pdof[4]]); /* side 1 */ dofc = child->dof[node][n0+4]; vec[dofc] = 0.375*vec[pdof[1]] - 0.125*vec[pdof[0]] + 0.75*vec[pdof[5]]; /* side 2 */ dofc = child->dof[node][n0+5]; vec[dofc] = vec[pdof[3]]; } return; } static void d_real_coarse_inter2_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter2_2d"); EL *el, **child; REAL *vec = nil, avg; int i, node, n0; const DOF_ADMIN *admin; MESH *mesh = nil; if (n < 1) return; GET_DOF_VEC(vec, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } GET_STRUCT(admin,drv->fe_space); GET_STRUCT(mesh,drv->fe_space); node = mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; child = el->child; vec[el->dof[node][n0+0]] = vec[child[0]->dof[node][n0+1]]; vec[el->dof[node][n0+1]] = vec[child[1]->dof[node][n0+0]]; avg = 0.5*(vec[child[0]->dof[node][n0+0]]+vec[child[1]->dof[node][n0+1]]); vec[el->dof[node][n0+2]] = avg; vec[el->dof[node][n0+3]] = vec[child[1]->dof[node][n0+5]]; vec[el->dof[node][n0+4]] = vec[child[0]->dof[node][n0+5]]; avg = 0.5*(vec[child[0]->dof[node][n0+2]]+vec[child[1]->dof[node][n0+2]]); vec[el->dof[node][n0+5]] = avg; } return; } static BAS_FCT *d_phi2_2d[6] = {d_phi2v0_2d, d_phi2v1_2d, d_phi2v2_2d, d_phi2e0_2d, d_phi2e1_2d, d_phi2e2_2d}; static GRD_BAS_FCT *d_grd_phi2_2d[6] = {d_grd_phi2v0_2d, d_grd_phi2v1_2d, d_grd_phi2v2_2d, d_grd_phi2e0_2d, d_grd_phi2e1_2d, d_grd_phi2e2_2d}; static D2_BAS_FCT *d_D2_phi2_2d[6] = {d_D2_phi2v0_2d, d_D2_phi2v1_2d, d_D2_phi2v2_2d, d_D2_phi2e0_2d, d_D2_phi2e1_2d, d_D2_phi2e2_2d}; static BAS_FCTS disc_lagrange2_2d = {"disc_lagrange2_2d", 2, N_BAS_2D, 2, {0, N_BAS_2D, 0, 0}, nil, d_phi2_2d, d_grd_phi2_2d, d_D2_phi2_2d, d_get_dof_indices2_2d, d_get_bound2_2d, d_interpol2_2d, d_interpol_d2_2d, d_get_int_vec2_2d, d_get_real_vec2_2d, d_get_real_d_vec2_2d, d_get_uchar_vec2_2d, d_get_schar_vec2_2d, d_real_refine_inter2_2d, d_real_coarse_inter2_2d, nil, nil, nil, nil, d_bary2_2d, }; #undef N_BAS_2D alberta-2.0.1/alberta/src/2d/element_2d.c0000644000042300001440000002654510676724251014753 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: element_2d.c */ /* */ /* */ /* description: routines on elements that depend on the dimension in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* world_to_coord_2d(): return -1 if inside, otherwise index of lambda<0 */ /*--------------------------------------------------------------------------*/ int world_to_coord_2d(const EL_INFO *el_info, const REAL *xy, REAL_B lambda) { FUNCNAME("world_to_coord_2d"); REAL edge[2][DIM_OF_WORLD], x[DIM_OF_WORLD]; REAL x0, det, det0, det1, adet, lmin; int i, j, k; #if (DIM_OF_WORLD != 2) ERROR_EXIT("not yet for DIM_OF_WORLD != 2\n"); #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->worldto_coord() to access the parametric mesh\n"); /* wir haben das gleichungssystem zu loesen: */ /* ( q1x q2x ) (lambda1) (qx) */ /* ( q1y q2y ) (lambda2) = (qy) */ /* mit qi=pi-p3, q=xy-p3 */ for (j=0; jcoord[2][j]; x[j] = xy[j] - x0; for (i=0; i < 2; i++) edge[i][j] = el_info->coord[i][j] - x0; } det = edge[0][0] * edge[1][1] - edge[0][1] * edge[1][0]; det0 = x[0] * edge[1][1] - x[1] * edge[1][0]; det1 = edge[0][0] * x[1] - edge[0][1] * x[0]; adet = ABS(det); if (adet < 1.E-20) { ERROR_EXIT("det = %le; abort\n", det); return(-2); } lambda[0] = det0 / det; lambda[1] = det1 / det; lambda[2] = 1.0 - lambda[0] - lambda[1]; k = -1; lmin = 0.0; j = 0; for (i = 0; i <= 2; i++) { if ((lambda[i]*adet) < -1.E-15) { if (lambda[i] < lmin) { k = i; lmin = lambda[i]; } j++; } } return(k); } /*--------------------------------------------------------------------------*/ /* transform local coordinates l to world coordinates; if w is non nil */ /* store them at w otherwise return a pointer to some local static */ /* area containing world coordintes */ /*--------------------------------------------------------------------------*/ const REAL *coord_to_world_2d(const EL_INFO *el_info, const REAL *l, REAL_D w) { FUNCNAME("coord_to_world_2d"); static REAL_D world; REAL *ret; int i; #if DIM_OF_WORLD < 2 ERROR_EXIT("Does not make sense for DIM_OF_WORLD == 1!\n"); #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->coord_to_world() to access the parametric mesh\n"); ret = w ? w : world; for(i = 0; i < DIM_OF_WORLD; i++) ret[i] = el_info->coord[0][i] * l[0] + el_info->coord[1][i] * l[1] + el_info->coord[2][i] * l[2]; return((const REAL *) ret); } /*--------------------------------------------------------------------------*/ /* compute volume of an element */ /*--------------------------------------------------------------------------*/ REAL el_det_2d(const EL_INFO *el_info) { FUNCNAME("el_det_2d"); REAL_D e1, e2; REAL det; const REAL *v0; int i; #if DIM_OF_WORLD == 3 REAL_D n; #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric, "not for parametric meshes\n"); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->det() to access the parametric mesh\n"); #if DIM_OF_WORLD < 2 ERROR_EXIT("Does not make sense for DIM_OF_WORLD == 1!\n"); #endif v0 = el_info->coord[0]; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = el_info->coord[1][i] - v0[i]; e2[i] = el_info->coord[2][i] - v0[i]; } #if DIM_OF_WORLD==2 det = WEDGE_DOW(e1, e2); det = ABS(det); #else WEDGE_DOW(e1, e2, n); det = NORM_DOW(n); #endif return(det); } REAL el_volume_2d(const EL_INFO *el_info) { return 0.5 * el_det_2d(el_info); } /*--------------------------------------------------------------------------*/ /* compute gradients of basis functions on element; return the absolute */ /* value of the determinant from the transformation to the reference */ /* element */ /* */ /* Notice: for dim < DIM_OF_WORLD grd_lam will contain tangential */ /* derivatives of the barycentric coordinates! */ /*--------------------------------------------------------------------------*/ REAL el_grd_lambda_2d(const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]) { FUNCNAME("el_grd_lambda_2d"); int i, j; REAL e1[DIM_OF_WORLD], e2[DIM_OF_WORLD], det, adet; const REAL *v0; REAL a11, a12, a21, a22; #if DIM_OF_WORLD == 3 REAL n[DIM_OF_WORLD]; REAL a13, a23; #endif #if DIM_OF_WORLD < 2 ERROR_EXIT("Does not make sense for DIM_OF_WORLD == 1!\n"); #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->grd_lambda() to access the parametric mesh\n"); v0 = el_info->coord[0]; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = el_info->coord[1][i] - v0[i]; e2[i] = el_info->coord[2][i] - v0[i]; } #if DIM_OF_WORLD == 2 det = WEDGE_DOW(e1, e2); adet = ABS(det); #else WEDGE_DOW(e1, e2, n); det = NRM2_DOW(n); adet = sqrt(det); #endif if (adet < 1.0E-25) { MSG("abs(det) = %lf\n", adet); for (i = 0; i < N_LAMBDA; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lam[i][j] = 0.0; } else { det = 1.0 / det; #if DIM_OF_WORLD == 2 a11 = e2[1] * det; a21 = -e2[0] * det; a12 = -e1[1] * det; a22 = e1[0] * det; grd_lam[1][0] = a11; grd_lam[1][1] = a21; grd_lam[2][0] = a12; grd_lam[2][1] = a22; grd_lam[0][0] = - grd_lam[1][0] - grd_lam[2][0]; grd_lam[0][1] = - grd_lam[1][1] - grd_lam[2][1]; #else a11 = (e2[1]* n[2] - e2[2]* n[1]) * det; a12 = (e2[2]* n[0] - e2[0]* n[2]) * det; a13 = (e2[0]* n[1] - e2[1]* n[0]) * det; a21 = (e1[2]* n[1] - e1[1]* n[2]) * det; a22 = (e1[0]* n[2] - e1[2]* n[0]) * det; a23 = (e1[1]* n[0] - e1[0]* n[1]) * det; grd_lam[1][0] = a11; grd_lam[1][1] = a12; grd_lam[1][2] = a13; grd_lam[2][0] = a21; grd_lam[2][1] = a22; grd_lam[2][2] = a23; grd_lam[0][0] = -grd_lam[1][0] - grd_lam[2][0]; grd_lam[0][1] = -grd_lam[1][1] - grd_lam[2][1]; grd_lam[0][2] = -grd_lam[1][2] - grd_lam[2][2]; #endif } return(adet); } /*--------------------------------------------------------------------------*/ /* calculate a normal of an edge of a triangle with coordinates */ /* coord; return the absolute value of the determinant from the */ /* transformation to the reference element */ /*--------------------------------------------------------------------------*/ REAL get_wall_normal_2d(const EL_INFO *el_info, int i0, REAL *normal) { FUNCNAME("get_face_normal_2d"); #if DIM_OF_WORLD == 2 static int ind[5] = {0, 1, 2, 0, 1}; REAL det; int i1 = ind[i0+1], i2 = ind[i0+2]; const REAL_D *coord = el_info->coord; DEBUG_TEST_FLAG(FILL_COORDS, el_info); normal[0] = coord[i2][1] - coord[i1][1]; normal[1] = coord[i1][0] - coord[i2][0]; det = sqrt(SQR(normal[0])+SQR(normal[1])); TEST_EXIT(det > 1.e-30, "det = 0 on face %d\n", i0); normal[0] /= det; normal[1] /= det; return(det); #else ERROR_EXIT("not implemented for DIM_OF_WORLD = %d in 2d\n", DIM_OF_WORLD); return 0.0; #endif } /*--------------------------------------------------------------------------*/ /* orient the vertices of walls */ /* used by estimator for the jumps => same quadrature nodes from both sides!*/ /*--------------------------------------------------------------------------*/ int *sorted_wall_indices_2d(int wall, int permno) { static int sorted[3][2][2] = { {{1,2}, {2,1}}, {{2,0},{0,2}}, {{0,1}, {1,0}}}; return sorted[wall][permno]; } int wall_orientation_2d(const EL *el, int wall, int **vec) { int no; int *vof = vertex_of_edge_2d[wall]; DOF **dof = el->dof; if (dof[vof[0]][0] < dof[vof[1]][0]) no = 0; else no = 1; if (vec) { *vec = sorted_wall_indices_2d(wall, no); } return no; } int *sort_wall_indices_2d(const EL *el, int wall, int *vec) { int i, *val = nil; (void)wall_orientation_2d(el, wall, &val); if (vec) { for (i = 0; i < 2; i++) vec[i] = val[i]; return vec; } else return val; } alberta-2.0.1/alberta/src/2d/graphXO_2d.c0000644000042300001440000013301510676724251014661 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: graphXO_2d.c */ /* */ /* */ /* description: simple graphical routines in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ static const REAL vertex_lambda_2d[N_VERTICES_2D][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; #if 0 static const REAL midedge_lambda[N_VERTICES_2D][N_LAMBDA] = {{0.0,0.5,0.5}, {0.5,0.0,0.5}, {0.5,0.5,0.0}}; #endif typedef struct min_max { float xmin_2d[DIM_OF_WORLD], xmax_2d[DIM_OF_WORLD], diam_2d[DIM_OF_WORLD]; } MIN_MAX; static void xminmax_fct_2d(const EL_INFO *elinfo, void *data) { MIN_MAX *ud = (MIN_MAX *)data; int i, j; PARAMETRIC *parametric = elinfo->mesh->parametric; if (parametric) { REAL_D world[N_VERTICES_2D]; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, world); for (i = 0; i < N_VERTICES_2D; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { ud->xmin_2d[j] = MIN(ud->xmin_2d[j], world[i][j]); ud->xmax_2d[j] = MAX(ud->xmax_2d[j], world[i][j]); } } } else { DEBUG_TEST_FLAG(FILL_COORDS, elinfo); for (i = 0; i < N_VERTICES_2D; i++) for (j = 0; j < DIM_OF_WORLD; j++) { ud->xmin_2d[j] = MIN(ud->xmin_2d[j], elinfo->coord[i][j]); ud->xmax_2d[j] = MAX(ud->xmax_2d[j], elinfo->coord[i][j]); } } return; } static GRAPH_WINDOW graph_open_window_2d(const char *title, const char *geometry, REAL *world, MESH *mesh) { FUNCNAME("graph_open_window_2d"); MIN_MAX mm[1] = {{{0}}}; OGL_WINDOW *winO = nil; char Geometry[16]; int i; if (world) { mm->xmin_2d[0] = world[0]; mm->xmax_2d[0] = world[1]; mm->xmin_2d[1] = world[2]; mm->xmax_2d[1] = world[3]; mm->diam_2d[0] = MAX(mm->xmax_2d[0] - mm->xmin_2d[0], 1.E-10); mm->diam_2d[1] = MAX(mm->xmax_2d[1] - mm->xmin_2d[1], 1.E-10); } else if (mesh) { for (i=0; ixmax_2d[i] = -(mm->xmin_2d[i] = 1.0E10); mesh_traverse(mesh, -1, CALL_LEAF_EL|FILL_COORDS, xminmax_fct_2d, mm); for (i=0; idiam_2d[i] = MAX(mm->xmax_2d[i] - mm->xmin_2d[i], 1.E-10); mm->xmin_2d[i] -= 0.1 * mm->diam_2d[i]; mm->xmax_2d[i] += 0.1 * mm->diam_2d[i]; mm->diam_2d[i] *= 1.2; } } else { for (i=0; ixmin_2d[i] = 0.0; mm->xmax_2d[i] = 1.0; mm->diam_2d[i] = 1.0; } } if (!title) title = "ALBERTA graphics"; if (!geometry) { REAL SIZE = 400.0, xsize, ysize; if (mm->diam_2d[0] >= mm->diam_2d[1]) { xsize = SIZE; ysize = SIZE * mm->diam_2d[1] / mm->diam_2d[0]; } else { xsize = SIZE * mm->diam_2d[0] / mm->diam_2d[1]; ysize = SIZE; } snprintf(Geometry, 16, "%dx%d", (int)xsize, (int)ysize); geometry = Geometry; MSG("use geometry: %s\n", geometry); } winO = OGL_create_window(title, geometry); TEST_EXIT(winO, "Could not create window!\n"); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); for (i = 0; i < DIM_OF_WORLD; i++) { winO->xmin[i] = mm->xmin_2d[i]; winO->xmax[i] = mm->xmax_2d[i]; } glOrtho(winO->xmin[0], winO->xmax[0], winO->xmin[1], winO->xmax[1], -1.0, 1.0); graph_clear_window((GRAPH_WINDOW) winO, rgb_white); return((GRAPH_WINDOW) winO); } /****************************************************************************/ static FLAGS graph_mesh_flags_2d; static const float *linecolor_2d; #if HAVE_LIBGL static void OGLgraph_mesh_fct_2d(const EL_INFO *elinfo, void *data) { EL *el = elinfo->el; int i, j, i1,i2; double xmid[DIM_OF_WORLD]; DOF **dof; char cindex[20]; REAL_D world[N_VERTICES_2D]; const REAL_D *coord; PARAMETRIC *parametric = elinfo->mesh->parametric; if (parametric) { parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, world); coord = (const REAL_D *) world; } else { DEBUG_TEST_FLAG(FILL_COORDS, elinfo); coord = elinfo->coord; } for (j=0; jmark > 0) glColor3fv(rgb_red); else if (el->mark < 0) glColor3fv(rgb_blue); else glColor3fv(rgb_white); glBegin(GL_TRIANGLES); glVertex2dv(coord[0]); glVertex2dv(coord[1]); glVertex2dv(coord[2]); glEnd(); } #if DEBUG /* show element indices */ if (graph_mesh_flags_2d & GRAPH_MESH_ELEMENT_INDEX) { if (elinfo->level < 5) { sprintf(cindex,"%d",el->index); /* PLOT_text2d(xmid[0],xmid[1],cindex); */ } } #endif if (graph_mesh_flags_2d & GRAPH_MESH_BOUNDARY) { /* show boundary edges */ DEBUG_TEST_FLAG(FILL_BOUND, elinfo); for (i=0; iedge_bound[i])) { if (linecolor_2d) glColor3fv(linecolor_2d); else if (IS_DIRICHLET(elinfo->edge_bound[i])) glColor3fv(rgb_blue); else glColor3fv(rgb_red); i1 = (i+1) % 3; i2 = (i+2) % 3; glBegin(GL_LINE_STRIP); glVertex2dv(coord[i1]); /* if (parametric) insert additional points... */ glVertex2dv(coord[i2]); glEnd(); } } } else { /* show all edges */ glColor3fv(linecolor_2d ? linecolor_2d : rgb_black); glBegin(GL_LINE_LOOP); for (i=0; i < N_VERTICES_2D; i++) { glVertex2dv(coord[i]); /* if (parametric) insert additional points... */ } glEnd(); } /* show dof[0] at vertices */ if (graph_mesh_flags_2d & GRAPH_MESH_VERTEX_DOF) { if ((dof = el->dof)) { for (i=0; iel)); } static void graph_el_est_2d(GRAPH_WINDOW win, MESH *mesh, REAL (*get_el_est)(EL *el), REAL min, REAL max) { FUNCNAME("graph_el_est_2d"); TEST_EXIT(Get_el_est = get_el_est, "no get_el_est()\n"); graph_fvalues_2d(win, mesh, el_est_fct, 0, min, max, 0); MSG("values in range [%.3le, %.3le]\n", val_min, val_max); } static void graph_level_recursive(int refine, const REAL *b[3], REAL v[3], const REAL *x[3]) { int i,j; if (refine > 0) /* refine and call recursively */ { const REAL *bnew[3], *xnew[3]; REAL bm[3][N_LAMBDA], vnew[3], vm[3], xm[3][DIM_OF_WORLD]; for (j = 0; j < 3; j++) { bm[0][j] = 0.5*(b[1][j] + b[2][j]); bm[1][j] = 0.5*(b[0][j] + b[2][j]); bm[2][j] = 0.5*(b[0][j] + b[1][j]); } for (i = 0; i < 3; i++) { vm[i] = 0.0; for (j=0; jcoord_to_world(el_info, nil, N_EDGES_2D, (const REAL (*)[N_LAMBDA])bm, xm); } else { for (j = 0; j < DIM_OF_WORLD; j++) { xm[0][j] = 0.5*(x[1][j] + x[2][j]); xm[1][j] = 0.5*(x[0][j] + x[2][j]); xm[2][j] = 0.5*(x[0][j] + x[1][j]); } } bnew[0] = b[0]; bnew[1] = bm[2]; bnew[2] = bm[1]; xnew[0] = x[0]; xnew[1] = xm[2]; xnew[2] = xm[1]; vnew[0] = v[0]; vnew[1] = vm[2]; vnew[2] = vm[1]; graph_level_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[2]; bnew[2] = bm[1]; xnew[0] = xm[2]; xnew[1] = x[2]; xnew[2] = xm[1]; vnew[0] = vm[2]; vnew[1] = v[2]; vnew[2] = vm[1]; graph_level_recursive(refine-1, bnew, vnew, xnew); bnew[0] = b[2]; bnew[1] = bm[2]; bnew[2] = bm[0]; xnew[0] = x[2]; xnew[1] = xm[2]; xnew[2] = xm[0]; vnew[0] = v[2]; vnew[1] = vm[2]; vnew[2] = vm[0]; graph_level_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[1]; bnew[2] = bm[0]; xnew[0] = xm[2]; xnew[1] = x[1]; xnew[2] = xm[0]; vnew[0] = vm[2]; vnew[1] = v[1]; vnew[2] = vm[0]; graph_level_recursive(refine-1, bnew, vnew, xnew); return; } /* draw level line */ { static REAL small = 1.0E-8; int i1, i2, flag[3]; REAL s[3]; float xy[2]; for (i=0; i<3; i++) { i1 = (i+1) % 3; if (ABS(v[i1]-v[i]) >= small) { s[i] = (level_value - v[i]) / (v[i1]-v[i]); flag[i] = (s[i] <= 1.0 && s[i] >= 0.0); } else { flag[i] = 0; if (ABS(level_value - v[i]) <= small) { glBegin(GL_LINE_STRIP); xy[0] = x[i][0]; xy[1] = x[i][1]; glVertex2fv(xy); xy[0] = x[i1][0]; xy[1] = x[i1][1]; glVertex2fv(xy); glEnd(); } } } for (i=0; i<3; i++) { i1 = (i+1) % 3; if (flag[i] && flag[i1]) { i2 = (i+2) % 3; glBegin(GL_LINE_STRIP); for (j=0; j<2; j++) xy[j] = x[i][j] + s[i] * (x[i1][j] - x[i][j]); glVertex2fv(xy); for (j=0; j<2; j++) xy[j] = x[i1][j] + s[i1] * (x[i2][j] - x[i1][j]); glVertex2fv(xy); glEnd(); } } } } static void graph_level_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("graph_level_fct"); static REAL bnew[3][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; static const REAL *b[3]={bnew[0],bnew[1],bnew[2]}; const REAL *x[3]; REAL_D coord[N_VERTICES_2D]; REAL v[3]; EL *el = elinfo->el; int i, j; PARAMETRIC *parametric = elinfo->mesh->parametric; if (bas_fcts->get_real_vec) el_vec = bas_fcts->get_real_vec(el, drv, nil); else ERROR("no bas_fcts->get_real_vec()\n"); el_info = elinfo; if (parametric) { el_parametric = parametric; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, coord); for (i = 0; i < 3; i++) x[i] = coord[i]; } else { el_parametric = nil; for (i = 0; i < 3; i++) x[i] = elinfo->coord[i]; } for (i = 0; i < 3; i++) { v[i] = 0.0; for (j=0; jfe_space && v->fe_space->admin && v->fe_space->admin->mesh) { if((DIM_OF_WORLD != 2) || (v->fe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } OGL_set_std_window(ogl_win); glLineWidth(1); glColor3fv(c ? c : rgb_black); bas_fcts = v->fe_space->bas_fcts; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; drv = v; level_value = level; if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL | FILL_COORDS, graph_level_fct, nil); OGL_FLUSH(ogl_win); } else ERROR("no FE_SPACE OR DOF_ADMIN or MESH\n"); } /****************************************************************************/ static void graph_level_d_recursive(int refine, const REAL *b[3], REAL v[3], const REAL *x[3]) { int i,j,k; if (refine > 0) /* refine and call recursively */ { const REAL *bnew[3], *xnew[3]; REAL bm[3][N_LAMBDA], vnew[3], vm[3], xm[3][DIM_OF_WORLD], phi_b; REAL_D vd; for (j = 0; j < 3; j++) { bm[0][j] = 0.5*(b[1][j] + b[2][j]); bm[1][j] = 0.5*(b[0][j] + b[2][j]); bm[2][j] = 0.5*(b[0][j] + b[1][j]); } for (i = 0; i < 3; i++) { SET_DOW(0.0, vd); for (j=0; jcoord_to_world(el_info, nil, N_EDGES_2D, (const REAL (*)[N_LAMBDA])bm, xm); } else { for (j = 0; j < DIM_OF_WORLD; j++) { xm[0][j] = 0.5*(x[1][j] + x[2][j]); xm[1][j] = 0.5*(x[0][j] + x[2][j]); xm[2][j] = 0.5*(x[0][j] + x[1][j]); } } bnew[0] = b[0]; bnew[1] = bm[2]; bnew[2] = bm[1]; xnew[0] = x[0]; xnew[1] = xm[2]; xnew[2] = xm[1]; vnew[0] = v[0]; vnew[1] = vm[2]; vnew[2] = vm[1]; graph_level_d_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[2]; bnew[2] = bm[1]; xnew[0] = xm[2]; xnew[1] = x[2]; xnew[2] = xm[1]; vnew[0] = vm[2]; vnew[1] = v[2]; vnew[2] = vm[1]; graph_level_d_recursive(refine-1, bnew, vnew, xnew); bnew[0] = b[2]; bnew[1] = bm[2]; bnew[2] = bm[0]; xnew[0] = x[2]; xnew[1] = xm[2]; xnew[2] = xm[0]; vnew[0] = v[2]; vnew[1] = vm[2]; vnew[2] = vm[0]; graph_level_d_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[1]; bnew[2] = bm[0]; xnew[0] = xm[2]; xnew[1] = x[1]; xnew[2] = xm[0]; vnew[0] = vm[2]; vnew[1] = v[1]; vnew[2] = vm[0]; graph_level_d_recursive(refine-1, bnew, vnew, xnew); return; } /* draw level line */ { static REAL small = 1.0E-8; int i1, i2, flag[3]; REAL s[3]; float xy[2]; for (i=0; i<3; i++) { i1 = (i+1) % 3; if (ABS(v[i1]-v[i]) >= small) { s[i] = (level_value - v[i]) / (v[i1]-v[i]); flag[i] = (s[i] <= 1.0 && s[i] >= 0.0); } else { flag[i] = 0; if (ABS(level_value - v[i]) <= small) { glBegin(GL_LINE_STRIP); xy[0] = x[i][0]; xy[1] = x[i][1]; glVertex2fv(xy); xy[0] = x[i1][0]; xy[1] = x[i1][1]; glVertex2fv(xy); glEnd(); } } } for (i=0; i<3; i++) { i1 = (i+1) % 3; if (flag[i] && flag[i1]) { i2 = (i+2) % 3; glBegin(GL_LINE_STRIP); for (j=0; j<2; j++) xy[j] = x[i][j] + s[i] * (x[i1][j] - x[i][j]); glVertex2fv(xy); for (j=0; j<2; j++) xy[j] = x[i1][j] + s[i1] * (x[i2][j] - x[i1][j]); glVertex2fv(xy); glEnd(); } } } } static void graph_level_d_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("graph_level_d_fct"); static REAL bnew[3][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; static const REAL *b[3]={bnew[0],bnew[1],bnew[2]}; const REAL *x[3]; REAL_D coord[N_VERTICES_2D], vd; REAL v[3], phi_b; EL *el = elinfo->el; int i, j, k; PARAMETRIC *parametric = elinfo->mesh->parametric; if (bas_fcts->get_real_d_vec) el_vec_d = bas_fcts->get_real_d_vec(el, drdv, nil); else ERROR("no bas_fcts->get_real_d_vec()\n"); el_info = elinfo; if (parametric) { el_parametric = parametric; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, coord); for (i = 0; i < 3; i++) x[i] = coord[i]; } else { el_parametric = nil; for (i = 0; i < 3; i++) x[i] = elinfo->coord[i]; } for (i = 0; i < 3; i++) { SET_DOW(0.0, vd); for (j=0; jfe_space && v->fe_space->admin && v->fe_space->admin->mesh) { if((DIM_OF_WORLD != 2) || (v->fe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } OGL_set_std_window(ogl_win); glLineWidth(1.0); glColor3fv(c ? c : rgb_black); bas_fcts = v->fe_space->bas_fcts; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; drdv = v; level_value = level; if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL | FILL_COORDS, graph_level_d_fct, nil); OGL_FLUSH(ogl_win); } else ERROR("no FE_SPACE OR DOF_ADMIN or MESH\n"); } /****************************************************************************/ static void val_minmax_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("val_minmax_fct"); #define NTEST 4 static REAL b[NTEST][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.333,0.333,0.334,0.0}}; int i, j, ntest; REAL v; if (bas_fcts->get_real_vec) el_vec = bas_fcts->get_real_vec(elinfo->el, drv, nil); else ERROR("no bas_fcts->get_real_vec()\n"); if (nrefine>0) ntest = NTEST; else ntest = 3; for (i = 0; i < ntest; i++) { v = 0.0; for (j=0; jget_real_d_vec) el_vec_d = bas_fcts->get_real_d_vec(elinfo->el, drdv, nil); else ERROR("no bas_fcts->get_real_d_vec()\n"); if (nrefine>0) ntest = NTEST; else ntest = 3; for (i = 0; i < ntest; i++) { SET_DOW(0.0, vd); for (j=0; jfe_space && v->fe_space->admin && v->fe_space->admin->mesh) { if((DIM_OF_WORLD != 2) || (v->fe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } if (levels) { l = levels; } else { drv = v; bas_fcts = v->fe_space->bas_fcts; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); val_max = -(val_min = 1.0E20); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL, val_minmax_fct, nil); val_max = MAX(val_max, val_min + 1.0E-10); for (i = 0; i < nl; i++) lev[i] = val_min + ((i-0.5) * nlr) * (val_max-val_min); l = lev; } if (color) { c = color; } else { c = (const GRAPH_RGBCOLOR *) col; for (i = 0; i < nl; i++) { col[i][0] = i * nlr; col[i][1] = 4.0 * (i * nlr) * (1.0 - i*nlr); col[i][2] = 1.0 - i * nlr; } } for (i = 0; i < nl; i++) graph_level_2d(win, v, l[i], c[i], refine); } else ERROR("no FE_SPACE or DOF_ADMIN or MESH\n"); } void graph_levels_d_2d(GRAPH_WINDOW win, const DOF_REAL_D_VEC *v, int n, REAL const *levels, const GRAPH_RGBCOLOR *color, int refine) { FUNCNAME("graph_levels_d_2d"); #define MAXLEV 100 REAL lev[MAXLEV]; GRAPH_RGBCOLOR col[MAXLEV]; const GRAPH_RGBCOLOR *c; const REAL *l; int nl, i; REAL nlr; if (!v) return; nl = MIN(n, MAXLEV); nlr = 1.0 / (float)(MAX(nl,1)); if (v->fe_space && v->fe_space->admin && v->fe_space->admin->mesh) { if((DIM_OF_WORLD != 2) || (v->fe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } if (levels) { l = levels; } else { drdv = v; bas_fcts = v->fe_space->bas_fcts; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); val_max = -(val_min = 1.0E20); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL, val_d_minmax_fct, nil); val_max = MAX(val_max, val_min + 1.0E-10); for (i = 0; i < nl; i++) lev[i] = val_min + ((i-0.5) * nlr) * (val_max-val_min); l = lev; } if (color) { c = color; } else { c = (const GRAPH_RGBCOLOR *) col; for (i = 0; i < nl; i++) { col[i][0] = i * nlr; col[i][1] = 4.0 * (i * nlr) * (1.0 - i*nlr); col[i][2] = 1.0 - i * nlr; } } for (i = 0; i < nl; i++) graph_level_d_2d(win, v, l[i], c[i], refine); } else ERROR("no FE_SPACE or DOF_ADMIN or MESH\n"); } /****************************************************************************/ static REAL val_fac = 1.0; static float *val_color(REAL v) { static GRAPH_RGBCOLOR c; float vv = (float) ((v - val_min) * val_fac); vv = MIN(1.0, vv); vv = MAX(0.0, vv); c[0] = vv; c[1] = 4 * vv * (1.0 - vv); c[2] = 1.0 - vv; return(c); } static void graph_value_recursive(int refine, const REAL *b[3], REAL v[3], const REAL *x[3]) { int i,j; if (refine > 0) /* refine and call recursively */ { const REAL *bnew[3], *xnew[3]; REAL bm[3][N_LAMBDA], vnew[3], vm[3], xm[3][DIM_OF_WORLD]; for (j = 0; j < 3; j++) { bm[0][j] = 0.5*(b[1][j] + b[2][j]); bm[1][j] = 0.5*(b[0][j] + b[2][j]); bm[2][j] = 0.5*(b[0][j] + b[1][j]); } for (i = 0; i < 3; i++) { for (vm[i] = j = 0; j < n_bas_fcts; j++) vm[i] += el_vec[j]*phi[j](bm[i]); } if (el_parametric) { el_parametric->coord_to_world(el_info, nil, N_EDGES_2D, (const REAL (*)[N_LAMBDA]) bm, xm); } else { for (j = 0; j < DIM_OF_WORLD; j++) { xm[0][j] = 0.5*(x[1][j] + x[2][j]); xm[1][j] = 0.5*(x[0][j] + x[2][j]); xm[2][j] = 0.5*(x[0][j] + x[1][j]); } } bnew[0] = b[0]; bnew[1] = bm[2]; bnew[2] = bm[1]; xnew[0] = x[0]; xnew[1] = xm[2]; xnew[2] = xm[1]; vnew[0] = v[0]; vnew[1] = vm[2]; vnew[2] = vm[1]; graph_value_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[1]; bnew[2] = bm[0]; xnew[0] = xm[2]; xnew[1] = x[1]; xnew[2] = xm[0]; vnew[0] = vm[2]; vnew[1] = v[1]; vnew[2] = vm[0]; graph_value_recursive(refine-1, bnew, vnew, xnew); bnew[0] = b[2]; bnew[1] = bm[1]; bnew[2] = bm[0]; xnew[0] = x[2]; xnew[1] = xm[1]; xnew[2] = xm[0]; vnew[0] = v[2]; vnew[1] = vm[1]; vnew[2] = vm[0]; graph_value_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[0]; bnew[1] = bm[1]; bnew[2] = bm[2]; xnew[0] = xm[0]; xnew[1] = xm[1]; xnew[2] = xm[2]; vnew[0] = vm[0]; vnew[1] = vm[1]; vnew[2] = vm[2]; graph_value_recursive(refine-1, bnew, vnew, xnew); return; } /* draw triangle */ glBegin(GL_TRIANGLES); for (i = 0; i < N_VERTICES_2D; i++) { glColor3fv(val_color(v[i])); glVertex2dv(x[i]); } glEnd(); } static void graph_value_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("graph_value_fct"); static REAL bnew[3][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; static const REAL *b[3]={bnew[0],bnew[1],bnew[2]}; static const REAL *x[3]; static REAL_D coord[N_VERTICES_2D]; static REAL v[3]; int i, j; PARAMETRIC *parametric = elinfo->mesh->parametric; if (bas_fcts->get_real_vec) el_vec = bas_fcts->get_real_vec(elinfo->el, drv, nil); else ERROR("no bas_fcts->get_real_vec()\n"); el_info = elinfo; if (parametric) { el_parametric = parametric; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, coord); for (i = 0; i < 3; i++) x[i] = coord[i]; } else { el_parametric = nil; for (i = 0; i < 3; i++) x[i] = elinfo->coord[i]; } for (i = 0; i < 3; i++) { v[i] = 0.0; for (j=0; jfe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } drv = v; bas_fcts = v->fe_space->bas_fcts; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); if (min < max) { val_min = min; val_max = max; } else { val_max = -(val_min = 1.0E20); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL, val_minmax_fct, nil); val_max = MAX(val_max, val_min + 1.0E-10); } val_fac = 1.0 / (val_max - val_min); OGL_set_std_window(ogl_win); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL|FILL_COORDS, graph_value_fct, nil); OGL_FLUSH(ogl_win); } /****************************************************************************/ static void graph_value_d_recursive(int refine, const REAL *b[3], REAL v[3], const REAL *x[3]) { int i, j, k; REAL phi_b; if (refine > 0) /* refine and call recursively */ { const REAL *bnew[3], *xnew[3]; REAL bm[3][N_LAMBDA], vnew[3], vm[3], xm[3][DIM_OF_WORLD]; REAL_D vd; for (j = 0; j < 3; j++) { bm[0][j] = 0.5*(b[1][j] + b[2][j]); bm[1][j] = 0.5*(b[0][j] + b[2][j]); bm[2][j] = 0.5*(b[0][j] + b[1][j]); } for (i = 0; i < 3; i++) { SET_DOW(0.0, vd); for (j = 0; j < n_bas_fcts; j++) { phi_b = phi[j](bm[i]); for (k=0; kcoord_to_world(el_info, nil, N_EDGES_2D, (const REAL (*)[N_LAMBDA]) bm, xm); } else { for (j = 0; j < DIM_OF_WORLD; j++) { xm[0][j] = 0.5*(x[1][j] + x[2][j]); xm[1][j] = 0.5*(x[0][j] + x[2][j]); xm[2][j] = 0.5*(x[0][j] + x[1][j]); } } bnew[0] = b[0]; bnew[1] = bm[2]; bnew[2] = bm[1]; xnew[0] = x[0]; xnew[1] = xm[2]; xnew[2] = xm[1]; vnew[0] = v[0]; vnew[1] = vm[2]; vnew[2] = vm[1]; graph_value_d_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[1]; bnew[2] = bm[0]; xnew[0] = xm[2]; xnew[1] = x[1]; xnew[2] = xm[0]; vnew[0] = vm[2]; vnew[1] = v[1]; vnew[2] = vm[0]; graph_value_d_recursive(refine-1, bnew, vnew, xnew); bnew[0] = b[2]; bnew[1] = bm[1]; bnew[2] = bm[0]; xnew[0] = x[2]; xnew[1] = xm[1]; xnew[2] = xm[0]; vnew[0] = v[2]; vnew[1] = vm[1]; vnew[2] = vm[0]; graph_value_d_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[0]; bnew[1] = bm[1]; bnew[2] = bm[2]; xnew[0] = xm[0]; xnew[1] = xm[1]; xnew[2] = xm[2]; vnew[0] = vm[0]; vnew[1] = vm[1]; vnew[2] = vm[2]; graph_value_d_recursive(refine-1, bnew, vnew, xnew); return; } /* draw triangle */ glBegin(GL_TRIANGLES); for (i = 0; i < N_VERTICES_2D; i++) { glColor3fv(val_color(v[i])); glVertex2dv(x[i]); } glEnd(); } static void graph_value_d_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("graph_value_d_fct"); static REAL bnew[3][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; static const REAL *b[3]={bnew[0],bnew[1],bnew[2]}; static const REAL *x[3]; static REAL_D coord[N_VERTICES_2D]; static REAL v[3], phi_b; static REAL_D vd; int i, j, k; PARAMETRIC *parametric = elinfo->mesh->parametric; if (bas_fcts->get_real_d_vec) el_vec_d = bas_fcts->get_real_d_vec(elinfo->el, drdv, nil); else ERROR("no bas_fcts->get_real_d_vec()\n"); el_info = elinfo; if (parametric) { el_parametric = parametric; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, coord); for (i = 0; i < 3; i++) x[i] = coord[i]; } else { el_parametric = nil; for (i = 0; i < 3; i++) x[i] = elinfo->coord[i]; } for (i = 0; i < 3; i++) { SET_DOW(0.0, vd); for (j = 0; j < n_bas_fcts; j++) { phi_b = phi[j](b[i]); for (k = 0; k < DIM_OF_WORLD; k++) vd[k] += el_vec_d[j][k]*phi_b; } v[i] = NORM_DOW(vd); } graph_value_d_recursive(nrefine, b, v, x); } static void graph_drv_d_2d(GRAPH_WINDOW win, const DOF_REAL_D_VEC *v, REAL min, REAL max, int refine) { FUNCNAME("graph_drv_d_2d"); OGL_WINDOW *ogl_win = (OGL_WINDOW *)win; if((DIM_OF_WORLD != 2) || (v->fe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } drdv = v; bas_fcts = v->fe_space->bas_fcts; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); if (min < max) { val_min = min; val_max = max; } else { val_max = -(val_min = 1.0E20); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL, val_d_minmax_fct, nil); val_max = MAX(val_max, val_min + 1.0E-10); } val_fac = 1.0 / (val_max - val_min); OGL_set_std_window(ogl_win); mesh_traverse(v->fe_space->admin->mesh, -1, CALL_LEAF_EL|FILL_COORDS, graph_value_d_fct, nil); OGL_FLUSH(ogl_win); } /****************************************************************************/ /* graph_fvalue: general graph_value without DOF_REAL_VEC */ /****************************************************************************/ static REAL (*fvalue_fct)(const EL_INFO *, const REAL *lambda) = nil; static void gval_minmax_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("gval_minmax_fct"); #define NTEST 4 static REAL b[NTEST][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.333,0.333,0.334, 0.0}}; int i, ntest; REAL v; TEST_EXIT(fvalue_fct, "no fvalue_fct\n"); if (nrefine>0) ntest = NTEST; else ntest = 3; for (i = 0; i < ntest; i++) { v = fvalue_fct(elinfo, b[i]); val_min = MIN(val_min, v); val_max = MAX(val_max, v); } #undef NTEST } /****************************************************************************/ static void graph_fvalue_recursive(int refine, const REAL *b[3], REAL v[3], const REAL *x[3]) { int i,j; if (refine > 0) /* refine and call recursively */ { const REAL *bnew[3], *xnew[3]; REAL bm[3][N_LAMBDA], vnew[3], vm[3], xm[3][DIM_OF_WORLD]; for (j = 0; j < 3; j++) { bm[0][j] = 0.5*(b[1][j] + b[2][j]); bm[1][j] = 0.5*(b[0][j] + b[2][j]); bm[2][j] = 0.5*(b[0][j] + b[1][j]); } for (i = 0; i < 3; i++) { vm[i] = fvalue_fct(el_info, bm[i]); } if (el_parametric) { el_parametric->coord_to_world(el_info, nil, N_EDGES_2D, (const REAL (*)[N_LAMBDA]) bm, xm); } else { for (j = 0; j < DIM_OF_WORLD; j++) { xm[0][j] = 0.5*(x[1][j] + x[2][j]); xm[1][j] = 0.5*(x[0][j] + x[2][j]); xm[2][j] = 0.5*(x[0][j] + x[1][j]); } } bnew[0] = b[0]; bnew[1] = bm[2]; bnew[2] = bm[1]; xnew[0] = x[0]; xnew[1] = xm[2]; xnew[2] = xm[1]; vnew[0] = v[0]; vnew[1] = vm[2]; vnew[2] = vm[1]; graph_fvalue_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[2]; bnew[2] = bm[1]; xnew[0] = xm[2]; xnew[1] = x[2]; xnew[2] = xm[1]; vnew[0] = vm[2]; vnew[1] = v[2]; vnew[2] = vm[1]; graph_fvalue_recursive(refine-1, bnew, vnew, xnew); bnew[0] = b[2]; bnew[1] = bm[2]; bnew[2] = bm[0]; xnew[0] = x[2]; xnew[1] = xm[2]; xnew[2] = xm[0]; vnew[0] = v[2]; vnew[1] = vm[2]; vnew[2] = vm[0]; graph_fvalue_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[1]; bnew[2] = bm[0]; xnew[0] = xm[2]; xnew[1] = x[1]; xnew[2] = xm[0]; vnew[0] = vm[2]; vnew[1] = v[1]; vnew[2] = vm[0]; graph_fvalue_recursive(refine-1, bnew, vnew, xnew); return; } /* draw triangle */ glBegin(GL_TRIANGLES); for (i = 0; i < N_VERTICES_2D; i++) { glColor3fv(val_color(v[i])); glVertex2dv(x[i]); } glEnd(); } static void graph_fvalue_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("graph_fvalue_fct"); static REAL bnew[3][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; static const REAL *b[3]={bnew[0],bnew[1],bnew[2]}; static const REAL *x[3]; static REAL_D coord[N_VERTICES_2D]; static REAL v[3]; int i; PARAMETRIC *parametric = elinfo->mesh->parametric; TEST_EXIT(fvalue_fct, "no fvalue_fct\n"); el_info = elinfo; if (parametric) { el_parametric = parametric; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, coord); for (i = 0; i < 3; i++) x[i] = coord[i]; } else { el_parametric = nil; for (i = 0; i < 3; i++) x[i] = elinfo->coord[i]; } for (i = 0; i < 3; i++) { v[i] = fvalue_fct(elinfo, b[i]); } graph_fvalue_recursive(nrefine, b, v, x); } void graph_fvalues_2d(GRAPH_WINDOW win, MESH *mesh, REAL(*fct)(const EL_INFO *, const REAL *lambda), FLAGS fill_flag, REAL min, REAL max, int refine) { FUNCNAME("graph_fvalues_2d"); OGL_WINDOW *ogl_win = (OGL_WINDOW *)win; TEST_EXIT(mesh, "no mesh\n"); TEST_EXIT(fvalue_fct = fct, "no fct\n"); if((DIM_OF_WORLD != 2) || (mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } nrefine = MAX(refine, 0); if (min < max) { val_min = min; val_max = max; } else { val_max = -(val_min = 1.0E20); mesh_traverse(mesh, -1, CALL_LEAF_EL | fill_flag, gval_minmax_fct, nil); val_max = MAX(val_max, val_min + 1.0E-10); } val_fac = 1.0 / (val_max - val_min); OGL_set_std_window(ogl_win); mesh_traverse(mesh, -1, CALL_LEAF_EL|FILL_COORDS, graph_fvalue_fct, nil); OGL_FLUSH(ogl_win); } /****************************************************************************/ /****************************************************************************/ /* MULTIGRID LEVEL DISPLAYS */ /****************************************************************************/ /****************************************************************************/ void graph_mesh_mg_2d(GRAPH_WINDOW win, MESH *mesh, const GRAPH_RGBCOLOR c, FLAGS flags, int mg_level) { OGL_WINDOW *ogl_win = (OGL_WINDOW *)win; if (!mesh) return; if((DIM_OF_WORLD != 2) || (mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } OGL_set_std_window(ogl_win); if (c) linecolor_2d = c; else linecolor_2d = rgb_black; graph_mesh_flags_2d = flags; mesh_traverse(mesh, mg_level, CALL_MG_LEVEL | FILL_COORDS | FILL_BOUND, OGLgraph_mesh_fct_2d, nil); OGL_FLUSH(ogl_win); return; } /****************************************************************************/ static const int *mg_sort_dof_invers = nil; static int mg_el_vec_size = 0; static REAL *mg_el_vec = nil; static const REAL *drv_vec = nil; static const DOF_ADMIN *mg_admin = nil; static void val_minmax_mg_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("val_minmax_mg_fct"); #define NTEST 4 static REAL b[NTEST][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.333,0.333,0.334,0.0}}; int i, j, ntest; REAL v; const DOF *dof_indices; if (bas_fcts->get_dof_indices) dof_indices = bas_fcts->get_dof_indices(elinfo->el, mg_admin, nil); else { ERROR("no bas_fcts->get_dof_indices()\n"); return; } if (mg_sort_dof_invers) { for (i = 0; i < n_bas_fcts; i++) { mg_el_vec[i] = drv_vec[mg_sort_dof_invers[dof_indices[i]]]; } } else /* no mg_sort_dof_invers */ { for (i = 0; i < n_bas_fcts; i++) { mg_el_vec[i] = drv_vec[dof_indices[i]]; } } if (nrefine>0) ntest = NTEST; else ntest = 3; for (i = 0; i < ntest; i++) { v = 0.0; for (j=0; j 0) /* refine and call recursively */ { const REAL *bnew[3], *xnew[3]; REAL bm[3][N_LAMBDA], vnew[3], vm[3], xm[3][DIM_OF_WORLD]; for (j = 0; j < 3; j++) { bm[0][j] = 0.5*(b[1][j] + b[2][j]); bm[1][j] = 0.5*(b[0][j] + b[2][j]); bm[2][j] = 0.5*(b[0][j] + b[1][j]); } for (i = 0; i < 3; i++) { vm[i] = 0.0; for (j=0; jcoord_to_world(el_info, nil, N_EDGES_2D, (const REAL (*)[N_LAMBDA]) bm, xm); } else { for (j = 0; j < DIM_OF_WORLD; j++) { xm[0][j] = 0.5*(x[1][j] + x[2][j]); xm[1][j] = 0.5*(x[0][j] + x[2][j]); xm[2][j] = 0.5*(x[0][j] + x[1][j]); } } bnew[0] = b[0]; bnew[1] = bm[2]; bnew[2] = bm[1]; xnew[0] = x[0]; xnew[1] = xm[2]; xnew[2] = xm[1]; vnew[0] = v[0]; vnew[1] = vm[2]; vnew[2] = vm[1]; graph_value_mg_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[2]; bnew[2] = bm[1]; xnew[0] = xm[2]; xnew[1] = x[2]; xnew[2] = xm[1]; vnew[0] = vm[2]; vnew[1] = v[2]; vnew[2] = vm[1]; graph_value_mg_recursive(refine-1, bnew, vnew, xnew); bnew[0] = b[2]; bnew[1] = bm[2]; bnew[2] = bm[0]; xnew[0] = x[2]; xnew[1] = xm[2]; xnew[2] = xm[0]; vnew[0] = v[2]; vnew[1] = vm[2]; vnew[2] = vm[0]; graph_value_mg_recursive(refine-1, bnew, vnew, xnew); bnew[0] = bm[2]; bnew[1] = b[1]; bnew[2] = bm[0]; xnew[0] = xm[2]; xnew[1] = x[1]; xnew[2] = xm[0]; vnew[0] = vm[2]; vnew[1] = v[1]; vnew[2] = vm[0]; graph_value_mg_recursive(refine-1, bnew, vnew, xnew); return; } /* draw triangle */ glBegin(GL_TRIANGLES); for (i = 0; i < N_VERTICES_2D; i++) { glColor3fv(val_color(v[i])); glVertex2dv(x[i]); } glEnd(); } static void graph_value_mg_fct(const EL_INFO *elinfo, void *data) { FUNCNAME("graph_value_mg_fct"); static REAL bnew[3][N_LAMBDA]={{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}}; static const REAL *b[3]={bnew[0],bnew[1],bnew[2]}; const REAL *x[3]; REAL_D coord[N_VERTICES_2D]; REAL v[3]; int i, j; const DOF *dof_indices; PARAMETRIC *parametric = elinfo->mesh->parametric; if (bas_fcts->get_dof_indices) dof_indices = bas_fcts->get_dof_indices(elinfo->el, mg_admin, nil); else { ERROR("no bas_fcts->get_dof_indices()\n"); return; } if (mg_sort_dof_invers) { for (i = 0; i < n_bas_fcts; i++) { mg_el_vec[i] = drv_vec[mg_sort_dof_invers[dof_indices[i]]]; } } else /* no mg_sort_dof_invers */ { for (i = 0; i < n_bas_fcts; i++) { mg_el_vec[i] = drv_vec[dof_indices[i]]; } } el_info = elinfo; if (parametric) { el_parametric = parametric; parametric->init_element(elinfo, parametric); parametric->coord_to_world(elinfo, nil, N_VERTICES_2D, vertex_lambda_2d, coord); for (i = 0; i < 3; i++) x[i] = coord[i]; } else { el_parametric = nil; for (i = 0; i < 3; i++) x[i] = elinfo->coord[i]; } for (i = 0; i < 3; i++) { v[i] = 0.0; for (j=0; jadmin, "no vec or fe_space or admin\n"); if((DIM_OF_WORLD != 2) || (v->fe_space->admin->mesh->dim != 2)) { ERROR("Only implemented for DIM_OF_WORLD==2 and dim==2!\n"); return; } drv = v; drv_vec = drv->vec; bas_fcts = fe_space->bas_fcts; mg_admin = fe_space->admin; n_bas_fcts = bas_fcts->n_bas_fcts; phi = bas_fcts->phi; mg_sort_dof_invers = sort_dof_invers; if (n_bas_fcts > mg_el_vec_size) { mg_el_vec = MEM_REALLOC(mg_el_vec, mg_el_vec_size, n_bas_fcts, REAL); mg_el_vec_size = n_bas_fcts; } if (refine >= 0) nrefine = refine; else nrefine = MAX(0, bas_fcts->degree-1); if (min < max) { val_min = min; val_max = max; } else { val_max = -(val_min = 1.0E20); mesh_traverse(fe_space->admin->mesh, mg_level, CALL_MG_LEVEL, val_minmax_mg_fct, nil); MSG("<%s> value range in [%.3le , %.3le]\n", NAME(drv), val_min, val_max); val_max = MAX(val_max, val_min + 1.0E-5); } val_fac = 1.0 / (val_max - val_min); OGL_set_std_window(ogl_win); mesh_traverse(fe_space->admin->mesh, mg_level, CALL_MG_LEVEL | FILL_COORDS, graph_value_mg_fct, nil); graph_mesh_mg_2d(win, fe_space->admin->mesh, rgb_black, 0, mg_level); OGL_FLUSH(ogl_win); } alberta-2.0.1/alberta/src/2d/lagrange_1_2d.c0000644000042300001440000003412510676724251015313 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_1_2d.c */ /* */ /* description: piecewise linear Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL bary1_2d[3][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi1v0_2d(const REAL lambda[N_LAMBDA]) { return(lambda[0]); } static const REAL *grd_phi1v0_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; return(grd); } static const REAL (*D2_phi1v0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi1v1_2d(const REAL lambda[N_LAMBDA]) { return(lambda[1]); } static const REAL *grd_phi1v1_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; return(grd); } static const REAL (*D2_phi1v1_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi1v2_2d(const REAL lambda[N_LAMBDA]) { return(lambda[2]); } static const REAL *grd_phi1v2_2d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 0.0, 1.0, 0.0}; return(grd); } static const REAL (*D2_phi1v2_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *get_dof_indices1_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_VERTICES_2D]; DOF *rvec = idof ? idof : index_vec; int i, n0 = admin->n0_dof[VERTEX]; DOF **dof = el->dof; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound1_2d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound1_2d"); static S_CHAR bound_vec[N_VERTICES_2D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = el_info->vertex_bound[i]; return((const S_CHAR *) rvec); } static const int *get_int_vec1_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec1_2d"); int i, n0; static int local_vec[N_VERTICES_2D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *get_real_vec1_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_v1_2d"); int i, n0; static REAL local_vec[N_VERTICES_2D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec1_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_v1_2d"); int i, k, n0; static REAL_D local_vec[N_VERTICES_2D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec1_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec1_2d"); int i, n0; static U_CHAR local_vec[N_VERTICES_2D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec1_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec1_2d"); int i, n0; static S_CHAR local_vec[N_VERTICES_2D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } static const REAL *interpol1_2d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("interpol1_2d"); static REAL inter[N_VERTICES_2D]; REAL *rvec = vec ? vec : inter; int i; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= N_VERTICES_2D), "not for %d points\n", no); if(f_loc) for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = f_loc(el_info, bary1_2d[i]); else { if (parametric) { REAL_D world[N_VERTICES_2D]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES_2D, bary1_2d, world); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = f(world[i]); } else { /* Vertex coordinates do not have to be calculated. */ DEBUG_TEST_FLAG(FILL_COORDS, el_info); rvec[0] = f(el_info->coord[0]); rvec[1] = f(el_info->coord[1]); rvec[2] = f(el_info->coord[2]); } } if(b_no) { /* Perform resorting if only certain indices are required. */ REAL tmp[N_VERTICES_2D]; memcpy(tmp, rvec, N_VERTICES_2D * sizeof(REAL)); for(i = 0; i < no; i++) rvec[i] = tmp[b_no[i]]; } return((const REAL *) rvec); } static const REAL_D *interpol_d1_2d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("interpol_d1_2d"); static REAL_D inter[N_VERTICES_2D]; REAL_D *rvec = vec ? vec : inter; int i; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= N_VERTICES_2D), "not for %d points\n", no); if(f_loc) for (i = 0; i < N_VERTICES_2D; i++) f_loc(el_info, bary1_2d[i], rvec[i]); else { if (parametric) { REAL_D world[N_VERTICES_2D]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES_2D, bary1_2d, world); for (i = 0; i < N_VERTICES_2D; i++) f(world[i], rvec[i]); } else { /* Vertex coordinates do not have to be calculated. */ DEBUG_TEST_FLAG(FILL_COORDS, el_info); f(el_info->coord[0], rvec[0]); f(el_info->coord[1], rvec[1]); f(el_info->coord[2], rvec[2]); } } if(b_no) { /* Perform resorting if only certain indices are required. */ REAL_D tmp[N_VERTICES_2D]; memcpy(tmp, rvec, N_VERTICES_2D * sizeof(REAL_D)); for(i = 0; i < no; i++) COPY_DOW(tmp[b_no[i]], rvec[i]); } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void real_refine_inter1_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter1_2d"); EL *el; REAL *vec = nil; DOF dof_new, dof0, dof1; int n0; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[2][n0]; /* newest vertex is dim==2 */ vec[dof_new] = 0.5*(vec[dof0] + vec[dof1]); return; } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do nothing */ /*--------------------------------------------------------------------------*/ static void real_coarse_restr1_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr1_2d"); EL *el; REAL *vec = nil; DOF dof_new, dof0, dof1; int n0; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[2][n0]; /* newest vertex is dim==2 */ vec[dof0] += 0.5*vec[dof_new]; vec[dof1] += 0.5*vec[dof_new]; return; } static void real_d_refine_inter1_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter1_2d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; int n0, j; if (n < 1) return; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[2][n0]; /* newest vertex is dim==2 */ for (j = 0; j < DIM_OF_WORLD; j++) vec[dof_new][j] = 0.5*(vec[dof0][j] + vec[dof1][j]); return; } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do nothing */ /*--------------------------------------------------------------------------*/ static void real_d_coarse_restr1_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr1_2d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; int n0, j; if (n < 1) return; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[2][n0]; /* newest vertex is dim==2 */ for (j = 0; j < DIM_OF_WORLD; j++) { vec[dof0][j] += 0.5 * vec[dof_new][j]; vec[dof1][j] += 0.5 * vec[dof_new][j]; } return; } static BAS_FCT *phi1_2d[3] = {phi1v0_2d, phi1v1_2d, phi1v2_2d}; static GRD_BAS_FCT *grd_phi1_2d[3] = {grd_phi1v0_2d, grd_phi1v1_2d, grd_phi1v2_2d}; static D2_BAS_FCT *D2_phi1_2d[3] = {D2_phi1v0_2d, D2_phi1v1_2d, D2_phi1v2_2d}; static BAS_FCTS lagrange1_2d = {"lagrange1_2d", 2, 3, 1, {1, 0, 0, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi1_2d, grd_phi1_2d, D2_phi1_2d, get_dof_indices1_2d, get_bound1_2d, interpol1_2d, interpol_d1_2d, get_int_vec1_2d, get_real_vec1_2d, get_real_d_vec1_2d, get_uchar_vec1_2d, get_schar_vec1_2d, real_refine_inter1_2d, nil, real_coarse_restr1_2d, real_d_refine_inter1_2d, nil, real_d_coarse_restr1_2d, bary1_2d, }; alberta-2.0.1/alberta/src/2d/lagrange_2_2d.c0000644000042300001440000006414310676724251015317 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_2_2d.c */ /* */ /* description: piecewise quadratic Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS2_2D 6 /* (N_VERTICES_2D + N_EDGES_2D) */ static const REAL bary2_2d[N_BAS2_2D][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.5, 0.5, 0.0}, {0.5, 0.0, 0.5, 0.0}, {0.5, 0.5, 0.0, 0.0}}; /****************************************************************************/ /* basisfunction at vertex 0 */ /****************************************************************************/ static REAL phi2v0_2d(const REAL lambda[N_LAMBDA]) { return(lambda[0]*(2.0*lambda[0] - 1.0)); } static const REAL *grd_phi2v0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[0] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 1 */ /****************************************************************************/ static REAL phi2v1_2d(const REAL lambda[N_LAMBDA]) { return(lambda[1]*(2.0*lambda[1] - 1.0)); } static const REAL *grd_phi2v1_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[1] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v1_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 2 */ /****************************************************************************/ static REAL phi2v2_2d(const REAL lambda[N_LAMBDA]) { return(lambda[2]*(2.0*lambda[2] - 1.0)); } static const REAL *grd_phi2v2_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = 4.0*lambda[2] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v2_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 4, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 0 */ /****************************************************************************/ static REAL phi2e0_2d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[1]*lambda[2]); } static const REAL *grd_phi2e0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[2]; grd[2] = 4.0*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi2e0_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 4, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 1 */ /****************************************************************************/ static REAL phi2e1_2d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[2]); } static const REAL *grd_phi2e1_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[2]; grd[2] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi2e1_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 4, 0}, {0, 0, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 2 */ /****************************************************************************/ static REAL phi2e2_2d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[1]); } static const REAL *grd_phi2e2_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[1]; grd[1] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi2e2_2d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 4, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* functions for combining basisfunctions with coefficients */ /****************************************************************************/ static const DOF *get_dof_indices2_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS2_2D]; int i, n0; DOF *rvec = idof ? idof : index_vec; DOF **dof = el->dof; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = dof[i][n0]; n0 = admin->n0_dof[EDGE]; for (i = N_VERTICES_2D; i < N_BAS2_2D; i++) rvec[i] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound2_2d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound2_2d"); static S_CHAR bound_vec[N_BAS2_2D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = el_info->vertex_bound[i]; for (i = 0; i < N_EDGES_2D; i++) rvec[N_VERTICES_2D+i] = el_info->edge_bound[i]; return((const S_CHAR *) rvec); } static const int *get_int_vec2_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec2_2d"); int i, n0; static int local_vec[6]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_2D; i < N_BAS2_2D; i++) rvec[i] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *get_real_vec2_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_vec2_2d"); int i, n0; static REAL local_vec[6]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_2D; i < N_BAS2_2D; i++) rvec[i] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec2_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_vec2_2d"); int i, k, n0; static REAL_D local_vec[6]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_2D; i < N_BAS2_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec2_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec2_2d"); int i, n0; static U_CHAR local_vec[6]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_2D; i < N_BAS2_2D; i++) rvec[i] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec2_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec2_2d"); int i, n0; static S_CHAR local_vec[6]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_2D; i < N_BAS2_2D; i++) rvec[i] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,2,2,6) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,2,2,6) /****************************************************************************/ /* functions for interpolation/ restriction during refinement/coarsening */ /****************************************************************************/ static void real_refine_inter2_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter2_2d"); EL *el; REAL *vec = nil; int node, n0; DOF cdof; const DOF *pdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(vec, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); pdof = get_dof_indices(el, admin, nil); node = drv->fe_space->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; /****************************************************************************/ /* newest vertex of child[0] and child[1] */ /****************************************************************************/ cdof = el->child[0]->dof[node+2][n0]; /* newest vertex is 2 */ vec[cdof] = vec[pdof[5]]; node = drv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /****************************************************************************/ /* midpoint of edge on child[0] at the refinement edge */ /****************************************************************************/ cdof = el->child[0]->dof[node][n0]; vec[cdof] = 0.375*vec[pdof[0]] - 0.125*vec[pdof[1]] + 0.75*vec[pdof[5]]; /****************************************************************************/ /* node in the common edge of child[0] and child[1] */ /****************************************************************************/ cdof = el->child[0]->dof[node+1][n0]; vec[cdof] = -0.125*(vec[pdof[0]] + vec[pdof[1]]) + 0.25*vec[pdof[5]] + 0.5*(vec[pdof[3]] + vec[pdof[4]]); /****************************************************************************/ /* midpoint of edge on child[1] at the refinement edge */ /****************************************************************************/ cdof = el->child[1]->dof[node+1][n0]; vec[cdof] = -0.125*vec[pdof[0]] + 0.375*vec[pdof[1]] + 0.75*vec[pdof[5]]; if (n > 1) { /****************************************************************************/ /* adjust the value at the midpoint of the common edge of neigh's children */ /****************************************************************************/ el = list[1].el_info.el; pdof = get_dof_indices(el, admin, nil); cdof = el->child[0]->dof[node+1][n0]; vec[cdof] = -0.125*(vec[pdof[0]] + vec[pdof[1]]) + 0.25*vec[pdof[5]] + 0.5*(vec[pdof[3]] + vec[pdof[4]]); } return; } static void real_coarse_inter2_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter2_2d"); EL *el; REAL *v = nil; DOF cdof, pdof; const DOF_ADMIN *admin; MESH *mesh = nil; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } GET_STRUCT(admin,drv->fe_space); GET_STRUCT(mesh,drv->fe_space); /****************************************************************************/ /* values on child[0] */ /****************************************************************************/ cdof = el->child[0]->dof[mesh->node[VERTEX]+2][admin->n0_dof[VERTEX]]; pdof = el->dof[mesh->node[EDGE]+2][admin->n0_dof[EDGE]]; v[pdof] = v[cdof]; return; } static void real_coarse_restr2_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr2_2d"); EL *el; REAL *vec = nil; int node, n0; DOF cdof2, cdof3, cdof4; const DOF *pdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(vec, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); pdof = get_dof_indices(el, admin, nil); /****************************************************************************/ /* contributions of dofs located on child[0] */ /****************************************************************************/ node = drv->fe_space->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; cdof2 = el->child[0]->dof[node+2][n0]; node = drv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; cdof3 = el->child[0]->dof[node][n0]; cdof4 = el->child[0]->dof[node+1][n0]; vec[pdof[0]] += 0.375*vec[cdof3] - 0.125*vec[cdof4]; vec[pdof[1]] += -0.125*(vec[cdof3] + vec[cdof4]); vec[pdof[3]] += 0.5*vec[cdof4]; vec[pdof[4]] += 0.5*vec[cdof4]; vec[pdof[5]] = vec[cdof2] + 0.75*vec[cdof3] + 0.25*vec[cdof4]; /****************************************************************************/ /* contributions of dofs located on child[1] and not on child[0] */ /****************************************************************************/ cdof4 = el->child[1]->dof[node+1][n0]; vec[pdof[0]] += -0.125*vec[cdof4]; vec[pdof[1]] += 0.375*vec[cdof4]; vec[pdof[5]] += 0.75*vec[cdof4]; if (n > 1) { el = list[1].el_info.el; pdof = get_dof_indices(el, admin, nil); /****************************************************************************/ /* first set those values not effected by previous element */ /****************************************************************************/ cdof4 = el->child[0]->dof[node+1][n0]; vec[pdof[3]] += 0.5*vec[cdof4]; vec[pdof[4]] += 0.5*vec[cdof4]; /****************************************************************************/ /* and now, update the values in the refinement edge */ /****************************************************************************/ vec[pdof[0]] += -0.125*vec[cdof4]; vec[pdof[1]] += -0.125*vec[cdof4]; vec[pdof[5]] += 0.25*vec[cdof4]; } return; } static void real_d_refine_inter2_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter2_2d"); EL *el; REAL_D *vec = nil; int node, n0, j; DOF cdof; const DOF *pdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(vec, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); pdof = get_dof_indices(el, admin, nil); node = drdv->fe_space->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; /****************************************************************************/ /* newest vertex of child[0] and child[1] */ /****************************************************************************/ cdof = el->child[0]->dof[node+2][n0]; /* newest vertex is 2 */ for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof][j] = vec[pdof[5]][j]; node = drdv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /****************************************************************************/ /* midpoint of edge on child[0] at the refinement edge */ /****************************************************************************/ cdof = el->child[0]->dof[node][n0]; for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof][j] = (0.375*vec[pdof[0]][j] - 0.125*vec[pdof[1]][j] + 0.75*vec[pdof[5]][j]); /****************************************************************************/ /* node in the common edge of child[0] and child[1] */ /****************************************************************************/ cdof = el->child[0]->dof[node+1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof][j] = -0.125*(vec[pdof[0]][j] + vec[pdof[1]][j]) + 0.25*vec[pdof[5]][j] + 0.5*(vec[pdof[3]][j] + vec[pdof[4]][j]); /****************************************************************************/ /* midpoint of edge on child[1] at the refinement edge */ /****************************************************************************/ cdof = el->child[1]->dof[node+1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof][j] = (-0.125*vec[pdof[0]][j] + 0.375*vec[pdof[1]][j] + 0.75*vec[pdof[5]][j]); if (n > 1) { /****************************************************************************/ /* adjust the value at the midpoint of the common edge of neigh's children */ /****************************************************************************/ el = list[1].el_info.el; pdof = get_dof_indices(el, admin, nil); cdof = el->child[0]->dof[node+1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof][j] = -0.125*(vec[pdof[0]][j] + vec[pdof[1]][j]) + 0.25*vec[pdof[5]][j]+ 0.5*(vec[pdof[3]][j] + vec[pdof[4]][j]); } return; } static void real_d_coarse_inter2_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_inter2_2d"); EL *el; REAL_D *v = nil; int j; DOF cdof, pdof; MESH *mesh = nil; const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } GET_STRUCT(admin,drdv->fe_space); GET_STRUCT(mesh,drdv->fe_space); /****************************************************************************/ /* values on child[0] */ /****************************************************************************/ cdof = el->child[0]->dof[mesh->node[VERTEX]+2][admin->n0_dof[VERTEX]]; pdof = el->dof[mesh->node[EDGE]+2][admin->n0_dof[EDGE]]; for (j = 0; j < DIM_OF_WORLD; j++) v[pdof][j] = v[cdof][j]; return; } static void real_d_coarse_restr2_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr2_2d"); EL *el; REAL_D *vec = nil; int node, n0, j; DOF cdof2, cdof3, cdof4; const DOF *pdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(vec, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); pdof = get_dof_indices(el, admin, nil); /****************************************************************************/ /* contributions of dofs located on child[0] */ /****************************************************************************/ node = drdv->fe_space->mesh->node[VERTEX]; n0 = admin->n0_dof[VERTEX]; cdof2 = el->child[0]->dof[node+2][n0]; node = drdv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; cdof3 = el->child[0]->dof[node][n0]; cdof4 = el->child[0]->dof[node+1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) { vec[pdof[0]][j] += 0.375*vec[cdof3][j] - 0.125*vec[cdof4][j]; vec[pdof[1]][j] += -0.125*(vec[cdof3][j] + vec[cdof4][j]); vec[pdof[3]][j] += 0.5*vec[cdof4][j]; vec[pdof[4]][j] += 0.5*vec[cdof4][j]; vec[pdof[5]][j] = vec[cdof2][j] + 0.75*vec[cdof3][j] + 0.25*vec[cdof4][j]; } /****************************************************************************/ /* contributions of dofs located on child[1] and not on child[0] */ /****************************************************************************/ cdof4 = el->child[1]->dof[node+1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) { vec[pdof[0]][j] += -0.125*vec[cdof4][j]; vec[pdof[1]][j] += 0.375*vec[cdof4][j]; vec[pdof[5]][j] += 0.75*vec[cdof4][j]; } if (n > 1) { el = list[1].el_info.el; pdof = get_dof_indices(el, admin, nil); /****************************************************************************/ /* first set those values not effected by previous element */ /****************************************************************************/ cdof4 = el->child[0]->dof[node+1][n0]; for (j = 0; j < DIM_OF_WORLD; j++) { vec[pdof[3]][j] += 0.5*vec[cdof4][j]; vec[pdof[4]][j] += 0.5*vec[cdof4][j]; /****************************************************************************/ /* and now, update the values in the refinement edge */ /****************************************************************************/ vec[pdof[0]][j] += -0.125*vec[cdof4][j]; vec[pdof[1]][j] += -0.125*vec[cdof4][j]; vec[pdof[5]][j] += 0.25*vec[cdof4][j]; } } return; } static BAS_FCT *phi2_2d[6] = {phi2v0_2d, phi2v1_2d, phi2v2_2d, phi2e0_2d, phi2e1_2d, phi2e2_2d}; static GRD_BAS_FCT *grd_phi2_2d[6] = {grd_phi2v0_2d, grd_phi2v1_2d, grd_phi2v2_2d, grd_phi2e0_2d, grd_phi2e1_2d, grd_phi2e2_2d}; static D2_BAS_FCT *D2_phi2_2d[6] = {D2_phi2v0_2d, D2_phi2v1_2d, D2_phi2v2_2d, D2_phi2e0_2d, D2_phi2e1_2d, D2_phi2e2_2d}; static BAS_FCTS lagrange2_2d = {"lagrange2_2d", 2, 6, 2, {1, 0, 1, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi2_2d, grd_phi2_2d, D2_phi2_2d, get_dof_indices2_2d, get_bound2_2d, interpol2_2d, interpol_d2_2d, get_int_vec2_2d, get_real_vec2_2d, get_real_d_vec2_2d, get_uchar_vec2_2d, get_schar_vec2_2d, real_refine_inter2_2d, real_coarse_inter2_2d, real_coarse_restr2_2d, real_d_refine_inter2_2d, real_d_coarse_inter2_2d, real_d_coarse_restr2_2d, bary2_2d,}; alberta-2.0.1/alberta/src/2d/lagrange_3_2d.c0000644000042300001440000011703110676724251015313 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_3_2d.c */ /* */ /* description: piecewise cubic Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS3_2D 10 static const REAL bary3_2d[N_BAS3_2D][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 2.0/3.0, 1.0/3.0, 0.0}, {0.0, 1.0/3.0, 2.0/3.0, 0.0}, {1.0/3.0, 0.0, 2.0/3.0, 0.0}, {2.0/3.0, 0.0, 1.0/3.0, 0.0}, {2.0/3.0, 1.0/3.0, 0.0, 0.0}, {1.0/3.0, 2.0/3.0, 0.0, 0.0}, {1.0/3.0, 1.0/3.0, 1.0/3.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi3v0_2d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[0] - 1.0)*lambda[0] + 1.0)*lambda[0]); } static const REAL *grd_phi3v0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[0] - 9.0)*lambda[0] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v0_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[0] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3v1_2d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[1] - 1.0)*lambda[1] + 1.0)*lambda[1]); } static const REAL *grd_phi3v1_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (13.5*lambda[1] - 9.0)*lambda[1] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v1_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 27.0*lambda[1] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3v2_2d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[2] - 1.0)*lambda[2] + 1.0)*lambda[2]); } static const REAL *grd_phi3v2_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = (13.5*lambda[2] - 9.0)*lambda[2] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v2_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 27.0*lambda[2] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi3e0_2d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[1] - 4.5)*lambda[1]*lambda[2]); } static const REAL *grd_phi3e0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (27.0*lambda[1] - 4.5)*lambda[2]; grd[2] = (13.5*lambda[1] - 4.5)*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3e0_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 27.0*lambda[2]; D2[1][2] = D2[2][1] = 27.0*lambda[1] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi3e1_2d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[2] - 4.5)*lambda[2]*lambda[1]); } static const REAL *grd_phi3e1_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (13.5*lambda[2] - 4.5)*lambda[2]; grd[2] = (27.0*lambda[2] - 4.5)*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3e1_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][2] = D2[2][1] = 27.0*lambda[2] - 4.5; D2[2][2] = 27.0*lambda[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3e2_2d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[2] - 4.5)*lambda[2]*lambda[0]); } static const REAL *grd_phi3e2_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[2] - 4.5)*lambda[2]; grd[2] = (27.0*lambda[2] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e2_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][2] = D2[2][0] = 27.0*lambda[2] - 4.5; D2[2][2] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3e3_2d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[0] - 4.5)*lambda[0]*lambda[2]); } static const REAL *grd_phi3e3_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (27.0*lambda[0] - 4.5)*lambda[2]; grd[2] = (13.5*lambda[0] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e3_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[2]; D2[0][2] = D2[2][0] = 27.0*lambda[0] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3e4_2d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[0] - 4.5)*lambda[0]*lambda[1]); } static const REAL *grd_phi3e4_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (27.0*lambda[0] - 4.5)*lambda[1]; grd[1] = (13.5*lambda[0] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e4_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[1]; D2[0][1] = D2[1][0] = 27.0*lambda[0] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3e5_2d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[1] - 4.5)*lambda[1]*lambda[0]); } static const REAL *grd_phi3e5_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[1] - 4.5)*lambda[1]; grd[1] = (27.0*lambda[1] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e5_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 27.0*lambda[1] - 4.5; D2[1][1] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at barycenter */ /*--------------------------------------------------------------------------*/ static REAL phi3c0_2d(const REAL lambda[N_LAMBDA]) { return(27.0*lambda[0]*lambda[1]*lambda[2]); } static const REAL *grd_phi3c0_2d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 27.0*lambda[1]*lambda[2]; grd[1] = 27.0*lambda[0]*lambda[2]; grd[2] = 27.0*lambda[0]*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3c0_2d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 27.0*lambda[2]; D2[0][2] = D2[2][0] = 27.0*lambda[1]; D2[1][2] = D2[2][1] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *get_dof_indices3_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS3_2D]; DOF *rvec = idof ? idof : index_vec; int i, j, n0; DOF **dof = el->dof; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = dof[i][n0]; n0 = admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = dof[N_VERTICES_2D+i][n0]; rvec[j++] = dof[N_VERTICES_2D+i][n0+1]; } else { rvec[j++] = dof[N_VERTICES_2D+i][n0+1]; rvec[j++] = dof[N_VERTICES_2D+i][n0]; } } n0 = admin->n0_dof[CENTER]; rvec[9] = dof[6][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound3_2d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound3_2d"); static S_CHAR bound_vec[N_BAS3_2D]; S_CHAR *rvec = bound ? bound : bound_vec; int i, j; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = el_info->vertex_bound[i]; for (j = N_VERTICES_2D, i = 0; i < N_EDGES_2D; j += 2, i++) rvec[j] = rvec[j+1] = el_info->edge_bound[i]; rvec[9] = INTERIOR; return((const S_CHAR *) rvec); } static const int *get_int_vec3_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec3_2d"); int i, j, n0; static int local_vec[N_BAS3_2D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[9] = v[dof[6][n0]]; return((const int *) rvec); } static const REAL *get_real_vec3_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_vec3_2d"); int i, j, n0; static REAL local_vec[N_BAS3_2D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[9] = v[dof[6][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec3_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_vec3_2d"); int i, j, k, n0; static REAL_D local_vec[N_BAS3_2D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { for (k = 0; k < DIM_OF_WORLD; k++) { rvec[j][k] = v[dof[N_VERTICES_2D+i][n0]][k]; rvec[j+1][k] = v[dof[N_VERTICES_2D+i][n0+1]][k]; } j += 2; } else { for (k = 0; k < DIM_OF_WORLD; k++) { rvec[j][k] = v[dof[N_VERTICES_2D+i][n0+1]][k]; rvec[j+1][k] = v[dof[N_VERTICES_2D+i][n0]][k]; } j += 2; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; for (k = 0; k < DIM_OF_WORLD; k++) rvec[9][k] = v[dof[6][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec3_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec3_2d"); int i, j, n0; static U_CHAR local_vec[N_BAS3_2D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[9] = v[dof[6][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec3_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec3_2d"); int i, j, n0; static S_CHAR local_vec[N_BAS3_2D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[9] = v[dof[6][n0]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,3,2,10) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,3,2,10) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void real_refine_inter3_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter3_2d"); EL *el; REAL *v = nil; int dof9, node, n0; const DOF *cdof; DOF pdof[N_BAS3_2D]; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[cdof[2]] = (-0.0625*(v[pdof[0]] + v[pdof[1]]) + 0.5625*(v[pdof[7]] + v[pdof[8]])); v[cdof[3]] = (0.3125*(v[pdof[0]] - v[pdof[8]]) + 0.0625*v[pdof[1]] + 0.9375*v[pdof[7]]); v[cdof[4]] = v[pdof[7]]; v[cdof[5]] = v[pdof[9]]; v[cdof[6]] = (0.0625*(v[pdof[0]] + v[pdof[1]]) - 0.25*(v[pdof[3]] + v[pdof[6]]) + 0.5*(v[pdof[4]] + v[pdof[5]] + v[pdof[9]]) - 0.0625*(v[pdof[7]] + v[pdof[8]])); v[cdof[9]] = (0.0625*(-v[pdof[0]] + v[pdof[1]]) - 0.125*v[pdof[3]] + 0.375*v[pdof[6]] + 0.1875*(v[pdof[7]] - v[pdof[8]]) + 0.75*v[pdof[9]]); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[cdof[5]] = v[pdof[8]]; v[cdof[6]] = (0.0625*v[pdof[0]] + 0.9375*v[pdof[8]] + 0.3125*(v[pdof[1]] - v[pdof[7]])); v[cdof[9]] = (0.0625*(v[pdof[0]] - v[pdof[1]]) + 0.375*v[pdof[3]] - 0.125*v[pdof[6]] + 0.1875*(-v[pdof[7]] + v[pdof[8]]) + 0.75*v[pdof[9]]); if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust the value on the neihgbour */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neigh's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[cdof[5]] = v[pdof[9]]; v[cdof[6]] = (0.0625*(v[pdof[0]] + v[pdof[1]]) - 0.25*(v[pdof[3]] + v[pdof[6]]) + 0.5*(v[pdof[4]] + v[pdof[5]] + v[pdof[9]]) - 0.0625*(v[pdof[7]] + v[pdof[8]])); v[cdof[9]] = (0.0625*(-v[pdof[0]] + v[pdof[1]]) - 0.12500*v[pdof[3]] + 0.375*v[pdof[6]] + 0.1875*(v[pdof[7]] - v[pdof[8]]) + 0.75*v[pdof[9]]); /*--------------------------------------------------------------------------*/ /* values on neigh's child[0] */ /*--------------------------------------------------------------------------*/ node = drv->fe_space->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; dof9 = el->child[1]->dof[node][n0]; v[dof9] = (0.0625*(v[pdof[0]] - v[pdof[1]]) + 0.375*v[pdof[3]] - 0.125*v[pdof[6]] + 0.1875*(-v[pdof[7]] + v[pdof[8]]) + 0.75*v[pdof[9]]); return; } static void real_coarse_inter3_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter3_2d"); EL *el, *child; REAL *v = nil; int cdof, pdof, node, n0; const DOF_ADMIN *admin; MESH *mesh = nil; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } GET_STRUCT(admin,drv->fe_space); GET_STRUCT(mesh,drv->fe_space); node = mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ child = el->child[0]; if (el->dof[0][0] < el->dof[1][0]) pdof = el->dof[node+2][n0]; else pdof = el->dof[node+2][n0+1]; if (child->dof[1][0] < child->dof[2][0]) cdof = child->dof[node][n0+1]; else cdof = child->dof[node][n0]; v[pdof] = v[cdof]; if (child->dof[2][0] < child->dof[0][0]) cdof = child->dof[node+1][n0]; else cdof = child->dof[node+1][n0+1]; v[el->dof[mesh->node[CENTER]][admin->n0_dof[CENTER]]] = v[cdof]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ child = el->child[1]; if (el->dof[0][0] < el->dof[1][0]) pdof = el->dof[node+2][n0+1]; else pdof = el->dof[node+2][n0]; if (child->dof[2][0] < child->dof[0][0]) cdof = child->dof[node+1][n0]; else cdof = child->dof[node+1][n0+1]; v[pdof] = v[cdof]; if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; child = el->child[0]; if (child->dof[2][0] < child->dof[0][0]) cdof = child->dof[node+1][n0]; else cdof = child->dof[node+1][n0+1]; v[el->dof[mesh->node[CENTER]][admin->n0_dof[CENTER]]] = v[cdof]; return; } static void real_coarse_restr3_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr3_2d"); EL *el; REAL *v = nil; int node, n0; const DOF *cdof; DOF pdof[N_BAS3_2D], dof9; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[0]] += (0.0625*(-v[cdof[2]] + v[cdof[6]] - v[cdof[9]]) + 0.3125*v[cdof[3]]); v[pdof[1]] += 0.0625*(-v[cdof[2]] + v[cdof[3]] + v[cdof[6]] + v[cdof[9]]); v[pdof[3]] += -0.25*v[cdof[6]] - 0.125*v[cdof[9]]; v[pdof[4]] += 0.5*v[cdof[6]]; v[pdof[5]] += 0.5*v[cdof[6]]; v[pdof[6]] += -0.25*v[cdof[6]] + 0.375*v[cdof[9]]; v[pdof[7]] = (0.5625*v[cdof[2]] + 0.9375*v[cdof[3]] + v[cdof[4]] - 0.0625*v[cdof[6]] + 0.1875*v[cdof[9]]); v[pdof[8]] = (0.5625*v[cdof[2]] - 0.3125*v[cdof[3]] - 0.0625*v[cdof[6]] - 0.1875*v[cdof[9]]); v[pdof[9]] = v[cdof[5]] + 0.5*v[cdof[6]] + 0.75*v[cdof[9]]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[pdof[0]] += 0.0625*v[cdof[6]] + 0.0625*v[cdof[9]]; v[pdof[1]] += 0.3125*v[cdof[6]] - 0.0625*v[cdof[9]]; v[pdof[3]] += 0.375*v[cdof[9]]; v[pdof[6]] += -0.125*v[cdof[9]]; v[pdof[7]] += -0.3125*v[cdof[6]] - 0.18750*v[cdof[9]]; v[pdof[8]] += v[cdof[5]] + 0.9375*v[cdof[6]] + 0.1875*v[cdof[9]]; v[pdof[9]] += 0.75*v[cdof[9]]; if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust the value on the neihgbour */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neigh's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[0]] += 0.0625*(v[cdof[6]] - v[cdof[9]]); v[pdof[1]] += 0.0625*(v[cdof[6]] + v[cdof[9]]); v[pdof[3]] += -0.25*v[cdof[6]] - 0.12500*v[cdof[9]]; v[pdof[4]] += 0.5*v[cdof[6]]; v[pdof[5]] += 0.5*v[cdof[6]]; v[pdof[6]] += -0.25*v[cdof[6]] + 0.375*v[cdof[9]]; v[pdof[7]] += -0.0625*v[cdof[6]] + 0.1875*v[cdof[9]]; v[pdof[8]] += -0.0625*v[cdof[6]] - 0.1875*v[cdof[9]]; v[pdof[9]] = v[cdof[5]] + 0.5*v[cdof[6]] + 0.75*v[cdof[9]]; /*--------------------------------------------------------------------------*/ /* values on neigh's child[1] */ /*--------------------------------------------------------------------------*/ node = drv->fe_space->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; dof9 = el->child[1]->dof[node][n0]; v[pdof[0]] += 0.0625*v[dof9]; v[pdof[1]] -= 0.0625*v[dof9]; v[pdof[3]] += 0.375*v[dof9]; v[pdof[6]] -= 0.125*v[dof9]; v[pdof[7]] -= 0.1875*v[dof9]; v[pdof[8]] += 0.1875*v[dof9]; v[pdof[9]] += 0.75*v[dof9]; return; } static void real_d_refine_inter3_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter3_2d"); EL *el; REAL_D *v = nil; int node, n0, j; const DOF *cdof; DOF pdof[N_BAS3_2D], dof9; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); for (j = 0; j < DIM_OF_WORLD; j++) { v[cdof[2]][j] = (-0.0625*(v[pdof[0]][j] + v[pdof[1]][j]) + 0.5625*(v[pdof[7]][j] + v[pdof[8]][j])); v[cdof[3]][j] = (0.3125*(v[pdof[0]][j] - v[pdof[8]][j]) + 0.0625*v[pdof[1]][j] + 0.9375*v[pdof[7]][j]); v[cdof[4]][j] = v[pdof[7]][j]; v[cdof[5]][j] = v[pdof[9]][j]; v[cdof[6]][j] = (0.0625*(v[pdof[0]][j] + v[pdof[1]][j]) - 0.25*(v[pdof[3]][j] + v[pdof[6]][j]) + 0.5*(v[pdof[4]][j] + v[pdof[5]][j] + v[pdof[9]][j]) - 0.0625*(v[pdof[7]][j] + v[pdof[8]][j])); v[cdof[9]][j] = (0.0625*(-v[pdof[0]][j] + v[pdof[1]][j]) - 0.125*v[pdof[3]][j] + 0.375*v[pdof[6]][j] + 0.1875*(v[pdof[7]][j] - v[pdof[8]][j]) + 0.75*v[pdof[9]][j]); } /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); for (j = 0; j < DIM_OF_WORLD; j++) { v[cdof[5]][j] = v[pdof[8]][j]; v[cdof[6]][j] = (0.0625*v[pdof[0]][j] + 0.9375*v[pdof[8]][j] + 0.3125*(v[pdof[1]][j] - v[pdof[7]][j])); v[cdof[9]][j] = (0.0625*(v[pdof[0]][j] - v[pdof[1]][j]) + 0.375*v[pdof[3]][j] - 0.125*v[pdof[6]][j] + 0.1875*(-v[pdof[7]][j] + v[pdof[8]][j]) + 0.75*v[pdof[9]][j]); } if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust the value on the neihgbour */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neigh's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); for (j = 0; j < DIM_OF_WORLD; j++) { v[cdof[5]][j] = v[pdof[9]][j]; v[cdof[6]][j] = (0.0625*(v[pdof[0]][j] + v[pdof[1]][j]) - 0.25*(v[pdof[3]][j] + v[pdof[6]][j]) + 0.5*(v[pdof[4]][j] + v[pdof[5]][j] + v[pdof[9]][j]) - 0.0625*(v[pdof[7]][j] + v[pdof[8]][j])); v[cdof[9]][j] = (0.0625*(-v[pdof[0]][j] + v[pdof[1]][j]) - 0.12500*v[pdof[3]][j] + 0.375*v[pdof[6]][j] + 0.1875*(v[pdof[7]][j] - v[pdof[8]][j]) + 0.75*v[pdof[9]][j]); } /*--------------------------------------------------------------------------*/ /* values on neigh's child[0] */ /*--------------------------------------------------------------------------*/ node = drdv->fe_space->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; for (j = 0; j < DIM_OF_WORLD; j++) { dof9 = el->child[1]->dof[node][n0]; v[dof9][j] = (0.0625*(v[pdof[0]][j] - v[pdof[1]][j]) + 0.375*v[pdof[3]][j] - 0.125*v[pdof[6]][j] + 0.1875*(-v[pdof[7]][j] + v[pdof[8]][j]) + 0.75*v[pdof[9]][j]); } return; } static void real_d_coarse_inter3_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_inter3_2d"); EL *el, *child; REAL_D *v = nil; int cdof, pdof, node, n0, j; const DOF_ADMIN *admin; MESH *mesh = nil; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } GET_STRUCT(admin,drdv->fe_space); GET_STRUCT(mesh,drdv->fe_space); node = mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ child = el->child[0]; if (el->dof[0][0] < el->dof[1][0]) pdof = el->dof[node+2][n0]; else pdof = el->dof[node+2][n0+1]; if (child->dof[1][0] < child->dof[2][0]) cdof = child->dof[node][n0+1]; else cdof = child->dof[node][n0]; for (j = 0; j < DIM_OF_WORLD; j++) v[pdof][j] = v[cdof][j]; if (child->dof[2][0] < child->dof[0][0]) cdof = child->dof[node+1][n0]; else cdof = child->dof[node+1][n0+1]; for (j = 0; j < DIM_OF_WORLD; j++) v[el->dof[mesh->node[CENTER]][admin->n0_dof[CENTER]]][j] = v[cdof][j]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ child = el->child[1]; if (el->dof[0][0] < el->dof[1][0]) pdof = el->dof[node+2][n0+1]; else pdof = el->dof[node+2][n0]; if (child->dof[2][0] < child->dof[0][0]) cdof = child->dof[node+1][n0]; else cdof = child->dof[node+1][n0+1]; for (j = 0; j < DIM_OF_WORLD; j++) v[pdof][j] = v[cdof][j]; if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; child = el->child[0]; if (child->dof[2][0] < child->dof[0][0]) cdof = child->dof[node+1][n0]; else cdof = child->dof[node+1][n0+1]; for (j = 0; j < DIM_OF_WORLD; j++) v[el->dof[mesh->node[CENTER]][admin->n0_dof[CENTER]]][j] = v[cdof][j]; return; } static void real_d_coarse_restr3_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr3_2d"); EL *el; REAL_D *v = nil; int node, n0, j; const DOF *cdof; DOF pdof[N_BAS3_2D], dof9; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); for (j = 0; j < DIM_OF_WORLD; j++) { v[pdof[0]][j] += (0.0625*(-v[cdof[2]][j] + v[cdof[6]][j] - v[cdof[9]][j]) + 0.3125*v[cdof[3]][j]); v[pdof[1]][j] += 0.0625*(-v[cdof[2]][j] + v[cdof[3]][j] + v[cdof[6]][j] + v[cdof[9]][j]); v[pdof[3]][j] += -0.25*v[cdof[6]][j] - 0.125*v[cdof[9]][j]; v[pdof[4]][j] += 0.5*v[cdof[6]][j]; v[pdof[5]][j] += 0.5*v[cdof[6]][j]; v[pdof[6]][j] += -0.25*v[cdof[6]][j] + 0.375*v[cdof[9]][j]; v[pdof[7]][j] = (0.5625*v[cdof[2]][j] + 0.9375*v[cdof[3]][j] + v[cdof[4]][j] - 0.0625*v[cdof[6]][j] + 0.1875*v[cdof[9]][j]); v[pdof[8]][j] = (0.5625*v[cdof[2]][j] - 0.3125*v[cdof[3]][j] - 0.0625*v[cdof[6]][j] - 0.1875*v[cdof[9]][j]); v[pdof[9]][j] = v[cdof[5]][j] + 0.5*v[cdof[6]][j] + 0.75*v[cdof[9]][j]; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); for (j = 0; j < DIM_OF_WORLD; j++) { v[pdof[0]][j] += 0.0625*v[cdof[6]][j] + 0.0625*v[cdof[9]][j]; v[pdof[1]][j] += 0.3125*v[cdof[6]][j] - 0.0625*v[cdof[9]][j]; v[pdof[3]][j] += 0.375*v[cdof[9]][j]; v[pdof[6]][j] += -0.125*v[cdof[9]][j]; v[pdof[7]][j] += -0.3125*v[cdof[6]][j] - 0.18750*v[cdof[9]][j]; v[pdof[8]][j] += (v[cdof[5]][j] + 0.9375*v[cdof[6]][j] + 0.1875*v[cdof[9]][j]); v[pdof[9]][j] += 0.75*v[cdof[9]][j]; } if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust the value on the neihgbour */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neigh's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); for (j = 0; j < DIM_OF_WORLD; j++) { v[pdof[0]][j] += 0.0625*(v[cdof[6]][j] - v[cdof[9]][j]); v[pdof[1]][j] += 0.0625*(v[cdof[6]][j] + v[cdof[9]][j]); v[pdof[3]][j] += -0.25*v[cdof[6]][j] - 0.12500*v[cdof[9]][j]; v[pdof[4]][j] += 0.5*v[cdof[6]][j]; v[pdof[5]][j] += 0.5*v[cdof[6]][j]; v[pdof[6]][j] += -0.25*v[cdof[6]][j] + 0.375*v[cdof[9]][j]; v[pdof[7]][j] += -0.0625*v[cdof[6]][j] + 0.1875*v[cdof[9]][j]; v[pdof[8]][j] += -0.0625*v[cdof[6]][j] - 0.1875*v[cdof[9]][j]; v[pdof[9]][j] = v[cdof[5]][j] + 0.5*v[cdof[6]][j] + 0.75*v[cdof[9]][j]; } /*--------------------------------------------------------------------------*/ /* values on neigh's child[1] */ /*--------------------------------------------------------------------------*/ node = drdv->fe_space->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; dof9 = el->child[1]->dof[node][n0]; for (j = 0; j < DIM_OF_WORLD; j++) { v[pdof[0]][j] += 0.0625*v[dof9][j]; v[pdof[1]][j] -= 0.0625*v[dof9][j]; v[pdof[3]][j] += 0.375*v[dof9][j]; v[pdof[6]][j] -= 0.125*v[dof9][j]; v[pdof[7]][j] -= 0.1875*v[dof9][j]; v[pdof[8]][j] += 0.1875*v[dof9][j]; v[pdof[9]][j] += 0.75*v[dof9][j]; } return; } static BAS_FCT *phi3_2d[N_BAS3_2D] = {phi3v0_2d, phi3v1_2d, phi3v2_2d, phi3e0_2d, phi3e1_2d, phi3e2_2d, phi3e3_2d, phi3e4_2d, phi3e5_2d, phi3c0_2d}; static GRD_BAS_FCT *grd_phi3_2d[N_BAS3_2D] = {grd_phi3v0_2d, grd_phi3v1_2d, grd_phi3v2_2d, grd_phi3e0_2d, grd_phi3e1_2d, grd_phi3e2_2d, grd_phi3e3_2d, grd_phi3e4_2d, grd_phi3e5_2d, grd_phi3c0_2d}; static D2_BAS_FCT *D2_phi3_2d[N_BAS3_2D] = {D2_phi3v0_2d, D2_phi3v1_2d, D2_phi3v2_2d, D2_phi3e0_2d, D2_phi3e1_2d, D2_phi3e2_2d, D2_phi3e3_2d, D2_phi3e4_2d, D2_phi3e5_2d, D2_phi3c0_2d}; static BAS_FCTS lagrange3_2d = {"lagrange3_2d", 2, N_BAS3_2D, 3, {1, 1, 2, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi3_2d, grd_phi3_2d, D2_phi3_2d, get_dof_indices3_2d, get_bound3_2d, interpol3_2d, interpol_d3_2d, get_int_vec3_2d, get_real_vec3_2d, get_real_d_vec3_2d, get_uchar_vec3_2d, get_schar_vec3_2d, real_refine_inter3_2d, real_coarse_inter3_2d, real_coarse_restr3_2d, real_d_refine_inter3_2d, real_d_coarse_inter3_2d, real_d_coarse_restr3_2d, bary3_2d,}; alberta-2.0.1/alberta/src/2d/lagrange_4_2d.c0000644000042300001440000015506110676724251015321 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_4_2d.c */ /* */ /* description: piecewise quartic Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS4_2D 15 static const REAL bary4_2d[N_BAS4_2D][N_LAMBDA] = {{ 1.0, 0.0, 0.0, 0.0}, { 0.0, 1.0, 0.0, 0.0}, { 0.0, 0.0, 1.0, 0.0}, { 0.0, 3.0/4.0, 1.0/4.0, 0.0}, { 0.0, 0.5, 0.5, 0.0}, { 0.0, 1.0/4.0, 3.0/4.0, 0.0}, {1.0/4.0, 0.0, 3.0/4.0, 0.0}, { 0.5, 0.0, 0.5, 0.0}, {3.0/4.0, 0.0, 1.0/4.0, 0.0}, {3.0/4.0, 1.0/4.0, 0.0, 0.0}, { 0.5, 0.5, 0.0, 0.0}, {1.0/4.0, 3.0/4.0, 0.0, 0.0}, {1.0/2.0, 1.0/4.0, 1.0/4.0, 0.0}, {1.0/4.0, 1.0/2.0, 1.0/4.0, 0.0}, {1.0/4.0, 1.0/4.0, 1.0/2.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4v0_2d(const REAL l[N_LAMBDA]) { return((((32.0*l[0] - 48.0)*l[0] + 22.0)*l[0] - 3.0)*l[0]/3.0); } static const REAL *grd_phi4v0_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = ((128.0*l[0] - 144.0)*l[0] + 44.0)*l[0]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v0_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = (128.0*l[0] - 96.0)*l[0] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4v1_2d(const REAL l[N_LAMBDA]) { return((((32.0*l[1] - 48.0)*l[1] + 22.0)*l[1] - 3.0)*l[1]/3.0); } static const REAL *grd_phi4v1_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = ((128.0*l[1] - 144.0)*l[1] + 44.0)*l[1]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v1_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (128.0*l[1] - 96.0)*l[1] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4v2_2d(const REAL l[N_LAMBDA]) { return((((32.0*l[2] - 48.0)*l[2] + 22.0)*l[2] - 3.0)*l[2]/3.0); } static const REAL *grd_phi4v2_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = ((128.0*l[2] - 144.0)*l[2] + 44.0)*l[2]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v2_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (128.0*l[2] - 96.0)*l[2] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4e00_2d(const REAL l[N_LAMBDA]) { return(((128.0*l[1] - 96.0)*l[1] + 16.0)*l[1]*l[2]/3.0); } static const REAL *grd_phi4e00_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = ((128*l[1] - 64.0)*l[1] + 16.0/3.0)*l[2]; grd[2] = ((128*l[1] - 96.0)*l[1] + 16.0)*l[1]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e00_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (256.0*l[1] - 64.0)*l[2]; D2[1][2] = D2[2][1] = (128.0*l[1] - 64.0)*l[1] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4e10_2d(const REAL l[N_LAMBDA]) { return(((128.0*l[2] - 96.0)*l[2] + 16.0)*l[2]*l[0]/3.0); } static const REAL *grd_phi4e10_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = ((128*l[2] - 96.0)*l[2] + 16.0)*l[2]/3.0; grd[2] = ((128*l[2] - 64.0)*l[2] + 16.0/3.0)*l[0]; return((const REAL *) grd); } static const REAL (*D2_phi4e10_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (256.0*l[2] - 64.0)*l[0]; D2[2][0] = D2[0][2] = (128.0*l[2] - 64.0)*l[2] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e20_2d(const REAL l[N_LAMBDA]) { return(((128.0*l[0] - 96.0)*l[0] + 16.0)*l[0]*l[1]/3.0); } static const REAL *grd_phi4e20_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = ((128*l[0] - 64.0)*l[0] + 16.0/3.0)*l[1]; grd[1] = ((128*l[0] - 96.0)*l[0] + 16.0)*l[0]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e20_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = (256.0*l[0] - 64.0)*l[1]; D2[0][1] = D2[1][0] = (128.0*l[0] - 64.0)*l[0] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4e01_2d(const REAL l[N_LAMBDA]) { return((4.0*l[1] - 1.0)*l[1]*(4.0*l[2] - 1.0)*l[2]*4.0); } static const REAL *grd_phi4e01_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*(8.0*l[1] - 1.0)*l[2]*(4.0*l[2] - 1.0); grd[2] = 4.0*l[1]*(4.0*l[1] - 1.0)*(8.0*l[2] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e01_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 32.0*l[2]*(4.0*l[2] - 1.0); D2[1][2] = D2[2][1] = 4.0*(8.0*l[1] - 1.0)*(8.0*l[2] - 1.0); D2[2][2] = 32.0*l[1]*(4.0*l[1] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4e11_2d(const REAL l[N_LAMBDA]) { return((4.0*l[2] - 1.0)*l[2]*(4.0*l[0] - 1.0)*l[0]*4.0); } static const REAL *grd_phi4e11_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*l[2]*(4.0*l[2] - 1.0)*(8.0*l[0] - 1.0); grd[2] = 4.0*(8.0*l[2] - 1.0)*l[0]*(4.0*l[0] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e11_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 32.0*l[0]*(4.0*l[0] - 1.0); D2[2][0] = D2[0][2] = 4.0*(8.0*l[2] - 1.0)*(8.0*l[0] - 1.0); D2[0][0] = 32.0*l[2]*(4.0*l[2] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e21_2d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*(4.0*l[1] - 1.0)*l[1]*4.0); } static const REAL *grd_phi4e21_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 4.0*(8.0*l[0] - 1.0)*l[1]*(4.0*l[1] - 1.0); grd[1] = 4.0*l[0]*(4.0*l[0] - 1.0)*(8.0*l[1] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e21_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 32.0*l[1]*(4.0*l[1] - 1.0); D2[0][1] = D2[1][0] = 4.0*(8.0*l[0] - 1.0)*(8.0*l[1] - 1.0); D2[1][1] = 32.0*l[0]*(4.0*l[0] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4e02_2d(const REAL l[N_LAMBDA]) { return(((128.0*l[2] - 96.0)*l[2] + 16.0)*l[2]*l[1]/3.0); } static const REAL *grd_phi4e02_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = ((128*l[2] - 96.0)*l[2] + 16.0)*l[2]/3.0; grd[2] = ((128*l[2] - 64.0)*l[2] + 16.0/3.0)*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4e02_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (256.0*l[2] - 64.0)*l[1]; D2[1][2] = D2[2][1] = (128.0*l[2] - 64.0)*l[2] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4e12_2d(const REAL l[N_LAMBDA]) { return(((128.0*l[0] - 96.0)*l[0] + 16.0)*l[0]*l[2]/3.0); } static const REAL *grd_phi4e12_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = ((128*l[0] - 64.0)*l[0] + 16.0/3.0)*l[2]; grd[2] = ((128*l[0] - 96.0)*l[0] + 16.0)*l[0]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e12_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = (256.0*l[0] - 64.0)*l[2]; D2[2][0] = D2[0][2] = (128.0*l[0] - 64.0)*l[0] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e22_2d(const REAL l[N_LAMBDA]) { return(((128.0*l[1] - 96.0)*l[1] + 16.0)*l[1]*l[0]/3.0); } static const REAL *grd_phi4e22_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = ((128*l[1] - 96.0)*l[1] + 16.0)*l[1]/3.0; grd[1] = ((128*l[1] - 64.0)*l[1] + 16.0/3.0)*l[0]; return((const REAL *) grd); } static const REAL (*D2_phi4e22_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (256.0*l[1] - 64.0)*l[0]; D2[0][1] = D2[1][0] = (128.0*l[1] - 64.0)*l[1] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at center */ /*--------------------------------------------------------------------------*/ static REAL phi4c0_2d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*l[1]*l[2]*32.0); } static const REAL *grd_phi4c0_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 32.0*(8.0*l[0] - 1.0)*l[1]*l[2]; grd[1] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[2]; grd[2] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4c0_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 256.0*l[1]*l[2]; D2[0][1] = D2[1][0] = 32.0*(8.0*l[0] - 1.0)*l[2]; D2[0][2] = D2[2][0] = 32.0*(8.0*l[0] - 1.0)*l[1]; D2[1][2] = D2[2][1] = 32.0*(4.0*l[0] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at center */ /*--------------------------------------------------------------------------*/ static REAL phi4c1_2d(const REAL l[N_LAMBDA]) { return(l[0]*(4.0*l[1] - 1.0)*l[1]*l[2]*32.0); } static const REAL *grd_phi4c1_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 32.0*(4.0*l[1] - 1.0)*l[1]*l[2]; grd[1] = 32.0*(8.0*l[1] - 1.0)*l[0]*l[2]; grd[2] = 32.0*(4.0*l[1] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4c1_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 32.0*(8.0*l[1] - 1.0)*l[2]; D2[0][2] = D2[2][0] = 32.0*(4.0*l[1] - 1.0)*l[1]; D2[1][1] = 256.0*l[0]*l[2]; D2[1][2] = D2[2][1] = 32.0*(8.0*l[1] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at center */ /*--------------------------------------------------------------------------*/ static REAL phi4c2_2d(const REAL l[N_LAMBDA]) { return(l[0]*l[1]*(4.0*l[2] - 1.0)*l[2]*32.0); } static const REAL *grd_phi4c2_2d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 32.0*(4.0*l[2] - 1.0)*l[1]*l[2]; grd[1] = 32.0*(4.0*l[2] - 1.0)*l[0]*l[2]; grd[2] = 32.0*(8.0*l[2] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4c2_2d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 32.0*(4.0*l[2] - 1.0)*l[2]; D2[0][2] = D2[2][0] = 32.0*(8.0*l[2] - 1.0)*l[1]; D2[1][2] = D2[2][1] = 32.0*(8.0*l[2] - 1.0)*l[0]; D2[2][2] = 256.0*l[0]*l[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *get_dof_indices4_2d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS4_2D]; DOF *rvec = idof ? idof : index_vec; int i, j, n0; DOF **dof = el->dof; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = dof[i][n0]; n0 = admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = dof[N_VERTICES_2D+i][n0]; rvec[j++] = dof[N_VERTICES_2D+i][n0+1]; rvec[j++] = dof[N_VERTICES_2D+i][n0+2]; } else { rvec[j++] = dof[N_VERTICES_2D+i][n0+2]; rvec[j++] = dof[N_VERTICES_2D+i][n0+1]; rvec[j++] = dof[N_VERTICES_2D+i][n0]; } } n0 = admin->n0_dof[CENTER]; for (i = 0; i < 3; i++) rvec[12+i] = dof[6][n0+i]; return((const DOF *) rvec); } static const S_CHAR *get_bound4_2d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound4_2d"); static S_CHAR bound_vec[N_BAS4_2D]; S_CHAR *rvec = bound ? bound : bound_vec; int i, j; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = el_info->vertex_bound[i]; for (j = N_VERTICES_2D, i = 0; i < N_EDGES_2D; j += 3, i++) rvec[j] = rvec[j+1] = rvec[j+2] = el_info->edge_bound[i]; for (i = 0; i < 3; i++) rvec[12+i] = INTERIOR; return((const S_CHAR *) rvec); } static const int *get_int_vec4_2d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec4_2d"); int i, j, n0; static int local_vec[N_BAS4_2D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < 3; i++) rvec[12+i] = v[dof[6][n0+i]]; return((const int *) rvec); } static const REAL *get_real_vec4_2d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_vec4_2d"); int i, j, n0; static REAL local_vec[N_BAS4_2D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < 3; i++) rvec[12+i] = v[dof[6][n0+i]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec4_2d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rdvec) { FUNCNAME("get_real_vec4_2d"); int i, j, k, n0; static REAL_D local_vec[N_BAS4_2D]; REAL_D *v = nil, *rvec = Rdvec ? Rdvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { for (k = 0; k < DIM_OF_WORLD; k++) { rvec[j][k] = v[dof[N_VERTICES_2D+i][n0]][k]; rvec[j+1][k] = v[dof[N_VERTICES_2D+i][n0+1]][k]; rvec[j+2][k] = v[dof[N_VERTICES_2D+i][n0+2]][k]; } j += 3; } else { for (k = 0; k < DIM_OF_WORLD; k++) { rvec[j][k] = v[dof[N_VERTICES_2D+i][n0+2]][k]; rvec[j+1][k] = v[dof[N_VERTICES_2D+i][n0+1]][k]; rvec[j+2][k] = v[dof[N_VERTICES_2D+i][n0]][k]; } j += 3; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < 3; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[12+i][k] = v[dof[6][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec4_2d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec4_2d"); int i, j, n0; static U_CHAR local_vec[N_BAS4_2D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < 3; i++) rvec[12+i] = v[dof[6][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec4_2d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec4_2d"); int i, j, n0; static S_CHAR local_vec[N_BAS4_2D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_2D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_2D; i < N_EDGES_2D; i++) { if (dof[vertex_of_edge_2d[i][0]][0] < dof[vertex_of_edge_2d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; } else { rvec[j++] = v[dof[N_VERTICES_2D+i][n0+2]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_2D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < 3; i++) rvec[12+i] = v[dof[6][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,4,2,15) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,4,2,15) /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ static void real_refine_inter4_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter4_2d"); EL *el; REAL *v = nil; DOF pdof[N_BAS4_2D]; const DOF *cdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[cdof[2]] = v[pdof[10]]; v[cdof[3]] = (0.2734375*v[pdof[0]] - 0.0390625*v[pdof[1]] + 1.09375*v[pdof[9]] - 0.546875*v[pdof[10]] + 0.21875*v[pdof[11]]); v[cdof[4]] = v[pdof[9]]; v[cdof[5]] = (-0.0390625*v[pdof[0]] + 0.0234375*v[pdof[1]] + 0.46875*v[pdof[9]] + 0.703125*v[pdof[10]] - 0.15625*v[pdof[11]]); v[cdof[6]] = (0.0234375*(v[pdof[0]] + v[pdof[1]]) + 0.0625*(-v[pdof[3]] - v[pdof[8]]) + 0.09375*(-v[pdof[9]] - v[pdof[11]]) + 0.140625*v[pdof[10]] + 0.5625*(v[pdof[12]] + v[pdof[13]])); v[cdof[7]] = v[pdof[14]]; v[cdof[8]] = (0.0390625*(-v[pdof[0]] - v[pdof[1]]) + 0.1875*(v[pdof[3]] + v[pdof[8]]-v[pdof[12]]-v[pdof[13]]) + 0.375*(-v[pdof[4]] - v[pdof[7]]) + 0.5*(v[pdof[5]] + v[pdof[6]]) + 0.03125*(v[pdof[9]] + v[pdof[11]]) + 0.015625*v[pdof[10]] + 0.75*v[pdof[14]]); v[cdof[12]] = (0.0234375*v[pdof[0]] - 0.0390625*v[pdof[1]] + 0.125*(v[pdof[3]] - v[pdof[4]] - v[pdof[8]]) + 0.375*(v[pdof[7]] + v[pdof[12]] - v[pdof[13]]) - 0.03125*v[pdof[9]] - 0.046875*v[pdof[10]] + 0.09375*v[pdof[11]] + 0.75*v[pdof[14]]); v[cdof[13]] = (0.0390625*(-v[pdof[0]] - v[pdof[1]]) + 0.0625*v[pdof[3]] + 0.3125*(v[pdof[8]] - v[pdof[13]]) + 0.15625*(v[pdof[9]] + v[pdof[11]]) - 0.234375*v[pdof[10]] + 0.9375*v[pdof[12]]); v[cdof[14]] = v[pdof[12]]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[cdof[6]] = (0.0234375*v[pdof[0]] - 0.0390625*v[pdof[1]] - 0.15625*v[pdof[9]] + 0.703125*v[pdof[10]] + 0.46875*v[pdof[11]]); v[cdof[7]] = v[pdof[11]]; v[cdof[8]] = (-0.0390625*v[pdof[0]] + 0.2734375*v[pdof[1]] + 0.21875*v[pdof[9]] - 0.546875*v[pdof[10]] + 1.09375*v[pdof[11]]); v[cdof[12]] = (0.0390625*(-v[pdof[0]] - v[pdof[1]]) + 0.3125*(v[pdof[3]] - v[pdof[12]]) + 0.0625*v[pdof[8]] + 0.15625*(v[pdof[9]] + v[pdof[11]]) - 0.234375*v[pdof[10]] + 0.9375*v[pdof[13]]); v[cdof[13]] = (-0.0390625*v[pdof[0]] + 0.0234375*v[pdof[1]] + 0.125*(-v[pdof[3]] - v[pdof[7]] + v[pdof[8]]) + 0.375*(v[pdof[4]] - v[pdof[12]] + v[pdof[13]]) + 0.09375*v[pdof[9]] - 0.046875*v[pdof[10]] - 0.03125*v[pdof[11]] + 0.75*v[pdof[14]]); v[cdof[14]] = v[pdof[13]]; if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[cdof[6]] = (0.0234375*(v[pdof[0]] + v[pdof[1]]) + 0.0625*(-v[pdof[3]] - v[pdof[8]]) + 0.09375*(-v[pdof[9]] - v[pdof[11]]) + 0.140625*v[pdof[10]] + 0.5625*(v[pdof[12]] + v[pdof[13]])); v[cdof[7]] = v[pdof[14]]; v[cdof[8]] = (0.0390625*(-v[pdof[0]] - v[pdof[1]]) + 0.1875*(v[pdof[3]]+v[pdof[8]]-v[pdof[12]]-v[pdof[13]]) + 0.375*(-v[pdof[4]] - v[pdof[7]]) + 0.5*(v[pdof[5]] + v[pdof[6]]) + 0.03125*(v[pdof[9]] + v[pdof[11]]) + 0.015625*v[pdof[10]] + 0.75*v[pdof[14]]); v[cdof[12]] = (0.0234375*v[pdof[0]] - 0.0390625*v[pdof[1]] + 0.125*(v[pdof[3]] - v[pdof[4]] - v[pdof[8]]) + 0.375*(v[pdof[7]] + v[pdof[12]] - v[pdof[13]]) - 0.03125*v[pdof[9]] - 0.046875*v[pdof[10]] + 0.09375*v[pdof[11]] + 0.75*v[pdof[14]]); v[cdof[13]] = (0.0390625*(-v[pdof[0]] - v[pdof[1]]) + 0.0625*v[pdof[3]] + 0.3125*(v[pdof[8]] - v[pdof[13]]) + 0.15625*(v[pdof[9]] + v[pdof[11]]) - 0.234375*v[pdof[10]] + 0.9375*v[pdof[12]]); v[cdof[14]] = v[pdof[12]]; /*--------------------------------------------------------------------------*/ /* values on neighbour's child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[cdof[12]] = (0.0390625*(-v[pdof[0]] - v[pdof[1]]) + 0.3125*(v[pdof[3]] - v[pdof[12]]) + 0.0625*v[pdof[8]] + 0.15625*(v[pdof[9]] + v[pdof[11]]) - 0.234375*v[pdof[10]] + 0.9375*v[pdof[13]]); v[cdof[13]] = (-0.0390625*v[pdof[0]] + 0.0234375*v[pdof[1]] + 0.125*(-v[pdof[3]] - v[pdof[7]] + v[pdof[8]]) + 0.375*(v[pdof[4]] - v[pdof[12]] + v[pdof[13]]) + 0.09375*v[pdof[9]] - 0.046875*v[pdof[10]] - 0.03125*v[pdof[11]] + 0.75*v[pdof[14]]); v[cdof[14]] = v[pdof[13]]; return; } static void real_coarse_inter4_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter4_2d"); EL *el; REAL *v = nil; DOF pdof[N_BAS4_2D]; const DOF *cdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[9]] = v[cdof[4]]; v[pdof[10]] = v[cdof[2]]; v[pdof[12]] = v[cdof[14]]; v[pdof[14]] = v[cdof[7]]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[pdof[11]] = v[cdof[7]]; v[pdof[13]] = v[cdof[14]]; if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[12]] = v[cdof[14]]; v[pdof[14]] = v[cdof[7]]; /*--------------------------------------------------------------------------*/ /* values on neighbour's child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[pdof[13]] = v[cdof[14]]; return; } static void real_coarse_restr4_2d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr4_2d"); EL *el; REAL *v = nil; DOF pdof[N_BAS4_2D]; const DOF *cdof; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[0]] += (0.2734375*v[cdof[3]] + 0.0390625*(-v[cdof[5]] - v[cdof[8]] - v[cdof[13]]) + 0.0234375*(v[cdof[6]] + v[cdof[12]])); v[pdof[1]] += (0.0390625*(-v[cdof[3]] - v[cdof[8]] - v[cdof[12]] - v[cdof[13]]) + 0.0234375*(v[cdof[5]] + v[cdof[6]])); v[pdof[3]] += (0.0625*(-v[cdof[6]] + v[cdof[13]]) + 0.1875*v[cdof[8]] + 0.125*v[cdof[12]]); v[pdof[4]] += (-0.375*v[cdof[8]] - 0.125*v[cdof[12]]); v[pdof[5]] += 0.5*v[cdof[8]]; v[pdof[6]] += 0.5*v[cdof[8]]; v[pdof[7]] += 0.375*(-v[cdof[8]] + v[cdof[12]]); v[pdof[8]] += (-0.0625*v[cdof[6]] + 0.1875*v[cdof[8]] - 0.125*v[cdof[12]] + 0.3125*v[cdof[13]]); v[pdof[9]] = (v[cdof[4]] + 1.09375*v[cdof[3]] + 0.46875*v[cdof[5]] - 0.09375*v[cdof[6]] + 0.15625*v[cdof[13]] + 0.03125*(v[cdof[8]] - v[cdof[12]])); v[pdof[10]] = (v[cdof[2]] - 0.546875*v[cdof[3]] + 0.703125*v[cdof[5]] + 0.140625*v[cdof[6]] + 0.015625*v[cdof[8]] - 0.046875*v[cdof[12]] - 0.234375*v[cdof[13]]); v[pdof[11]] = (0.21875*v[cdof[3]] + 0.15625*(-v[cdof[5]] + v[cdof[13]]) + 0.09375*(-v[cdof[6]] + v[cdof[12]]) + 0.03125*v[cdof[8]]); v[pdof[12]] = (v[cdof[14]] + 0.5625*v[cdof[6]] - 0.1875*v[cdof[8]] + 0.375*v[cdof[12]] + 0.9375*v[cdof[13]]); v[pdof[13]] = (0.5625*v[cdof[6]] - 0.1875*v[cdof[8]] - 0.375*v[cdof[12]] - 0.3125*v[cdof[13]]); v[pdof[14]] = (v[cdof[7]] + 0.75*(v[cdof[8]] + v[cdof[12]])); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[pdof[0]] += (0.0234375*v[cdof[6]] + 0.0390625*(-v[cdof[8]] - v[cdof[12]] - v[cdof[13]])); v[pdof[1]] += (0.0390625*(-v[cdof[6]] - v[cdof[12]]) + 0.2734375*v[cdof[8]] + 0.0234375*v[cdof[13]]); v[pdof[3]] += 0.3125*v[cdof[12]] - 0.125*v[cdof[13]]; v[pdof[4]] += 0.375*v[cdof[13]]; v[pdof[7]] += -0.125*v[cdof[13]]; v[pdof[8]] += 0.0625*v[cdof[12]] + 0.125*v[cdof[13]]; v[pdof[9]] += (0.15625*(-v[cdof[6]] + v[cdof[12]]) + 0.21875*v[cdof[8]] + 0.09375*v[cdof[13]]); v[pdof[10]] += (0.703125*v[cdof[6]] - 0.546875*v[cdof[8]] - 0.234375*v[cdof[12]] - 0.046875*v[cdof[13]]); v[pdof[11]] += (v[cdof[7]] + 0.46875*v[cdof[6]] + 1.09375*v[cdof[8]] + 0.15625*v[cdof[12]] - 0.03125*v[cdof[13]]); v[pdof[12]] += -0.3125*v[cdof[12]] - 0.375*v[cdof[13]]; v[pdof[13]] += v[cdof[14]] + 0.9375*v[cdof[12]] + 0.375*v[cdof[13]]; v[pdof[14]] += 0.75*v[cdof[13]]; if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pdof); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[0]] += (0.0234375*(v[cdof[6]] + v[cdof[12]]) + 0.0390625*(-v[cdof[8]] - v[cdof[13]])); v[pdof[1]] += (0.0234375*v[cdof[6]] + 0.0390625*(-v[cdof[8]] - v[cdof[12]] - v[cdof[13]])); v[pdof[3]] += (0.0625*(-v[cdof[6]] + v[cdof[13]]) + 0.1875*v[cdof[8]] + 0.12500000*v[cdof[12]]); v[pdof[4]] += -0.375*v[cdof[8]] - 0.125*v[cdof[12]]; v[pdof[5]] += 0.5*v[cdof[8]]; v[pdof[6]] += 0.5*v[cdof[8]]; v[pdof[7]] += 0.375*(-v[cdof[8]] + v[cdof[12]]); v[pdof[8]] += (-0.0625*v[cdof[6]] + 0.1875*v[cdof[8]] - 0.125*v[cdof[12]] + 0.3125*v[cdof[13]]); v[pdof[9]] += (-0.09375*v[cdof[6]] + 0.03125*(v[cdof[8]] - v[cdof[12]]) + 0.15625*v[cdof[13]]); v[pdof[10]] += (0.140625*v[cdof[6]] + 0.015625*v[cdof[8]] - 0.046875*v[cdof[12]] - 0.234375*v[cdof[13]]); v[pdof[11]] += (0.09375*(-v[cdof[6]] + v[cdof[12]]) + 0.03125*v[cdof[8]] + 0.15625*v[cdof[13]]); v[pdof[12]] = (v[cdof[14]] + 0.5625*v[cdof[6]] - 0.1875*v[cdof[8]] + 0.375*v[cdof[12]] + 0.9375*v[cdof[13]]); v[pdof[13]] = (0.5625*v[cdof[6]] - 0.1875*v[cdof[8]] - 0.375*v[cdof[12]] - 0.3125*v[cdof[13]]); v[pdof[14]] = v[cdof[7]] + 0.75*(v[cdof[8]] + v[cdof[12]]); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); v[pdof[0]] += 0.0390625*(-v[cdof[12]] - v[cdof[13]]); v[pdof[1]] += -0.0390625*v[cdof[12]] + 0.0234375*v[cdof[13]]; v[pdof[3]] += 0.3125*v[cdof[12]] - 0.125*v[cdof[13]]; v[pdof[4]] += 0.375*v[cdof[13]]; v[pdof[7]] += -0.125*v[cdof[13]]; v[pdof[8]] += 0.0625*v[cdof[12]] + 0.125*v[cdof[13]]; v[pdof[9]] += 0.15625*v[cdof[12]] + 0.09375*v[cdof[13]]; v[pdof[10]] += -0.234375*v[cdof[12]] - 0.046875*v[cdof[13]]; v[pdof[11]] += 0.15625*v[cdof[12]] - 0.03125*v[cdof[13]]; v[pdof[12]] += -0.3125*v[cdof[12]] - 0.375*v[cdof[13]]; v[pdof[13]] += v[cdof[14]] + 0.9375*v[cdof[12]] + 0.375*v[cdof[13]]; v[pdof[14]] += 0.75*v[cdof[13]]; return; } static void real_d_refine_inter4_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter4_2d"); EL *el; REAL_D *v = nil; int k; DOF pd[N_BAS4_2D]; const DOF *cd; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[2]][k] = v[pd[10]][k]; v[cd[3]][k] = (0.2734375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] + 1.09375*v[pd[9]][k] - 0.546875*v[pd[10]][k] + 0.21875*v[pd[11]][k]); v[cd[4]][k] = v[pd[9]][k]; v[cd[5]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.46875*v[pd[9]][k] + 0.703125*v[pd[10]][k] - 0.15625*v[pd[11]][k]); v[cd[6]][k] = (0.0234375*(v[pd[0]][k] + v[pd[1]][k]) + 0.0625*(-v[pd[3]][k] - v[pd[8]][k]) + 0.09375*(-v[pd[9]][k] - v[pd[11]][k]) + 0.140625*v[pd[10]][k] + 0.5625*(v[pd[12]][k] + v[pd[13]][k])); v[cd[7]][k] = v[pd[14]][k]; v[cd[8]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(v[pd[3]][k] + v[pd[8]][k] -v[pd[12]][k]-v[pd[13]][k]) + 0.375*(-v[pd[4]][k] - v[pd[7]][k]) + 0.5*(v[pd[5]][k] + v[pd[6]][k]) + 0.03125*(v[pd[9]][k] + v[pd[11]][k]) + 0.015625*v[pd[10]][k] + 0.75*v[pd[14]][k]); v[cd[12]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] + 0.125*(v[pd[3]][k] - v[pd[4]][k] - v[pd[8]][k]) + 0.375*(v[pd[7]][k] + v[pd[12]][k]-v[pd[13]][k]) - 0.03125*v[pd[9]][k] - 0.046875*v[pd[10]][k] + 0.09375*v[pd[11]][k] + 0.75*v[pd[14]][k]); v[cd[13]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.0625*v[pd[3]][k] + 0.3125*(v[pd[8]][k] - v[pd[13]][k]) + 0.15625*(v[pd[9]][k] + v[pd[11]][k]) - 0.234375*v[pd[10]][k] + 0.9375*v[pd[12]][k]); v[cd[14]][k] = v[pd[12]][k]; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[6]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.15625*v[pd[9]][k] + 0.703125*v[pd[10]][k] + 0.46875*v[pd[11]][k]); v[cd[7]][k] = v[pd[11]][k]; v[cd[8]][k] = (-0.0390625*v[pd[0]][k] + 0.2734375*v[pd[1]][k] + 0.21875*v[pd[9]][k] - 0.546875*v[pd[10]][k] + 1.09375*v[pd[11]][k]); v[cd[12]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.3125*(v[pd[3]][k] - v[pd[12]][k]) + 0.0625*v[pd[8]][k] + 0.15625*(v[pd[9]][k] + v[pd[11]][k]) - 0.234375*v[pd[10]][k] + 0.9375*v[pd[13]][k]); v[cd[13]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.125*(-v[pd[3]][k] - v[pd[7]][k] + v[pd[8]][k]) + 0.375*(v[pd[4]][k] - v[pd[12]][k] + v[pd[13]][k]) + 0.09375*v[pd[9]][k] - 0.046875*v[pd[10]][k] - 0.03125*v[pd[11]][k] + 0.75*v[pd[14]][k]); v[cd[14]][k] = v[pd[13]][k]; } if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[6]][k] = (0.0234375*(v[pd[0]][k] + v[pd[1]][k]) + 0.0625*(-v[pd[3]][k] - v[pd[8]][k]) + 0.09375*(-v[pd[9]][k] - v[pd[11]][k]) + 0.140625*v[pd[10]][k] + 0.5625*(v[pd[12]][k] + v[pd[13]][k])); v[cd[7]][k] = v[pd[14]][k]; v[cd[8]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(v[pd[3]][k] + v[pd[8]][k] - v[pd[12]][k]-v[pd[13]][k]) + 0.375*(-v[pd[4]][k] - v[pd[7]][k]) + 0.5*(v[pd[5]][k] + v[pd[6]][k]) + 0.03125*(v[pd[9]][k] + v[pd[11]][k]) + 0.015625*v[pd[10]][k] + 0.75*v[pd[14]][k]); v[cd[12]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] + 0.125*(v[pd[3]][k] - v[pd[4]][k] - v[pd[8]][k]) + 0.375*(v[pd[7]][k] + v[pd[12]][k] - v[pd[13]][k]) - 0.03125*v[pd[9]][k] - 0.046875*v[pd[10]][k] + 0.09375*v[pd[11]][k] + 0.75*v[pd[14]][k]); v[cd[13]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.0625*v[pd[3]][k] + 0.3125*(v[pd[8]][k] - v[pd[13]][k]) + 0.15625*(v[pd[9]][k] + v[pd[11]][k]) - 0.234375*v[pd[10]][k] + 0.9375*v[pd[12]][k]); v[cd[14]][k] = v[pd[12]][k]; } /*--------------------------------------------------------------------------*/ /* values on neighbour's child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[12]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.3125*(v[pd[3]][k] - v[pd[12]][k]) + 0.0625*v[pd[8]][k] + 0.15625*(v[pd[9]][k] + v[pd[11]][k]) - 0.234375*v[pd[10]][k] + 0.9375*v[pd[13]][k]); v[cd[13]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.125*(-v[pd[3]][k] - v[pd[7]][k] + v[pd[8]][k]) + 0.375*(v[pd[4]][k] - v[pd[12]][k] + v[pd[13]][k]) + 0.09375*v[pd[9]][k] - 0.046875*v[pd[10]][k] - 0.03125*v[pd[11]][k] + 0.75*v[pd[14]][k]); v[cd[14]][k] = v[pd[13]][k]; } return; } static void real_d_coarse_inter4_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_inter4_2d"); EL *el; REAL_D *v = nil; int k; DOF pd[N_BAS4_2D]; const DOF *cd; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[9]][k] = v[cd[4]][k]; v[pd[10]][k] = v[cd[2]][k]; v[pd[12]][k] = v[cd[14]][k]; v[pd[14]][k] = v[cd[7]][k]; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[11]][k] = v[cd[7]][k]; v[pd[13]][k] = v[cd[14]][k]; } if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[12]][k] = v[cd[14]][k]; v[pd[14]][k] = v[cd[7]][k]; } /*--------------------------------------------------------------------------*/ /* values on neighbour's child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) v[pd[13]][k] = v[cd[14]][k]; return; } static void real_d_coarse_restr4_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr4_2d"); EL *el; REAL_D *v = nil; int k; DOF pd[N_BAS4_2D]; const DOF *cd; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.2734375*v[cd[3]][k] + 0.0390625*(-v[cd[5]][k] - v[cd[8]][k] - v[cd[13]][k]) + 0.0234375*(v[cd[6]][k] + v[cd[12]][k])); v[pd[1]][k] += (0.0390625*(-v[cd[3]][k] - v[cd[8]][k] - v[cd[12]][k] - v[cd[13]][k]) + 0.0234375*(v[cd[5]][k] + v[cd[6]][k])); v[pd[3]][k] += (0.0625*(-v[cd[6]][k] + v[cd[13]][k]) + 0.1875*v[cd[8]][k] + 0.125*v[cd[12]][k]); v[pd[4]][k] += (-0.375*v[cd[8]][k] - 0.125*v[cd[12]][k]); v[pd[5]][k] += 0.5*v[cd[8]][k]; v[pd[6]][k] += 0.5*v[cd[8]][k]; v[pd[7]][k] += 0.375*(-v[cd[8]][k] + v[cd[12]][k]); v[pd[8]][k] += (-0.0625*v[cd[6]][k] + 0.1875*v[cd[8]][k] - 0.125*v[cd[12]][k] + 0.3125*v[cd[13]][k]); v[pd[9]][k] = (v[cd[4]][k] + 1.09375*v[cd[3]][k] + 0.46875*v[cd[5]][k] - 0.09375*v[cd[6]][k] + 0.15625*v[cd[13]][k] + 0.03125*(v[cd[8]][k] - v[cd[12]][k])); v[pd[10]][k] = (v[cd[2]][k] - 0.546875*v[cd[3]][k] + 0.703125*v[cd[5]][k] + 0.140625*v[cd[6]][k] + 0.015625*v[cd[8]][k] - 0.046875*v[cd[12]][k] - 0.234375*v[cd[13]][k]); v[pd[11]][k] = (0.21875*v[cd[3]][k] + 0.15625*(-v[cd[5]][k] + v[cd[13]][k]) + 0.09375*(-v[cd[6]][k] + v[cd[12]][k]) + 0.03125*v[cd[8]][k]); v[pd[12]][k] = (v[cd[14]][k] + 0.5625*v[cd[6]][k] - 0.1875*v[cd[8]][k] + 0.375*v[cd[12]][k] + 0.9375*v[cd[13]][k]); v[pd[13]][k] = (0.5625*v[cd[6]][k] - 0.1875*v[cd[8]][k] - 0.375*v[cd[12]][k] - 0.3125*v[cd[13]][k]); v[pd[14]][k] = (v[cd[7]][k] + 0.75*(v[cd[8]][k] + v[cd[12]][k])); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0234375*v[cd[6]][k] + 0.0390625*(-v[cd[8]][k] - v[cd[12]][k] - v[cd[13]][k])); v[pd[1]][k] += (0.0390625*(-v[cd[6]][k] - v[cd[12]][k]) + 0.2734375*v[cd[8]][k] + 0.0234375*v[cd[13]][k]); v[pd[3]][k] += 0.3125*v[cd[12]][k] - 0.125*v[cd[13]][k]; v[pd[4]][k] += 0.375*v[cd[13]][k]; v[pd[7]][k] += -0.125*v[cd[13]][k]; v[pd[8]][k] += 0.0625*v[cd[12]][k] + 0.125*v[cd[13]][k]; v[pd[9]][k] += (0.15625*(-v[cd[6]][k] + v[cd[12]][k]) + 0.21875*v[cd[8]][k] + 0.09375*v[cd[13]][k]); v[pd[10]][k] += (0.703125*v[cd[6]][k] - 0.546875*v[cd[8]][k] - 0.234375*v[cd[12]][k] - 0.046875*v[cd[13]][k]); v[pd[11]][k] += (v[cd[7]][k] + 0.46875*v[cd[6]][k] + 1.09375*v[cd[8]][k] + 0.15625*v[cd[12]][k] - 0.03125*v[cd[13]][k]); v[pd[12]][k] += -0.3125*v[cd[12]][k] - 0.375*v[cd[13]][k]; v[pd[13]][k] += v[cd[14]][k] + 0.9375*v[cd[12]][k] + 0.375*v[cd[13]][k]; v[pd[14]][k] += 0.75*v[cd[13]][k]; } if (n <= 1) return; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ el = list[1].el_info.el; get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on neighbour's child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0234375*(v[cd[6]][k] + v[cd[12]][k]) + 0.0390625*(-v[cd[8]][k] - v[cd[13]][k])); v[pd[1]][k] += (0.0234375*v[cd[6]][k] + 0.0390625*(-v[cd[8]][k] - v[cd[12]][k] - v[cd[13]][k])); v[pd[3]][k] += (0.0625*(-v[cd[6]][k] + v[cd[13]][k]) + 0.1875*v[cd[8]][k] + 0.12500000*v[cd[12]][k]); v[pd[4]][k] += -0.375*v[cd[8]][k] - 0.125*v[cd[12]][k]; v[pd[5]][k] += 0.5*v[cd[8]][k]; v[pd[6]][k] += 0.5*v[cd[8]][k]; v[pd[7]][k] += 0.375*(-v[cd[8]][k] + v[cd[12]][k]); v[pd[8]][k] += (-0.0625*v[cd[6]][k] + 0.1875*v[cd[8]][k] - 0.125*v[cd[12]][k] + 0.3125*v[cd[13]][k]); v[pd[9]][k] += (-0.09375*v[cd[6]][k] + 0.03125*(v[cd[8]][k] - v[cd[12]][k]) + 0.15625*v[cd[13]][k]); v[pd[10]][k] += (0.140625*v[cd[6]][k] + 0.015625*v[cd[8]][k] - 0.046875*v[cd[12]][k] - 0.234375*v[cd[13]][k]); v[pd[11]][k] += (0.09375*(-v[cd[6]][k] + v[cd[12]][k]) + 0.03125*v[cd[8]][k] + 0.15625*v[cd[13]][k]); v[pd[12]][k] = (v[cd[14]][k] + 0.5625*v[cd[6]][k] - 0.1875*v[cd[8]][k] + 0.375*v[cd[12]][k] + 0.9375*v[cd[13]][k]); v[pd[13]][k] = (0.5625*v[cd[6]][k] - 0.1875*v[cd[8]][k] - 0.375*v[cd[12]][k] - 0.3125*v[cd[13]][k]); v[pd[14]][k] = v[cd[7]][k] + 0.75*(v[cd[8]][k] + v[cd[12]][k]); } /*--------------------------------------------------------------------------*/ /* values on neighbour's child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0390625*(-v[cd[12]][k] - v[cd[13]][k]); v[pd[1]][k] += -0.0390625*v[cd[12]][k] + 0.0234375*v[cd[13]][k]; v[pd[3]][k] += 0.3125*v[cd[12]][k] - 0.125*v[cd[13]][k]; v[pd[4]][k] += 0.375*v[cd[13]][k]; v[pd[7]][k] += -0.125*v[cd[13]][k]; v[pd[8]][k] += 0.0625*v[cd[12]][k] + 0.125*v[cd[13]][k]; v[pd[9]][k] += 0.15625*v[cd[12]][k] + 0.09375*v[cd[13]][k]; v[pd[10]][k] += -0.234375*v[cd[12]][k] - 0.046875*v[cd[13]][k]; v[pd[11]][k] += 0.15625*v[cd[12]][k] - 0.03125*v[cd[13]][k]; v[pd[12]][k] += -0.3125*v[cd[12]][k] - 0.375*v[cd[13]][k]; v[pd[13]][k] += v[cd[14]][k] + 0.9375*v[cd[12]][k] + 0.375*v[cd[13]][k]; v[pd[14]][k] += 0.75*v[cd[13]][k]; } return; } static BAS_FCT *phi4_2d[N_BAS4_2D] = {phi4v0_2d, phi4v1_2d, phi4v2_2d, phi4e00_2d, phi4e01_2d, phi4e02_2d, phi4e10_2d, phi4e11_2d, phi4e12_2d, phi4e20_2d, phi4e21_2d, phi4e22_2d, phi4c0_2d, phi4c1_2d, phi4c2_2d}; static GRD_BAS_FCT *grd_phi4_2d[N_BAS4_2D] = { grd_phi4v0_2d, grd_phi4v1_2d, grd_phi4v2_2d, grd_phi4e00_2d, grd_phi4e01_2d, grd_phi4e02_2d, grd_phi4e10_2d, grd_phi4e11_2d, grd_phi4e12_2d, grd_phi4e20_2d, grd_phi4e21_2d, grd_phi4e22_2d, grd_phi4c0_2d, grd_phi4c1_2d, grd_phi4c2_2d}; static D2_BAS_FCT *D2_phi4_2d[N_BAS4_2D] = { D2_phi4v0_2d, D2_phi4v1_2d, D2_phi4v2_2d, D2_phi4e00_2d, D2_phi4e01_2d, D2_phi4e02_2d, D2_phi4e10_2d, D2_phi4e11_2d, D2_phi4e12_2d, D2_phi4e20_2d, D2_phi4e21_2d, D2_phi4e22_2d, D2_phi4c0_2d, D2_phi4c1_2d, D2_phi4c2_2d}; static BAS_FCTS lagrange4_2d = {"lagrange4_2d", 2, N_BAS4_2D, 4, {1, 3, 3, 0}, /* VERTEX, CENTER, EDGE, FACE */ nil, phi4_2d, grd_phi4_2d, D2_phi4_2d, get_dof_indices4_2d, get_bound4_2d, interpol4_2d, interpol_d4_2d, get_int_vec4_2d, get_real_vec4_2d, get_real_d_vec4_2d, get_uchar_vec4_2d, get_schar_vec4_2d, real_refine_inter4_2d, real_coarse_inter4_2d, real_coarse_restr4_2d, real_d_refine_inter4_2d, real_d_coarse_inter4_2d, real_d_coarse_restr4_2d, bary4_2d,}; alberta-2.0.1/alberta/src/2d/level_2d.c0000644000042300001440000003434510676724251014426 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: level_common.c */ /* */ /* description: routines for extracting level set of a piecewise linear */ /* fe-function, 2d part */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* file includes ../Common/level_common.c */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de/ */ /* */ /*--------------------------------------------------------------------------*/ /* (c) by A. Schmidt and K.G. Siebert (1996-2004) */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /*--------------------------------------------------------------------------*/ REAL level_element_det_2d(const REAL_D coord[N_VERTICES_1D]) { REAL_D diff; int i; for (i = 0; i < DIM_OF_WORLD; i++) diff[i] = coord[0][i] - coord[1][i]; return(sqrt(SCP_DOW(diff,diff))); } void level_coord_to_world_2d(const REAL_D coord[N_VERTICES_1D], const REAL_B lambda, REAL_D world) { int k; for (k = 0; k < DIM_OF_WORLD; k++) world[k] = (lambda[0]*coord[0][k] + lambda[1]*coord[1][k]); } void level_coord_to_el_coord_2d(const REAL_B v_lambda[N_VERTICES_1D], const REAL_B lambda, REAL_B el_lambda) { int k; for (k = 0; k < N_VERTICES_2D; k++) el_lambda[k] = (lambda[0]*v_lambda[0][k] + lambda[1]*v_lambda[1][k]); } static int n_el = 0; static void new_edge_2d(const EL_INFO *el_info, REAL v[], REAL_B lambda[], int face) { int n, j, k; REAL_D coord[N_VERTICES_1D]; if (init_element && !(*init_element)(el_info, v, 2, face, (void *)lambda)) return; n_el++; for (n = 0; n < 2; n++) { for (k = 0; k < DIM_OF_WORLD; k++) { coord[n][k] = 0.0; for (j = 0; j < N_VERTICES_2D; j++) coord[n][k] += lambda[n][j]*el_info->coord[j][k]; } } if (cal_element) (*cal_element)(el_info, v, 0, face, (void *) lambda, (void *) coord); return; } static const DOF_REAL_VEC *level; static const BAS_FCTS *linear; static const REAL *(*get_real_vec)(const EL *, const DOF_REAL_VEC *, REAL *); static void level_fct_2d(const EL_INFO *el_info, void *dummy) { FUNCNAME("level_fct"); static REAL_B lambdaT[N_VERTICES_2D] = {{1,0,0},{0,1,0},{0,0,1}}; static REAL_B lambdae[N_EDGES_2D][N_VERTICES_1D] = {{{0,1,0},{0,0,1}}, {{0,0,1},{1,0,0}}, {{1,0,0},{0,1,0}}}; REAL s; REAL_B v; REAL_BB lambda; int i, j, i1, i2; int n_p = 0, n_m = 0, n_0 = 0; int index_p[N_VERTICES_2D], index_m[N_VERTICES_2D], index_0[N_VERTICES_2D]; (*get_real_vec)(el_info->el, level, v); /****************************************************************************/ /* count the number of positve, negative and zero values at the vertices */ /****************************************************************************/ for (i = 0; i < N_VERTICES_2D; i++) { if (v[i] - level_value > small) index_p[n_p++] = i; else if (v[i] - level_value < -small) index_m[n_m++] = i; else index_0[n_0++] = i; } TEST_EXIT(n_p + n_m + n_0 == N_VERTICES_2D, "n_p + n_m + n_0 = %d != N_VERTICES_2D\n", n_p + n_m + n_0); switch(n_0) { case 3: /****************************************************************************/ /* all three edges belong to the level: */ /* => three edges */ /****************************************************************************/ for (i = 0; i < N_NEIGH_2D; i++) new_edge_2d(el_info, v, lambdae[i], i); break; case 2: /****************************************************************************/ /* one edge belongs to the level: */ /* => one edge (if not collected by the neighbour!) */ /****************************************************************************/ if (n_p) i = index_p[0]; else i = index_m[0]; new_edge_2d(el_info, v, lambdae[i], i); break; case 1: /****************************************************************************/ /* one of the other vertices is positive and the other negativ */ /* => one (interior) edge */ /* otherwise the zero level is only a vertex => nothing to do */ /****************************************************************************/ if (n_p == 1 && n_m == 1) { i1 = index_p[0]; i2 = index_m[0]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_2D; j++) { lambda[0][j] = lambdaT[index_0[0]][j]; lambda[1][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; } new_edge_2d(el_info, v, lambda, -1); } break; case 0: /****************************************************************************/ /* all other cases: */ /* 3 positive vertices: nothing */ /* 2 positive vertices and 1 negative vertex: 1 interior edge */ /* 1 positive vertex and 2 negative vertices: 1 interior edge */ /* 3 negative vertices: nothing */ /****************************************************************************/ switch (n_p) { case 2: i1 = index_m[0]; for (i = 0; i < 2; i++) { i2 = index_p[i]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_2D; j++) lambda[i][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; } new_edge_2d(el_info, v, lambda, -1); break; case 1: i1 = index_p[0]; for (i = 0; i < 2; i++) { i2 = index_m[i]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_2D; j++) lambda[i][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; } new_edge_2d(el_info, v, lambda, -1); break; } break; } return; } #if 0 /* cH: I'm just too lazy ATM. */ #if DIM_OF_WORLD == 2 #define X(x) ((x-x_min)*diam_x_1) #define Y(y) ((y-y_min)*diam_y_1) static FILE *psFile = nil; static REAL x_min, x_max, y_min, y_max, diam_x_1, diam_y_1; static int (*is_domain)(const EL *); static int ps_init(const EL_INFO *el_info, REAL v[N_VERTICES], int N, int f, const REAL lambda[][DIM+1]) { EL *n; el_info->el->mark = 0; if (f >= 0) { if ((n = NEIGH(el_info->el,el_info)[f])) { if (!n->mark) return(0); if (is_domain && !is_domain(el_info->el) && !is_domain(n)) return(0); } else { if (is_domain && !is_domain(el_info->el)) return(0); } } return(1); } static void ps_write(const EL_INFO *el_info, REAL v[N_VERTICES], int i, int f, const REAL lambda[DIM][DIM+1], const REAL_D coord[DIM]) { int in0, in1; el_info->el->mark = 0; in0 = (coord[0][0] > x_min && coord[0][0] < x_max); in0 = in0 && (coord[0][1] > y_min && coord[0][1] < y_max); in1 = (coord[1][0] > x_min && coord[1][0] < x_max); in1 = in1 && (coord[1][1] > y_min && coord[1][1] < y_max); if (in0 || in1) { fprintf(psFile,"newpath\n"); fprintf(psFile,"%f %f m\n", X(coord[0][0]), Y(coord[0][1])); fprintf(psFile,"%f %f l\n", X(coord[1][0]), Y(coord[1][1])); fprintf(psFile,"stroke\n"); } } void write_ps_level(MESH *mesh, const char *filename, const char *mode, const char *title, const REAL x[2], const REAL y[2], int keepaspect, const DOF_REAL_VEC *level, REAL value, int (*is_d)(const EL *), int draw_bound) { FUNCNAME("write_ps_level"); int i; MACRO_EL *mel; const float *c = rgb_black; /*--- to be done, color as argument ---*/ if (mesh==nil) return; x_max = y_max = -LARGE; x_min = y_min = LARGE; for (mel = mesh->first_macro_el; mel; mel = mel->next) { for (i = 0; i < N_VERTICES; i++) { x_max = MAX(x_max,mel->coord[i][0]); y_max = MAX(y_max,mel->coord[i][1]); x_min = MIN(x_min,mel->coord[i][0]); y_min = MIN(y_min,mel->coord[i][1]); } } if (x && x[0] != x[1]) { REAL xx; xx = MAX(x[1], x_min); x_max = MIN(x_max,xx); xx = MIN(x[0], x_max); x_min = MAX(x_min,xx); } if (y && y[0] != y[1]) { REAL yy; yy = MAX(y[1], y_min); y_max = MIN(y_max,yy); yy = MIN(y[0], y_max); y_min = MAX(y_min,yy); } diam_x_1 = x_max - x_min ? 1.0/(x_max - x_min) : 1.0; diam_y_1 = y_max - y_min ? 1.0/(y_max - y_min) : 1.0; if (keepaspect) diam_x_1 = diam_y_1 = MIN(diam_x_1, diam_y_1); #if 0 MSG("x in [%le,%le], diam_x = %le\n", x_min, x_max, 1.0/diam_x_1); MSG("y in [%le,%le], diam_y = %le\n", y_min, y_max, 1.0/diam_y_1); #endif if (!(psFile = fopen(filename, mode))) { MSG("cannot open PS file for writing\n"); return; } if (!strcmp(mode, "w")) /* new file */ { fprintf(psFile,"%%!PS-Adobe-2.0 EPSF-1.2\n"); fprintf(psFile,"%%%%Creator: ALBERTAPostScript level writer\n"); fprintf(psFile,"%%%%Title: %s\n", title ? title : "ALBERTAOutput"); fprintf(psFile,"%%%%Pages: 1\n"); fprintf(psFile,"%%%%DocumentFonts: Times-Roman\n"); fprintf(psFile,"%%%%BoundingBox: 200 200 %.3f %.3f\n", 200.0*(1.0 + X(x_max)), 200.0*(1.0 + Y(y_max))); fprintf(psFile,"%%%%EndComments\n"); fprintf(psFile,"%%begin(plot)\n"); fprintf(psFile,"200 200 translate\n"); fprintf(psFile,"200 200 scale %% 72 = 1in, 200 ~ 7cm\n"); fprintf(psFile,"/mm { 0.01132 mul } def\n"); fprintf(psFile,"/m { moveto } def\n"); fprintf(psFile,"/l { lineto } def\n"); fprintf(psFile," %.3f %.3f m\n", 0.0, 0.0); fprintf(psFile," %.3f %.3f l\n", X(x_max), 0.0); fprintf(psFile," %.3f %.3f l\n", X(x_max), Y(y_max)); fprintf(psFile," %.3f %.3f l\n", 0.0, Y(y_max)); fprintf(psFile,"closepath\n"); if (!draw_bound) fprintf(psFile, "%%"); fprintf(psFile,"gsave 0.5 mm setlinewidth stroke grestore\n"); fprintf(psFile,"clip\n"); fprintf(psFile, "0.25 mm setlinewidth 1 setlinejoin 1 setlinecap\n"); fprintf(psFile," 0 0 0 setrgbcolor\n"); fprintf(psFile, "/Times-Roman findfont 5 mm scalefont setfont 0 setgray\n"); #if 0 fprintf(psFile,"%%newpath\n"); fprintf(psFile,"%% 0. 1. m\n"); fprintf(psFile,"%% 0. 0. l\n"); fprintf(psFile,"%% 1. 0. l\n"); fprintf(psFile,"%% 1. 1. l\n"); fprintf(psFile,"%% 0. 1. l\n"); fprintf(psFile,"%%stroke\n"); #endif fprintf(psFile,"%% ENDE DES PROLOGS XXXXXXXXXXXXXXXXXXX\n"); if (title) { fprintf(psFile,"0.1 1.05 m\n (%s) show\n",title); } if (draw_bound) { fprintf(psFile,"%% begin domains boundary\n"); for (mel = mesh->first_macro_el; mel; mel = mel->next) { for (i = 0; i < N_EDGES; i++) { if (!IS_INTERIOR(mel->boundary[i])) { fprintf(psFile,"newpath\n"); fprintf(psFile,"%f %f m\n", X(mel->coord[(i+1)%3][0]), Y(mel->coord[(i+1)%3][1])); fprintf(psFile,"%f %f l\n", X(mel->coord[(i+2)%3][0]), Y(mel->coord[(i+2)%3][1])); fprintf(psFile,"stroke\n"); } } } fprintf(psFile,"%% end domains boundary\n"); } fprintf(psFile,"%% first level\n"); } else { fprintf(psFile,"%% next level\n"); } fprintf(psFile, "%% set color\n"); fprintf(psFile, "%8.5f %8.5f %8.5f setrgbcolor\n", c[0], c[1], c[2]); is_domain = is_d; set_element_mark(mesh, CALL_LEAF_EL, 1); find_level(mesh, FILL_COORDS|FILL_NEIGH, level, value, ps_init, ps_write); set_element_mark(mesh, CALL_LEAF_EL, 0); /* fprintf(psFile,"showpage end\n"); */ fclose(psFile); psFile = nil; } #endif /* DOW == 2 */ #endif /* 0 */ alberta-2.0.1/alberta/src/2d/macro_2d.c0000644000042300001440000004243310676724251014415 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: macro_2d.c */ /* */ /* */ /* description: dimension dependent part of reading/writing macro */ /* triangulations for 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* count_edges_2d(): */ /* calculates the number of edges in the given macro triangulation. */ /*--------------------------------------------------------------------------*/ static void count_edges_2d(MESH *mesh) { int i, n, n_edges = 0; MACRO_EL *mel; for(n = 0; n < mesh->n_macro_el; n++) { mel = mesh->macro_els + n; for (i = 0; i < N_NEIGH_2D; i++) if (!mel->neigh[i] || (mel->neigh[i]->index < mel->index)) n_edges++; } mesh->n_edges = n_edges; return; } /*--------------------------------------------------------------------------*/ /* fill_bound_info_2d(): */ /* fills boundary information for the vertices of the macro triangulation */ /* The type of a boundary vertex is equal to the highest type of all */ /* adjoining boundary edges. If there are no boundary edges containing the */ /* vertex, it is assumed to be an interior vertex. */ /*--------------------------------------------------------------------------*/ static void fill_bound_info_2d(MESH *mesh, const MACRO_DATA *data) { FUNCNAME("fill_bound_info_2d"); MACRO_EL *mel = mesh->macro_els; int i, j, ne = mesh->n_elements, nv = mesh->n_vertices; S_CHAR *bound = MEM_ALLOC(nv, S_CHAR), m_bound; for(i = 0; i < data->n_macro_elements; i++) for(j = 0; j < N_NEIGH_2D; j++) mel[i].edge_bound[j] = data->boundary[NEIGH_IND(2,i,j)]; for (i = 0; i < nv; i++) bound[i] = INTERIOR; for (i = 0; i < ne; i++) for (j = 0; j < N_NEIGH_2D; j++) if ((m_bound = mel[i].edge_bound[j])) { if (m_bound >= DIRICHLET) { int j1 = data->mel_vertices[VERT_IND(2,i,(j+1)%3)]; int j2 = data->mel_vertices[VERT_IND(2,i,(j+2)%3)]; bound[j1] = MAX(bound[j1], m_bound); bound[j2] = MAX(bound[j2], m_bound); } else if (m_bound <= NEUMANN) { int j1 = data->mel_vertices[VERT_IND(2,i,(j+1)%3)]; int j2 = data->mel_vertices[VERT_IND(2,i,(j+2)%3)]; if (bound[j1] != INTERIOR) bound[j1] = MAX(bound[j1], m_bound); else bound[j1] = m_bound; if (bound[j2] != INTERIOR) bound[j2] = MAX(bound[j2], m_bound); else bound[j2] = m_bound; } } for (i = 0; i < ne; i++) for (j = 0; j < N_VERTICES_2D; j++) mel[i].vertex_bound[j] = bound[data->mel_vertices[VERT_IND(2,i,j)]]; MEM_FREE(bound, nv, S_CHAR); return; } /*--------------------------------------------------------------------------*/ /* check_cycles_2d(): check "data" for potential cycles during refinement */ /* returns -1 if data is OK else the global index of an element where a */ /* cycle is found */ /*--------------------------------------------------------------------------*/ static int check_cycles_2d(MACRO_DATA *data) { FUNCNAME("check_cycles_2d"); int zykstart, i, elem, elemlfd; U_CHAR *test, *zykl, flg; test=MEM_CALLOC(data->n_macro_elements, U_CHAR); zykl=MEM_ALLOC(data->n_macro_elements, U_CHAR); zykstart = -1; for(elemlfd = 0; elemlfd < data->n_macro_elements; elemlfd++) { if (!test[elemlfd]) { for (i = 0; i < data->n_macro_elements; i++) zykl[i]=0; elem = elemlfd; flg=2; do { if (zykl[elem] == 1) { flg=0; zykstart=elem; } else { zykl[elem]=1; if (test[elem]==1) { flg=1; } else if (data->neigh[NEIGH_IND(2,elem,2)] < 0) { flg=1; test[elem]=1; } else if (elem == data->neigh[NEIGH_IND(2,data->neigh[NEIGH_IND(2,elem,2)],2)]) { flg=1; test[elem]=1; test[data->neigh[NEIGH_IND(2,elem,2)]]=1; } else { elem=data->neigh[NEIGH_IND(2,elem,2)]; } } }while(flg == 2); if (flg != 1) break; } } MEM_FREE(zykl, data->n_macro_elements, U_CHAR); MEM_FREE(test, data->n_macro_elements, U_CHAR); return(zykstart); } /*--------------------------------------------------------------------------*/ /* fill_best_edges_2d(): The main job of this routine is to fill the arrays */ /* best_edges[] and neighs[] below. best_edges[elem] is best explained with */ /* some examples: */ /* best_edges[elem] == {2, 3, 3}: one longest edge, namely 2 */ /* best_edges[elem] == {0, 1, 3}: two longest edges, namely 0 and 1 */ /* best_edges[elem] == {2, 0, 1}: three longest edges, namely 2, 0, 1 */ /* neighs[elem] contains the global indices of the neighbour edges ordered */ /* by length to match best_edges[elem]. */ /*--------------------------------------------------------------------------*/ typedef U_CHAR UCHAR_NNEIGH[N_NEIGH_2D]; typedef int INT_NNEIGH[N_NEIGH_2D]; static void fill_best_edges_2d(MACRO_DATA *data, int elem, UCHAR_NNEIGH edge, INT_NNEIGH neighs) { static U_CHAR i; static REAL l[3]; for(i = 0; i < N_EDGES_2D; i++) { l[i] = DIST_DOW(data->coords[data->mel_vertices[VERT_IND(2,elem,(i+1)%N_EDGES_2D)]], data->coords[data->mel_vertices[VERT_IND(2,elem,(i+2)% N_EDGES_2D)]]); edge[i] = i; } for (i = 0; i < N_EDGES_2D; i++) { if (l[i] > l[edge[0]]) edge[0] = i; if (l[i] < l[edge[2]]) edge[2] = i; } edge[1] = N_EDGES_2D - edge[0] - edge[2]; for(i = 0; i < N_NEIGH_2D; i++) neighs[i] = data->neigh[NEIGH_IND(2,elem, edge[i])]; for (i = 1; i < N_EDGES_2D; i++) if ( (l[edge[i - 1]] - l[edge[i]]) > REAL_EPSILON * l[edge[i]] ) break; for (; i < N_EDGES_2D; i++) edge[i]=N_EDGES_2D; } /*--------------------------------------------------------------------------*/ /* new_refine_edge_2d(): change the local indices of vertices, neighbours */ /* and boundaries to fit the choice of the new refinement edge. */ /* NOTE: the element's orientation is unimportant for this routine. */ /*--------------------------------------------------------------------------*/ static void new_refine_edge_2d(MACRO_DATA *data, int elem, U_CHAR new_edge) { static int buffer_vertex, buffer_neigh; static S_CHAR buffer_boundary; if(new_edge != 2) { buffer_vertex = data->mel_vertices[VERT_IND(2,elem,0)]; buffer_neigh = data->neigh[NEIGH_IND(2,elem,0)]; buffer_boundary = data->boundary[NEIGH_IND(2,elem,0)]; switch (new_edge) { case 0: data->mel_vertices[VERT_IND(2,elem,0)] = data->mel_vertices[VERT_IND(2,elem,1)]; data->mel_vertices[VERT_IND(2,elem,1)] = data->mel_vertices[VERT_IND(2,elem,2)]; data->mel_vertices[VERT_IND(2,elem,2)] = buffer_vertex; data->neigh[NEIGH_IND(2,elem,0)] = data->neigh[NEIGH_IND(2,elem,1)]; data->neigh[NEIGH_IND(2,elem,1)] = data->neigh[NEIGH_IND(2,elem,2)]; data->neigh[NEIGH_IND(2,elem,2)] = buffer_neigh; data->boundary[NEIGH_IND(2,elem,0)] = data->boundary[NEIGH_IND(2,elem,1)]; data->boundary[NEIGH_IND(2,elem,1)] = data->boundary[NEIGH_IND(2,elem,2)]; data->boundary[NEIGH_IND(2,elem,2)] = buffer_boundary; break; case 1: data->mel_vertices[VERT_IND(2,elem,0)] = data->mel_vertices[VERT_IND(2,elem,2)]; data->mel_vertices[VERT_IND(2,elem,2)] = data->mel_vertices[VERT_IND(2,elem,1)]; data->mel_vertices[VERT_IND(2,elem,1)] = buffer_vertex; data->neigh[NEIGH_IND(2,elem,0)] = data->neigh[NEIGH_IND(2,elem,2)]; data->neigh[NEIGH_IND(2,elem,2)] = data->neigh[NEIGH_IND(2,elem,1)]; data->neigh[NEIGH_IND(2,elem,1)] = buffer_neigh; data->boundary[NEIGH_IND(2,elem,0)] = data->boundary[NEIGH_IND(2,elem,2)]; data->boundary[NEIGH_IND(2,elem,2)] = data->boundary[NEIGH_IND(2,elem,1)]; data->boundary[NEIGH_IND(2,elem,1)] = buffer_boundary; } } } /*--------------------------------------------------------------------------*/ /* reorder_2d(): the main routine for correcting cycles */ /* */ /* Refinement edges are chosen using the following priority: */ /* 0. If the current element elem only has one longest edge then */ /* choose that edge as refinement edge. */ /* 1. If possible, choose the refinement edge as one of the longest */ /* edges along the boundary. */ /* 2. Otherwise chose the refinement edge as one of the longest edges */ /* whose corresponding neighbour's edge is also one of its longest */ /* ones (thus creating compatibly divisible pairs of elements) */ /* 3. Choose a longest edge towards an already tested element. */ /* 4. If all else fails, choose an arbitrary longest edge. */ /*--------------------------------------------------------------------------*/ static void reorder_2d(MACRO_DATA *data, U_CHAR *test, int elem, INT_NNEIGH *neighs, UCHAR_NNEIGH *best_edges) { FUNCNAME("reorder_2d"); static U_CHAR j, k; MSG("Current elem: %d, best_edges: %d %d %d\n", elem, best_edges[elem][0], best_edges[elem][1], best_edges[elem][2]); test[elem] = true; if (best_edges[elem][1] == N_EDGES_2D) { new_refine_edge_2d(data, elem, best_edges[elem][0]); return; } for (j = 0; best_edges[elem][j] < N_EDGES_2D; j++) { MSG("Looking at best_edges[%d][%d]...\n", elem, j); if (neighs[elem][j] < 0) { MSG("It is a border edge! Selecting it...\n"); new_refine_edge_2d(data, elem, best_edges[elem][j]); return; } if (!test[neighs[elem][j]]) { for (k = 0; best_edges[neighs[elem][j]][k] < N_EDGES_2D; k++) if(neighs[neighs[elem][j]][k] == elem) { MSG("Found compatibly divisible neighbour %d!\n", neighs[elem][j]); test[neighs[elem][j]] = true; new_refine_edge_2d(data, elem, best_edges[elem][j]); new_refine_edge_2d(data,neighs[elem][j],best_edges[neighs[elem][j]][k]); return; } } } MSG("No immediate patch found - trying to select an edge towards tested elements.\n"); for (j = 0; best_edges[elem][j] < N_EDGES_2D; j++) { MSG("Looking at best_edges[%d][%d]...\n", elem, j); if (test[neighs[elem][j]]) { MSG("Found tested neighbour on edge %d.", j); new_refine_edge_2d(data, elem, best_edges[elem][j]); return; } } MSG("Finally resorted to selecting edge %d.\n", best_edges[elem][0]); new_refine_edge_2d(data, elem, best_edges[elem][0]); return; } /*--------------------------------------------------------------------------*/ /* correct_cycles_2d(): Correct refinement cycles using reorder_2d() */ /*--------------------------------------------------------------------------*/ static void correct_cycles_2d(MACRO_DATA *data) { FUNCNAME("correct_cycles_2d"); int elem; U_CHAR *test; INT_NNEIGH *neighs = MEM_ALLOC(data->n_macro_elements, INT_NNEIGH); UCHAR_NNEIGH *best_edges = MEM_ALLOC(data->n_macro_elements, UCHAR_NNEIGH); test = MEM_CALLOC(data->n_macro_elements, U_CHAR); for(elem = 0; elem < data->n_macro_elements; elem++) fill_best_edges_2d(data, elem, best_edges[elem], neighs[elem]); for(elem = 0; elem < data->n_macro_elements; elem++) if(!test[elem]) reorder_2d(data,test,elem, neighs, best_edges); MEM_FREE(test, data->n_macro_elements, U_CHAR); MEM_FREE(neighs, data->n_macro_elements, INT_NNEIGH); MEM_FREE(best_edges, data->n_macro_elements, UCHAR_NNEIGH); } #if DIM_OF_WORLD == 2 /*--------------------------------------------------------------------------*/ /* orientation_2d(): checks and corrects whether the element is oriented */ /* counterclockwise. Only makes sense for DIM_OF_WORLD == 2! */ /*--------------------------------------------------------------------------*/ static U_CHAR orientation_2d(MACRO_DATA *data) { int i, vert_buffer, neigh_buffer; REAL_D e1, e2; REAL det, *a0; S_CHAR bound_buffer; U_CHAR result = false; for(i = 0; i < data->n_macro_elements; i++) { a0 = data->coords[data->mel_vertices[VERT_IND(2,i,0)]]; e1[0] = data->coords[data->mel_vertices[VERT_IND(2,i,1)]][0] - a0[0]; e1[1] = data->coords[data->mel_vertices[VERT_IND(2,i,1)]][1] - a0[1]; e2[0] = data->coords[data->mel_vertices[VERT_IND(2,i,2)]][0] - a0[0]; e2[1] = data->coords[data->mel_vertices[VERT_IND(2,i,2)]][1] - a0[1]; det = e1[0]*e2[1] - e1[1]*e2[0]; if(det < 0) { result = true; vert_buffer = data->mel_vertices[VERT_IND(2,i,0)]; data->mel_vertices[VERT_IND(2,i,0)]=data->mel_vertices[VERT_IND(2,i,1)]; data->mel_vertices[VERT_IND(2,i,1)] = vert_buffer; neigh_buffer = data->neigh[NEIGH_IND(2,i,0)]; data->neigh[NEIGH_IND(2,i,0)] = data->neigh[NEIGH_IND(2,i,1)]; data->neigh[NEIGH_IND(2,i,1)] = neigh_buffer; bound_buffer = data->boundary[NEIGH_IND(2,i,0)]; data->boundary[NEIGH_IND(2,i,0)] = data->boundary[NEIGH_IND(2,i,1)]; data->boundary[NEIGH_IND(2,i,1)] = bound_buffer; } } return(result); } #endif /*--------------------------------------------------------------------------*/ /* macro_test_2d(): Check data for potential cycles during refinement */ /* At the moment, a correction (and subsequent writing of a correct macro */ /* data file) can only be done in 2D */ /* Additionally, the element orientation is checked and corrected. */ /*--------------------------------------------------------------------------*/ static void macro_test_2d(MACRO_DATA *data, const char *nameneu) { FUNCNAME("macro_test_2d"); U_CHAR error_found = false; int i = -1; i = check_cycles_2d(data); if (i >= 0) { error_found = true; WARNING("There is a cycle beginning in macro element %d.\n", i); MSG("Correcting refinement edges....\n"); correct_cycles_2d(data); } #if DIM_OF_WORLD == 2 if(orientation_2d(data)) { error_found = true; WARNING("Element orientation was corrected for some elements.\n"); } #endif if (error_found && nameneu) { MSG("Attempting to write corrected macro data to file %s...\n", nameneu); write_macro_data(data, nameneu); } return; } alberta-2.0.1/alberta/src/2d/memory_2d.c0000644000042300001440000005200110676724251014614 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: memory_2d.c */ /* */ /* */ /* description: special routines for getting new FE_SPACEs, 2D-Version */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* LOGICAL_EL_2D: */ /* This structure defines a MESH element at any point in the hierarchy in */ /* terms of global indices for vertices, edges, and elements. This */ /* information is calculated by the routines below. A temporary */ /* representation of the entire mesh is used to fill DOF pointers on all */ /* elements. This rather general (and costly) approach was used since this */ /* information might be useful in other contexts in the future */ /* */ /* The entries are self-explanatory, except for "neigh", which is slightly */ /* complicated. "neigh" is defined to be the neighbour on the same */ /* refinement level. If there is no such neighbour due to non-matching */ /* refinement edges, we take a neighbour one level higher. */ /****************************************************************************/ typedef struct logical_el_2d LOGICAL_EL_2D; struct logical_el_2d { int parent; int child[2]; int neigh[N_NEIGH_2D]; int vertex[N_VERTICES_2D]; int edge[N_EDGES_2D]; EL *el; }; /****************************************************************************/ /* fill_logical_el_rec_2d(l_els, el, current_el, index): */ /* This routine fills basic information on logical els, namely childhood */ /* relationships, element types, EL pointers. Elements are also counted */ /* here, and the maximum depth of the refinement tree is determined */ /* (max_level == maximum number of parent generations above an element). */ /****************************************************************************/ static void fill_logical_el_rec_2d(LOGICAL_EL_2D *l_els, EL *el, int current_el, int *index, int current_level, int *max_level) { /*FUNCNAME("fill_logical_el_rec_2d"); */ int i_child, child_ind[2]; if(current_level > *max_level) *max_level = current_level; if(el->child[0]) { /* Fill basic child information. */ for(i_child = 0; i_child < 2; i_child++) { child_ind[i_child] = *index + i_child; l_els[current_el].child[i_child] = child_ind[i_child]; l_els[child_ind[i_child]].el = el->child[i_child]; l_els[child_ind[i_child]].parent = current_el; } *index += 2; /* Now recurse to the two children. */ fill_logical_el_rec_2d(l_els, el->child[0], child_ind[0], index, current_level + 1, max_level); fill_logical_el_rec_2d(l_els, el->child[1], child_ind[1], index, current_level + 1, max_level); } return; } /****************************************************************************/ /* get_opp_v_2d(l_els, el, neigh): */ /* Simple routine to determine the opposite vertex (semantics as in EL, */ /* EL_INFO, or MACRO_EL) since this is not stored on LOGICAL_EL structures. */ /****************************************************************************/ static int get_opp_v_2d(LOGICAL_EL_2D *l_els, int el, int neigh) { FUNCNAME("get_opp_v_2d"); int i, tmp; if(neigh > -1) { for(i = 0; i < N_NEIGH_2D; i++) { tmp = l_els[neigh].neigh[i]; if(tmp > -1 && (tmp == el || tmp == l_els[el].parent)) return i; } ERROR_EXIT("Problems while looking for opp_vertex!\n"); } return -1; } /****************************************************************************/ /* fill_connectivity_rec_2d(l_els, current_el, v_index, e_index): */ /* This routine is the workhorse for filling a LOGICAL_EL array. It sets */ /* vertex, edge, and neighbour indices on the children of "current_el". */ /* It is not a simple recursion, but is called for each refinement level. */ /* Only thus are we guaranteed to have correct neighbourhood information */ /* which is vital for setting edge and vertex indices correctly. A pointer */ /* to each index type is handed through all calls of this routine and */ /* advanced for each new entity counted. */ /****************************************************************************/ static void fill_connectivity_rec_2d(LOGICAL_EL_2D *l_els, int current_el, int *v_index, int *e_index, int current_level, int desired_level) { FUNCNAME("fill_connectivity_rec_2d"); int i_child, child_ind[2], opp_v[N_NEIGH_2D] = {-1,-1,-1}, neigh; int i, neigh_child[2], new_vertex; if(l_els[current_el].child[0] > -1) { for(i_child = 0; i_child < 2; i_child++) child_ind[i_child] = l_els[current_el].child[i_child]; if(current_level == desired_level - 1) { /* Fill opposite vertex information. */ for(i = 0; i < N_NEIGH_2D; i++) opp_v[i] = get_opp_v_2d(l_els, current_el, l_els[current_el].neigh[i]); /* Fill edge information. Two edges are handed down from parents. */ l_els[child_ind[0]].edge[2] = l_els[current_el].edge[1]; l_els[child_ind[1]].edge[2] = l_els[current_el].edge[0]; /* One edge is allocated where the two children of "current_el" meet. */ l_els[child_ind[0]].edge[1] = l_els[child_ind[1]].edge[0] = *e_index; *e_index += 1; if(l_els[child_ind[0]].edge[0] < 0) { l_els[child_ind[0]].edge[0] = *e_index; l_els[child_ind[1]].edge[1] = *e_index + 1; *e_index += 2; } /* Fill vertex information. All "current_el" vertices are passed to */ /* children. */ l_els[child_ind[0]].vertex[0] = l_els[current_el].vertex[2]; l_els[child_ind[1]].vertex[1] = l_els[current_el].vertex[2]; l_els[child_ind[0]].vertex[1] = l_els[current_el].vertex[0]; l_els[child_ind[1]].vertex[0] = l_els[current_el].vertex[1]; /* One new vertex is shared by the two children and possibly by */ /* neighbouring children. The new vertex is passed to neighbours. */ new_vertex = false; if(l_els[child_ind[0]].vertex[2] < 0) { l_els[child_ind[0]].vertex[2] = l_els[child_ind[1]].vertex[2] = *v_index; new_vertex = true; *v_index += 1; } /* Set neighbourhood information among children of "current_el". */ l_els[child_ind[0]].neigh[1] = child_ind[1]; l_els[child_ind[1]].neigh[0] = child_ind[0]; /* Now spread neighbourhood info, edges, and vertices to the direct */ /* neighbours. We might have to traverse down on neighbour elements. */ for(i = 0; i < N_NEIGH_2D; i++) { neigh = l_els[current_el].neigh[i]; if(neigh > -1 && l_els[neigh].child[0] > -1) { neigh_child[0] = l_els[neigh].child[0]; neigh_child[1] = l_els[neigh].child[1]; if(i < 2) { /* These are faces which do not contain the refinement edge. */ if(opp_v[i] < 2) { l_els[child_ind[1-i]].neigh[2] = neigh_child[1-opp_v[i]]; l_els[neigh_child[1-opp_v[i]]].neigh[2] = child_ind[1-i]; l_els[neigh_child[1-opp_v[i]]].edge[2] = l_els[child_ind[1-i]].edge[2]; } else l_els[child_ind[1-i]].neigh[2] = neigh; } else { if(opp_v[2] != 2) { /* Go down along the neighbour's children. */ DEBUG_TEST_EXIT(l_els[neigh_child[1-opp_v[2]]].child[0] > -1, "Why did we not find a child here?\n"); neigh = neigh_child[1-opp_v[2]]; neigh_child[0] = l_els[neigh].child[0]; neigh_child[1] = l_els[neigh].child[1]; opp_v[2] = 2; } l_els[child_ind[0]].neigh[0] = l_els[neigh].child[1]; l_els[child_ind[1]].neigh[1] = l_els[neigh].child[0]; l_els[neigh_child[0]].neigh[0] = child_ind[1]; l_els[neigh_child[1]].neigh[1] = child_ind[0]; l_els[neigh_child[0]].edge[0] = l_els[child_ind[1]].edge[1]; l_els[neigh_child[1]].edge[1] = l_els[child_ind[0]].edge[0]; if(new_vertex) { l_els[neigh_child[0]].vertex[2] = l_els[neigh_child[1]].vertex[2] = *v_index - 1; } } } } } /* Now recurse to the two children. */ if(current_level < desired_level) { fill_connectivity_rec_2d(l_els, child_ind[0], v_index, e_index, current_level + 1, desired_level); fill_connectivity_rec_2d(l_els, child_ind[1], v_index, e_index, current_level + 1, desired_level); } } return; } /****************************************************************************/ /* fill_logical_els_2d(mesh, n_elements, n_vertices, n_edges): */ /* Return a filled array of LOGICAL_EL_2D elements corresponding to the */ /* current state of the mesh refinement tree. */ /****************************************************************************/ static LOGICAL_EL_2D *fill_logical_els_2d(MESH *mesh, int *n_elements, int *n_vertices, int *n_edges) { FUNCNAME("fill_logical_els_2d"); REAL_D *coords = ((MESH_MEM_INFO *)mesh->mem_info)->coords; int i, j, n_els = mesh->n_hier_elements, neigh, opp_v; LOGICAL_EL_2D *l_els = nil; int index, v_index = 0, e_index = 0, max_level = 0; MACRO_EL *mel; l_els = MEM_ALLOC(n_els, LOGICAL_EL_2D); /* First pass: Initialize everything, set some information on macro */ /* elements: Neighbour indices and vertices. Make use of the fact that */ /* macro coordinates are stored in a simple linear array to get vertices! */ for(i = 0; i < n_els; i++) { l_els[i].parent = -1; l_els[i].child[0] = -1; l_els[i].child[1] = -1; if(i < mesh->n_macro_el) { mel = mesh->macro_els + i; for(j = 0; j < N_NEIGH_2D; j++) if(mel->neigh[j]) l_els[i].neigh[j] = mel->neigh[j]->index; else l_els[i].neigh[j] = -1; for(j = 0; j < N_VERTICES_2D; j++) l_els[i].vertex[j] = (REAL_D *)(mel->coord[j]) - coords; l_els[i].el = mel->el; } else { for(j = 0; j < N_NEIGH_2D; j++) l_els[i].neigh[j] = -1; for(j = 0; j < N_VERTICES_2D; j++) l_els[i].vertex[j] = -1; } for(j = 0; j < N_EDGES_2D; j++) l_els[i].edge[j] = -1; } /* Second pass: Now that we know vertices and neighbours on the macro */ /* triangulation we set edges. */ for(i = 0; i < mesh->n_macro_el; i++) for(j = 0; j < N_EDGES_2D; j++) if(l_els[i].edge[j] < 0) { l_els[i].edge[j] = e_index; neigh = l_els[i].neigh[j]; if(neigh > -1) { opp_v = (int)mesh->macro_els[i].opp_vertex[j]; l_els[neigh].edge[opp_v] = e_index; } e_index++; } index = mesh->n_macro_el; v_index = ((MESH_MEM_INFO *)mesh->mem_info)->count; /* Now we fill basic information about all mesh elements. */ for(i = 0; i < mesh->n_macro_el; i++) fill_logical_el_rec_2d(l_els, mesh->macro_els[i].el, i, &index, 0, &max_level); /* Connectivity and vertex/edge indices are built in layers for each level*/ /* in the refinement tree. The reason is the interdepence between */ /* neighbour information and vertex/edge information. */ for(i = 1; i <= max_level; i++) for(j = 0; j < mesh->n_macro_el; j++) fill_connectivity_rec_2d(l_els, j, &v_index, &e_index, 0, i); #if ALBERTA_DEBUG == 1 /* Do a quick and cheap check. For more checks please call check_mesh(). */ for(i = 0; i < index; i++) { for(j = 0; j < N_VERTICES_2D; j++) DEBUG_TEST_EXIT(l_els[i].vertex[j] > -1, "Error while checking element %d, vertex %d==-1!\n", i, j); for(j = 0; j < N_EDGES_2D; j++) DEBUG_TEST_EXIT(l_els[i].edge[j] > -1, "Error while checking element %d, edge %d==-1!\n", i, j); } #endif *n_elements = index; *n_vertices = v_index; *n_edges = e_index; return l_els; } /****************************************************************************/ /* adjust_dofs_and_dof_ptrs_2d(mesh, new_admin, old_n_node_el, */ /* old_n_dof, old_node): */ /* 1) If el->dof pointers have changed, adjust these. Keep old information! */ /* 2) Determine what types of new DOF pointers must be allocated. */ /* 3) Build an index based mesh representation using fill_logical_els() */ /* 4) Change all DOFs on the leaf level. (non-coarse DOFs!) */ /* 5) Change all coarse DOFs on non-leaf elements. */ /****************************************************************************/ static void adjust_dofs_and_dof_ptrs_2d(MESH *mesh, DOF_ADMIN *new_admin, int old_n_node_el, int *old_n_dof, int *old_node) { FUNCNAME("adjust_dofs_and_dof_ptrs_2d"); DOF **old_dof_ptr; int i, n, n_elements = 0, n_hier_elements; int n_vertices, n_edges = 0, n_hier_edges; int node, change_dofs[N_NODE_TYPES] = {0}; EL *el; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info = nil; LOGICAL_EL_2D *l_els = nil; DOF **new_vertex_dofs = nil, **new_edge_dofs = nil; /* Adjust the length of el->dof pointer fields. Allocate new ones if */ /* necessary and transfer old information. */ if(mesh->n_node_el > old_n_node_el) { el_info = traverse_first(stack, mesh, -1, CALL_EVERY_EL_PREORDER); while(el_info) { el = el_info->el; old_dof_ptr = el->dof; el->dof = get_dof_ptrs(mesh); if(old_n_dof[VERTEX]) for(i = 0; i < N_VERTICES_2D; i++) el->dof[mesh->node[VERTEX] + i] = old_dof_ptr[old_node[VERTEX] + i]; if(old_n_dof[EDGE]) for(i = 0; i < N_EDGES_2D; i++) el->dof[mesh->node[EDGE] + i] = old_dof_ptr[old_node[EDGE] + i]; if(old_n_dof[CENTER]) el->dof[mesh->node[CENTER]] = old_dof_ptr[old_node[CENTER]]; el_info = traverse_next(stack, el_info); } } /* Determine which DOF types have changed on the mesh with the new admin. */ if(mesh->n_dof[VERTEX] > old_n_dof[VERTEX]) change_dofs[VERTEX] = 1; if(mesh->n_dof[EDGE] > old_n_dof[EDGE]) change_dofs[EDGE] = 1; if(mesh->n_dof[CENTER] > old_n_dof[CENTER]) change_dofs[CENTER] = 1; /* Build an array containing an index based mesh representation. */ l_els = fill_logical_els_2d(mesh, &n_hier_elements, &n_vertices, &n_hier_edges); /* Allocate an array containing new DOF pointers. We make use of the */ /* index based mesh representation to ensure the correct setting. */ if(change_dofs[VERTEX]) new_vertex_dofs = MEM_CALLOC(n_vertices, DOF *); if(change_dofs[EDGE]) new_edge_dofs = MEM_CALLOC(n_hier_edges, DOF *); /* First pass: Change all DOFs on the leaf level. EDGE DOFs on some */ /* parents of the leaf elements will still be in use and must thus be */ /* marked correctly in this pass! */ for(n = 0; n < n_hier_elements; n++) { el = l_els[n].el; if(!el->child[0]) { n_elements++; if(change_dofs[VERTEX]) { node = mesh->node[VERTEX]; for(i = 0; i < N_VERTICES_2D; i++) { if(!new_vertex_dofs[l_els[n].vertex[i]]) new_vertex_dofs[l_els[n].vertex[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], VERTEX, false); el->dof[node + i] = new_vertex_dofs[l_els[n].vertex[i]]; } } if(change_dofs[CENTER]) { node = mesh->node[CENTER]; el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, false); } if(change_dofs[EDGE]) { node = mesh->node[EDGE]; for(i = 0; i < N_EDGES_2D; i++) { if(!new_edge_dofs[l_els[n].edge[i]]) { new_edge_dofs[l_els[n].edge[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], EDGE, false); n_edges++; } el->dof[node + i] = new_edge_dofs[l_els[n].edge[i]]; } } } } /* Second pass: Change all DOFs which were not yet set. These will be */ /* coarse DOFs in the case of EDGE/CENTER DOFs, therefore call */ /* transfer_dofs() with "is_coarse_dof=true"! */ for(n = 0; n < n_hier_elements; n++) { el = l_els[n].el; if(el->child[0]) { if(change_dofs[VERTEX]) { node = mesh->node[VERTEX]; for(i = 0; i < N_VERTICES_2D; i++) el->dof[node + i] = new_vertex_dofs[l_els[n].vertex[i]]; } if(change_dofs[CENTER]) { node = mesh->node[CENTER]; el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, true); } if(change_dofs[EDGE]) { node = mesh->node[EDGE]; for(i = 0; i < N_EDGES_2D; i++) { if(!new_edge_dofs[l_els[n].edge[i]]) new_edge_dofs[l_els[n].edge[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], EDGE, true); el->dof[node + i] = new_edge_dofs[l_els[n].edge[i]]; } } } } /* A few checks and settings. */ TEST_EXIT(n_elements == mesh->n_elements, "Did not count correct number of leaf elements in mesh!\n"); if(mesh->n_vertices > -1) { TEST_EXIT(n_vertices == mesh->n_vertices, "Did not count correct number of vertices in mesh!\n"); } else mesh->n_vertices = n_vertices; if(change_dofs[EDGE]) { if(mesh->n_edges > -1) { TEST_EXIT(n_edges == mesh->n_edges, "Did not count correct number of leaf edges in mesh!\n"); } else mesh->n_edges = n_edges; } /* Clean up operations. */ if(new_vertex_dofs) MEM_FREE(new_vertex_dofs, n_vertices, DOF *); if(new_edge_dofs) MEM_FREE(new_edge_dofs, n_hier_edges, DOF *); if(l_els) MEM_FREE(l_els, n_hier_elements, LOGICAL_EL_2D); free_traverse_stack(stack); return; } /****************************************************************************/ /* fill_missing_dofs_2d(mesh): See master routine in memory.c. */ /****************************************************************************/ static void fill_missing_dofs_2d(MESH *mesh) { FUNCNAME("fill_missing_dofs_2d"); int i, n, n_hier_elements, n_vertices, n_edges, node; EL *el; LOGICAL_EL_2D *l_els = nil; DOF **new_edge_dofs = nil; if(!mesh->n_dof[CENTER] && !mesh->n_dof[EDGE]) return; l_els = fill_logical_els_2d(mesh, &n_hier_elements, &n_vertices, &n_edges); if(mesh->n_dof[EDGE]) new_edge_dofs = MEM_CALLOC(n_edges, DOF *); /* All new DOFs are set to -1 (unused) by transfer_dofs(). */ for(n = 0; n < n_hier_elements; n++) { el = l_els[n].el; if(mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; if(!el->dof[node]) el->dof[node] = transfer_dofs(mesh, nil, el->dof[node], CENTER, false); } if(mesh->n_dof[EDGE]) { node = mesh->node[EDGE]; for(i = 0; i < N_EDGES_2D; i++) if(!el->dof[node + i]) { if(!new_edge_dofs[l_els[n].edge[i]]) new_edge_dofs[l_els[n].edge[i]] = transfer_dofs(mesh, nil, el->dof[node + i], EDGE, false); el->dof[node + i] = new_edge_dofs[l_els[n].edge[i]]; } } } /* Clean up operations. */ if(new_edge_dofs) MEM_FREE(new_edge_dofs, n_edges, DOF *); MEM_FREE(l_els, n_hier_elements, LOGICAL_EL_2D); return; } alberta-2.0.1/alberta/src/2d/parametric_2d.c0000644000042300001440000007171710676724251015452 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: parametric_2d.c */ /* */ /* */ /* description: Support for parametric elements in 2D */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ static const REAL_B mid_lambda_2d = { 0.5, 0.5, 0.0 }; static const REAL_B bary2_2d[6] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.5, 0.5, 0.0}, {0.5, 0.0, 0.5, 0.0}, {0.5, 0.5, 0.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* Functions for affine elements as parametric elements. (suffix 1_2d) */ /*--------------------------------------------------------------------------*/ static void det1_2d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL dets[]) { REAL_D *local_coords = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data)->local_coords; REAL e1[DIM_OF_WORLD], e2[DIM_OF_WORLD], det; int i, n; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = local_coords[1][i] - local_coords[0][i]; e2[i] = local_coords[2][i] - local_coords[0][i]; } #if DIM_OF_WORLD==2 det = WEDGE_DOW(e1, e2); det = ABS(det); #else { REAL_D normal; WEDGE_DOW(e1, e2, normal); det = NORM_DOW(normal); } #endif if (quad) N = quad->n_points; for (n = 0; n < N; n++) dets[n] = det; return; } static void grd_lambda1_2d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D grd_lam[][N_LAMBDA], REAL dets[]) { FUNCNAME("grd_lambda1_2d"); REAL_D *local_coords = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data)->local_coords; int i, j, n; REAL e1[DIM_OF_WORLD], e2[DIM_OF_WORLD], adet; #if DIM_OF_WORLD == 2 REAL det; REAL a11, a12, a21, a22; #endif REAL_D grd_lambda[N_LAMBDA]; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = local_coords[1][i] - local_coords[0][i]; e2[i] = local_coords[2][i] - local_coords[0][i]; } #if DIM_OF_WORLD == 2 det = WEDGE_DOW(e1, e2); adet = ABS(det); if (adet < 1.0E-15) { MSG("abs(det) = %lf\n", adet); for (i = 0; i <= 2; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lambda[i][j] = 0.0; } else { det = 1.0 / det; a11 = e2[1] * det; /* (a_ij) = A^{-T} */ a21 = -e2[0] * det; a12 = -e1[1] * det; a22 = e1[0] * det; grd_lambda[1][0] = a11; grd_lambda[1][1] = a21; grd_lambda[2][0] = a12; grd_lambda[2][1] = a22; grd_lambda[0][0] = - grd_lambda[1][0] - grd_lambda[2][0]; grd_lambda[0][1] = - grd_lambda[1][1] - grd_lambda[2][1]; } #endif #if DIM_OF_WORLD == 3 { REAL_D normal; WEDGE_DOW(e1, e2, normal); adet = SCP_DOW(normal,normal); if (adet < 1.0E-15) { MSG("abs(det) = %lf\n", adet); for (i = 0; i <= 2; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lambda[i][j] = 0.0; } else { WEDGE_DOW(e2, normal, grd_lambda[1]); WEDGE_DOW(normal, e1, grd_lambda[2]); for (i = 0; i < DIM_OF_WORLD; i++) { grd_lambda[1][i] /= adet; grd_lambda[2][i] /= adet; } grd_lambda[0][0] = - grd_lambda[1][0] - grd_lambda[2][0]; grd_lambda[0][1] = - grd_lambda[1][1] - grd_lambda[2][1]; grd_lambda[0][2] = - grd_lambda[1][2] - grd_lambda[2][2]; adet = sqrt(adet); } } #endif #if 0 MSG("el %p : det = %8.6lf ----------------\n", el_info->el, adet); for (i = 0; i < N_VERTICES_2D; i++) MSG("vertex %1d = (%8.4lf, %8.4lf)\n",i, local_coords[i][0], local_coords[i][1]); #if DIM_OF_WORLD == 2 for (i = 0; i < N_VERTICES_2D; i++) MSG("grd_lam %1d = (%8.4lf, %8.4lf)\n",i, grd_lambda[i][0], grd_lambda[i][1]); #else for (i = 0; i < N_VERTICES_2D; i++) MSG("grd_lam %1d = (%8.4lf, %8.4lf, %8.4lf)\n",i, grd_lambda[i][0], grd_lambda[i][1], grd_lambda[i][2]); #endif #endif if (quad) N = quad->n_points; for (n = 0; n < N; n++) { for (i = 0; i <= 2; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lam[n][i][j] = grd_lambda[i][j]; dets[n] = adet; } return; } /****************************************************************************/ /* fill_coords1_2d(data): initialize the DOF_REAL_D_VEC coords containing */ /* the position data of the parametric elements (coordinates of vertices in */ /* this case). */ /****************************************************************************/ static void fill_coords1_2d(LAGRANGE_PARAM_DATA *data) { DOF_REAL_D_VEC *coords = data->coords; DOF_UCHAR_VEC *touched_coords = data->touched_coords; NODE_PROJECTION *n_proj = data->n_proj, *active_proj; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; int i, n; get_dof = coords->fe_space->bas_fcts->get_dof_indices; admin = coords->fe_space->admin; el_info = traverse_first(stack, coords->fe_space->mesh, -1, fill_flag); while (el_info) { const DOF *dof = (*get_dof)(el_info->el, admin, nil); REAL *vec; for (i = 0; i < N_VERTICES_2D; i++) { vec = coords->vec[dof[i]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = el_info->coord[i][n]; /* Look for a projection function that applies to vertex[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[i]] = 0; if(n_proj && (n_proj->func)) { active_proj = el_info->projections[1 + (i+1)%3]; if(!active_proj) active_proj = el_info->projections[1 + (i+2)%3]; if(!active_proj) active_proj = el_info->projections[0]; if(active_proj == n_proj) { n_proj->func(vec, el_info, bary2_2d[i]); if(touched_coords) touched_coords->vec[dof[i]] = 1; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } /****************************************************************************/ /* refine_interpol1_2d(drdv,list,n): update coords vector during refinement.*/ /****************************************************************************/ static void refine_interpol1_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("refine_interpol1_2d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)drdv->fe_space->mesh->parametric->data; NODE_PROJECTION *n_proj = data->n_proj; DOF_UCHAR_VEC *touched_coords = data->touched_coords; int n0, j; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[2][n0]; /* vertex[2] is newest vertex */ for (j = 0; j < DIM_OF_WORLD; j++) vec[dof_new][j] = 0.5*(vec[dof0][j] + vec[dof1][j]); if(touched_coords) touched_coords->vec[dof_new] = 0; if(n_proj && n_proj->func) { if(list->el_info.active_projection == n_proj) { n_proj->func(vec[dof_new], &list->el_info, mid_lambda_2d); if(touched_coords) touched_coords->vec[dof_new] = 1; } } return; } /*--------------------------------------------------------------------------*/ /* Common functions for higher order elements. (suffix y_2d) */ /*--------------------------------------------------------------------------*/ #define N_BAS2_2D 6 typedef struct DD_data_2d DD_DATA_2D; struct DD_data_2d { const QUAD *quad; int n_bas_fcts; REAL (*DD)[N_BAS2_2D][2]; DD_DATA_2D *next; }; static DD_DATA_2D *init_dd_data_2d(const QUAD *quad, const BAS_FCTS *bas_fcts) { FUNCNAME("init_dd_data_2d"); static DD_DATA_2D *first_dd_data = nil; DD_DATA_2D *data; int iq, i; const REAL *grd; DEBUG_TEST_EXIT(bas_fcts->n_bas_fcts <= N_BAS2_2D, "Sorry, only up to 6 local DOFs at the moment.\n"); for (data = first_dd_data; data; data = data->next) if (data->quad == quad) break; if (data) return(data); data = MEM_ALLOC(1, DD_DATA_2D); data->quad = quad; data->n_bas_fcts = bas_fcts->n_bas_fcts; data->next = first_dd_data; first_dd_data = data; data->DD = (REAL (*)[N_BAS2_2D][2]) alberta_alloc(quad->n_points*sizeof(REAL [N_BAS2_2D][2]), funcName, __FILE__, __LINE__); for (iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < bas_fcts->n_bas_fcts; i++) { grd = (*bas_fcts->grd_phi[i])(quad->lambda[iq]); data->DD[iq][i][0] = -grd[0] + grd[1]; data->DD[iq][i][1] = -grd[0] + grd[2]; } } return(data); } /*--------------------------------------------------------------------------*/ /*--- compute D^t and D^t D, return det(D^t D) ---*/ /*--------------------------------------------------------------------------*/ static REAL Dt_and_DtD_2d(REAL_D *F, REAL DD[][2], int n_bas, REAL Dt[2][DIM_OF_WORLD], REAL DtD[2][2]) { FUNCNAME("Dt_and_DtD_2d"); int i, j, n, m; REAL val; for (m = 0; m < 2; m++) { for (n = 0; n < DIM_OF_WORLD; n++) { for (Dt[m][n] = i = 0; i < n_bas; i++) Dt[m][n] += F[i][n]*DD[i][m]; } } for (i = 0; i < 2; i++) { for (j = i; j < 2; j++) { for (val = n = 0; n < DIM_OF_WORLD; n++) val += Dt[i][n]*Dt[j][n]; DtD[i][j] = DtD[j][i] = val; } } val = DtD[0][0]*DtD[1][1] - DtD[0][1]*DtD[1][0]; if (val < 0.0) { WARNING("val = %e\n", val); for (i = 0; i < n_bas; i++) PRINT_REAL_VEC("F", F[i], DIM_OF_WORLD); WAIT_REALLY; } return(val); } static void dety_2d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL dets[]) { /*FUNCNAME("dety_2d");*/ REAL Dt[2][DIM_OF_WORLD], DtD[2][2]; int iq; const BAS_FCTS *bas_fcts; LAGRANGE_PARAM_DATA *data = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data); REAL_D *local_coords = data->local_coords; /* First of all, check if we are on a parametric simplex. */ /* If not, treat this simplex as an affine simplex, even though some */ /* higher order vertices might be shifted. */ if(data->i_am_affine) { det1_2d(el_info, quad, N, lambda, dets); return; } if (quad) { static DD_DATA_2D *dd_data = nil; if (!dd_data || dd_data->quad != quad) { bas_fcts = data->coords->fe_space->bas_fcts; dd_data = init_dd_data_2d(quad, bas_fcts); } for (iq = 0; iq < quad->n_points; iq++) dets[iq] = sqrt(Dt_and_DtD_2d(local_coords, dd_data->DD[iq], dd_data->n_bas_fcts, Dt, DtD)); } else { REAL DD[N_BAS2_2D][2]; const REAL *grd; int i, n_bas; bas_fcts = data->coords->fe_space->bas_fcts; n_bas = bas_fcts->n_bas_fcts; for (iq = 0; iq < N; iq++) { for (i = 0; i < n_bas; i++) { grd = (*bas_fcts->grd_phi[i])(lambda[iq]); DD[i][0] = -grd[0] + grd[1]; DD[i][1] = -grd[0] + grd[2]; } dets[iq] = sqrt(Dt_and_DtD_2d(local_coords, DD, n_bas, Dt, DtD)); } } return; } static REAL Lambda_iq_2d(REAL_D *const F, REAL DD[][2], int n_bas, REAL_D Lambda[N_LAMBDA]) { REAL Dt[2][DIM_OF_WORLD], DtD[2][2]; REAL DtD_1[2][2], DFS_1[2][DIM_OF_WORLD]; REAL det, det_1; int n; det = Dt_and_DtD_2d(F, DD, n_bas, Dt, DtD); det_1 = 1.0/det; /*--------------------------------------------------------------------------*/ /*--- now, invert DtD ---*/ /*--------------------------------------------------------------------------*/ DtD_1[0][0] = det_1*DtD[1][1]; DtD_1[1][1] = det_1*DtD[0][0]; DtD_1[0][1] = DtD_1[1][0] = -det_1*DtD[0][1]; /*--------------------------------------------------------------------------*/ /*--- compute DF_S^{-1} = D^t D^{-1} D^t ---*/ /*--------------------------------------------------------------------------*/ for (n = 0; n < DIM_OF_WORLD; n++) { DFS_1[0][n] = DtD_1[0][0]*Dt[0][n] + DtD_1[0][1]*Dt[1][n]; DFS_1[1][n] = DtD_1[1][0]*Dt[0][n] + DtD_1[1][1]*Dt[1][n]; } /*--------------------------------------------------------------------------*/ /*--- finally, \Lambda = \hat\Lambda DF_S^{-1} ---*/ /*--------------------------------------------------------------------------*/ for (n = 0; n < DIM_OF_WORLD; n++) { Lambda[0][n] = -DFS_1[0][n] - DFS_1[1][n]; Lambda[1][n] = DFS_1[0][n]; Lambda[2][n] = DFS_1[1][n]; } return(sqrt(det)); } static void grd_lambday_2d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D Lambda[][N_LAMBDA], REAL dets[]) { #if 0 FUNCNAME("grd_lambday_2d"); #endif int iq; const BAS_FCTS *bas_fcts; LAGRANGE_PARAM_DATA *data = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data); REAL_D *local_coords = data->local_coords; /* First of all, check if we are on a parametric simplex. */ /* If not, treat this simplex as an affine simplex, even though some */ /* higher order vertices might be shifted. */ if(data->i_am_affine) { grd_lambda1_2d(el_info,quad, N, lambda, Lambda, dets); return; } if (quad) { static DD_DATA_2D *dd_data = nil; if (!dd_data || dd_data->quad != quad) { bas_fcts = data->coords->fe_space->bas_fcts; dd_data = init_dd_data_2d(quad, bas_fcts); } for (iq = 0; iq < quad->n_points; iq++) dets[iq] = Lambda_iq_2d(local_coords, dd_data->DD[iq], dd_data->n_bas_fcts, Lambda[iq]); } else { REAL DD[N_BAS2_2D][2]; const REAL *grd; int i, n_bas; bas_fcts = data->coords->fe_space->bas_fcts; n_bas = bas_fcts->n_bas_fcts; for (iq = 0; iq < N; iq++) { for (i = 0; i < n_bas; i++) { grd = (*bas_fcts->grd_phi[i])(lambda[iq]); DD[i][0] = -grd[0] + grd[1]; DD[i][1] = -grd[0] + grd[2]; } dets[iq] = Lambda_iq_2d(local_coords, DD, n_bas, Lambda[iq]); } } #if 0 int n; MSG("el %p : ----------------\n", el_info->el); for (n = 0; n < N_VERTICES_2D+N_EDGES_2D; n++) MSG("vertex %1d = (%8.4lf, %8.4lf)\n",n, local_coords[n][0], local_coords[n][1]); #if DIM_OF_WORLD == 2 for (n = 0; n < N_VERTICES_2D+N_EDGES_2D; n++) MSG("grd_lam %1d = (%8.4lf, %8.4lf)\n",n, Lambda[n][0], Lambda[n][1]); #else for (n = 0; n < N_VERTICES_2D+N_EDGES_2D; n++) MSG("grd_lam %1d = (%8.4lf, %8.4lf, %8.4lf)\n",n, Lambda[n][0], Lambda[n][1], Lambda[n][2]); #endif #endif return; } /*--------------------------------------------------------------------------*/ /* Functions for quadratic elements. (suffix 2_2d) */ /*--------------------------------------------------------------------------*/ static void refine_interpol2_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("refine_interpol2_2d"); EL *el; REAL_D *vec = nil; int node_v, node_e, n0_v, n0_e, i, j, result; DOF cdof[3], cdof_e[N_EDGES_2D], cdof_v[N_VERTICES_2D],pdof; REAL_D x[3]; NODE_PROJECTION *n_proj; const MESH *mesh = drdv->fe_space->mesh; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)mesh->parametric->data; DOF_UCHAR_VEC *touched_coords = data->touched_coords; static const REAL_B lambda[3] = { {0.25, 0.25, 0.5, 0.0}, {0.75, 0.25, 0.0, 0.0}, {0.25, 0.75, 0.0, 0.0} }; GET_DOF_VEC(vec, drdv); el = list->el_info.el; n_proj = data->n_proj; node_v = mesh->node[VERTEX]; node_e = mesh->node[EDGE]; n0_v = drdv->fe_space->admin->n0_dof[VERTEX]; n0_e = drdv->fe_space->admin->n0_dof[EDGE]; /****************************************************************************/ /* Step 1: Initialize the parametric element. */ /****************************************************************************/ param_init_element(&list->el_info, mesh->parametric); /****************************************************************************/ /* Step 2: Now we need to determine three points: The midpoint on the edge */ /* between the two children and the two midpoints of the children along the */ /* current refinement edge. These three points correspond to the three new */ /* DOFS that were created. */ /* If strategy is 0 or 1 we use the (nonlinear) barycentric coords. */ /* For strategy 2 we use geometric midpoints. */ /****************************************************************************/ if(mesh->parametric->not_all <= 1) param_coord_to_world(&list->el_info, nil, 3, lambda, x); else { cdof_e[2] = el->dof[node_e+2][n0_e]; for(i = 0; i < N_EDGES_2D; i++) cdof_v[i] = el->dof[node_v+i][n0_v]; for(i = 0; i < DIM_OF_WORLD; i++) { x[0][i] = 0.5 * (vec[cdof_v[2]][i] + vec[cdof_e[2]][i]); x[1][i] = 0.5 * (vec[cdof_v[0]][i] + vec[cdof_e[2]][i]); x[2][i] = 0.5 * (vec[cdof_v[1]][i] + vec[cdof_e[2]][i]); } } /****************************************************************************/ /* Step 3: We check if any projections need to be done on these three */ /* points. While doing this, we keep track of touched coordinates. */ /****************************************************************************/ cdof[0] = el->child[0]->dof[node_e+1][n0_e]; cdof[1] = el->child[0]->dof[node_e+0][n0_e]; cdof[2] = el->child[1]->dof[node_e+1][n0_e]; if(touched_coords) { touched_coords->vec[cdof[0]] = 0; touched_coords->vec[cdof[1]] = 0; touched_coords->vec[cdof[2]] = 0; } if(n_proj && n_proj->func) { if(list->el_info.projections[0] == n_proj) { (n_proj->func)(x[0], &list->el_info, lambda[0]); if(touched_coords) touched_coords->vec[cdof[0]] = 1; } if(list->el_info.active_projection == n_proj) { (n_proj->func)(x[1], &list->el_info, lambda[1]); (n_proj->func)(x[2], &list->el_info, lambda[2]); if(touched_coords) { touched_coords->vec[cdof[1]] = 1; touched_coords->vec[cdof[2]] = 1; } } } /****************************************************************************/ /* Step 4: Now that any projection has taken place, copy the values stored */ /* in x[i] to the DOF_REAL_D_VEC. */ /****************************************************************************/ for(i = 0; i < 3; i++) for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof[i]][j] = x[i][j]; /****************************************************************************/ /* Step 5: We hand down the data corresponding to the parent edge vertex */ /* in the refinement edge (its DOF could be deleted!). This concerns coords */ /* and touched coords. */ /****************************************************************************/ pdof = el->dof[node_e+2][n0_e]; cdof[0] = el->child[0]->dof[node_v+2][n0_v]; for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof[0]][j] = vec[pdof][j]; if(touched_coords) touched_coords->vec[cdof[0]] = touched_coords->vec[pdof]; /****************************************************************************/ /* Step 6: Correct the children, if not all elements are to be parametric. */ /* If the parent element was already affine, then the children will already */ /* have the correct coordinates. */ /****************************************************************************/ if(touched_coords && !data->i_am_affine) { for(i = 0; i < 2; i++) { result = 0; for(j = 0; j < N_EDGES_2D; j++) { cdof[0] = el->child[i]->dof[node_e+j][n0_e]; if(touched_coords->vec[cdof[0]]) { result = 1; break; } } if(result == 0) { for(j = 0; j < N_EDGES_2D; j++) { cdof_e[j] = el->child[i]->dof[node_e+j][n0_e]; cdof_v[j] = el->child[i]->dof[node_v+j][n0_v]; } for (j = 0; j < DIM_OF_WORLD; j++) { vec[cdof_e[0]][j] = 0.5*(vec[cdof_v[1]][j] + vec[cdof_v[2]][j]); vec[cdof_e[1]][j] = 0.5*(vec[cdof_v[0]][j] + vec[cdof_v[2]][j]); vec[cdof_e[2]][j] = 0.5*(vec[cdof_v[0]][j] + vec[cdof_v[1]][j]); } } } } /*--------------------------------------------------------------------------*/ /*--- Take care of the neighbour element. ---*/ /*--------------------------------------------------------------------------*/ if (n > 1) { el = list[1].el_info.el; /****************************************************************************/ /* Step 1: Initialize the neighbour element. */ /****************************************************************************/ param_init_element(&list[1].el_info, mesh->parametric); /****************************************************************************/ /* Step 2: Determine the location of the midpoint on the edge between the */ /* two children. */ /****************************************************************************/ if(mesh->parametric->not_all <= 1) param_coord_to_world(&list[1].el_info, nil, 1, lambda, x); else { cdof_e[2] = el->dof[node_e+2][n0_e]; cdof_v[2] = el->dof[node_v+2][n0_v]; for(i = 0; i < DIM_OF_WORLD; i++) x[0][i] = 0.5 * (vec[cdof_v[2]][i] + vec[cdof_e[2]][i]); } /****************************************************************************/ /* Step 3: We check if any projections need to be done on this point. */ /* While doing this, we keep track of touched coordinates. */ /****************************************************************************/ cdof[0] = el->child[0]->dof[node_e+1][n0_e]; if(touched_coords) touched_coords->vec[cdof[0]] = 0; if(n_proj && n_proj->func) { if(list[1].el_info.projections[0] == n_proj) { (n_proj->func)(x[0], &list[1].el_info, lambda[0]); if(touched_coords) touched_coords->vec[cdof[0]] = 1; } } /****************************************************************************/ /* Step 4: Now that any projection has taken place, copy the values stored */ /* in x[0] to the DOF_REAL_D_VEC. */ /****************************************************************************/ for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof[0]][j] = x[0][j]; /****************************************************************************/ /* Step 5: Correct the children. */ /****************************************************************************/ if(touched_coords && !data->i_am_affine) { for(i = 0; i < 2; i++) { result = 0; for(j = 0; j < N_EDGES_2D; j++) { cdof[0] = el->child[i]->dof[node_e+j][n0_e]; if(touched_coords->vec[cdof[0]]) { result = 1; break; } } if(result == 0) { for(j = 0; j < N_EDGES_2D; j++) { cdof_e[j] = el->child[i]->dof[node_e+j][n0_e]; cdof_v[j] = el->child[i]->dof[node_v+j][n0_v]; } for (j = 0; j < DIM_OF_WORLD; j++) { vec[cdof_e[0]][j] = 0.5*(vec[cdof_v[1]][j] + vec[cdof_v[2]][j]); vec[cdof_e[1]][j] = 0.5*(vec[cdof_v[0]][j] + vec[cdof_v[2]][j]); vec[cdof_e[2]][j] = 0.5*(vec[cdof_v[0]][j] + vec[cdof_v[1]][j]); } } } } } return; } static void coarse_interpol2_2d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("coarse_interpol2_2d"); EL *el; REAL_D *vec = nil; int node_v, node_e, n0_v, n0_e, j; DOF cdof, pdof; const MESH *mesh = drdv->fe_space->mesh; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)mesh->parametric->data; DOF_UCHAR_VEC *touched_coords = data->touched_coords; if (n < 1) return; GET_DOF_VEC(vec, drdv); el = list->el_info.el; node_v = mesh->node[VERTEX]; node_e = mesh->node[EDGE]; n0_v = drdv->fe_space->admin->n0_dof[VERTEX]; n0_e = drdv->fe_space->admin->n0_dof[EDGE]; /****************************************************************************/ /* copy values at refinement vertex to the parent refinement edge. */ /****************************************************************************/ cdof = el->child[0]->dof[node_v+2][n0_v]; /* newest vertex is dim */ pdof = el->dof[node_e+2][n0_e]; for (j = 0; j < DIM_OF_WORLD; j++) vec[pdof][j] = vec[cdof][j]; if(touched_coords) touched_coords->vec[pdof] = touched_coords->vec[cdof]; return; } static void fill_coords2_2d(LAGRANGE_PARAM_DATA *data) { DOF_REAL_D_VEC *coords = data->coords; DOF_UCHAR_VEC *touched_coords = data->touched_coords; NODE_PROJECTION *n_proj = data->n_proj, *active_proj; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; int i, n; get_dof = coords->fe_space->bas_fcts->get_dof_indices; admin = coords->fe_space->admin; el_info = traverse_first(stack, coords->fe_space->mesh, -1, fill_flag); while (el_info) { const DOF *dof = (*get_dof)(el_info->el, admin, nil); REAL *vec, *vec0, *vec1; for (i = 0; i < N_VERTICES_2D; i++) { vec = coords->vec[dof[i]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = el_info->coord[i][n]; /* Look for a projection function that applies to vertex[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[i]] = 0; if(n_proj && n_proj->func) { active_proj = el_info->projections[1 + (i+1)%3]; if(!active_proj) active_proj = el_info->projections[1 + (i+2)%3]; if(!active_proj) active_proj = el_info->projections[0]; if(active_proj == n_proj) { (n_proj->func)(vec, el_info, bary2_2d[i]); if(touched_coords) touched_coords->vec[dof[i]] = 1; } } } for (i = 0; i < N_EDGES_2D; i++) { int *voe = vertex_of_edge_2d[i]; vec = coords->vec[dof[N_VERTICES_2D+i]]; vec0 = coords->vec[dof[voe[0]]]; vec1 = coords->vec[dof[voe[1]]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = 0.5*(vec0[n] + vec1[n]); /* Look for a projection function that applies to edge[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[N_VERTICES_2D + i]] = 0; if(n_proj && n_proj->func) { active_proj = el_info->projections[1 + i]; if(!active_proj) active_proj = el_info->projections[0]; if(active_proj == n_proj) { (n_proj->func)(vec, el_info, bary2_2d[N_VERTICES_2D + i]); if(touched_coords) touched_coords->vec[dof[N_VERTICES_2D + i]] = 1; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } static PARAMETRIC lagrange_parametric1_2d = {"2D Lagrange parametric elements of degree 1", param_init_element, param_coord_to_world, nil, det1_2d, grd_lambda1_2d, false, false, nil}; static PARAMETRIC lagrange_parametric2_2d = {"2D Lagrange parametric elements of degree 2", param_init_element, param_coord_to_world, nil, dety_2d, grd_lambday_2d, false, false, nil}; alberta-2.0.1/alberta/src/2d/refine_2d.c0000644000042300001440000003460410676724251014565 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: refine_2d.c */ /* */ /* description: recursive refinement of 2 dim. hierarchical meshes; */ /* implementation of the newest vertex bisection */ /* file contains all routines depending on dim == 2; */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const EL_INFO *refine_function_2d(const EL_INFO *); static const EL_INFO *get_refine_patch_2d(const EL_INFO *el_info, RC_LIST_EL *ref_list, int *n_neighs) { FUNCNAME("get_refine_patch_2d"); #if ALBERTA_DEBUG EL *el = el_info->el; #endif const EL_INFO *neigh_info; int opp_vertex; if (el_info->neigh[2] && el_info->opp_vertex[2] != 2) { /*--------------------------------------------------------------------------*/ /* neighbour is not compatible devisible; refine neighbour first, store the*/ /* opp_vertex to traverse back to el */ /*--------------------------------------------------------------------------*/ opp_vertex = el_info->opp_vertex[2]; neigh_info = traverse_neighbour(stack_2d, el_info, 2); neigh_info->el->mark = MAX(neigh_info->el->mark, 1); neigh_info = refine_function_2d(neigh_info); /*--------------------------------------------------------------------------*/ /* now go back to the original element and refine the patch */ /*--------------------------------------------------------------------------*/ el_info = traverse_neighbour(stack_2d, neigh_info, opp_vertex); DEBUG_TEST_EXIT(el_info->el == el, "invalid traverse_neighbour1"); } if ((ref_list[1].el_info.el = el_info->neigh[2])) { DEBUG_TEST_EXIT(el_info->opp_vertex[2] == 2, "no compatible ref. edge after recursive refinement of neighbour"); /*--------------------------------------------------------------------------*/ /* NEW CODE: fill the neighbour el_info structure! DK */ /*--------------------------------------------------------------------------*/ neigh_info = traverse_neighbour(stack_2d, el_info, 2); ref_list[1].el_info = *neigh_info; traverse_neighbour(stack_2d, neigh_info, 2); *n_neighs = 2; } return(el_info); } /*--------------------------------------------------------------------------*/ /* AI_bisect_element_2d: bisects a single element into child[0] and child[1]*/ /*--------------------------------------------------------------------------*/ void AI_bisect_element_2d(MESH *mesh, EL *el, DOF *dof[3]) { EL *child[2]; int i_child, node; child[0] = get_element(mesh); child[1] = get_element(mesh); child[0]->mark = child[1]->mark = MAX(0, el->mark-1); el->mark = 0; /*--------------------------------------------------------------------------*/ /* transfer hidden data from parent to children */ /*--------------------------------------------------------------------------*/ if (el->child[1] && ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->refine_leaf_data) ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->refine_leaf_data(el, child); AI_free_leaf_data((void *) el->child[1], mesh); el->child[0] = child[0]; el->child[1] = child[1]; if (child[0]->mark > 0) do_more_refine_2d = true; if(mesh->n_dof[VERTEX]) { /*--------------------------------------------------------------------------*/ /* vertex 2 is the newest vertex */ /*--------------------------------------------------------------------------*/ child[0]->dof[2] = child[1]->dof[2] = dof[0]; /*--------------------------------------------------------------------------*/ /* the other vertices are handed on from the parent */ /*--------------------------------------------------------------------------*/ for (i_child = 0; i_child < 2; i_child++) { child[i_child]->dof[i_child] = el->dof[2]; child[i_child]->dof[1-i_child] = el->dof[i_child]; } } /*--------------------------------------------------------------------------*/ /* there is one more leaf element, two hierachical elements and one more */ /* edge */ /*--------------------------------------------------------------------------*/ if(mesh->n_edges > -1) mesh->n_edges++; mesh->n_elements++; mesh->n_hier_elements += 2; if (mesh->n_dof[EDGE]) { node = mesh->node[EDGE]; /*--------------------------------------------------------------------------*/ /* there are dof's in the midpoint of the edges */ /*--------------------------------------------------------------------------*/ child[0]->dof[node + 1] = child[1]->dof[node] = get_dof(mesh, EDGE); /*--------------------------------------------------------------------------*/ /* dofs handed on by the parent */ /*--------------------------------------------------------------------------*/ child[0]->dof[node + 2] = el->dof[node + 1]; child[1]->dof[node + 2] = el->dof[node]; /*--------------------------------------------------------------------------*/ /* dofs in the refinement edge */ /*--------------------------------------------------------------------------*/ child[0]->dof[node] = dof[1]; child[1]->dof[node + 1] = dof[2]; } if (mesh->n_dof[CENTER]) { int node = mesh->node[CENTER]; /*--------------------------------------------------------------------------*/ /* there are dofs at the barycenter of the triangles */ /*--------------------------------------------------------------------------*/ child[0]->dof[node] = get_dof(mesh, CENTER); child[1]->dof[node] = get_dof(mesh, CENTER); } return; } /*--------------------------------------------------------------------------*/ void AI_bisect_patch_2d(MESH *mesh, RC_LIST_EL ref_list[], int n_neighs) { DOF *dof[3] = {nil, nil, nil}; EL *el = ref_list[0].el_info.el, *neigh = ref_list[1].el_info.el; int node, i; /*--------------------------------------------------------------------------*/ /* there is one new vertex in the refinement edge */ /*--------------------------------------------------------------------------*/ if(mesh->n_dof[VERTEX]) dof[0] = get_dof(mesh, VERTEX); if(mesh->n_vertices > -1) mesh->n_vertices++; if(mesh->n_edges > -1) mesh->n_edges++; if (mesh->n_dof[EDGE]) { /*--------------------------------------------------------------------------*/ /* there are two additional dofs in the refinement edge */ /*--------------------------------------------------------------------------*/ dof[1] = get_dof(mesh, EDGE); dof[2] = get_dof(mesh, EDGE); } /*--------------------------------------------------------------------------*/ /* first refine the element */ /*--------------------------------------------------------------------------*/ AI_bisect_element_2d(mesh, el, dof); if (neigh) { DOF *tmp = dof[1]; /*--------------------------------------------------------------------------*/ /* there is a neighbour; refine it also, but first exchange dof[1] and */ /* dof[2]; thus, dof[1] is always added on child[0]! */ /*--------------------------------------------------------------------------*/ dof[1] = dof[2]; dof[2] = tmp; AI_bisect_element_2d(mesh, neigh, dof); } /*--------------------------------------------------------------------------*/ /* if there are functions to interpolate data to the finer grid, do so */ /*--------------------------------------------------------------------------*/ if (call_refine_interpol_2d) refine_interpol(mesh, ref_list, n_neighs); /*--------------------------------------------------------------------------*/ /* if there should be no dof information on interior leaf elements remove */ /* dofs from edges and the centers of parents */ /*--------------------------------------------------------------------------*/ if (mesh->n_dof[EDGE]) { /*--------------------------------------------------------------------------*/ /* the only DOF that can be freed is that in the refinement edge; all other*/ /* DOFs are handed on the children */ /*--------------------------------------------------------------------------*/ node = mesh->node[EDGE]; free_dof(el->dof[node+2], mesh, EDGE, true); } if (mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; for (i = 0; i < n_neighs; i++) free_dof(ref_list[i].el_info.el->dof[node], mesh, CENTER, true); } return; } /*--------------------------------------------------------------------------*/ /* refine_function_2d: gets the refinement patch via get_refine_patch_2d() */ /* and checks whether it compatibly divisible (same refinement edge) or */ /* not; in the first case the patch is refined by refine_patch_2d() in the */ /* second the incompatible neighbour(s) is (are) refined first via a */ /* recursive call of refine_function_2d() in get_refine_patch_2d(). */ /*--------------------------------------------------------------------------*/ static const EL_INFO *refine_function_2d(const EL_INFO *el_info) { int n_neighs; MESH *mesh = el_info->mesh; RC_LIST_EL ref_list[2]; if (el_info->el->mark <= 0) return(el_info); /* element may not be refined */ ref_list->el_info = *el_info; n_neighs = 1; /*--------------------------------------------------------------------------*/ /* get the refinement patch */ /*--------------------------------------------------------------------------*/ el_info = get_refine_patch_2d(el_info, ref_list, &n_neighs); /*--------------------------------------------------------------------------*/ /* and now refine the patch */ /*--------------------------------------------------------------------------*/ AI_bisect_patch_2d(mesh, ref_list, n_neighs); return(el_info); } /*--------------------------------------------------------------------------*/ /* AI_post_refine_2d(mesh): Projects all new vertices with user supplied */ /* projection routines. Also called from submesh_3d.c */ /*--------------------------------------------------------------------------*/ static void new_coords_fct_2d(const EL_INFO *el_info, void *data) { EL *el = el_info->el; int j; static const REAL_B mid_lambda = {0.5, 0.5, 0.0}; if (el->child[0] && el_info->active_projection && el_info->active_projection->func && (el->new_coord == nil)) { el->new_coord = get_real_d(el_info->mesh); for (j = 0; j < DIM_OF_WORLD; j++) el->new_coord[j] = (el_info->coord[0][j] + el_info->coord[1][j])*0.5; el_info->active_projection->func(el->new_coord, el_info, mid_lambda); /*--------------------------------------------------------------------------*/ /* new_coord entry must also be set on the neighbor along the refinement */ /* edge, if this neighbor exists. */ /*--------------------------------------------------------------------------*/ if(el_info->neigh[2] && !el_info->neigh[2]->new_coord) el_info->neigh[2]->new_coord = el->new_coord; } return; } void AI_post_refine_2d(MESH *mesh) { FLAGS fill_flag = CALL_EVERY_EL_PREORDER|FILL_PROJECTION|FILL_COORDS|FILL_NEIGH; mesh_traverse(mesh, -1, fill_flag, new_coords_fct_2d, nil); return; } static U_CHAR refine_2d(MESH *mesh) { int n_elements = mesh->n_elements; FLAGS fill_flag = CALL_LEAF_EL|FILL_NEIGH|FILL_BOUND; const EL_INFO *el_info; if(mesh->parametric) fill_flag |= FILL_PROJECTION; call_refine_interpol_2d = count_refine_interpol(mesh); stack_2d = get_traverse_stack(); do_more_refine_2d = true; while (do_more_refine_2d) { do_more_refine_2d = false; el_info = traverse_first(stack_2d, mesh, -1, fill_flag); while (el_info) { if (el_info->el->mark > 0) { do_more_refine_2d |= (el_info->el->mark > 1); el_info = refine_function_2d(el_info); } el_info = traverse_next(stack_2d, el_info); } } free_traverse_stack(stack_2d); n_elements = mesh->n_elements - n_elements; return(n_elements ? MESH_REFINED : 0); } alberta-2.0.1/alberta/src/2d/submesh_2d.c0000644000042300001440000005176110676724251014766 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: submesh_2d.c */ /* */ /* */ /* description: Support for master/slave meshes for master->dim == 2 */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ static void get_slave_elements_rec_2d(MESH *master, MESH *slave, int neigh, EL *m_el, EL *s_el) { /* FUNCNAME("get_slave_elements_rec_2d"); */ EL_INFO el_info = {}; if(m_el->child[0]) { if(neigh == 0) get_slave_elements_rec_2d(master, slave, 2, m_el->child[1], s_el); else if(neigh == 1) get_slave_elements_rec_2d(master, slave, 2, m_el->child[0], s_el); else if(neigh == 2) { /* We MUST copy m_el->new_coord here!!! */ if (m_el->new_coord) { s_el->new_coord = get_real_d(slave); COPY_DOW(m_el->new_coord, s_el->new_coord); } el_info.mesh = slave; el_info.el = s_el; s_el->mark = 1; AI_refine_fct_1d(&el_info, nil); get_slave_elements_rec_2d(master, slave, 0, m_el->child[0], s_el->child[0]); get_slave_elements_rec_2d(master, slave, 1, m_el->child[1], s_el->child[1]); } } return; } static void get_slave_elements_2d(MESH *master, MESH *slave, int (*binding_method) (MESH *master, MACRO_EL *el, int face, void *data), void *data) { FUNCNAME("get_slave_elements_2d"); MACRO_EL *m_mel, *s_mel; int n, i; s_mel = slave->macro_els; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_NEIGH_2D; i++) if(binding_method(master, m_mel, i, data)) { DEBUG_TEST_EXIT(s_mel, "Ran out of slave macro elements... Wrong meshes?\n"); get_slave_elements_rec_2d(master, slave, i, m_mel->el, s_mel->el); s_mel++; } } return; } /****************************************************************************/ /* master interpolation/restriction routines. */ /* These call the corresponding refinement/coarsening routines for the slave*/ /* mesh patchwise. */ /****************************************************************************/ static void master_interpol_2d(DOF_PTR_VEC *m_dpv, RC_LIST_EL *rclist, int mn) { FUNCNAME("master_interpol_2d"); MESH_MEM_INFO *m_mem_info = (MESH_MEM_INFO *) m_dpv->fe_space->admin->mesh->mem_info; int m_n0 = m_dpv->fe_space->admin->n0_dof[EDGE]; int m_n = m_dpv->fe_space->admin->mesh->node[EDGE]; EL *m_el, *s_el; EL *s_child[2], *m_child[2]; int s_n0, s_n, i, j, n_slaves = m_mem_info->n_slaves; MESH *slave = nil; DOF_PTR_VEC *s_dpv; NODE_PROJECTION *s_proj; /****************************************************************************/ /* Retrieve the slave mesh. Rather unelegant, sorry... */ /****************************************************************************/ for (j = 0; j < n_slaves; j++) { slave = m_mem_info->slaves[j]; if(((MESH_MEM_INFO *)slave->mem_info)->slave_binding == m_dpv) break; } DEBUG_TEST_EXIT(j < n_slaves, "Slave mesh not found!\n"); s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; /****************************************************************************/ /* Run over all patch elements. Check if any edges belong to slave elements.*/ /* If so, determine if they should be refined together with the master */ /* elements. All necessary DOFs are set. New DOFs are set to nil, if they */ /* should not point to anything. THIS IS NOT JUST A SECURITY MEASURE - IT */ /* IS ABSOLUTELY NECESSARY! At the moment, new entries in a DOF vector can */ /* not be guaranteed to be clean. */ /****************************************************************************/ for(i = 0; i < mn; i++) { m_el = rclist[i].el_info.el; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; /****************************************************************************/ /* DOF pointers of the master child elements along the bisection line are */ /* set to nil. */ /****************************************************************************/ m_dpv->vec[m_child[0]->dof[m_n+1][m_n0]] = nil; m_dpv->vec[m_child[1]->dof[m_n+0][m_n0]] = nil; for(j = 0; j < N_EDGES_2D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { EL_INFO el_info = {}; if(j == 2) { /****************************************************************************/ /* Refine this slave element. Take precautions to preserve the coarse DOFs */ /* on master and slave elements, since they will be needed for coarsening. */ /****************************************************************************/ s_el->mark = MAX(s_el->mark, 1); el_info.el = s_el; el_info.mesh = slave; /* Fill active projection on slave rclist for parametric meshes. */ s_proj = rclist[i].el_info.projections[1+j]; if(!s_proj) s_proj = rclist[i].el_info.projections[0]; el_info.active_projection = el_info.projections[0] = s_proj; AI_refine_fct_1d(&el_info, nil); /****************************************************************************/ /* Now retrieve the new child elements and set DOF pointers. */ /****************************************************************************/ s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; m_dpv->vec[m_child[0]->dof[m_n+0][m_n0]] = s_child[0]; m_dpv->vec[m_child[1]->dof[m_n+1][m_n0]] = s_child[1]; s_dpv->vec[s_child[0]->dof[s_n][s_n0]] = m_child[0]; s_dpv->vec[s_child[1]->dof[s_n][s_n0]] = m_child[1]; } else if (s_el) { /****************************************************************************/ /* If we are not on a refinement edge, set the correct master child */ /* pointer to point to the slave element. Edge 2 of child[1-j] should point */ /* to the current slave element, and vice versa. */ /****************************************************************************/ m_dpv->vec[m_child[1-j]->dof[m_n+2][m_n0]] = s_el; s_dpv->vec[s_el->dof[s_n][s_n0]] = m_child[1-j]; } } /****************************************************************************/ /* If there is no slave element on this refinement edge, zero the master */ /* child pointers. */ /****************************************************************************/ else if (!s_el) { if(j == 2) { m_dpv->vec[m_child[0]->dof[m_n+0][m_n0]] = nil; m_dpv->vec[m_child[1]->dof[m_n+1][m_n0]] = nil; } else m_dpv->vec[m_child[1-j]->dof[m_n+2][m_n0]] = nil; } } } return; } static void master_restrict_2d(DOF_PTR_VEC *m_dpv, RC_LIST_EL *rclist, int mn) { FUNCNAME("master_restrict_2d"); MESH_MEM_INFO *m_mem_info = (MESH_MEM_INFO *) m_dpv->fe_space->admin->mesh->mem_info; int m_n0 = m_dpv->fe_space->admin->n0_dof[EDGE]; int m_n = m_dpv->fe_space->admin->mesh->node[EDGE]; EL *m_el, *s_el, *cm_el; EL *s_child[2], *m_child[2]; int s_n0, s_n, i, j, n_slaves = m_mem_info->n_slaves; MESH *slave = nil; DOF_PTR_VEC *s_dpv; /****************************************************************************/ /* Retrieve the slave mesh. Rather unelegant, sorry... */ /****************************************************************************/ for (j = 0; j < n_slaves; j++) { slave = m_mem_info->slaves[j]; if(((MESH_MEM_INFO *)slave->mem_info)->slave_binding == m_dpv) break; } DEBUG_TEST_EXIT(j < n_slaves, "Slave mesh not found!\n"); s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; /****************************************************************************/ /* Run over all patch elements. Check if any edges belong to slave elements.*/ /* If so, determine if they should be coarsened together with the master */ /* elements. */ /****************************************************************************/ for(i = 0; i < mn; i++) { m_el = rclist[i].el_info.el; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; for(j = 0; j < N_EDGES_2D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el) { cm_el = (EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]; if (cm_el==m_child[0] || cm_el==m_child[1] || cm_el==m_el) { /****************************************************************************/ /* Set the slave pointer to point to the parent master element. */ /****************************************************************************/ s_dpv->vec[s_el->dof[s_n][s_n0]] = m_el; if (j==2) { /****************************************************************************/ /* Coarsen this slave element. Old parent DOFs still exist due to the */ /* preserve_coarse_dofs-setting during refinement. */ /****************************************************************************/ s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; s_child[0]->mark = -1; s_child[1]->mark = -1; AI_coarse_recursive_1d(slave, s_el); } } } } } return; } static void join_elements_recursive_2d(const MESH *master, const MESH *slave, const DOF_ADMIN *m_admin, const DOF_ADMIN *s_admin, const DOF_PTR_VEC *m_dpv, const DOF_PTR_VEC *s_dpv, const int subsimplex, const EL *m_el, const EL *s_el) { FUNCNAME("join_elements_recursive_2d"); s_dpv->vec[s_el->dof[slave->node[CENTER]] [s_admin->n0_dof[CENTER]]] = (void *)m_el; m_dpv->vec[m_el->dof[master->node[EDGE] + subsimplex] [m_admin->n0_dof[EDGE]]] = (void *)s_el; if(m_el->child[0]) { if (subsimplex == 2) { /* this is the refinement edge */ DEBUG_TEST_EXIT(s_el->child[0], "Could not find slave children!\n"); join_elements_recursive_2d(master, slave, m_admin, s_admin, m_dpv, s_dpv, 0, m_el->child[0], s_el->child[0]); join_elements_recursive_2d(master, slave, m_admin, s_admin, m_dpv, s_dpv, 1, m_el->child[1], s_el->child[1]); } else join_elements_recursive_2d(master, slave, m_admin, s_admin, m_dpv, s_dpv, 2, m_el->child[1 - subsimplex], s_el); } return; } /****************************************************************************/ /* get_submesh_2d(master, name, binding_method): returns a 1D submesh of */ /* master based on the information given by the user routine */ /* binding_method(). */ /****************************************************************************/ static MESH *get_submesh_2d(MESH *master, const char *name, int (*binding_method) (MESH *master, MACRO_EL *el, int face, void *data), void *data) { FUNCNAME("get_submesh_2d"); MACRO_DATA s_data = {}; MESH_MEM_INFO *m_info, *s_info; MESH *slave = nil; const FE_SPACE *slave_space, *master_space; DOF_PTR_VEC *slave_to_master_binding; DOF_PTR_VEC *master_to_slave_binding; int s_n_dof[N_NODE_TYPES] = {}, m_n_dof[N_NODE_TYPES] = {}; MACRO_EL *m_mel, *s_mel; const DOF_ADMIN *m_admin, *s_admin; int i, j, k, n, ne = 0, nv = 0, *vert_ind = nil, index; S_CHAR bound; char new_name[1024]; m_info = ((MESH_MEM_INFO *)master->mem_info); /****************************************************************************/ /* Count all needed vertices and elements. */ /****************************************************************************/ s_data.dim = 1; s_data.coords = MEM_ALLOC(master->n_vertices, REAL_D); /* resized later! */ vert_ind = MEM_ALLOC(master->n_vertices, int); for(i = 0; i < master->n_vertices; i++) vert_ind[i] = -1; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_EDGES_2D; i++) if(binding_method(master, m_mel, i, data)) { ne++; for(j = 0; j < N_VERTICES_2D; j++) if(j != i) { /* Make use of the slave->mem_info->coords vector to get vertex indices. */ index = (m_mel->coord[j] - m_info->coords[0]) / DIM_OF_WORLD; if (vert_ind[index] < 0) { vert_ind[index] = nv; for(k = 0; k < DIM_OF_WORLD; k++) s_data.coords[nv][k] = m_info->coords[index][k]; nv++; } } } } /****************************************************************************/ /* Allocate the needed amount of macro elements and coordinates. */ /* Fill element and coordinate information. */ /****************************************************************************/ TEST_EXIT(nv,"Bad mesh: no vertices counted!\n"); TEST_EXIT(ne,"Bad mesh: no elements counted!\n"); s_data.n_total_vertices = nv; s_data.n_macro_elements = ne; s_data.coords = MEM_REALLOC(s_data.coords, master->n_vertices, nv, REAL_D); s_data.mel_vertices = MEM_ALLOC(ne * N_NEIGH_1D, int); ne = 0; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_EDGES_2D; i++) if(binding_method(master, m_mel, i, data)) { for(j = 0; j < N_VERTICES_2D; j++) if(j != i) { index = (m_mel->coord[j] - m_info->coords[0]) / DIM_OF_WORLD; nv = vert_ind[index]; s_data.mel_vertices[N_VERTICES_1D * ne + (j + 2 - i) % 3] = nv; } ne++; } } compute_neigh_fast(&s_data); /* First assign a default DIRICHLET boundary. */ dirichlet_boundary(&s_data); /* Now correct the boundary values if the master vertex has nonzero type. */ ne = 0; for(ne = n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_EDGES_2D; i++) if(binding_method(master, m_mel, i, data)) { for(j = 0; j < N_NEIGH_1D; j++) if((s_data.boundary[N_NEIGH_1D * ne + j] == DIRICHLET) && (bound = m_mel->vertex_bound[(i+2-j)%3])) s_data.boundary[N_NEIGH_1D * ne + j] = bound; ne++; } } /****************************************************************************/ /* Allocate a submesh. */ /****************************************************************************/ if(!name) { static int count_2d = 1; sprintf(new_name, "Submesh %d of %s", count_2d, master->name); name = new_name; count_2d++; } slave = GET_MESH(1, name, &s_data, nil); /****************************************************************************/ /* Clean up. */ /****************************************************************************/ nv = s_data.n_total_vertices; ne = s_data.n_macro_elements; MEM_FREE(s_data.coords, nv, REAL_D); MEM_FREE(s_data.mel_vertices, ne*N_VERTICES_1D, int); MEM_FREE(s_data.neigh, ne*N_NEIGH_1D, int); MEM_FREE(s_data.boundary, ne*N_NEIGH_1D, S_CHAR); MEM_FREE(vert_ind, master->n_vertices, int); /****************************************************************************/ /* Fill more slave elements, if the master mesh was already refined. */ /****************************************************************************/ get_slave_elements_2d(master, slave, binding_method, data); /****************************************************************************/ /* Allocate special FE spaces for the slave. */ /****************************************************************************/ s_n_dof[CENTER] = 1; slave_space = get_fe_space(slave, "Center dof fe_space", s_n_dof, nil, 1); slave_to_master_binding = get_dof_ptr_vec("Slave - master pointers", slave_space); /****************************************************************************/ /* Allocate special FE spaces for master. */ /****************************************************************************/ m_n_dof[EDGE] = 1; master_space = get_fe_space(master, "Edge dof fe_space", m_n_dof, nil, 1); #if ALBERTA_DEBUG == 1 check_mesh(slave); #endif /****************************************************************************/ /* Allocate special DOF_PTR_VECs for both master and slave. These serve to */ /* help find the corresponding subsimplex to each boundary master simplex */ /* during refinement and vice versa. */ /****************************************************************************/ master_to_slave_binding = get_dof_ptr_vec("Master - slave pointers", master_space); master_to_slave_binding->refine_interpol = master_interpol_2d; master_to_slave_binding->coarse_restrict = master_restrict_2d; /****************************************************************************/ /* Set the special pointers in the MESH_MEM_INFO components of both master */ /* and slave grids. */ /****************************************************************************/ s_info = (MESH_MEM_INFO *)slave->mem_info; s_info->master = master; s_info->binding_method = binding_method; s_info->slave_binding = master_to_slave_binding; s_info->master_binding = slave_to_master_binding; m_info->slaves = MEM_REALLOC(m_info->slaves, m_info->n_slaves, m_info->n_slaves + 1, MESH *); m_info->slaves[m_info->n_slaves] = slave; m_info->n_slaves++; /****************************************************************************/ /* Set the element pointer vec entries to the correct values. */ /* This assumes that slave macro elements were allocated in the order given */ /* by the loop below. */ /****************************************************************************/ m_admin = master_to_slave_binding->fe_space->admin; s_admin = slave_to_master_binding->fe_space->admin; FOR_ALL_DOFS(s_admin, slave_to_master_binding->vec[dof] = nil); FOR_ALL_DOFS(m_admin, master_to_slave_binding->vec[dof] = nil); s_mel = slave->macro_els; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_NEIGH_2D; i++) if(binding_method(master, m_mel, i, data)) { DEBUG_TEST_EXIT(s_mel, "Ran out of slave macro elements... Wrong meshes?\n"); /* Here we take care of node projection function transfer. */ if(m_mel->projection[i+1]) s_mel->projection[0] = m_mel->projection[i+1]; else s_mel->projection[0] = m_mel->projection[0]; join_elements_recursive_2d(master, slave, m_admin, s_admin, master_to_slave_binding, slave_to_master_binding, i, m_mel->el, s_mel->el); s_mel++; } } /****************************************************************************/ /* Now project all new vertices if the mesh was already refined. */ /****************************************************************************/ if(slave->n_elements < slave->n_hier_elements) AI_post_refine_1d(slave); return slave; } alberta-2.0.1/alberta/src/2d/traverse_nr_2d.c0000644000042300001440000002307410676724251015646 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_nr_2d.c */ /* */ /* description: */ /* nonrecursive mesh traversal, 2d routines */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static int coarse_nb_2d[3][3] = {{-2,-2,-2}, {2,-1,1}, {-1,2,0}}; /* father.neigh[coarse_nb_2d[i][j]] == child[i-1].neigh[j] */ /*--------------------------------------------------------------------------*/ /* traverse_neighbour_2d: */ /* ------------------- */ /* walk through hierarchy tree and look for a neighbour */ /*--------------------------------------------------------------------------*/ static const EL_INFO *traverse_neighbour_2d(TRAVERSE_STACK *stack, const EL_INFO *elinfo_old, int neighbour) { FUNCNAME("traverse_neighbour_2d"); EL *el, *sav_el; EL_INFO *old_elinfo, *elinfo; int i, nb, opp_vertex, stack2_used; int sav_index, sav_neighbour = neighbour; DEBUG_TEST_EXIT(stack->stack_used > 0, "no current element"); DEBUG_TEST_EXIT(stack->traverse_fill_flag & CALL_LEAF_EL, "invalid traverse_fill_flag=%d", stack->traverse_fill_flag); DEBUG_TEST_EXIT(elinfo_old == stack->elinfo_stack+stack->stack_used, "invalid old elinfo"); DEBUG_TEST_FLAG(FILL_NEIGH, stack->elinfo_stack+stack->stack_used); el = stack->elinfo_stack[stack->stack_used].el; sav_index = INDEX(el); sav_el = el; /* first, goto to leaf level, if necessary... */ if ((el->child[0]) && (neighbour < 2)) { if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = 1 - neighbour; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->info_stack[stack->stack_used] = i + 1; stack->stack_used++; neighbour = 2; } /* save information about current element and its position in the tree */ stack->save_traverse_mel = stack->traverse_mel; stack->save_stack_used = stack->stack_used; for (i=0; i<=stack->stack_used; i++) stack->save_info_stack[i] = stack->info_stack[i]; for (i=0; i<=stack->stack_used; i++) stack->save_elinfo_stack[i] = stack->elinfo_stack[i]; old_elinfo = stack->save_elinfo_stack+stack->stack_used; opp_vertex = old_elinfo->opp_vertex[neighbour]; /*--------------------------------------------------------------------------*/ /* First phase: go up in tree until we can go down again. */ /* */ /* During this first phase, nb is the neighbour index which points from an */ /* element of the OLD hierarchy branch to the NEW branch */ /*--------------------------------------------------------------------------*/ nb = neighbour; while (stack->stack_used > 1) { stack->stack_used--; nb = coarse_nb_2d[stack->info_stack[stack->stack_used]][nb]; if (nb == -1) break; DEBUG_TEST_EXIT(nb >= 0, "invalid coarse_nb_2d %d\n",nb); } /*--------------------------------------------------------------------------*/ /* Now, goto neighbouring element at the local hierarchy entry */ /* This is either a macro element neighbour or the other child of parent. */ /* initialize nb for second phase (see below) */ /*--------------------------------------------------------------------------*/ if (nb >= 0) { /* go to macro element neighbour */ if ((nb < 2) && (stack->save_stack_used > 1)) { stack2_used = 2; /* go down one level in OLD hierarchy */ } else { stack2_used = 1; } /* elinfo2 = stack->save_elinfo_stack+stack2_used; */ /* el2 = elinfo2->el; */ i = stack->traverse_mel->opp_vertex[nb]; stack->traverse_mel = stack->traverse_mel->neigh[nb]; if (stack->traverse_mel == nil) return(nil); nb = i; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; } else { /* goto other child */ stack2_used = stack->stack_used + 1; if (stack->save_stack_used > stack2_used) { stack2_used++; /* go down one level in OLD hierarchy */ } /* elinfo2 = stack->save_elinfo_stack+stack2_used; */ /* el2 = elinfo2->el; */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = 2 - stack->info_stack[stack->stack_used]; stack->info_stack[stack->stack_used] = i+1; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; nb = 1-i; } /*--------------------------------------------------------------------------*/ /* Second phase: go down in a new hierarchy branch until leaf level. */ /* Now, nb is the neighbour index which points from an element of the */ /* NEW hierarchy branch to the OLD branch. */ /*--------------------------------------------------------------------------*/ elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; while(el->child[0]) { if (nb < 2) { /* go down one level in hierarchy */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); fill_elinfo(1-nb, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->info_stack[stack->stack_used] = 2-nb; stack->stack_used++; nb = 2; } if (stack->save_stack_used > stack2_used) { /* `refine' both el and el2 */ DEBUG_TEST_EXIT(el->child[0], "invalid NEW refinement?"); /* use child i, neighbour of el2->child[nb-1] */ i = 2 - stack->save_info_stack[stack2_used]; DEBUG_TEST_EXIT(i < 2, "invalid OLD refinement?"); stack->info_stack[stack->stack_used] = i+1; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; nb = i; elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; stack2_used++; if (stack->save_stack_used > stack2_used) { stack2_used++; /* go down one level in OLD hierarchy */ } /* elinfo2 = stack->save_elinfo_stack+stack2_used; */ /* el2 = elinfo2->el; */ } else { /* now we're done... */ elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; } } if (elinfo->neigh[opp_vertex] != old_elinfo->el) { MSG(" looking for neighbour %d of element %d at %p\n", neighbour, INDEX(old_elinfo->el), old_elinfo->el); MSG(" originally: neighbour %d of element %d at %p\n", sav_neighbour, sav_index, sav_el); MSG(" got element %d at %p with opp_vertex %d neigh %d\n", INDEX(elinfo->el), elinfo->el, opp_vertex, INDEX(elinfo->neigh[opp_vertex])); DEBUG_TEST_EXIT(elinfo->neigh[opp_vertex] == old_elinfo->el, "didn't succeed !?!?!?"); } if (elinfo->el->child[0]) { MSG(" looking for neighbour %d of element %d at %p\n", neighbour, INDEX(old_elinfo->el), old_elinfo->el); MSG(" originally: neighbour %d of element %d at %p\n", sav_neighbour, sav_index, sav_el); MSG(" got element %d at %p with opp_vertex %d neigh %d\n", INDEX(elinfo->el), elinfo->el, opp_vertex, INDEX(elinfo->neigh[opp_vertex])); MSG("got no leaf element\n"); WAIT_REALLY; } return(elinfo); } alberta-2.0.1/alberta/src/2d/traverse_r_2d.c0000644000042300001440000002671210676724251015472 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_r_2d.c */ /* */ /* description: */ /* recursive mesh traversal - 2d routines: */ /* fill_macro_info_2d(), fill_elinfo_2d() */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* fill_macro_info_2d: */ /* ---------------- */ /* fill EL_INFO structure for a macro element */ /*--------------------------------------------------------------------------*/ static void fill_macro_info_2d(MESH *mesh, const MACRO_EL *mel, EL_INFO *elinfo) { FUNCNAME("fill_macro_info_2d"); EL *nb; MACRO_EL *mnb; int i, j, k; FLAGS fill_opp_coords; elinfo->mesh = mesh; elinfo->macro_el = mel; elinfo->el = mel->el; elinfo->parent = nil; elinfo->level = 0; if (elinfo->fill_flag & FILL_COORDS) { for (i=0; icoord[i], "no mel->coord[%d]\n",i); for (j=0;jcoord[i][j] = mel->coord[i][j]; } } if (elinfo->fill_flag & (FILL_OPP_COORDS | FILL_NEIGH)) { fill_opp_coords = (elinfo->fill_flag & FILL_OPP_COORDS); for (i = 0; i < N_NEIGH_2D; i++) { if ((mnb = mel->neigh[i])) { nb = elinfo->neigh[i] = mel->neigh[i]->el; k = elinfo->opp_vertex[i] = mel->opp_vertex[i]; if (nb->child[0] && (k != 2)) /*--- make nb nearest element ---*/ { if (fill_opp_coords) { if (nb->new_coord) { for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[i][j] = nb->new_coord[j]; } else { for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[i][j] = (mnb->coord[0][j] + mnb->coord[1][j]) / 2; } } nb = elinfo->neigh[i] = nb->child[1-k]; k = elinfo->opp_vertex[i] = 2; } else { if (fill_opp_coords) { for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[i][j] = mnb->coord[k][j]; } } } else { elinfo->neigh[i] = nil; } } } if (elinfo->fill_flag & FILL_BOUND) { for (i = 0; i < N_VERTICES_2D; i++) elinfo->vertex_bound[i] = mel->vertex_bound[i]; for (i=0;iedge_bound[i] = mel->edge_bound[i]; } if(elinfo->fill_flag & FILL_PROJECTION) { for(i = 0; i < N_EDGES_2D + 1; i++) elinfo->projections[i] = mel->projection[i]; elinfo->active_projection = mel->projection[0]; /* If we have a projection for the refinement edge, it takes precedence! */ if(mel->projection[3]) elinfo->active_projection = mel->projection[3]; } return; } /*--------------------------------------------------------------------------*/ /* fill_elinfo_2d: */ /* ------------ */ /* fill EL_INFO structure for one child of an element */ /*--------------------------------------------------------------------------*/ static void fill_elinfo_2d(int ichild, const EL_INFO *elinfo_old, EL_INFO *elinfo) { FUNCNAME("fill_elinfo_2d"); int j; EL *nb; EL *el = elinfo_old->el; FLAGS fill_flag = elinfo_old->fill_flag; FLAGS fill_opp_coords; DEBUG_TEST_EXIT(el->child[0], "no children?\n"); elinfo->el = el->child[ichild]; DEBUG_TEST_EXIT(elinfo->el, "missing child %d?\n", ichild); elinfo->macro_el = elinfo_old->macro_el; elinfo->fill_flag = fill_flag; elinfo->mesh = elinfo_old->mesh; elinfo->parent = el; elinfo->level = elinfo_old->level + 1; if (fill_flag & FILL_COORDS) { if (el->new_coord) { for (j = 0; j < DIM_OF_WORLD; j++) elinfo->coord[2][j] = el->new_coord[j]; } else { for (j = 0; j < DIM_OF_WORLD; j++) elinfo->coord[2][j] = 0.5 * (elinfo_old->coord[0][j] + elinfo_old->coord[1][j]); } if (ichild==0) { for (j = 0; j < DIM_OF_WORLD; j++) { elinfo->coord[0][j] = elinfo_old->coord[2][j]; elinfo->coord[1][j] = elinfo_old->coord[0][j]; } } else { for (j = 0; j < DIM_OF_WORLD; j++) { elinfo->coord[0][j] = elinfo_old->coord[1][j]; elinfo->coord[1][j] = elinfo_old->coord[2][j]; } } } if (fill_flag & (FILL_NEIGH | FILL_OPP_COORDS)) { fill_opp_coords = (fill_flag & FILL_OPP_COORDS); if (ichild==0) { if ((elinfo->neigh[2] = elinfo_old->neigh[1])) { if (fill_opp_coords) { for (j=0; jopp_coord[2][j] = elinfo_old->opp_coord[1][j]; } } elinfo->opp_vertex[2] = elinfo_old->opp_vertex[1]; if (el->child[0] && el->child[1]->child[0] && el->child[1]->child[0]) { elinfo->neigh[1] = el->child[1]->child[1]; DEBUG_TEST_EXIT(elinfo->neigh[1], "el->child[1]->child[0]!=nil, but el->child[1]->child[1]=nil\n"); elinfo->opp_vertex[1] = 2; if (fill_opp_coords) { if (el->child[1]->new_coord) { for (j=0; jopp_coord[1][j] = el->child[1]->new_coord[j]; } else { for (j=0; jopp_coord[1][j] = 0.5 * (elinfo_old->coord[1][j] + elinfo_old->coord[2][j]); } } } else { elinfo->neigh[1] = el->child[1]; DEBUG_TEST_EXIT(elinfo->neigh[1], "el->child[0] != nil, but el->child[1] = nil\n"); elinfo->opp_vertex[1] = 0; if (fill_opp_coords) { for (j=0; jopp_coord[1][j] = elinfo_old->coord[1][j]; } } if ((nb = elinfo_old->neigh[2])) { DEBUG_TEST(elinfo_old->opp_vertex[2] == 2,"invalid neighbour\n"); DEBUG_TEST_EXIT(nb->child[0], "missing children?\n"); nb = nb->child[1]; DEBUG_TEST_EXIT(nb, "missing child[1]?\n"); if (nb->child[0]) { elinfo->opp_vertex[0] = 2; if (fill_opp_coords) { if (nb->new_coord) { for (j=0; jopp_coord[0][j] = nb->new_coord[j]; } else { for (j=0; jopp_coord[0][j] = 0.5*(elinfo_old->opp_coord[2][j] + elinfo_old->coord[0][j]); } } } nb = nb->child[0]; } else { elinfo->opp_vertex[0] = 1; if (fill_opp_coords) { for (j=0; jopp_coord[0][j] = elinfo_old->opp_coord[2][j]; } } } elinfo->neigh[0] = nb; } else /* ichild==1 */ { if ((elinfo->neigh[2] = elinfo_old->neigh[0])) { if (fill_opp_coords) { for (j=0; jopp_coord[2][j] = elinfo_old->opp_coord[0][j]; } } elinfo->opp_vertex[2] = elinfo_old->opp_vertex[0]; if (el->child[0]->child[0]) { elinfo->neigh[0] = el->child[0]->child[0]; elinfo->opp_vertex[0] = 2; if (fill_opp_coords) { if (el->child[0]->new_coord) { for (j=0; jopp_coord[0][j] = el->child[0]->new_coord[j]; } else { for (j=0; jopp_coord[0][j] = 0.5 * (elinfo_old->coord[0][j] + elinfo_old->coord[2][j]); } } } else { elinfo->neigh[0] = el->child[0]; elinfo->opp_vertex[0] = 1; if (fill_opp_coords) { for (j=0; jopp_coord[0][j] = elinfo_old->coord[0][j]; } } if ((nb = elinfo_old->neigh[2])) { DEBUG_TEST(elinfo_old->opp_vertex[2] == 2,"invalid neighbour\n"); nb = nb->child[0]; DEBUG_TEST(nb,"missing child?\n"); if (nb->child[0]) { elinfo->opp_vertex[1] = 2; if (fill_opp_coords) { if (nb->new_coord) for (j=0; jopp_coord[1][j] = nb->new_coord[j]; else for (j=0; jopp_coord[1][j] = 0.5*(elinfo_old->opp_coord[2][j] + elinfo_old->coord[1][j]); } nb = nb->child[1]; } else { elinfo->opp_vertex[1] = 0; if (fill_opp_coords) { for (j=0; jopp_coord[1][j] = elinfo_old->opp_coord[2][j]; } } } elinfo->neigh[1] = nb; } } if (fill_flag & FILL_PROJECTION) { elinfo->projections[0] = elinfo_old->projections[0]; if(ichild == 0) { elinfo->projections[1] = elinfo_old->projections[3]; elinfo->projections[2] = elinfo_old->projections[0]; elinfo->projections[3] = elinfo_old->projections[2]; } else { elinfo->projections[1] = elinfo_old->projections[0]; elinfo->projections[2] = elinfo_old->projections[3]; elinfo->projections[3] = elinfo_old->projections[1]; } if(elinfo->projections[3]) elinfo->active_projection = elinfo->projections[3]; else elinfo->active_projection = elinfo->projections[0]; } if (fill_flag & FILL_BOUND) { elinfo->vertex_bound[2] = elinfo_old->edge_bound[2]; if (ichild==0) { elinfo->vertex_bound[0] = elinfo_old->vertex_bound[2]; elinfo->vertex_bound[1] = elinfo_old->vertex_bound[0]; elinfo->edge_bound[0] = elinfo_old->edge_bound[2]; elinfo->edge_bound[1] = INTERIOR; elinfo->edge_bound[2] = elinfo_old->edge_bound[1]; } else { elinfo->vertex_bound[0] = elinfo_old->vertex_bound[1]; elinfo->vertex_bound[1] = elinfo_old->vertex_bound[2]; elinfo->edge_bound[0] = INTERIOR; elinfo->edge_bound[1] = elinfo_old->edge_bound[2]; elinfo->edge_bound[2] = elinfo_old->edge_bound[0]; } } return; } alberta-2.0.1/alberta/src/3d/0000777000042300001440000000000011067147344012637 500000000000000alberta-2.0.1/alberta/src/3d/bas_fct_3d.c0000644000042300001440000000670610676723576014733 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: bas_fct_3d.c */ /* */ /* */ /* description: Lagrange basis functions up to order 4 in 3d */ /* includes ./lagrange_[1234]_3d.c */ /* includes ./disc_lagrange_[012]_3d.c */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* discontinuous Lagrangian basisfunctions of order 0-2; these */ /* functions are evaluated in barycentric coordinates; the derivatives */ /* are those corresponding to these barycentric coordinates. */ /*--------------------------------------------------------------------------*/ #include "disc_lagrange_0_3d.c" #include "disc_lagrange_1_3d.c" #include "disc_lagrange_2_3d.c" /*--------------------------------------------------------------------------*/ /* Lagrangian basis functions of order 1-4; these */ /* functions are evaluated in barycentric coordinates; the derivatives */ /* are those corresponding to these barycentric coordinates. */ /*--------------------------------------------------------------------------*/ #include "lagrange_1_3d.c" #include "lagrange_2_3d.c" #include "lagrange_3_3d.c" #include "lagrange_4_3d.c" alberta-2.0.1/alberta/src/3d/coarsen_3d.c0000644000042300001440000005530110676724252014747 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: coarsen_3d.c */ /* */ /* description: coarsening of 3 dim. hierarchical meshes; */ /* file contains all routines depending on DIM == 3; */ /* */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* n_child_edge_3d[el_type][ichild][dir] */ /* gives local index of new edge on child[ichild] part of face [2+dir] on */ /* the parent */ /****************************************************************************/ static U_CHAR n_child_edge_3d[3][2][2] = {{{5,4},{4,5}}, {{5,4},{5,4}}, {{5,4},{5,4}}}; /****************************************************************************/ /* n_child_face_3d[el_type][ichild][dir] */ /* gives local index of sub-face on child[ichild] part of face [2+dir] on */ /* the parent */ /****************************************************************************/ static U_CHAR n_child_face_3d[3][2][2] = {{{1,2},{2,1}}, {{1,2},{1,2}}, {{1,2},{1,2}}}; /****************************************************************************/ /* coarsen_element_3d: coarsens a single element of the coarsening patch; */ /* dof's in the interior of the element are removed and dof's in the faces */ /* of the element are removed if neighbour has been coarsend or if the face*/ /* is part of the domain's boundary */ /****************************************************************************/ static void coarsen_element_3d(MESH *mesh, RC_LIST_EL *coarse_list) { EL *el = coarse_list->el_info.el, *child[2]; EL *neigh; int dir, el_type, i, node; child[0] = el->child[0]; child[1] = el->child[1]; el_type = coarse_list->el_info.el_type; /****************************************************************************/ /* Information about patch neighbours is still valid! But edge and face */ /* dof's in a common face of patch neighbours have to be removed */ /****************************************************************************/ for (dir = 0; dir < 2; dir++) { neigh = coarse_list->neigh[dir]? coarse_list->neigh[dir]->el_info.el : nil; /* opp_v = coarse_list->opp_vertex[dir]; */ if (!neigh || !neigh->child[0]) { /****************************************************************************/ /* boundary face or neigh has been coarsend: free the dof's in the face */ /****************************************************************************/ if (mesh->n_dof[EDGE]) { node = mesh->node[EDGE] + n_child_edge_3d[el_type][0][dir]; free_dof(child[0]->dof[node], mesh, EDGE, false); } if (mesh->n_dof[FACE]) { node = mesh->node[FACE] + n_child_face_3d[el_type][0][dir]; free_dof(child[0]->dof[node], mesh, FACE, false); node = mesh->node[FACE] + n_child_face_3d[el_type][1][dir]; free_dof(child[1]->dof[node], mesh, FACE, false); } } } /* for (dir = 0; dir < 2; dir++) */ /****************************************************************************/ /* finally remove the interior dof's: in the common face of child[0] and */ /* child[1] and at the two barycenter */ /****************************************************************************/ if (mesh->n_dof[FACE]) { node = mesh->node[FACE]; free_dof(child[0]->dof[node], mesh, FACE, false); } if (mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; for (i = 0; i < 2; i++) free_dof(child[i]->dof[node], mesh, CENTER, false); } /****************************************************************************/ /* get new data on parent and transfer data from children to parent */ /****************************************************************************/ el->child[0] = nil; el->child[1] = (EL *) AI_get_leaf_data(mesh); if (el->child[1] && ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->coarsen_leaf_data) ((MESH_MEM_INFO *)mesh->mem_info)-> leaf_data_info->coarsen_leaf_data(el, child); free_element(child[0], mesh); free_element(child[1], mesh); el->mark++; mesh->n_elements--; mesh->n_hier_elements -= 2; return; } /****************************************************************************/ /* get_coarse_patch_3d: gets the patch for coarsening starting on element */ /* el_info->el in direction of neighbour [3-dir]; returns 1 if a boundary */ /* reached and 0 if we come back to the starting element. */ /* */ /* We complete the loop also in the case of a incompatible */ /* coarsening patch since then all marks of patch elements are reset by */ /* do_coarse_patch() and this minimizes calls of traverse_neighbour(); */ /* if we reach a boundary while looping around the edge we loop back to */ /* the starting element before we return */ /****************************************************************************/ static int get_coarse_patch_3d(const EL_INFO *el_info, DOF *edge[2], int dir, RC_LIST_EL coarse_list[], int *n_neigh) { FUNCNAME("get_coarse_patch_3d"); const EL_INFO *neigh_info; EL *el, *neigh; int i, j, k, opp_v, edge_no; static U_CHAR next_el[6][2] = {{3,2},{1,3},{1,2},{0,3},{0,2},{0,1}}; el = el_info->el; if ((neigh = el_info->neigh[3-dir]) == nil) return(1); opp_v = el_info->opp_vertex[3-dir]; neigh_info = traverse_neighbour(stack_3d, el_info, 3-dir); DEBUG_TEST_EXIT(neigh == neigh_info->el, "neigh %d and neigh_info->el %d are not identical\n", INDEX(neigh), INDEX(neigh_info->el)); /****************************************************************************/ /* we have to go back to the starting element via opp_v values */ /* correct information is produce by AI_get_neigh_on_patch() */ /****************************************************************************/ coarse_list[*n_neigh].opp_vertex[0] = opp_v; coarse_list[*n_neigh].el_info = *neigh_info; while (neigh != el) { for (j = 0; j < N_VERTICES_3D; j++) if (neigh->dof[j] == edge[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (neigh->dof[k] == edge[1]) break; DEBUG_TEST_EXIT(j < N_VERTICES_3D && k < N_VERTICES_3D, "dof %d or dof %d not found on element %d with nodes (%d %d %d %d)\n", edge[0][0], edge[1][0], INDEX(neigh), neigh->dof[0][0], neigh->dof[1][0], neigh->dof[2][0], neigh->dof[3][0]); edge_no = edge_of_dofs_3d[j][k]; coarse_list[*n_neigh].flag = edge_no == 0; /****************************************************************************/ /* get the direction of the next neighbour */ /****************************************************************************/ if (next_el[edge_no][0] != opp_v) i = next_el[edge_no][0]; else i = next_el[edge_no][1]; ++*n_neigh; opp_v = neigh_info->opp_vertex[i]; if ((neigh = neigh_info->neigh[i])) { neigh_info = traverse_neighbour(stack_3d, neigh_info, i); DEBUG_TEST_EXIT(neigh == neigh_info->el, "neigh %d and neigh_info->el %d are not identical\n", INDEX(neigh), INDEX(neigh_info->el)); /****************************************************************************/ /* we have to go back to the starting element via opp_v values */ /* correct information is produced by AI_get_neigh_on_patch() */ /****************************************************************************/ coarse_list[*n_neigh].opp_vertex[0] = opp_v; coarse_list[*n_neigh].el_info = *neigh_info; } else break; } if (neigh == el) return(0); /****************************************************************************/ /* the domain's boundary is reached; loop back to the starting el */ /****************************************************************************/ i = *n_neigh-1; opp_v = coarse_list[i].opp_vertex[0]; do { DEBUG_TEST_EXIT(neigh_info->neigh[opp_v] && i > 0, "while looping back domains boundary was reached or i == 0\n"); opp_v = coarse_list[i--].opp_vertex[0]; neigh_info = traverse_neighbour(stack_3d, neigh_info, opp_v); } while(neigh_info->el != el); return(1); } /****************************************************************************/ /* coarse_patch_3d: first rebuild the dofs on the parents then do */ /* restriction of data (if possible) and finally coarsen the patch elements*/ /****************************************************************************/ static void coarse_patch_3d(MESH *mesh, RC_LIST_EL *coarse_list, int n_neigh, int bound) { EL *el = coarse_list->el_info.el; REAL *new_coord = el->new_coord; int i, node; /****************************************************************************/ /* reactivate DOFs */ /****************************************************************************/ for (i = 0; i < n_neigh; i++) AI_reactivate_dof(mesh, coarse_list[i].el_info.el); if (call_coarse_restrict_3d) /****************************************************************************/ /* restrict dof vectors to the parents on the patch */ /****************************************************************************/ coarse_restrict(mesh, coarse_list, n_neigh); /****************************************************************************/ /* and now start to coarsen the patch: */ /****************************************************************************/ /* remove dof's of the coarsening edge */ /****************************************************************************/ free_dof(el->child[0]->dof[3], mesh, VERTEX, false); mesh->n_vertices--; if (mesh->n_dof[EDGE]) { node = mesh->node[EDGE]+2; free_dof(el->child[0]->dof[node], mesh, EDGE, false); free_dof(el->child[1]->dof[node], mesh, EDGE, false); } /*--------------------------------------------------------------------------*/ /*--- and now coarsen single elements ---*/ /*--------------------------------------------------------------------------*/ for (i = 0; i < n_neigh; i++) { coarsen_element_3d(mesh, coarse_list+i); coarse_list[i].el_info.el->new_coord = nil; } /*--------------------------------------------------------------------------*/ /*--- if there is a projected boundary node, free memory ---*/ /*--------------------------------------------------------------------------*/ if (new_coord) free_real_d(mesh, new_coord); /****************************************************************************/ /* if the coarsening edge is an interior edge there are n_neigh + 1 edges */ /* and 2*n_neigh + 1 faces removed; if it is a boundary edge it is one */ /* more edge and one more face */ /****************************************************************************/ if (bound) { mesh->n_edges -= n_neigh + 2; mesh->n_faces -= 2*n_neigh + 1; } else { mesh->n_edges -= n_neigh + 1; mesh->n_faces -= 2*n_neigh; } return; } /*--------------------------------------------------------------------------*/ /* Propagate coarsening information over the whole hierarchy */ /* by POSTORDER traversal of the hierarchy tree */ /* leaves: 'increment' coarsening mark */ /* inner nodes: set coarsening mark to */ /* min(0,child[0].mark+1,child[1].mark+1) */ /*--------------------------------------------------------------------------*/ static void spread_coarsen_mark_fct_3d(const EL_INFO *el_info, void *data) { EL *el = el_info->el; S_CHAR mark; if (el->child[0]) { /*--------------------------------------------------------------------------*/ /* interior node of the tree */ /*--------------------------------------------------------------------------*/ mark = MAX(el->child[0]->mark, el->child[1]->mark); el->mark = MIN(mark + 1, 0); } else { /*--------------------------------------------------------------------------*/ /* leaf node of the tree */ /*--------------------------------------------------------------------------*/ if (el->mark < 0) el->mark -= 1; } return; } static void spread_coarsen_mark_3d(MESH *mesh) { mesh_traverse(mesh, -1, CALL_EVERY_EL_POSTORDER, spread_coarsen_mark_fct_3d, nil); return; } /*--------------------------------------------------------------------------*/ /* cleanup_after_coarsen_3d: */ /* resets the element marks */ /*--------------------------------------------------------------------------*/ static void cleanup_after_coarsen_fct_3d(const EL_INFO *el_info, void *data) { EL *el = el_info->el; el->mark = MAX(el->mark, 0); } static void cleanup_after_coarsen_3d(MESH *mesh) { mesh_traverse(mesh, -1, CALL_LEAF_EL, cleanup_after_coarsen_fct_3d, nil); return; } /*--------------------------------------------------------------------------*/ /* do_coarse_patch_3d: if patch can be coarsened return true, else false */ /* and reset the element marks */ /*--------------------------------------------------------------------------*/ static int do_coarse_patch_3d(MESH *mesh, RC_LIST_EL *coarse_list, int n_neigh) { /* FUNCNAME("do_coarse_patch_3d"); */ int i, j; EL *el; for (i = 0; i < n_neigh; i++) { el = coarse_list[i].el_info.el; if (el->mark >= 0 || el->child[0] == nil) { /*--------------------------------------------------------------------------*/ /* element must not be coarsened or element is a leaf element; reset the */ /* the coarsening flag on all those elements that have to be coarsened with*/ /* this element */ /*--------------------------------------------------------------------------*/ el->mark = 0; for (j = 0; j < n_neigh; j++) if (coarse_list[j].flag) coarse_list[j].el_info.el->mark = 0; return(false); } else if (el->child[0]->mark >= 0 || el->child[1]->mark >= 0) { /*--------------------------------------------------------------------------*/ /* one of the element's children must not be coarsened; reset the */ /* coarsening flag on all those elements that have to be coarsened with */ /* this element */ /*--------------------------------------------------------------------------*/ el->mark = 0; for (j = 0; j < n_neigh; j++) if (coarse_list[j].flag) coarse_list[j].el_info.el->mark = 0; return(false); } else if (el->child[0]->child[0] || el->child[1]->child[0]) { /*--------------------------------------------------------------------------*/ /* one of the element's children is not a leaf element; */ /* element may be coarsened after coarsening one of the children; try again*/ /*--------------------------------------------------------------------------*/ do_more_coarsen_3d = true; return(false); } #if 0 /* removed, DK */ else { /*--------------------------------------------------------------------------*/ /* either one element is a macro element or we can coarsen the patch */ /*--------------------------------------------------------------------------*/ if (coarse_list[i].flag == 0) { MACRO_EL *mel; for (mel = mesh->first_macro_el; mel; mel = mel->next) if (mel->el == el) break; DEBUG_TEST_EXIT(mel, "incompatible coarsening patch found\n"); } } #endif } return(true); } /*--------------------------------------------------------------------------*/ /* coarsen_fct_3d: get the coarsening patch, starting on el_info->el, */ /* checks whether patch can be coarsened and calls coarse_patch_3d if */ /* possible */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* coarse_patch_3d: gets the coarsening patch via get_coarse_patch_3d() */ /* (starting on el_info->el), checks whether patch can be coarsened or not */ /* via do_coarse_patch_3d(); in the first case the patch is refined by */ /* coarse_patch_3d(); otherwise element markers for patch elements are */ /* reset by do_coarse_patch_3d() and we have to return :-( */ /*--------------------------------------------------------------------------*/ static void coarsen_fct_3d(const EL_INFO *el_info) { EL *el = el_info->el; MESH *mesh = el_info->mesh; DOF *edge[2]; int n_neigh, bound = 0; EL_INFO *elinfo = (EL_INFO *) el_info; RC_LIST_EL *coarse_list; if (el->mark >= 0) return; /* el must not be coarsened, return :-( */ if (!(el->child[0])) return; /* single leaves don't get coarsened */ if (el->child[0]->mark >= 0 || el->child[1]->mark >= 0) { /*--------------------------------------------------------------------------*/ /* one of the children must not be coarsend; return :-( */ /*--------------------------------------------------------------------------*/ el->mark = 0; return; } if (el->child[0]->child[0] || el->child[1]->child[0]) { /*--------------------------------------------------------------------------*/ /* one of the children is not a leaf element; try again later on */ /*--------------------------------------------------------------------------*/ do_more_coarsen_3d = true; return; } /*--------------------------------------------------------------------------*/ /* get a list for storing all elements at the coarsening edge and fill it */ /*--------------------------------------------------------------------------*/ coarse_list = get_rc_list(mesh); /*--------------------------------------------------------------------------*/ /* give the refinement edge the right orientation */ /*--------------------------------------------------------------------------*/ if (el->dof[0][0] < el->dof[1][0]) { edge[0] = el->dof[0]; edge[1] = el->dof[1]; } else { edge[1] = el->dof[0]; edge[0] = el->dof[1]; } coarse_list[0].el_info = *el_info; coarse_list[0].flag = 1; n_neigh = 1; coarse_list[0].opp_vertex[0] = 0; bound = false; if (get_coarse_patch_3d(elinfo, edge, 0, coarse_list, &n_neigh)) { get_coarse_patch_3d(elinfo, edge, 1, coarse_list, &n_neigh); bound = true; } AI_get_neigh_on_patch_3d(coarse_list, n_neigh, bound); /*--------------------------------------------------------------------------*/ /* check wether we can coarsen the patch or not */ /*--------------------------------------------------------------------------*/ if (do_coarse_patch_3d(mesh, coarse_list, n_neigh)) { coarse_patch_3d(mesh, coarse_list, n_neigh, bound); } free_rc_list(mesh, coarse_list); return; } /*--------------------------------------------------------------------------*/ /* coarsen_3d: */ /* traversal routine for recursive coarsening of a triangulation in 3d */ /*--------------------------------------------------------------------------*/ static U_CHAR coarsen_3d(MESH *mesh) { int n_elements; FLAGS flag = CALL_EVERY_EL_POSTORDER | FILL_NEIGH; const EL_INFO *el_info; n_elements = mesh->n_elements; call_coarse_restrict_3d = count_coarse_restrict(mesh); spread_coarsen_mark_3d(mesh); stack_3d = get_traverse_stack(); do { do_more_coarsen_3d = false; el_info = traverse_first(stack_3d, mesh, -1, flag); while (el_info) { coarsen_fct_3d(el_info); el_info = traverse_next(stack_3d, el_info); } } while (do_more_coarsen_3d); free_traverse_stack(stack_3d); cleanup_after_coarsen_3d(mesh); n_elements -= mesh->n_elements; return(n_elements ? MESH_COARSENED : 0); } alberta-2.0.1/alberta/src/3d/disc_lagrange_0_3d.c0000644000042300001440000003056710676724252016325 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_0_3d.c */ /* */ /* description: piecewise constant discontinuous Lagrange elements in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL d_bary0_3d[1][N_LAMBDA] = {{1.0/4.0, 1.0/4.0, 1.0/4.0, 1.0/4.0}}; static REAL d_phi0c0_3d(const REAL lambda[N_LAMBDA]) { return(1.0); } static const REAL *d_grd_phi0c0_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA]; return(grd); } static const REAL (*d_D2_phi0c0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *d_get_dof_indices0_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[1]; DOF *rvec = idof ? idof : index_vec; int i = admin->mesh->node[CENTER], n0 = admin->n0_dof[CENTER]; DOF **dof = el->dof; rvec[0] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound0_3d(const EL_INFO *el_info, S_CHAR *bound) { static S_CHAR bound_vec[1]; S_CHAR *rvec = bound ? bound : bound_vec; rvec[0] = INTERIOR; return((const S_CHAR *) rvec); } static const int *d_get_int_vec0_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec0_3d"); static int local_vec[1]; int i, n0, *v = nil; int *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *d_get_real_vec0_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_v0_3d"); int i, n0; static REAL local_vec[1]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec0_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_vec0_3d"); int i, k, n0; static REAL_D local_vec[1]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; for (k = 0; k < DIM_OF_WORLD; k++) rvec[0][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec0_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec0_3d"); int i, n0; static U_CHAR local_vec[1]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec0_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec0_3d"); int i, n0; static S_CHAR local_vec[1]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); i = vec->fe_space->admin->mesh->node[CENTER]; n0 = vec->fe_space->admin->n0_dof[CENTER]; rvec[0] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } static const REAL *d_interpol0_3d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("d_interpol0_3d"); static REAL inter[1]; REAL *rvec = vec ? vec : inter; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no == 1), "only for one point!\n"); if(f_loc) rvec[0] = f_loc(el_info, d_bary0_3d[0]); else { if (parametric) { REAL_D world[1]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 1, d_bary0_3d, world); rvec[0] = f(world[0]); } else { REAL_D world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); coord_to_world(el_info, d_bary0_3d[0], world); rvec[0] = f(world); } } return((const REAL *) rvec); } static const REAL_D *d_interpol_d0_3d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("d_interpol_d0_3d"); static REAL_D inter[1]; REAL_D *rvec = vec ? vec : inter; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no == 1), "only for one point!\n"); if(f_loc) f_loc(el_info, d_bary0_3d[0], rvec[0]); else { if (parametric) { REAL_D world[1]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 1, d_bary0_3d, world); f(world[0], rvec[0]); } else { REAL_D world; DEBUG_TEST_FLAG(FILL_COORDS, el_info); coord_to_world(el_info, d_bary0_3d[0], world); f(world, rvec[0]); } } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void d_real_refine_inter0_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter0_3d"); EL *el; REAL *vec = nil; int cdof, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof = el->child[0]->dof[node0][n0]; vec[cdof] = vec[pdof]; cdof = el->child[1]->dof[node0][n0]; vec[cdof] = vec[pdof]; } return; } static void d_real_coarse_inter0_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter0_3d"); EL *el; REAL *vec = nil; int cdof0, cdof1, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; vec[pdof] = 0.5*(vec[cdof0] + vec[cdof1]); } return; } static void d_real_coarse_restr0_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_restr0_3d"); EL *el; REAL *vec = nil; int cdof0, cdof1, pdof, node0, n0, i; if (n < 1) return; GET_DOF_VEC(vec, drv); node0 = drv->fe_space->mesh->node[CENTER]; n0 = drv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; vec[pdof] = vec[cdof0] + vec[cdof1]; } return; } static void d_real_d_refine_inter0_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_d_refine_inter0_3d"); EL *el; REAL_D *vec = nil; int cdof, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof = el->child[0]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof][k] = vec[pdof][k]; cdof = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof][k] = vec[pdof][k]; } return; } static void d_real_d_coarse_inter0_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter0_3d"); EL *el; REAL_D *vec = nil; int cdof0, cdof1, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[pdof][k] = 0.5*(vec[cdof0][k] + vec[cdof1][k]); } return; } static void d_real_d_coarse_restr0_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_d_coarse_restr0_3d"); EL *el; REAL_D *vec = nil; int cdof0, cdof1, pdof, node0, n0, i, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); node0 = drdv->fe_space->mesh->node[CENTER]; n0 = drdv->fe_space->admin->n0_dof[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; pdof = el->dof[node0][n0]; cdof0 = el->child[0]->dof[node0][n0]; cdof1 = el->child[1]->dof[node0][n0]; for (k = 0; k < DIM_OF_WORLD; k++) vec[pdof] [k]= vec[cdof0][k] + vec[cdof1][k]; } return; } static BAS_FCT *d_phi0_3d[1] = {d_phi0c0_3d}; static GRD_BAS_FCT *d_grd_phi0_3d[1] = {d_grd_phi0c0_3d}; static D2_BAS_FCT *d_D2_phi0_3d[1] = {d_D2_phi0c0_3d}; static BAS_FCTS disc_lagrange0_3d = {"disc_lagrange0_3d", 3, 1, 0, {0, 1, 0, 0}, nil, d_phi0_3d, d_grd_phi0_3d, d_D2_phi0_3d, d_get_dof_indices0_3d, d_get_bound0_3d, d_interpol0_3d, d_interpol_d0_3d, d_get_int_vec0_3d, d_get_real_vec0_3d, d_get_real_d_vec0_3d, d_get_uchar_vec0_3d, d_get_schar_vec0_3d, d_real_refine_inter0_3d, d_real_coarse_inter0_3d, d_real_coarse_restr0_3d, d_real_d_refine_inter0_3d, d_real_d_coarse_inter0_3d, d_real_d_coarse_restr0_3d, d_bary0_3d, }; alberta-2.0.1/alberta/src/3d/disc_lagrange_1_3d.c0000644000042300001440000003144410676724252016321 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_1_3d.c */ /* */ /* description: piecewise linear discontinuous Lagrange elements in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL d_bary1_3d[4][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v0_3d(const REAL lambda[N_LAMBDA]) { return(lambda[0]); } static const REAL *d_grd_phi1v0_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v1_3d(const REAL lambda[N_LAMBDA]) { return(lambda[1]); } static const REAL *d_grd_phi1v1_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v1_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v2_3d(const REAL lambda[N_LAMBDA]) { return(lambda[2]); } static const REAL *d_grd_phi1v2_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 0.0, 1.0, 0.0}; return(grd); } static const REAL (*d_D2_phi1v2_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 3 */ /*--------------------------------------------------------------------------*/ static REAL d_phi1v3_3d(const REAL lambda[N_LAMBDA]) { return(lambda[3]); } static const REAL *d_grd_phi1v3_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 0.0, 0.0, 1.0}; return(grd); } static const REAL (*d_D2_phi1v3_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *d_get_dof_indices1_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_VERTICES_3D]; DOF *rvec = idof ? idof : index_vec; int i, n0 = admin->n0_dof[CENTER], node = admin->mesh->node[CENTER]; DOF **dof = el->dof; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = dof[node][n0+i]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound1_3d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("d_get_bound1_3d"); static S_CHAR bound_vec[N_VERTICES_3D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = el_info->vertex_bound[i]; return((const S_CHAR *) rvec); } static const int *d_get_int_vec1_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec1_3d"); int i, n0, node; static int local_vec[N_VERTICES_3D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const int *) rvec); } static const REAL *d_get_real_vec1_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_v1_3d"); int i, n0, node; static REAL local_vec[N_VERTICES_3D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec1_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_v1_3d"); int i, k, n0, node; static REAL_D local_vec[N_VERTICES_3D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_3D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[node][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec1_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec1_3d"); int i, n0, node; static U_CHAR local_vec[N_VERTICES_3D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec1_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec1_3d"); int i, n0, node; static S_CHAR local_vec[N_VERTICES_3D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(d_,1,3,4) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(d_,1,3,4) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void d_real_refine_inter1_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter1_3d"); EL *el, *child; REAL *vec = nil, avg; DOF dofc; U_CHAR type; int i, n0, node; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[CENTER]; node = drv->fe_space->mesh->node[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; avg = 0.5*(vec[el->dof[node][n0+0]] + vec[el->dof[node][n0+1]]); /* --- child 0 --- */ child = el->child[0]; dofc = child->dof[node][n0+0]; vec[dofc] = vec[el->dof[node][n0+0]]; dofc = child->dof[node][n0+1]; vec[dofc] = vec[el->dof[node][n0+2]]; dofc = child->dof[node][n0+2]; vec[dofc] = vec[el->dof[node][n0+3]]; dofc = child->dof[node][n0+3]; /* newest vertex is DIM */ vec[dofc] = avg; /* --- child 1 --- */ child = el->child[1]; dofc = child->dof[node][n0+0]; vec[dofc] = vec[el->dof[node][n0+1]]; #if NEIGH_IN_EL type = list[i].el_info.el->el_type; #else type = list[i].el_info.el_type; #endif if (type == 0) { dofc = child->dof[node][n0+1]; vec[dofc] = vec[el->dof[node][n0+3]]; dofc = child->dof[node][n0+2]; vec[dofc] = vec[el->dof[node][n0+2]]; } else { dofc = child->dof[node][n0+1]; vec[dofc] = vec[el->dof[node][n0+2]]; dofc = child->dof[node][n0+2]; vec[dofc] = vec[el->dof[node][n0+3]]; } dofc = child->dof[node][n0+3]; /* newest vertex is DIM */ vec[dofc] = avg; } return; } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do something */ /*--------------------------------------------------------------------------*/ static void d_real_coarse_inter1_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter1_3d"); EL *el, **child; REAL *vec = nil; U_CHAR type; int i, n0, node; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[CENTER]; node = drv->fe_space->mesh->node[CENTER]; for (i = 0; i < n; i++) { el = list[i].el_info.el; child = el->child; #if NEIGH_IN_EL type = list[i].el_info.el->el_type; #else type = list[i].el_info.el_type; #endif if (type == 0) { vec[el->dof[node][n0+2]] = 0.5* (vec[child[0]->dof[node][n0+1]]+vec[child[1]->dof[node][n0+2]]); vec[el->dof[node][n0+3]] = 0.5* (vec[child[0]->dof[node][n0+2]]+vec[child[1]->dof[node][n0+1]]); } else { vec[el->dof[node][n0+2]] = 0.5* (vec[child[0]->dof[node][n0+1]]+vec[child[1]->dof[node][n0+1]]); vec[el->dof[node][n0+3]] = 0.5* (vec[child[0]->dof[node][n0+2]]+vec[child[1]->dof[node][n0+2]]); } } return; } static BAS_FCT *d_phi1_3d[4] = {d_phi1v0_3d, d_phi1v1_3d, d_phi1v2_3d, d_phi1v3_3d}; static GRD_BAS_FCT *d_grd_phi1_3d[4] = {d_grd_phi1v0_3d, d_grd_phi1v1_3d, d_grd_phi1v2_3d, d_grd_phi1v3_3d}; static D2_BAS_FCT *d_D2_phi1_3d[4] = {d_D2_phi1v0_3d, d_D2_phi1v1_3d, d_D2_phi1v2_3d, d_D2_phi1v3_3d}; static BAS_FCTS disc_lagrange1_3d = {"disc_lagrange1_3d", 3, 4, 1, {0, 4, 0, 0}, nil, d_phi1_3d, d_grd_phi1_3d, d_D2_phi1_3d, d_get_dof_indices1_3d, d_get_bound1_3d, d_interpol1_3d, d_interpol_d1_3d, d_get_int_vec1_3d, d_get_real_vec1_3d, d_get_real_d_vec1_3d, d_get_uchar_vec1_3d, d_get_schar_vec1_3d, d_real_refine_inter1_3d, d_real_coarse_inter1_3d, nil, nil, nil, nil, d_bary1_3d, }; alberta-2.0.1/alberta/src/3d/disc_lagrange_2_3d.c0000644000042300001440000005051210676724252016317 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: disc_lagrange_2_3d.c */ /* */ /* description: piecewise quadratic discontinuous Lagrange elements in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS_3D N_VERTICES_3D+N_EDGES_3D static const REAL d_bary2_3d[N_BAS_3D][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}, {0.5, 0.5, 0.0, 0.0}, {0.5, 0.0, 0.5, 0.0}, {0.5, 0.0, 0.0, 0.5}, {0.0, 0.5, 0.5, 0.0}, {0.0, 0.5, 0.0, 0.5}, {0.0, 0.0, 0.5, 0.5}}; /****************************************************************************/ /* basisfunction at vertex 0 */ /****************************************************************************/ static REAL d_phi2v0_3d(const REAL lambda[N_LAMBDA]) { return(lambda[0]*(2.0*lambda[0] - 1.0)); } static const REAL *d_grd_phi2v0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[0] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 1 */ /****************************************************************************/ static REAL d_phi2v1_3d(const REAL lambda[N_LAMBDA]) { return(lambda[1]*(2.0*lambda[1] - 1.0)); } static const REAL *d_grd_phi2v1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[1] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v1_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 2 */ /****************************************************************************/ static REAL d_phi2v2_3d(const REAL lambda[N_LAMBDA]) { return(lambda[2]*(2.0*lambda[2] - 1.0)); } static const REAL *d_grd_phi2v2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = 4.0*lambda[2] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v2_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 4, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at vertex 3 */ /****************************************************************************/ static REAL d_phi2v3_3d(const REAL lambda[N_LAMBDA]) { return(lambda[3]*(2.0*lambda[3] - 1.0)); } static const REAL *d_grd_phi2v3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[3] = 4.0*lambda[3] - 1.0; return((const REAL *) grd); } static const REAL (*d_D2_phi2v3_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 4}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 0 */ /****************************************************************************/ static REAL d_phi2e0_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[1]); } static const REAL *d_grd_phi2e0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[1]; grd[1] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 4, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 1 */ /****************************************************************************/ static REAL d_phi2e1_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[2]); } static const REAL *d_grd_phi2e1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[2]; grd[2] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e1_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 4, 0}, {0, 0, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 2 */ /****************************************************************************/ static REAL d_phi2e2_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[3]); } static const REAL *d_grd_phi2e2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[3]; grd[3] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e2_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 4}, {0, 0, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 3 */ /****************************************************************************/ static REAL d_phi2e3_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[1]*lambda[2]); } static const REAL *d_grd_phi2e3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[2]; grd[2] = 4.0*lambda[1]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e3_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 4, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 4 */ /****************************************************************************/ static REAL d_phi2e4_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[1]*lambda[3]); } static const REAL *d_grd_phi2e4_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[3]; grd[3] = 4.0*lambda[1]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e4_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 4}, {0, 0, 0, 0}, {0, 4, 0, 0}}; return(D2); } /****************************************************************************/ /* basisfunction at edge 5 */ /****************************************************************************/ static REAL d_phi2e5_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[2]*lambda[3]); } static const REAL *d_grd_phi2e5_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = 4.0*lambda[3]; grd[3] = 4.0*lambda[2]; return((const REAL *) grd); } static const REAL (*d_D2_phi2e5_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 4}, {0, 0, 4, 0}}; return(D2); } /****************************************************************************/ /* functions for combining basisfunctions with coefficients */ /****************************************************************************/ static const DOF *d_get_dof_indices2_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS_3D]; int i, n0, node; DOF *rvec = idof ? idof : index_vec; DOF **dof = el->dof; n0 = admin->n0_dof[CENTER]; node = admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_3D; i++) rvec[i] = dof[node][n0+i]; return((const DOF *) rvec); } static const S_CHAR *d_get_bound2_3d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("d_get_bound2_3d"); static S_CHAR bound_vec[N_BAS_3D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = el_info->vertex_bound[i]; for (i = 0; i < N_EDGES_3D; i++) rvec[N_VERTICES_3D+i] = el_info->edge_bound[i]; return((const S_CHAR *) rvec); } static const int *d_get_int_vec2_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("d_get_int_vec2_3d"); int i, n0, node; static int local_vec[N_BAS_3D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const int *) rvec); } static const REAL *d_get_real_vec2_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("d_get_real_vec2_3d"); int i, n0, node; static REAL local_vec[N_BAS_3D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const REAL *) rvec); } static const REAL_D *d_get_real_d_vec2_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("d_get_real_d_vec2_3d"); int i, k, n0, node; static REAL_D local_vec[N_BAS_3D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_3D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[node][n0+i]][k]; return((const REAL_D *) rvec); } static const U_CHAR *d_get_uchar_vec2_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("d_get_uchar_vec2_3d"); int i, n0, node; static U_CHAR local_vec[N_BAS_3D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const U_CHAR *) rvec); } static const S_CHAR *d_get_schar_vec2_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("d_get_schar_vec2_3d"); int i, n0, node; static S_CHAR local_vec[N_BAS_3D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[CENTER]; node = vec->fe_space->admin->mesh->node[CENTER]; for (i = 0; i < N_BAS_3D; i++) rvec[i] = v[dof[node][n0+i]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(d_,2,3,10) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(d_,2,3,10) /****************************************************************************/ /* functions for interpolation/ restriction during refinement/coarsening */ /****************************************************************************/ static void d_real_refine_inter2_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_refine_inter2_3d"); EL *el; REAL *vec = nil; int node, n0, i; U_CHAR type; const DOF *cdof; DOF pdof[N_BAS_3D]; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; GET_DOF_VEC(vec, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); for (i = 0; i < n; i++) { el = list[i].el_info.el; get_dof_indices(el, admin, pdof); node = drv->fe_space->mesh->node[CENTER]; n0 = admin->n0_dof[CENTER]; /****************************************************************************/ /* values on child[0] */ /****************************************************************************/ cdof = get_dof_indices(el->child[0], admin, nil); vec[cdof[0]] = vec[pdof[0]]; vec[cdof[1]] = vec[pdof[2]]; vec[cdof[2]] = vec[pdof[3]]; vec[cdof[3]] = vec[pdof[4]]; vec[cdof[4]] = vec[pdof[5]]; vec[cdof[5]] = vec[pdof[6]]; vec[cdof[6]] = (0.375*vec[pdof[0]] - 0.125*vec[pdof[1]] + 0.75*vec[pdof[4]]); vec[cdof[7]] = vec[pdof[9]]; vec[cdof[8]] = (0.125*(-vec[pdof[0]] - vec[pdof[1]]) + 0.25*vec[pdof[4]] + 0.5*(vec[pdof[5]] + vec[pdof[7]])); vec[cdof[9]] = (0.125*(-vec[pdof[0]] - vec[pdof[1]]) + 0.25*vec[pdof[4]] + 0.5*(vec[pdof[6]] + vec[pdof[8]])); /****************************************************************************/ /* values on child[1] */ /****************************************************************************/ #if NEIGH_IN_EL type = list[i].el_info.el->el_type; #else type = list[i].el_info.el_type; #endif cdof = get_dof_indices(el->child[1], admin, nil); vec[cdof[0]] = vec[pdof[1]]; if (type == 0) { vec[cdof[1]] = vec[pdof[3]]; vec[cdof[2]] = vec[pdof[2]]; } else { vec[cdof[1]] = vec[pdof[2]]; vec[cdof[2]] = vec[pdof[3]]; } vec[cdof[3]] = vec[pdof[4]]; if (type == 0) { vec[cdof[4]] = vec[pdof[8]]; vec[cdof[5]] = vec[pdof[7]]; } else { vec[cdof[4]] = vec[pdof[7]]; vec[cdof[5]] = vec[pdof[8]]; } vec[cdof[6]] = (0.375*vec[pdof[1]] - 0.125*vec[pdof[0]] + 0.75*vec[pdof[4]]); vec[cdof[7]] = vec[pdof[9]]; if (type == 0) { vec[cdof[8]] = (0.125*(-vec[pdof[0]] - vec[pdof[1]]) + 0.25*vec[pdof[4]] + 0.5*(vec[pdof[6]] + vec[pdof[8]])); vec[cdof[9]] = (0.125*(-vec[pdof[0]] - vec[pdof[1]]) + 0.25*vec[pdof[4]] + 0.5*(vec[pdof[5]] + vec[pdof[7]])); } else { vec[cdof[8]] = (0.125*(-vec[pdof[0]] - vec[pdof[1]]) + 0.25*vec[pdof[4]] + 0.5*(vec[pdof[5]] + vec[pdof[7]])); vec[cdof[9]] = (0.125*(-vec[pdof[0]] - vec[pdof[1]]) + 0.25*vec[pdof[4]] + 0.5*(vec[pdof[6]] + vec[pdof[8]])); } } return; } static void d_real_coarse_inter2_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("d_real_coarse_inter2_3d"); EL *el; REAL *v = nil; U_CHAR type; DOF pdof[N_BAS_3D], cdof0[N_BAS_3D], cdof1[N_BAS_3D]; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; MESH *mesh = nil; int i; if (n < 1) return; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); GET_STRUCT(mesh,drv->fe_space); for (i = 0; i < n; i++) { el = list[i].el_info.el; #if NEIGH_IN_EL type = el->el_type; #else type = list[i].el_info.el_type; #endif get_dof_indices(el, admin, pdof); get_dof_indices(el->child[0], admin, cdof0); get_dof_indices(el->child[1], admin, cdof1); v[pdof[0]] = v[cdof0[0]]; v[pdof[1]] = v[cdof1[0]]; v[pdof[2]] = 0.5 * (v[cdof0[1]] + v[cdof1[ type ? 1 : 2 ]]); v[pdof[3]] = 0.5 * (v[cdof0[2]] + v[cdof1[ type ? 2 : 1 ]]); v[pdof[4]] = 0.5 * (v[cdof0[3]] + v[cdof1[3]]); v[pdof[5]] = 0.5 * (v[cdof0[9]] + v[cdof1[ type ? 9 : 8 ]]); v[pdof[6]] = v[cdof0[5]]; v[pdof[7]] = v[cdof1[ type ? 4 : 5]]; v[pdof[8]] = v[cdof1[ type ? 5 : 4]]; v[pdof[9]] = 0.5 * (v[cdof0[7]] + v[cdof1[7]]); } return; } static BAS_FCT *d_phi2_3d[N_BAS_3D] = {d_phi2v0_3d, d_phi2v1_3d, d_phi2v2_3d, d_phi2v3_3d, d_phi2e0_3d, d_phi2e1_3d, d_phi2e2_3d, d_phi2e3_3d, d_phi2e4_3d, d_phi2e5_3d}; static GRD_BAS_FCT *d_grd_phi2_3d[N_BAS_3D] = {d_grd_phi2v0_3d, d_grd_phi2v1_3d, d_grd_phi2v2_3d, d_grd_phi2v3_3d, d_grd_phi2e0_3d, d_grd_phi2e1_3d, d_grd_phi2e2_3d, d_grd_phi2e3_3d, d_grd_phi2e4_3d, d_grd_phi2e5_3d}; static D2_BAS_FCT *d_D2_phi2_3d[N_BAS_3D] = {d_D2_phi2v0_3d, d_D2_phi2v1_3d, d_D2_phi2v2_3d, d_D2_phi2v3_3d, d_D2_phi2e0_3d, d_D2_phi2e1_3d, d_D2_phi2e2_3d, d_D2_phi2e3_3d, d_D2_phi2e4_3d, d_D2_phi2e5_3d}; static BAS_FCTS disc_lagrange2_3d = {"disc_lagrange2_3d", 3, N_BAS_3D, 2, {0, N_BAS_3D, 0, 0}, nil, d_phi2_3d, d_grd_phi2_3d, d_D2_phi2_3d, d_get_dof_indices2_3d, d_get_bound2_3d, d_interpol2_3d, d_interpol_d2_3d, d_get_int_vec2_3d, d_get_real_vec2_3d, d_get_real_d_vec2_3d, d_get_uchar_vec2_3d, d_get_schar_vec2_3d, d_real_refine_inter2_3d, d_real_coarse_inter2_3d, nil, nil, nil, nil, d_bary2_3d, }; #undef N_BAS_3D alberta-2.0.1/alberta/src/3d/element_3d.c0000644000042300001440000003143210676724252014745 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: element.c */ /* */ /* */ /* description: routines on elements that depend on the dimension in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /*--------------------------------------------------------------------------*/ /* world_to_coord_3d(): return -1 if inside, otherwise index of lambda<0 */ /*--------------------------------------------------------------------------*/ int world_to_coord_3d(const EL_INFO *el_info, const REAL *xy, REAL_B lambda) { FUNCNAME("world_to_coord_3d"); REAL edge[3][DIM_OF_WORLD], x[DIM_OF_WORLD]; REAL x0, det, det0, det1, det2, adet, lmin; int i, j, k; DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->world_to_coord() to access the parametric mesh\n"); /* wir haben das gleichungssystem zu loesen: */ /* ( q1x q2x q3x) (lambda1) (qx) */ /* ( q1y q2y q3y) (lambda2) = (qy) */ /* ( q1z q2z q3z) (lambda3) (qz) */ /* mit qi=pi-p3, q=xy-p3 */ for (j=0; jcoord[3][j]; x[j] = xy[j] - x0; for (i=0; i<3; i++) edge[i][j] = el_info->coord[i][j] - x0; } det = edge[0][0] * edge[1][1] * edge[2][2] + edge[0][1] * edge[1][2] * edge[2][0] + edge[0][2] * edge[1][0] * edge[2][1] - edge[0][2] * edge[1][1] * edge[2][0] - edge[0][0] * edge[1][2] * edge[2][1] - edge[0][1] * edge[1][0] * edge[2][2]; det0 = x[0] * edge[1][1] * edge[2][2] + x[1] * edge[1][2] * edge[2][0] + x[2] * edge[1][0] * edge[2][1] - x[2] * edge[1][1] * edge[2][0] - x[0] * edge[1][2] * edge[2][1] - x[1] * edge[1][0] * edge[2][2]; det1 = edge[0][0] * x[1] * edge[2][2] + edge[0][1] * x[2] * edge[2][0] + edge[0][2] * x[0] * edge[2][1] - edge[0][2] * x[1] * edge[2][0] - edge[0][0] * x[2] * edge[2][1] - edge[0][1] * x[0] * edge[2][2]; det2 = edge[0][0] * edge[1][1] * x[2] + edge[0][1] * edge[1][2] * x[0] + edge[0][2] * edge[1][0] * x[1] - edge[0][2] * edge[1][1] * x[0] - edge[0][0] * edge[1][2] * x[1] - edge[0][1] * edge[1][0] * x[2]; adet = ABS(det); if (adet < 1.E-20) { ERROR_EXIT("det = %le; abort\n", det); return(-2); } lambda[0] = det0 / det; lambda[1] = det1 / det; lambda[2] = det2 / det; lambda[3] = 1.0 - lambda[0] - lambda[1] - lambda[2]; k = -1; lmin = 0.0; j = 0; for (i = 0; i <= 3; i++) { if ((lambda[i]*adet) < -1.E-15) { if (lambda[i] < lmin) { k = i; lmin = lambda[i]; } j++; } } return(k); } /*--------------------------------------------------------------------------*/ /* transform local coordinates l to world coordinates; if w is non nil */ /* store them at w otherwise return a pointer to some local static */ /* area containing world coordintes */ /*--------------------------------------------------------------------------*/ const REAL *coord_to_world_3d(const EL_INFO *el_info, const REAL *l, REAL_D w) { FUNCNAME("coord_to_world_3d"); static REAL_D world; REAL *ret; int i; #if DIM_OF_WORLD < 3 ERROR_EXIT("Does not make sense for DIM_OF_WORLD < 3!\n"); #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->coord_to_world() to access the parametric mesh\n"); ret = w ? w : world; for(i = 0; i < DIM_OF_WORLD; i++) ret[i] = el_info->coord[0][i] * l[0] + el_info->coord[1][i] * l[1] + el_info->coord[2][i] * l[2] + el_info->coord[3][i] * l[3]; return((const REAL *) ret); } /*--------------------------------------------------------------------------*/ /* compute volume of an element */ /*--------------------------------------------------------------------------*/ REAL el_det_3d(const EL_INFO *el_info) { FUNCNAME("el_det_3d"); REAL e1[DIM_OF_WORLD], e2[DIM_OF_WORLD], e3[DIM_OF_WORLD], det; int i; const REAL *v0; #if DIM_OF_WORLD < 3 ERROR_EXIT("Does not make sense for DIM_OF_WORLD < 3!\n"); #endif DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->el_det() to access the parametric mesh\n"); v0 = el_info->coord[0]; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = el_info->coord[1][i] - v0[i]; e2[i] = el_info->coord[2][i] - v0[i]; e3[i] = el_info->coord[3][i] - v0[i]; } det = e1[0] * (e2[1]*e3[2] - e2[2]*e3[1]) - e1[1] * (e2[0]*e3[2] - e2[2]*e3[0]) + e1[2] * (e2[0]*e3[1] - e2[1]*e3[0]); det = ABS(det); return(det); } REAL el_volume_3d(const EL_INFO *el_info) { return el_det_3d(el_info) / 6.0; } /*--------------------------------------------------------------------------*/ /* compute gradients of basis functions on element */ /* - returns abs(determinant) */ /*--------------------------------------------------------------------------*/ REAL el_grd_lambda_3d(const EL_INFO *el_info, REAL grd_lam[N_LAMBDA][DIM_OF_WORLD]) { FUNCNAME("el_grd_lambda_3d"); int i, j; REAL e1[DIM_OF_WORLD], e2[DIM_OF_WORLD], e3[DIM_OF_WORLD]; const REAL *v0; REAL det, adet; REAL a11, a12, a13, a21, a22, a23, a31, a32, a33; DEBUG_TEST_FLAG(FILL_COORDS, el_info); DEBUG_TEST_EXIT(!el_info->mesh->parametric || el_info->mesh->parametric->use_reference_mesh, "You must enable the use_reference_mesh entry in the PARAMETRIC structure to use this function on the reference mesh. Use parametric->grd_lambda() to access the parametric mesh\n"); v0 = el_info->coord[0]; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = el_info->coord[1][i] - v0[i]; e2[i] = el_info->coord[2][i] - v0[i]; e3[i] = el_info->coord[3][i] - v0[i]; } #if DIM_OF_WORLD == 3 det = e1[0] * (e2[1]*e3[2] - e2[2]*e3[1]) - e1[1] * (e2[0]*e3[2] - e2[2]*e3[0]) + e1[2] * (e2[0]*e3[1] - e2[1]*e3[0]); adet = ABS(det); if (adet < 1.0E-25) { MSG("abs(det) = %lf\n",adet); for (i = 0; i < N_VERTICES_3D; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lam[i][j] = 0.0; } else { det = 1.0 / det; a11 = (e2[1]*e3[2] - e2[2]*e3[1]) * det; /* (a_ij) = A^{-T} */ a12 = (e2[2]*e3[0] - e2[0]*e3[2]) * det; a13 = (e2[0]*e3[1] - e2[1]*e3[0]) * det; a21 = (e1[2]*e3[1] - e1[1]*e3[2]) * det; a22 = (e1[0]*e3[2] - e1[2]*e3[0]) * det; a23 = (e1[1]*e3[0] - e1[0]*e3[1]) * det; a31 = (e1[1]*e2[2] - e1[2]*e2[1]) * det; a32 = (e1[2]*e2[0] - e1[0]*e2[2]) * det; a33 = (e1[0]*e2[1] - e1[1]*e2[0]) * det; grd_lam[1][0] = a11; grd_lam[1][1] = a12; grd_lam[1][2] = a13; grd_lam[2][0] = a21; grd_lam[2][1] = a22; grd_lam[2][2] = a23; grd_lam[3][0] = a31; grd_lam[3][1] = a32; grd_lam[3][2] = a33; grd_lam[0][0] = -grd_lam[1][0] -grd_lam[2][0] -grd_lam[3][0]; grd_lam[0][1] = -grd_lam[1][1] -grd_lam[2][1] -grd_lam[3][1]; grd_lam[0][2] = -grd_lam[1][2] -grd_lam[2][2] -grd_lam[3][2]; } #else ERROR_EXIT("Does not make sense for DIM_OF_WORLD < 3!\n"); #endif return(adet); } /*--------------------------------------------------------------------------*/ /* calculate a normal to a triangular face side of a tetrahedron with */ /* coordinates coord; return the absolute value of the determinant from */ /* the transformation to the reference element */ /*--------------------------------------------------------------------------*/ REAL get_wall_normal_3d(const EL_INFO *el_info, int i0, REAL *normal) { FUNCNAME("get_wall_normal_3d"); #if DIM_OF_WORLD == 3 static int ind[7] = {0, 1, 2, 3, 0, 1, 2}; REAL det, scale; int n, i1 = ind[i0+1], i2 = ind[i0+2], i3 = ind[i0+3]; const REAL_D *coord = el_info->coord; REAL_D e0, e1, e2; DEBUG_TEST_FLAG(FILL_COORDS, el_info); for (n = 0; n < DIM_OF_WORLD; n++) { e0[n] = coord[i2][n] - coord[i1][n]; e1[n] = coord[i3][n] - coord[i1][n]; e2[n] = coord[i0][n] - coord[i1][n]; } WEDGE_DOW(e0, e1, normal); det = NORM_DOW(normal); TEST_EXIT(det > 1.e-30, "det = 0 on face %d\n", i0); scale = SCP_DOW(e2,normal) < 0.0 ? 1.0/det : -1.0/det; AX_DOW(scale, normal); return(det); #else MSG("not implemented for DIM_OF_WORLD = %d in 3d\n", DIM_OF_WORLD); return(-1.0); #endif } /*--------------------------------------------------------------------------*/ /* orient the vertices of walls */ /* used by estimator for the jumps => same quadrature nodes from both sides!*/ /*--------------------------------------------------------------------------*/ int *sorted_wall_indices_3d(int wall, int permno) { /* FUNCNAME("sorted_wall_indices_3d"); */ static int sorted[4][6][3] = {{{1,3,2}, {2,1,3}, {1,2,3}, {3,2,1}, {3,1,2}, {2,3,1}}, {{0,3,2}, {2,0,3}, {0,2,3}, {3,2,0}, {3,0,2}, {2,3,0}}, {{0,3,1}, {1,0,3}, {0,1,3}, {3,1,0}, {3,0,1}, {1,3,0}}, {{0,2,1}, {1,0,2}, {0,1,2}, {2,1,0}, {2,0,1}, {1,2,0}}}; return sorted[wall][permno]; } int wall_orientation_3d(const EL *el, int wall, int **vec) { FUNCNAME("wall_orientation_3d"); static int vertex_of_wall[4][3] = {{1,2,3}, {0,2,3}, {0,1,3}, {0,1,2}}; int no; int *vof = vertex_of_wall[wall]; DOF **dof = el->dof; no = -1; if (dof[vof[0]][0] < dof[vof[1]][0]) no++; if (dof[vof[1]][0] < dof[vof[2]][0]) no += 2; if (dof[vof[2]][0] < dof[vof[0]][0]) no += 4; if (no >= 0 && no <= 5) { if (vec) *vec = sorted_wall_indices_3d(wall, no); } else { ERROR_EXIT("cannot sort wall indices of element %d at wall %d\n", INDEX(el), wall); } return no; } int *sort_wall_indices_3d(const EL *el, int wall, int *vec) { /* FUNCNAME("sort_wall_indices_3d"); */ int i, *val = nil; (void)wall_orientation_3d(el, wall, &val); if (vec) { for (i = 0; i < 3; i++) vec[i] = val[i]; return val; } else { return vec; } } alberta-2.0.1/alberta/src/3d/lagrange_1_3d.c0000644000042300001440000003560710676724252015324 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_1_3d.c */ /* */ /* description: piecewise linear Lagrange elements in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ static const REAL bary1_3d[4][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi1v0_3d(const REAL lambda[N_LAMBDA]) { return(lambda[0]); } static const REAL *grd_phi1v0_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {1.0, 0.0, 0.0, 0.0}; return(grd); } static const REAL (*D2_phi1v0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi1v1_3d(const REAL lambda[N_LAMBDA]) { return(lambda[1]); } static const REAL *grd_phi1v1_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 1.0, 0.0, 0.0}; return(grd); } static const REAL (*D2_phi1v1_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi1v2_3d(const REAL lambda[N_LAMBDA]) { return(lambda[2]); } static const REAL *grd_phi1v2_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 0.0, 1.0, 0.0}; return(grd); } static const REAL (*D2_phi1v2_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 3 */ /*--------------------------------------------------------------------------*/ static REAL phi1v3_3d(const REAL lambda[N_LAMBDA]) { return(lambda[3]); } static const REAL *grd_phi1v3_3d(const REAL lambda[N_LAMBDA]) { static const REAL grd[N_LAMBDA] = {0.0, 0.0, 0.0, 1.0}; return(grd); } static const REAL (*D2_phi1v3_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA]; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *get_dof_indices1_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_VERTICES_3D]; DOF *rvec = idof ? idof : index_vec; int i, n0 = admin->n0_dof[VERTEX]; DOF **dof = el->dof; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound1_3d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound1_3d"); static S_CHAR bound_vec[N_VERTICES_3D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = el_info->vertex_bound[i]; return((const S_CHAR *) rvec); } static const int *get_int_vec1_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec1_3d"); int i, n0; static int local_vec[N_VERTICES_3D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *get_real_vec1_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_v1_3d"); int i, n0; static REAL local_vec[N_VERTICES_3D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec1_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_v1_3d"); int i, k, n0; static REAL_D local_vec[N_VERTICES_3D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec1_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec1_3d"); int i, n0; static U_CHAR local_vec[N_VERTICES_3D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec1_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec1_3d"); int i, n0; static S_CHAR local_vec[N_VERTICES_3D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } static const REAL *interpol1_3d(const EL_INFO *el_info, int no, const int *b_no, REAL (*f)(const REAL_D), REAL (*f_loc)(const EL_INFO *, const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("interpol1_3d"); static REAL inter[N_VERTICES_3D]; REAL *rvec = vec ? vec : inter; int i; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= N_VERTICES_3D), "not for %d points\n", no); if(f_loc) for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = f_loc(el_info, bary1_3d[i]); else { if (parametric) { REAL_D world[N_VERTICES_3D]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES_3D, bary1_3d, world); for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = f(world[i]); } else { /* Vertex coordinates do not have to be calculated. */ DEBUG_TEST_FLAG(FILL_COORDS, el_info); rvec[0] = f(el_info->coord[0]); rvec[1] = f(el_info->coord[1]); rvec[2] = f(el_info->coord[2]); rvec[3] = f(el_info->coord[3]); } } if(b_no) { /* Perform resorting if only certain indices are required. */ REAL tmp[N_VERTICES_3D]; memcpy(tmp, rvec, N_VERTICES_3D * sizeof(REAL)); for(i = 0; i < no; i++) rvec[i] = tmp[b_no[i]]; } return((const REAL *) rvec); } static const REAL_D *interpol_d1_3d(const EL_INFO *el_info, int no, const int *b_no, const REAL *(*f)(const REAL_D, REAL_D), const REAL *(*f_loc)(const EL_INFO *, const REAL [N_LAMBDA], REAL_D), REAL_D *vec) { FUNCNAME("interpol_d1_2d"); static REAL_D inter[N_VERTICES_2D]; REAL_D *rvec = vec ? vec : inter; int i; const PARAMETRIC *parametric = el_info->mesh->parametric; DEBUG_TEST_EXIT(!b_no || (no > 0 && no <= N_VERTICES_3D), "not for %d points\n", no); if(f_loc) for (i = 0; i < N_VERTICES_3D; i++) f_loc(el_info, bary1_3d[i], rvec[i]); else { if (parametric) { REAL_D world[N_VERTICES_3D]; parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, N_VERTICES_3D, bary1_3d, world); for (i = 0; i < N_VERTICES_3D; i++) f(world[i], rvec[i]); } else { /* Vertex coordinates do not have to be calculated. */ DEBUG_TEST_FLAG(FILL_COORDS, el_info); f(el_info->coord[0], rvec[0]); f(el_info->coord[1], rvec[1]); f(el_info->coord[2], rvec[2]); f(el_info->coord[3], rvec[3]); } } if(b_no) { /* Perform resorting if only certain indices are required. */ REAL_D tmp[N_VERTICES_3D]; memcpy(tmp, rvec, N_VERTICES_3D * sizeof(REAL_D)); for(i = 0; i < no; i++) COPY_DOW(tmp[b_no[i]], rvec[i]); } return((const REAL_D *) rvec); } /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void real_refine_inter1_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter1_3d"); EL *el; REAL *vec = nil; DOF dof_new, dof0, dof1; int n0; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[3][n0]; /* newest vertex is dim */ vec[dof_new] = 0.5*(vec[dof0] + vec[dof1]); } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do nothing */ /*--------------------------------------------------------------------------*/ static void real_coarse_restr1_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr1_3d"); EL *el; REAL *vec = nil; DOF dof_new, dof0, dof1; int n0; if (n < 1) return; GET_DOF_VEC(vec, drv); n0 = drv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[3][n0]; /* newest vertex is DIM */ vec[dof0] += 0.5*vec[dof_new]; vec[dof1] += 0.5*vec[dof_new]; return; } static void real_d_refine_inter1_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter1_3d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; int n0, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[3][n0]; /* newest vertex is DIM */ for (k = 0; k < DIM_OF_WORLD; k++) vec[dof_new][k] = 0.5*(vec[dof0][k] + vec[dof1][k]); } /*--------------------------------------------------------------------------*/ /* linear interpolation during coarsening: do nothing */ /*--------------------------------------------------------------------------*/ static void real_d_coarse_restr1_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr1_3d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; int n0, k; if (n < 1) return; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[3][n0]; /* newest vertex is DIM */ for (k = 0; k < DIM_OF_WORLD; k++) { vec[dof0][k] += 0.5*vec[dof_new][k]; vec[dof1][k] += 0.5*vec[dof_new][k]; } return; } static BAS_FCT *phi1_3d[4] = {phi1v0_3d, phi1v1_3d, phi1v2_3d, phi1v3_3d}; static GRD_BAS_FCT *grd_phi1_3d[4] = {grd_phi1v0_3d, grd_phi1v1_3d, grd_phi1v2_3d, grd_phi1v3_3d}; static D2_BAS_FCT *D2_phi1_3d[4] = {D2_phi1v0_3d, D2_phi1v1_3d, D2_phi1v2_3d, D2_phi1v3_3d}; static const BAS_FCTS lagrange1_3d = {"lagrange1_3d", 3, 4, 1, {1,0,0,0}, /* VERTEX,CENTER,EDGE,FACE */ nil, phi1_3d, grd_phi1_3d, D2_phi1_3d, get_dof_indices1_3d, get_bound1_3d, interpol1_3d, interpol_d1_3d, get_int_vec1_3d, get_real_vec1_3d, get_real_d_vec1_3d, get_uchar_vec1_3d, get_schar_vec1_3d, real_refine_inter1_3d, nil, real_coarse_restr1_3d, real_d_refine_inter1_3d, nil, real_d_coarse_restr1_3d, bary1_3d,}; alberta-2.0.1/alberta/src/3d/lagrange_2_3d.c0000644000042300001440000007452410676724252015326 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_2_3d.c */ /* */ /* description: piecewise quadratic Lagrange elements in 2d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS2_3D 10 static const REAL bary2_3d[N_BAS2_3D][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}, {0.5, 0.5, 0.0, 0.0}, {0.5, 0.0, 0.5, 0.0}, {0.5, 0.0, 0.0, 0.5}, {0.0, 0.5, 0.5, 0.0}, {0.0, 0.5, 0.0, 0.5}, {0.0, 0.0, 0.5, 0.5}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi2v0_3d(const REAL lambda[N_LAMBDA]) { return(lambda[0]*(2.0*lambda[0] - 1.0)); } static const REAL *grd_phi2v0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[0] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi2v1_3d(const REAL lambda[N_LAMBDA]) { return(lambda[1]*(2.0*lambda[1] - 1.0)); } static const REAL *grd_phi2v1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[1] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v1_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi2v2_3d(const REAL lambda[N_LAMBDA]) { return(lambda[2]*(2.0*lambda[2] - 1.0)); } static const REAL *grd_phi2v2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = 4.0*lambda[2] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v2_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 4, 0}, {0, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 3 */ /*--------------------------------------------------------------------------*/ static REAL phi2v3_3d(const REAL lambda[N_LAMBDA]) { return(lambda[3]*(2.0*lambda[3] - 1.0)); } static const REAL *grd_phi2v3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[3] = 4.0*lambda[3] - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi2v3_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 4}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi2e0_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[1]); } static const REAL *grd_phi2e0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[1]; grd[1] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi2e0_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 4, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi2e1_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[2]); } static const REAL *grd_phi2e1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[2]; grd[2] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi2e1_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 4, 0}, {0, 0, 0, 0}, {4, 0, 0, 0}, {0, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi2e2_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[0]*lambda[3]); } static const REAL *grd_phi2e2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 4.0*lambda[3]; grd[3] = 4.0*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi2e2_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 4}, {0, 0, 0, 0}, {0, 0, 0, 0}, {4, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at edge 3 */ /*--------------------------------------------------------------------------*/ static REAL phi2e3_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[1]*lambda[2]); } static const REAL *grd_phi2e3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[2]; grd[2] = 4.0*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi2e3_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 4, 0}, {0, 4, 0, 0}, {0, 0, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at edge 4 */ /*--------------------------------------------------------------------------*/ static REAL phi2e4_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[1]*lambda[3]); } static const REAL *grd_phi2e4_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 4.0*lambda[3]; grd[3] = 4.0*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi2e4_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 4}, {0, 0, 0, 0}, {0, 4, 0, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at edge 5 */ /*--------------------------------------------------------------------------*/ static REAL phi2e5_3d(const REAL lambda[N_LAMBDA]) { return(4.0*lambda[2]*lambda[3]); } static const REAL *grd_phi2e5_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = 4.0*lambda[3]; grd[3] = 4.0*lambda[2]; return((const REAL *) grd); } static const REAL (*D2_phi2e5_3d(const REAL *lambda))[N_LAMBDA] { static const REAL D2[N_LAMBDA][N_LAMBDA] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 4}, {0, 0, 4, 0}}; return(D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *get_dof_indices2_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_VERTICES_3D+N_EDGES_3D]; int i, n0; DOF *rvec = idof ? idof : index_vec; DOF **dof = el->dof; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = dof[i][n0]; n0 = admin->n0_dof[EDGE]; for (i = N_VERTICES_3D; i < N_VERTICES_3D+N_EDGES_3D; i++) rvec[i] = dof[i][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound2_3d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound2_3d"); static S_CHAR bound_vec[N_VERTICES_3D+N_EDGES_3D]; S_CHAR *rvec = bound ? bound : bound_vec; int i; DEBUG_TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = el_info->vertex_bound[i]; for (i = 0; i < N_EDGES_3D; i++) rvec[N_VERTICES_3D+i] = el_info->edge_bound[i]; return((const S_CHAR *) rvec); } static const int *get_int_vec2_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec2_3d"); int i, n0; static int local_vec[N_VERTICES_3D+N_EDGES_3D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_3D; i < N_VERTICES_3D+N_EDGES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const int *) rvec); } static const REAL *get_real_vec2_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_vec2_3d"); int i, n0; static REAL local_vec[N_VERTICES_3D+N_EDGES_3D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_3D; i < N_VERTICES_3D+N_EDGES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec2_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_vec2_3d"); int i, k, n0; static REAL_D local_vec[N_BAS2_3D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_3D; i < N_VERTICES_3D+N_EDGES_3D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec2_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec2_3d"); int i, n0; static U_CHAR local_vec[N_VERTICES_3D+N_EDGES_3D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_3D; i < N_VERTICES_3D+N_EDGES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec2_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec2_3d"); int i, n0; static S_CHAR local_vec[N_VERTICES_3D+N_EDGES_3D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = N_VERTICES_3D; i < N_VERTICES_3D+N_EDGES_3D; i++) rvec[i] = v[dof[i][n0]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,2,3,10) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,2,3,10) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void real_refine_inter2_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter2_3d"); EL *el; REAL *v = nil; const DOF *cdof; DOF pdof[N_BAS2_3D], cdofi; int i, lr_set; int node0, n0; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); node0 = drv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[cdof[3]] = (v[pdof[4]]); v[cdof[6]] = (0.375*v[pdof[0]] - 0.125*v[pdof[1]] + 0.75*v[pdof[4]]); v[cdof[8]] = (0.125*(-v[pdof[0]] - v[pdof[1]]) + 0.25*v[pdof[4]] + 0.5*(v[pdof[5]] + v[pdof[7]])); v[cdof[9]] = (0.125*(-v[pdof[0]] - v[pdof[1]]) + 0.25*v[pdof[4]] + 0.5*(v[pdof[6]] + v[pdof[8]])); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdofi = el->child[1]->dof[node0+2][n0]; v[cdofi] = (-0.125*v[pdof[0]] + 0.375*v[pdof[1]] + 0.75*v[pdof[4]]); /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; get_dof_indices(el, admin, pdof); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ switch (lr_set) { case 1: cdofi = el->child[0]->dof[node0+4][n0]; v[cdofi] = (0.125*(-v[pdof[0]] - v[pdof[1]]) + 0.25*v[pdof[4]] + 0.5*(v[pdof[5]] + v[pdof[7]])); break; case 2: cdofi = el->child[0]->dof[node0+5][n0]; v[cdofi] = (0.125*(-v[pdof[0]] - v[pdof[1]]) + 0.25*v[pdof[4]] + 0.5*(v[pdof[6]] + v[pdof[8]])); } } return; } static void real_coarse_inter2_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter2_3d"); EL *el; REAL *v = nil; int cdof, pdof; const DOF_ADMIN *admin; MESH *mesh = nil; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } GET_STRUCT(admin,drv->fe_space); GET_STRUCT(mesh,drv->fe_space); cdof = el->child[0]->dof[mesh->node[VERTEX]+3][admin->n0_dof[VERTEX]]; pdof = el->dof[mesh->node[EDGE]][admin->n0_dof[EDGE]]; v[pdof] = v[cdof]; return; } static void real_coarse_restr2_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr2_3d"); EL *el; REAL *v = nil; const DOF *cdof; DOF pdof[N_BAS2_3D], cdofi; int i, lr_set; int node0, n0; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pdof); node0 = drv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); v[pdof[0]] += (0.375*v[cdof[6]] + 0.125*(-v[cdof[8]] - v[cdof[9]])); v[pdof[1]] += (0.125*(-v[cdof[6]] - v[cdof[8]] - v[cdof[9]])); v[pdof[4]] = (v[cdof[3]] + 0.75*v[cdof[6]] + 0.25*(v[cdof[8]] + v[cdof[9]])); v[pdof[5]] += (0.5*v[cdof[8]]); v[pdof[6]] += (0.5*v[cdof[9]]); v[pdof[7]] += (0.5*v[cdof[8]]); v[pdof[8]] += (0.5*v[cdof[9]]); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[1], admin, nil); cdofi = el->child[1]->dof[node0+2][n0]; v[pdof[0]] += (-0.125*v[cdofi]); v[pdof[1]] += (0.375*v[cdofi]); v[pdof[4]] += (0.75*v[cdofi]); /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; get_dof_indices(el, admin, pdof); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cdof = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: cdofi = el->child[0]->dof[node0+4][n0]; v[pdof[0]] += (-0.125*v[cdofi]); v[pdof[1]] += (-0.125*v[cdofi]); v[pdof[4]] += (0.25*v[cdofi]); v[pdof[5]] += (0.5*v[cdofi]); v[pdof[7]] += (0.5*v[cdofi]); break; case 2: cdofi = el->child[0]->dof[node0+5][n0]; v[pdof[0]] += (-0.125*v[cdofi]); v[pdof[1]] += (-0.125*v[cdofi]); v[pdof[4]] += (0.25*v[cdofi]); v[pdof[6]] += (0.5*v[cdofi]); v[pdof[8]] += (0.5*v[cdofi]); break; } } return; } static void real_d_refine_inter2_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter2_3d"); EL *el; REAL_D *v = nil; const DOF *cd; DOF pd[N_BAS2_3D], cdi; int i, k, lr_set; int node0, n0; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); node0 = drdv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[3]][k] = (v[pd[4]][k]); v[cd[6]][k] = (0.375*v[pd[0]][k] - 0.125*v[pd[1]][k] + 0.75*v[pd[4]][k]); v[cd[8]][k] = (0.125*(-v[pd[0]][k] - v[pd[1]][k]) + 0.25*v[pd[4]][k] + 0.5*(v[pd[5]][k] + v[pd[7]][k])); v[cd[9]][k] = (0.125*(-v[pd[0]][k] - v[pd[1]][k]) + 0.25*v[pd[4]][k] + 0.5*(v[pd[6]][k] + v[pd[8]][k])); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cdi = el->child[1]->dof[node0+2][n0]; for (k = 0; k < DIM_OF_WORLD; k++) v[cdi][k] = (-0.125*v[pd[0]][k] + 0.375*v[pd[1]][k] + 0.75*v[pd[4]][k]); /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ switch (lr_set) { case 1: cdi = el->child[0]->dof[node0+4][n0]; for (k = 0; k < DIM_OF_WORLD; k++) v[cdi][k] = (0.125*(-v[pd[0]][k] - v[pd[1]][k]) + 0.25*v[pd[4]][k] + 0.5*(v[pd[5]][k] + v[pd[7]][k])); break; case 2: cdi = el->child[0]->dof[node0+5][n0]; for (k = 0; k < DIM_OF_WORLD; k++) v[cdi][k] = (0.125*(-v[pd[0]][k] - v[pd[1]][k]) + 0.25*v[pd[4]][k] + 0.5*(v[pd[6]][k] + v[pd[8]][k])); } } return; } static void real_d_coarse_inter2_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_inter2_3d"); EL *el; REAL_D *v = nil; int cd, pd, k; const DOF_ADMIN *admin; MESH *mesh = nil; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } GET_STRUCT(admin,drdv->fe_space); GET_STRUCT(mesh,drdv->fe_space); cd = el->child[0]->dof[mesh->node[VERTEX]+3][admin->n0_dof[VERTEX]]; pd = el->dof[mesh->node[EDGE]][admin->n0_dof[EDGE]]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; return; } static void real_d_coarse_restr2_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr2_3d"); EL *el; REAL_D *v = nil; const DOF *cd; DOF pd[N_BAS2_3D], cdi; int i, k, lr_set; int node0, n0; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); node0 = drdv->fe_space->mesh->node[EDGE]; n0 = admin->n0_dof[EDGE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.375*v[cd[6]][k] + 0.125*(-v[cd[8]][k] - v[cd[9]][k])); v[pd[1]][k] += (0.125*(-v[cd[6]][k] - v[cd[8]][k] - v[cd[9]][k])); v[pd[4]][k] = (v[cd[3]][k] + 0.75*v[cd[6]][k] + 0.25*(v[cd[8]][k] + v[cd[9]][k])); v[pd[5]][k] += (0.5*v[cd[8]][k]); v[pd[6]][k] += (0.5*v[cd[9]][k]); v[pd[7]][k] += (0.5*v[cd[8]][k]); v[pd[8]][k] += (0.5*v[cd[9]][k]); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); cdi = el->child[1]->dof[node0+2][n0]; for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (-0.125*v[cdi][k]); v[pd[1]][k] += (0.375*v[cdi][k]); v[pd[4]][k] += (0.75*v[cdi][k]); } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: cdi = el->child[0]->dof[node0+4][n0]; for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (-0.125*v[cdi][k]); v[pd[1]][k] += (-0.125*v[cdi][k]); v[pd[4]][k] += (0.25*v[cdi][k]); v[pd[5]][k] += (0.5*v[cdi][k]); v[pd[7]][k] += (0.5*v[cdi][k]); } break; case 2: cdi = el->child[0]->dof[node0+5][n0]; for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (-0.125*v[cdi][k]); v[pd[1]][k] += (-0.125*v[cdi][k]); v[pd[4]][k] += (0.25*v[cdi][k]); v[pd[6]][k] += (0.5*v[cdi][k]); v[pd[8]][k] += (0.5*v[cdi][k]); } break; } } return; } static BAS_FCT *phi2_3d[N_BAS2_3D] = {phi2v0_3d, phi2v1_3d, phi2v2_3d, phi2v3_3d, phi2e0_3d, phi2e1_3d, phi2e2_3d, phi2e3_3d, phi2e4_3d, phi2e5_3d}; static GRD_BAS_FCT *grd_phi2_3d[N_BAS2_3D] = {grd_phi2v0_3d, grd_phi2v1_3d, grd_phi2v2_3d, grd_phi2v3_3d, grd_phi2e0_3d, grd_phi2e1_3d, grd_phi2e2_3d, grd_phi2e3_3d, grd_phi2e4_3d, grd_phi2e5_3d}; static D2_BAS_FCT *D2_phi2_3d[N_BAS2_3D] = {D2_phi2v0_3d, D2_phi2v1_3d, D2_phi2v2_3d, D2_phi2v3_3d, D2_phi2e0_3d, D2_phi2e1_3d, D2_phi2e2_3d, D2_phi2e3_3d, D2_phi2e4_3d, D2_phi2e5_3d}; static const BAS_FCTS lagrange2_3d = {"lagrange2_3d", 3, N_BAS2_3D, 2, {1,0,1,0},/* VERTEX, CENTER, EDGE,FACE*/ nil, phi2_3d, grd_phi2_3d, D2_phi2_3d, get_dof_indices2_3d, get_bound2_3d, interpol2_3d, interpol_d2_3d, get_int_vec2_3d, get_real_vec2_3d, get_real_d_vec2_3d, get_uchar_vec2_3d, get_schar_vec2_3d, real_refine_inter2_3d, real_coarse_inter2_3d, real_coarse_restr2_3d, real_d_refine_inter2_3d, real_d_coarse_inter2_3d, real_d_coarse_restr2_3d, bary2_3d,}; alberta-2.0.1/alberta/src/3d/lagrange_3_3d.c0000644000042300001440000021100410676724252015311 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_3_3d.c */ /* */ /* description: piecewise cubic Lagrange elements in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS3_3D 20 static const REAL bary3_3d[N_BAS3_3D][N_LAMBDA] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}, {2.0/3.0,1.0/3.0, 0.0, 0.0}, {1.0/3.0,2.0/3.0, 0.0, 0.0}, {2.0/3.0, 0.0,1.0/3.0, 0.0}, {1.0/3.0, 0.0,2.0/3.0, 0.0}, {2.0/3.0, 0.0, 0.0,1.0/3.0}, {1.0/3.0, 0.0, 0.0,2.0/3.0}, { 0.0,2.0/3.0,1.0/3.0, 0.0}, { 0.0,1.0/3.0,2.0/3.0, 0.0}, { 0.0,2.0/3.0, 0.0,1.0/3.0}, { 0.0,1.0/3.0, 0.0,2.0/3.0}, { 0.0, 0.0,2.0/3.0,1.0/3.0}, { 0.0, 0.0,1.0/3.0,2.0/3.0}, { 0.0,1.0/3.0,1.0/3.0,1.0/3.0}, {1.0/3.0, 0.0,1.0/3.0,1.0/3.0}, {1.0/3.0,1.0/3.0, 0.0,1.0/3.0}, {1.0/3.0,1.0/3.0,1.0/3.0, 0.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi3v0_3d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[0] - 1.0)*lambda[0] + 1.0)*lambda[0]); } static const REAL *grd_phi3v0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[0] - 9.0)*lambda[0] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v0_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[0] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3v1_3d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[1] - 1.0)*lambda[1] + 1.0)*lambda[1]); } static const REAL *grd_phi3v1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (13.5*lambda[1] - 9.0)*lambda[1] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v1_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 27.0*lambda[1] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3v2_3d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[2] - 1.0)*lambda[2] + 1.0)*lambda[2]); } static const REAL *grd_phi3v2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0, 0.0, 0.0}; grd[2] = (13.5*lambda[2] - 9.0)*lambda[2] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v2_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 27.0*lambda[2] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3v3_3d(const REAL lambda[N_LAMBDA]) { return((4.5*(lambda[3] - 1.0)*lambda[3] + 1.0)*lambda[3]); } static const REAL *grd_phi3v3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0.0, 0.0, 0.0}; grd[3] = (13.5*lambda[3] - 9.0)*lambda[3] + 1; return((const REAL *) grd); } static const REAL (*D2_phi3v3_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = 27.0*lambda[3] - 9.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 0 inbetween vertex 0 and 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3e0_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[0] - 4.5)*lambda[0]*lambda[1]); } static const REAL *grd_phi3e0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (27.0*lambda[0] - 4.5)*lambda[1]; grd[1] = (13.5*lambda[0] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e0_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[1]; D2[0][1] = D2[1][0] = 27.0*lambda[0] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 0 inbetween vertex 0 and 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3e1_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[1] - 4.5)*lambda[1]*lambda[0]); } static const REAL *grd_phi3e1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[1] - 4.5)*lambda[1]; grd[1] = (27.0*lambda[1] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e1_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 27.0*lambda[0]; D2[0][1] = D2[1][0] = 27.0*lambda[1] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 1 inbetween vertex 0 and 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3e2_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[0] - 4.5)*lambda[0]*lambda[2]); } static const REAL *grd_phi3e2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (27.0*lambda[0] - 4.5)*lambda[2]; grd[2] = (13.5*lambda[0] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e2_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[2]; D2[0][2] = D2[2][0] = 27.0*lambda[0] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 1 inbetween vertex 0 and 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3e3_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[2] - 4.5)*lambda[2]*lambda[0]); } static const REAL *grd_phi3e3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[2] - 4.5)*lambda[2]; grd[2] = (27.0*lambda[2] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e3_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 27.0*lambda[0]; D2[0][2] = D2[2][0] = 27.0*lambda[2] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 2 inbetween vertex 0 and 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3e4_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[0] - 4.5)*lambda[0]*lambda[3]); } static const REAL *grd_phi3e4_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (27.0*lambda[0] - 4.5)*lambda[3]; grd[3] = (13.5*lambda[0] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e4_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 27.0*lambda[3]; D2[0][3] = D2[3][0] = 27.0*lambda[0] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 0 inbetween vertex 0 and 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3e5_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[3] - 4.5)*lambda[3]*lambda[0]); } static const REAL *grd_phi3e5_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = (13.5*lambda[3] - 4.5)*lambda[3]; grd[3] = (27.0*lambda[3] - 4.5)*lambda[0]; return((const REAL *) grd); } static const REAL (*D2_phi3e5_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = 27.0*lambda[0]; D2[0][3] = D2[3][0] = 27.0*lambda[3] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 3 inbetween vertex 1 and 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3e6_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[1] - 4.5)*lambda[1]*lambda[2]); } static const REAL *grd_phi3e6_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (27.0*lambda[1] - 4.5)*lambda[2]; grd[2] = (13.5*lambda[1] - 4.5)*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3e6_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 27.0*lambda[2]; D2[1][2] = D2[2][1] = 27.0*lambda[1] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 3 inbetween vertex 1 and 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3e7_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[2] - 4.5)*lambda[2]*lambda[1]); } static const REAL *grd_phi3e7_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (13.5*lambda[2] - 4.5)*lambda[2]; grd[2] = (27.0*lambda[2] - 4.5)*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3e7_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 27.0*lambda[1]; D2[1][2] = D2[2][1] = 27.0*lambda[2] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 4 inbetween vertex 1 and 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3e8_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[1] - 4.5)*lambda[1]*lambda[3]); } static const REAL *grd_phi3e8_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (27.0*lambda[1] - 4.5)*lambda[3]; grd[3] = (13.5*lambda[1] - 4.5)*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3e8_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 27.0*lambda[3]; D2[1][3] = D2[3][1] = 27.0*lambda[1] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 4 inbetween vertex 1 and 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3e9_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[3] - 4.5)*lambda[3]*lambda[1]); } static const REAL *grd_phi3e9_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = (13.5*lambda[3] - 4.5)*lambda[3]; grd[3] = (27.0*lambda[3] - 4.5)*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3e9_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = 27.0*lambda[1]; D2[1][3] = D2[3][1] = 27.0*lambda[3] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 5 inbetween vertex 2 and 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3e10_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[2] - 4.5)*lambda[2]*lambda[3]); } static const REAL *grd_phi3e10_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = (27.0*lambda[2] - 4.5)*lambda[3]; grd[3] = (13.5*lambda[2] - 4.5)*lambda[2]; return((const REAL *) grd); } static const REAL (*D2_phi3e10_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 27.0*lambda[3]; D2[2][3] = D2[3][2] = 27.0*lambda[2] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 5 inbetween vertex 2 and 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3e11_3d(const REAL lambda[N_LAMBDA]) { return((13.5*lambda[3] - 4.5)*lambda[3]*lambda[2]); } static const REAL *grd_phi3e11_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[2] = (13.5*lambda[3] - 4.5)*lambda[3]; grd[3] = (27.0*lambda[3] - 4.5)*lambda[2]; return((const REAL *) grd); } static const REAL (*D2_phi3e11_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = 27.0*lambda[2]; D2[2][3] = D2[3][2] = 27.0*lambda[3] - 4.5; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at barycenter of face 0 */ /*--------------------------------------------------------------------------*/ static REAL phi3c0_3d(const REAL lambda[N_LAMBDA]) { return(27.0*lambda[1]*lambda[2]*lambda[3]); } static const REAL *grd_phi3c0_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[1] = 27.0*lambda[2]*lambda[3]; grd[2] = 27.0*lambda[1]*lambda[3]; grd[3] = 27.0*lambda[1]*lambda[2]; return((const REAL *) grd); } static const REAL (*D2_phi3c0_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][2] = D2[2][1] = 27.0*lambda[3]; D2[1][3] = D2[3][1] = 27.0*lambda[2]; D2[2][3] = D2[3][2] = 27.0*lambda[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at barycenter of face 1 */ /*--------------------------------------------------------------------------*/ static REAL phi3c1_3d(const REAL lambda[N_LAMBDA]) { return(27.0*lambda[0]*lambda[2]*lambda[3]); } static const REAL *grd_phi3c1_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA] = {0}; grd[0] = 27.0*lambda[2]*lambda[3]; grd[2] = 27.0*lambda[0]*lambda[3]; grd[3] = 27.0*lambda[0]*lambda[2]; return((const REAL *) grd); } static const REAL (*D2_phi3c1_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][2] = D2[2][0] = 27.0*lambda[3]; D2[0][3] = D2[3][0] = 27.0*lambda[2]; D2[2][3] = D2[3][2] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at barycenter of face 2 */ /*--------------------------------------------------------------------------*/ static REAL phi3c2_3d(const REAL lambda[N_LAMBDA]) { return(27.0*lambda[0]*lambda[1]*lambda[3]); } static const REAL *grd_phi3c2_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 27.0*lambda[1]*lambda[3]; grd[1] = 27.0*lambda[0]*lambda[3]; grd[3] = 27.0*lambda[0]*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3c2_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 27.0*lambda[3]; D2[0][3] = D2[3][0] = 27.0*lambda[1]; D2[1][3] = D2[3][1] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at barycenter of face 3 */ /*--------------------------------------------------------------------------*/ static REAL phi3c3_3d(const REAL lambda[N_LAMBDA]) { return(27.0*lambda[0]*lambda[1]*lambda[2]); } static const REAL *grd_phi3c3_3d(const REAL lambda[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 27.0*lambda[1]*lambda[2]; grd[1] = 27.0*lambda[0]*lambda[2]; grd[2] = 27.0*lambda[0]*lambda[1]; return((const REAL *) grd); } static const REAL (*D2_phi3c3_3d(const REAL *lambda))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 27.0*lambda[2]; D2[0][2] = D2[2][0] = 27.0*lambda[1]; D2[1][2] = D2[2][1] = 27.0*lambda[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const DOF *get_dof_indices3_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { static DOF index_vec[N_BAS3_3D]; DOF *rvec = idof ? idof : index_vec; int i, j, n0; DOF **dof = el->dof; n0 = admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = dof[i][n0]; n0 = admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_3D; i < N_EDGES_3D; i++) { if (dof[vertex_of_edge_3d[i][0]][0] < dof[vertex_of_edge_3d[i][1]][0]) { rvec[j++] = dof[N_VERTICES_3D+i][n0]; rvec[j++] = dof[N_VERTICES_3D+i][n0+1]; } else { rvec[j++] = dof[N_VERTICES_3D+i][n0+1]; rvec[j++] = dof[N_VERTICES_3D+i][n0]; } } n0 = admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) rvec[j++] = dof[N_VERTICES_3D+N_EDGES_3D+i][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound3_3d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound3_3d"); static S_CHAR bound_vec[N_BAS3_3D]; S_CHAR *rvec = bound ? bound : bound_vec; int i, j; DEBUG_TEST_FLAG(FILL_BOUND, el_info); for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = el_info->vertex_bound[i]; for (j = N_VERTICES_3D, i = 0; i < N_EDGES_3D; j += 2, i++) rvec[j] = rvec[j+1] = el_info->edge_bound[i]; for (i = 0; i < N_FACES_3D; i++) rvec[j++] = el_info->face_bound[i]; return((const S_CHAR *) rvec); } static const int *get_int_vec3_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec3_3d"); int i, j, n0; static int local_vec[N_BAS3_3D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_3D; i < N_EDGES_3D; i++) { if (dof[vertex_of_edge_3d[i][0]][0] < dof[vertex_of_edge_3d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) rvec[j++] = v[dof[N_VERTICES_3D+N_EDGES_3D+i][n0]]; return((const int *) rvec); } static const REAL *get_real_vec3_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_vec3_3d"); int i, j, n0; static REAL local_vec[N_BAS3_3D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_3D; i < N_EDGES_3D; i++) { if (dof[vertex_of_edge_3d[i][0]][0] < dof[vertex_of_edge_3d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) rvec[j++] = v[dof[N_VERTICES_3D+N_EDGES_3D+i][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec3_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_vec3_3d"); int i, j, k, n0; static REAL_D local_vec[N_BAS3_3D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[i][k] = v[dof[i][n0]][k]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_3D; i < N_EDGES_3D; i++) { if (dof[vertex_of_edge_3d[i][0]][0] < dof[vertex_of_edge_3d[i][1]][0]) { for (k = 0; k < DIM_OF_WORLD; k++) { rvec[j][k] = v[dof[N_VERTICES_3D+i][n0]][k]; rvec[j+1][k] = v[dof[N_VERTICES_3D+i][n0+1]][k]; } j += 2; } else { for (k = 0; k < DIM_OF_WORLD; k++) { rvec[j][k] = v[dof[N_VERTICES_3D+i][n0+1]][k]; rvec[j+1][k] = v[dof[N_VERTICES_3D+i][n0]][k]; } j += 2; } } n0 = vec->fe_space->admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++, j++) for (k = 0; k < DIM_OF_WORLD; k++) rvec[j][k] = v[dof[N_VERTICES_3D+N_EDGES_3D+i][n0]][k]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec3_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec3_3d"); int i, j, n0; static U_CHAR local_vec[N_BAS3_3D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_3D; i < N_EDGES_3D; i++) { if (dof[vertex_of_edge_3d[i][0]][0] < dof[vertex_of_edge_3d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) rvec[j++] = v[dof[N_VERTICES_3D+N_EDGES_3D+i][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec3_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec3_3d"); int i, j, n0; static S_CHAR local_vec[N_BAS3_3D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; GET_DOF_VEC(v, vec); n0 = vec->fe_space->admin->n0_dof[VERTEX]; for (i = 0; i < N_VERTICES_3D; i++) rvec[i] = v[dof[i][n0]]; n0 = vec->fe_space->admin->n0_dof[EDGE]; for (i = 0, j = N_VERTICES_3D; i < N_EDGES_3D; i++) { if (dof[vertex_of_edge_3d[i][0]][0] < dof[vertex_of_edge_3d[i][1]][0]) { rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; } else { rvec[j++] = v[dof[N_VERTICES_3D+i][n0+1]]; rvec[j++] = v[dof[N_VERTICES_3D+i][n0]]; } } n0 = vec->fe_space->admin->n0_dof[FACE]; for (i = 0; i < N_FACES_3D; i++) rvec[j++] = v[dof[N_VERTICES_3D+N_EDGES_3D+i][n0]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,3,3,20) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,3,3,20) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void real_refine_inter3_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter3_3d"); EL *el; REAL *v = nil; const DOF *cd; DOF pd[N_BAS3_3D], cdi; int i, lr_set, node0, n0; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); v[cd[3]] = (0.0625*(-v[pd[0]] - v[pd[1]]) + 0.5625*(v[pd[4]] + v[pd[5]])); v[cd[8]] = (0.3125*(v[pd[0]] - v[pd[5]]) + 0.0625*v[pd[1]] + 0.937500*v[pd[4]]); v[cd[9]] = v[pd[4]]; v[cd[12]] = (0.0625*(v[pd[0]] + v[pd[1]] - v[pd[4]] - v[pd[5]]) + 0.25*(-v[pd[6]] - v[pd[10]]) + 0.5*(v[pd[7]] + v[pd[11]] + v[pd[19]])); v[cd[13]] = v[pd[19]]; v[cd[14]] = (0.0625*(v[pd[0]] + v[pd[1]] - v[pd[4]] - v[pd[5]]) + 0.25*(-v[pd[8]] - v[pd[12]]) + 0.5*(v[pd[9]] + v[pd[13]] + v[pd[18]])); v[cd[15]] = (v[pd[18]]); v[cd[16]] = (0.0625*(v[pd[0]] + v[pd[1]] - v[pd[4]] - v[pd[5]]) + 0.125*(-v[pd[6]]-v[pd[8]]-v[pd[10]]-v[pd[12]]) + 0.5*(v[pd[16]] + v[pd[17]]) + 0.25*(v[pd[18]] + v[pd[19]])); v[cd[17]] = (0.0625*(-v[pd[0]] + v[pd[1]]) + 0.1875*(v[pd[4]] - v[pd[5]]) + 0.375*v[pd[8]] - 0.125*v[pd[12]] + 0.75*v[pd[18]]); v[cd[18]] = (0.0625*(-v[pd[0]] + v[pd[1]]) + 0.1875*(v[pd[4]] - v[pd[5]]) + 0.375*v[pd[6]] - 0.125*v[pd[10]] + 0.75*v[pd[19]]); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ v[cd[8]] = (0.0625*v[pd[0]] + 0.3125*(v[pd[1]] - v[pd[4]]) + 0.9375*v[pd[5]]); v[cd[9]] = v[pd[5]]; v[cd[17]] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[6]] + 0.375*v[pd[10]] + 0.75*v[pd[19]]); v[cd[18]] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[8]] + 0.375*v[pd[12]] + 0.75*v[pd[18]]); } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ v[cd[8]] = (0.0625*v[pd[0]] + 0.3125*(v[pd[1]] - v[pd[4]]) + 0.9375*v[pd[5]]); v[cd[9]] = v[pd[5]]; v[cd[17]] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[8]] + 0.375*v[pd[12]] + 0.75*v[pd[18]]); v[cd[18]] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[6]] + 0.375*v[pd[10]] + 0.75*v[pd[19]]); } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ node0 = drv->fe_space->mesh->node[FACE]; n0 = admin->n0_dof[FACE]; for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: v[cd[12]] = (0.0625*(v[pd[0]]+v[pd[1]]-v[pd[4]]-v[pd[5]]) + 0.25*(-v[pd[6]] - v[pd[10]]) + 0.5*(v[pd[7]] + v[pd[11]] + v[pd[19]])); v[cd[13]] = v[pd[19]]; v[cd[16]] = (0.0625*(v[pd[0]]+v[pd[1]]-v[pd[4]]-v[pd[5]]) + 0.125*(-v[pd[6]]-v[pd[8]]-v[pd[10]]-v[pd[12]]) + 0.5*(v[pd[16]] + v[pd[17]]) + 0.25*(v[pd[18]] + v[pd[19]])); v[cd[18]] = (0.0625*(-v[pd[0]] + v[pd[1]]) + 0.1875*(v[pd[4]] - v[pd[5]]) + 0.375*v[pd[6]] - 0.125*v[pd[10]] + 0.75*v[pd[19]]); break; case 2: v[cd[14]] = (0.0625*(v[pd[0]]+v[pd[1]]-v[pd[4]]-v[pd[5]]) + 0.25*(-v[pd[8]] - v[pd[12]]) + 0.5*(v[pd[9]] + v[pd[13]] + v[pd[18]])); v[cd[15]] = v[pd[18]]; v[cd[16]] = (0.0625*(v[pd[0]]+v[pd[1]]-v[pd[4]]-v[pd[5]]) + 0.125*(-v[pd[6]]-v[pd[8]]-v[pd[10]]-v[pd[12]]) + 0.5*(v[pd[16]] + v[pd[17]]) + 0.25*(v[pd[18]] + v[pd[19]])); v[cd[17]] = (0.0625*(-v[pd[0]] + v[pd[1]]) + 0.1875*(v[pd[4]] - v[pd[5]]) + 0.375*v[pd[8]] - 0.125*v[pd[12]] + 0.75*v[pd[18]]); break; case 3: v[cd[16]] = (0.0625*(v[pd[0]]+v[pd[1]]-v[pd[4]]-v[pd[5]]) + 0.125*(-v[pd[6]]-v[pd[8]]-v[pd[10]]-v[pd[12]]) + 0.5*(v[pd[16]] + v[pd[17]]) + 0.25*(v[pd[18]] + v[pd[19]])); break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); v[cdi] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[6]] + 0.375*v[pd[10]] + 0.75*v[pd[19]]); break; case 2: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); v[cdi] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[8]] + 0.375*v[pd[12]] + 0.75*v[pd[18]]); break; } } else { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); v[cdi] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[6]] + 0.375*v[pd[10]] + 0.75*v[pd[19]]); break; case 2: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); v[cdi] = (0.0625*(v[pd[0]] - v[pd[1]]) + 0.1875*(-v[pd[4]] + v[pd[5]]) - 0.125*v[pd[8]] + 0.375*v[pd[12]] + 0.75*v[pd[18]]); break; } } } return; } static void real_coarse_inter3_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter3_3d"); EL *el; REAL *v = nil; int i, lr_set; int node_e, node_f, n0_e, n0_f; DOF **pds, **cds; DOF pd_o[N_BAS3_3D], cd, pd; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); node_e = drv->fe_space->mesh->node[EDGE]; n0_e = admin->n0_dof[EDGE]; node_f = drv->fe_space->mesh->node[FACE]; n0_f = admin->n0_dof[FACE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ pds = el->dof; cds = el->child[0]->dof; get_dof_indices(el, admin, pd_o); pd = (pds[0][0] < pds[1][0]) ? pds[node_e][n0_e] : pds[node_e][n0_e+1]; cd = cds[0][0] < cds[3][0] ? cds[node_e+2][n0_e+1] : cds[node_e+2][n0_e]; v[pd] = v[cd]; pd = el->dof[node_f+2][n0_f]; cd = cds[2][0] < cds[3][0] ? cds[node_e+5][n0_e+1] : cds[node_e+5][n0_e]; v[pd] = v[cd]; pd = el->dof[node_f+3][n0_f]; cd = cds[1][0] < cds[3][0] ? cds[node_e+4][n0_e+1] : cds[node_e+4][n0_e]; v[pd] = v[cd]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cds = el->child[1]->dof; pd = (pds[0][0] < pds[1][0]) ? pds[node_e][n0_e+1] : pds[node_e][n0_e]; cd = cds[0][0] < cds[3][0] ? cds[node_e+2][n0_e+1] : cds[node_e+2][n0_e]; v[pd] = v[cd]; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; pds = el->dof; cds = el->child[0]->dof; lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); switch(lr_set) { case 1: pd = el->dof[node_f+3][n0_f]; cd = cds[1][0] < cds[3][0] ? cds[node_e+4][n0_e+1] : cds[node_e+4][n0_e]; v[pd] = v[cd]; break; case 2: pd = el->dof[node_f+2][n0_f]; cd = cds[2][0] < cds[3][0] ? cds[node_e+5][n0_e+1] : cds[node_e+5][n0_e]; v[pd] = v[cd]; break; } } return; } static void real_coarse_restr3_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr3_3d"); EL *el; REAL *v = nil; const DOF *cd; DOF pd[N_BAS3_3D], cdi; int node0, n0, i, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); v[pd[0]] += (0.0625*(-v[cd[3]] + v[cd[12]] + v[cd[14]] + v[cd[16]] - v[cd[17]] - v[cd[18]]) + 0.3125*v[cd[8]]); v[pd[1]] += (0.0625*(-v[cd[3]] + v[cd[8]] + v[cd[12]] + v[cd[14]] + v[cd[16]] + v[cd[17]] + v[cd[18]])); v[pd[4]] = (v[cd[9]] + 0.5625*v[cd[3]] + 0.9375*v[cd[8]] + 0.0625*(-v[cd[12]] - v[cd[14]] - v[cd[16]]) + 0.1875*(v[cd[17]] + v[cd[18]])); v[pd[5]] = (0.5625*v[cd[3]] - 0.3125*v[cd[8]] + 0.0625*(-v[cd[12]] - v[cd[14]] - v[cd[16]]) + 0.1875*(-v[cd[17]] - v[cd[18]])); v[pd[6]] += (-0.25*v[cd[12]] - 0.125*v[cd[16]] + 0.375*v[cd[18]]); v[pd[7]] += 0.5*v[cd[12]]; v[pd[8]] += (-0.25*v[cd[14]] - 0.125*v[cd[16]] + 0.375*v[cd[17]]); v[pd[9]] += 0.5*v[cd[14]]; v[pd[10]] += (-0.25*v[cd[12]] + 0.125*(-v[cd[16]] - v[cd[18]])); v[pd[11]] += 0.5*v[cd[12]]; v[pd[12]] += (-0.25*v[cd[14]] + 0.125*(-v[cd[16]] - v[cd[17]])); v[pd[13]] += 0.5*v[cd[14]]; v[pd[16]] += 0.5*v[cd[16]]; v[pd[17]] += 0.5*v[cd[16]]; v[pd[18]] = (v[cd[15]] + 0.5*v[cd[14]] + 0.25*v[cd[16]] + 0.75*v[cd[17]]); v[pd[19]] = (v[cd[13]] + 0.5*v[cd[12]] + 0.25*v[cd[16]] + 0.75*v[cd[18]]); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ v[pd[0]] += 0.0625*(v[cd[8]] + v[cd[17]] + v[cd[18]]); v[pd[1]] += 0.3125*v[cd[8]] + 0.0625*(-v[cd[17]] - v[cd[18]]); v[pd[4]] += -0.3125*v[cd[8]] + 0.1875*(-v[cd[17]] - v[cd[18]]); v[pd[5]] += (v[cd[9]] + 0.9375*v[cd[8]] + 0.1875*(v[cd[17]] + v[cd[18]])); v[pd[6]] += -0.125*v[cd[17]]; v[pd[8]] += -0.125*v[cd[18]]; v[pd[10]] += 0.375*v[cd[17]]; v[pd[12]] += 0.375*v[cd[18]]; v[pd[18]] += 0.75*v[cd[18]]; v[pd[19]] += 0.750000*v[cd[17]]; } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ v[pd[0]] += 0.0625*(v[cd[8]] + v[cd[17]] + v[cd[18]]); v[pd[1]] += 0.3125*v[cd[8]] + 0.0625*(-v[cd[17]] - v[cd[18]]); v[pd[4]] += -0.3125*v[cd[8]] + 0.1875*(-v[cd[17]] - v[cd[18]]); v[pd[5]] += (v[cd[9]] + 0.9375*v[cd[8]] + 0.1875*(v[cd[17]] + v[cd[18]])); v[pd[6]] += -0.125*v[cd[18]]; v[pd[8]] += -0.125*v[cd[17]]; v[pd[10]] += 0.375*v[cd[18]]; v[pd[12]] += 0.375*v[cd[17]]; v[pd[18]] += 0.75*v[cd[17]]; v[pd[19]] += 0.75*v[cd[18]]; } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ node0 = drv->fe_space->mesh->node[FACE]; n0 = admin->n0_dof[FACE]; for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); cdi = cd[16]; switch(lr_set) { case 1: v[pd[0]] += 0.0625*(v[cd[12]] + v[cdi] - v[cd[18]]); v[pd[1]] += 0.0625*(v[cd[12]] + v[cdi] + v[cd[18]]); v[pd[4]] += (0.0625*(-v[cd[12]] - v[cdi]) + 0.1875*v[cd[18]]); v[pd[5]] += (0.0625*(-v[cd[12]] - v[cdi]) - 0.1875*v[cd[18]]); v[pd[6]] += (-0.25*v[cd[12]] - 0.125*v[cdi] + 0.375*v[cd[18]]); v[pd[7]] += 0.5*v[cd[12]]; v[pd[8]] += -0.125*v[cdi]; v[pd[10]] += -0.25*v[cd[12]] + 0.125*(-v[cdi] - v[cd[18]]); v[pd[11]] += 0.5*v[cd[12]]; v[pd[12]] += -0.125*v[cdi]; v[pd[16]] += 0.5*v[cdi]; v[pd[17]] += 0.5*v[cdi]; v[pd[18]] += 0.25*v[cdi]; v[pd[19]] = (v[cd[13]] + 0.5*v[cd[12]] + 0.25*v[cdi] + 0.75*v[cd[18]]); break; case 2: v[pd[0]] += 0.0625*(v[cd[14]] + v[cdi] - v[cd[17]]); v[pd[1]] += 0.0625*(v[cd[14]] + v[cdi] + v[cd[17]]); v[pd[4]] += 0.0625*(-v[cd[14]] - v[cdi]) + 0.1875*v[cd[17]]; v[pd[5]] += 0.0625*(-v[cd[14]] - v[cdi]) - 0.1875*v[cd[17]]; v[pd[6]] += -0.125*v[cdi]; v[pd[8]] += -0.25*v[cd[14]] - 0.125*v[cdi] + 0.375*v[cd[17]]; v[pd[9]] += 0.5*v[cd[14]]; v[pd[10]] += -0.125*v[cdi]; v[pd[12]] += -0.25*v[cd[14]] + 0.125*(-v[cdi] - v[cd[17]]); v[pd[13]] += 0.5*v[cd[14]]; v[pd[16]] += 0.5*v[cdi]; v[pd[17]] += 0.5*v[cdi]; v[pd[18]] = (v[cd[15]] + 0.5*v[cd[14]] + 0.25*v[cdi] + 0.75*v[cd[17]]); v[pd[19]] += 0.25*v[cdi]; break; case 3: v[pd[0]] += 0.0625*v[cdi]; v[pd[1]] += 0.0625*v[cdi]; v[pd[4]] += -0.0625*v[cdi]; v[pd[5]] += -0.0625*v[cdi]; v[pd[6]] += -0.125*v[cdi]; v[pd[8]] += -0.125*v[cdi]; v[pd[10]] += -0.125*v[cdi]; v[pd[12]] += -0.125*v[cdi]; v[pd[16]] += 0.5*v[cdi]; v[pd[17]] += 0.5*v[cdi]; v[pd[18]] += 0.25*v[cdi]; v[pd[19]] += 0.25*v[cdi]; break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); v[pd[0]] += 0.0625*v[cdi]; v[pd[1]] += -0.0625*v[cdi]; v[pd[4]] += -0.1875*v[cdi]; v[pd[5]] += 0.1875*v[cdi]; v[pd[6]] += -0.125*v[cdi]; v[pd[10]] += 0.375*v[cdi]; v[pd[19]] += 0.75*v[cdi]; break; case 2: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); v[pd[0]] += 0.0625*v[cdi]; v[pd[1]] += -0.0625*v[cdi]; v[pd[4]] += -0.1875*v[cdi]; v[pd[5]] += 0.1875*v[cdi]; v[pd[8]] += -0.125*v[cdi]; v[pd[12]] += 0.375*v[cdi]; v[pd[18]] += 0.75*v[cdi]; break; } } else { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); v[pd[0]] += 0.0625*v[cdi]; v[pd[1]] += -0.0625*v[cdi]; v[pd[4]] += -0.1875*v[cdi]; v[pd[5]] += 0.1875*v[cdi]; v[pd[6]] += -0.125*v[cdi]; v[pd[10]] += 0.375*v[cdi]; v[pd[19]] += 0.75*v[cdi]; break; case 2: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); v[pd[0]] += 0.0625*v[cdi]; v[pd[1]] += -0.0625*v[cdi]; v[pd[4]] += -0.1875*v[cdi]; v[pd[5]] += 0.1875*v[cdi]; v[pd[8]] += -0.125*v[cdi]; v[pd[12]] += 0.375*v[cdi]; v[pd[18]] += 0.75*v[cdi]; break; } } } return; } static void real_d_refine_inter3_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter3_3d"); EL *el; REAL_D *v = nil; const DOF *cd; DOF pd[N_BAS3_3D], cdi; int node0, n0, i, lr_set, k; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[3]][k] = (0.0625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.5625*(v[pd[4]][k] + v[pd[5]][k])); v[cd[8]][k] = (0.3125*(v[pd[0]][k] - v[pd[5]][k]) + 0.0625*v[pd[1]][k] + 0.937500*v[pd[4]][k]); v[cd[9]][k] = v[pd[4]][k]; v[cd[12]][k] = (0.0625*(v[pd[0]][k] + v[pd[1]][k] - v[pd[4]][k] - v[pd[5]][k]) + 0.25*(-v[pd[6]][k] - v[pd[10]][k]) + 0.5*(v[pd[7]][k] + v[pd[11]][k] + v[pd[19]][k])); v[cd[13]][k] = v[pd[19]][k]; v[cd[14]][k] = (0.0625*(v[pd[0]][k] + v[pd[1]][k] - v[pd[4]][k] - v[pd[5]][k]) + 0.25*(-v[pd[8]][k] - v[pd[12]][k]) + 0.5*(v[pd[9]][k] + v[pd[13]][k] + v[pd[18]][k])); v[cd[15]][k] = (v[pd[18]][k]); v[cd[16]][k] = (0.0625*(v[pd[0]][k] + v[pd[1]][k] - v[pd[4]][k] - v[pd[5]][k]) + 0.125*(-v[pd[6]][k] - v[pd[8]][k] - v[pd[10]][k] - v[pd[12]][k]) + 0.5*(v[pd[16]][k] + v[pd[17]][k]) + 0.25*(v[pd[18]][k] + v[pd[19]][k])); v[cd[17]][k] = (0.0625*(-v[pd[0]][k] + v[pd[1]][k]) + 0.1875*(v[pd[4]][k] - v[pd[5]][k]) + 0.375*v[pd[8]][k] - 0.125*v[pd[12]][k] + 0.75*v[pd[18]][k]); v[cd[18]][k] = (0.0625*(-v[pd[0]][k] + v[pd[1]][k]) + 0.1875*(v[pd[4]][k] - v[pd[5]][k]) + 0.375*v[pd[6]][k] - 0.125*v[pd[10]][k] + 0.75*v[pd[19]][k]); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[8]][k] = (0.0625*v[pd[0]][k] + 0.3125*(v[pd[1]][k] - v[pd[4]][k]) + 0.9375*v[pd[5]][k]); v[cd[9]][k] = v[pd[5]][k]; v[cd[17]][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[6]][k] + 0.375*v[pd[10]][k] + 0.75*v[pd[19]][k]); v[cd[18]][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[8]][k] + 0.375*v[pd[12]][k] + 0.75*v[pd[18]][k]); } } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[8]][k] = (0.0625*v[pd[0]][k] + 0.3125*(v[pd[1]][k] - v[pd[4]][k]) + 0.9375*v[pd[5]][k]); v[cd[9]][k] = v[pd[5]][k]; v[cd[17]][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[8]][k] + 0.375*v[pd[12]][k] + 0.75*v[pd[18]][k]); v[cd[18]][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[6]][k] + 0.375*v[pd[10]][k] + 0.75*v[pd[19]][k]); } } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ node0 = drdv->fe_space->mesh->node[FACE]; n0 = admin->n0_dof[FACE]; for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set,"no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[12]][k] = (0.0625*(v[pd[0]][k]+v[pd[1]][k] -v[pd[4]][k]-v[pd[5]][k]) + 0.25*(-v[pd[6]][k] - v[pd[10]][k]) + 0.5*(v[pd[7]][k] + v[pd[11]][k] + v[pd[19]][k])); v[cd[13]][k] = v[pd[19]][k]; v[cd[16]][k] = (0.0625*(v[pd[0]][k]+v[pd[1]][k] -v[pd[4]][k]-v[pd[5]][k]) + 0.125*(-v[pd[6]][k]-v[pd[8]][k] -v[pd[10]][k]-v[pd[12]][k]) + 0.5*(v[pd[16]][k] + v[pd[17]][k]) + 0.25*(v[pd[18]][k] + v[pd[19]][k])); v[cd[18]][k] = (0.0625*(-v[pd[0]][k] + v[pd[1]][k]) + 0.1875*(v[pd[4]][k] - v[pd[5]][k]) + 0.375*v[pd[6]][k] - 0.125*v[pd[10]][k] + 0.75*v[pd[19]][k]); } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[14]][k] = (0.0625*(v[pd[0]][k]+v[pd[1]][k] -v[pd[4]][k]-v[pd[5]][k]) + 0.25*(-v[pd[8]][k] - v[pd[12]][k]) + 0.5*(v[pd[9]][k] + v[pd[13]][k] + v[pd[18]][k])); v[cd[15]][k] = v[pd[18]][k]; v[cd[16]][k] = (0.0625*(v[pd[0]][k]+v[pd[1]][k] -v[pd[4]][k]-v[pd[5]][k]) + 0.125*(-v[pd[6]][k]-v[pd[8]][k] -v[pd[10]][k]-v[pd[12]][k]) + 0.5*(v[pd[16]][k] + v[pd[17]][k]) + 0.25*(v[pd[18]][k] + v[pd[19]][k])); v[cd[17]][k] = (0.0625*(-v[pd[0]][k] + v[pd[1]][k]) + 0.1875*(v[pd[4]][k] - v[pd[5]][k]) + 0.375*v[pd[8]][k] - 0.125*v[pd[12]][k] + 0.75*v[pd[18]][k]); } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[16]][k] = (0.0625*(v[pd[0]][k]+v[pd[1]][k] -v[pd[4]][k]-v[pd[5]][k]) + 0.125*(-v[pd[6]][k]-v[pd[8]][k] -v[pd[10]][k]-v[pd[12]][k]) + 0.5*(v[pd[16]][k] + v[pd[17]][k]) + 0.25*(v[pd[18]][k] + v[pd[19]][k])); } break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[cdi][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[6]][k] + 0.375*v[pd[10]][k] + 0.75*v[pd[19]][k]); } break; case 2: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[cdi][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[8]][k] + 0.375*v[pd[12]][k] + 0.75*v[pd[18]][k]); } break; } } else { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[cdi][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[6]][k] + 0.375*v[pd[10]][k] + 0.75*v[pd[19]][k]); } break; case 2: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[cdi][k] = (0.0625*(v[pd[0]][k] - v[pd[1]][k]) + 0.1875*(-v[pd[4]][k] + v[pd[5]][k]) - 0.125*v[pd[8]][k] + 0.375*v[pd[12]][k] + 0.75*v[pd[18]][k]); } break; } } } return; } static void real_d_coarse_inter3_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter3_3d"); EL *el; REAL_D *v = nil; int i, lr_set, k; int node_e, node_f, n0_e, n0_f; DOF **pds, **cds; DOF pd_o[N_BAS3_3D], cd, pd; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); node_e = drdv->fe_space->mesh->node[EDGE]; n0_e = admin->n0_dof[EDGE]; node_f = drdv->fe_space->mesh->node[FACE]; n0_f = admin->n0_dof[FACE]; /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ pds = el->dof; cds = el->child[0]->dof; get_dof_indices(el, admin, pd_o); pd = (pds[0][0] < pds[1][0]) ? pds[node_e][n0_e] : pds[node_e][n0_e+1]; cd = cds[0][0] < cds[3][0] ? cds[node_e+2][n0_e+1] : cds[node_e+2][n0_e]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; pd = el->dof[node_f+2][n0_f]; cd = cds[2][0] < cds[3][0] ? cds[node_e+5][n0_e+1] : cds[node_e+5][n0_e]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; pd = el->dof[node_f+3][n0_f]; cd = cds[1][0] < cds[3][0] ? cds[node_e+4][n0_e+1] : cds[node_e+4][n0_e]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cds = el->child[1]->dof; pd = (pds[0][0] < pds[1][0]) ? pds[node_e][n0_e+1] : pds[node_e][n0_e]; cd = cds[0][0] < cds[3][0] ? cds[node_e+2][n0_e+1] : cds[node_e+2][n0_e]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; pds = el->dof; cds = el->child[0]->dof; lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); switch(lr_set) { case 1: pd = el->dof[node_f+3][n0_f]; cd = cds[1][0] < cds[3][0] ? cds[node_e+4][n0_e+1] : cds[node_e+4][n0_e]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; break; case 2: pd = el->dof[node_f+2][n0_f]; cd = cds[2][0] < cds[3][0] ? cds[node_e+5][n0_e+1] : cds[node_e+5][n0_e]; for (k = 0; k < DIM_OF_WORLD; k++) v[pd][k] = v[cd][k]; break; } } return; } static void real_d_coarse_restr3_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr3_3d"); EL *el; REAL_D *v = nil; const DOF *cd; DOF pd[N_BAS3_3D], cdi; int node0, n0, i, k, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0625*(-v[cd[3]][k] + v[cd[12]][k] + v[cd[14]][k] + v[cd[16]][k] - v[cd[17]][k] - v[cd[18]][k]) + 0.3125*v[cd[8]][k]); v[pd[1]][k] += (0.0625*(-v[cd[3]][k] + v[cd[8]][k] + v[cd[12]][k] + v[cd[14]][k] + v[cd[16]][k] + v[cd[17]][k] + v[cd[18]][k])); v[pd[4]][k] = (v[cd[9]][k] + 0.5625*v[cd[3]][k] + 0.9375*v[cd[8]][k] + 0.0625*(-v[cd[12]][k] - v[cd[14]][k] - v[cd[16]][k]) + 0.1875*(v[cd[17]][k] + v[cd[18]][k])); v[pd[5]][k] = (0.5625*v[cd[3]][k] - 0.3125*v[cd[8]][k] + 0.0625*(-v[cd[12]][k] - v[cd[14]][k] - v[cd[16]][k]) + 0.1875*(-v[cd[17]][k] - v[cd[18]][k])); v[pd[6]][k] += (-0.25*v[cd[12]][k] - 0.125*v[cd[16]][k] + 0.375*v[cd[18]][k]); v[pd[7]][k] += 0.5*v[cd[12]][k]; v[pd[8]][k] += (-0.25*v[cd[14]][k] - 0.125*v[cd[16]][k] + 0.375*v[cd[17]][k]); v[pd[9]][k] += 0.5*v[cd[14]][k]; v[pd[10]][k] += (-0.25*v[cd[12]][k] + 0.125*(-v[cd[16]][k] - v[cd[18]][k])); v[pd[11]][k] += 0.5*v[cd[12]][k]; v[pd[12]][k] += (-0.25*v[cd[14]][k] + 0.125*(-v[cd[16]][k] - v[cd[17]][k])); v[pd[13]][k] += 0.5*v[cd[14]][k]; v[pd[16]][k] += 0.5*v[cd[16]][k]; v[pd[17]][k] += 0.5*v[cd[16]][k]; v[pd[18]][k] = (v[cd[15]][k] + 0.5*v[cd[14]][k] + 0.25*v[cd[16]][k] + 0.75*v[cd[17]][k]); v[pd[19]][k] = (v[cd[13]][k] + 0.5*v[cd[12]][k] + 0.25*v[cd[16]][k] + 0.75*v[cd[18]][k]); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*(v[cd[8]][k] + v[cd[17]][k] + v[cd[18]][k]); v[pd[1]][k] += (0.3125*v[cd[8]][k] + 0.0625*(-v[cd[17]][k] - v[cd[18]][k])); v[pd[4]][k] += (-0.3125*v[cd[8]][k] + 0.1875*(-v[cd[17]][k] - v[cd[18]][k])); v[pd[5]][k] += (v[cd[9]][k] + 0.9375*v[cd[8]][k] + 0.1875*(v[cd[17]][k] + v[cd[18]][k])); v[pd[6]][k] += -0.125*v[cd[17]][k]; v[pd[8]][k] += -0.125*v[cd[18]][k]; v[pd[10]][k] += 0.375*v[cd[17]][k]; v[pd[12]][k] += 0.375*v[cd[18]][k]; v[pd[18]][k] += 0.75*v[cd[18]][k]; v[pd[19]][k] += 0.750000*v[cd[17]][k]; } } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*(v[cd[8]][k] + v[cd[17]][k] + v[cd[18]][k]); v[pd[1]][k] += (0.3125*v[cd[8]][k] + 0.0625*(-v[cd[17]][k] - v[cd[18]][k])); v[pd[4]][k] += (-0.3125*v[cd[8]][k] + 0.1875*(-v[cd[17]][k] - v[cd[18]][k])); v[pd[5]][k] += (v[cd[9]][k] + 0.9375*v[cd[8]][k] + 0.1875*(v[cd[17]][k] + v[cd[18]][k])); v[pd[6]][k] += -0.125*v[cd[18]][k]; v[pd[8]][k] += -0.125*v[cd[17]][k]; v[pd[10]][k] += 0.375*v[cd[18]][k]; v[pd[12]][k] += 0.375*v[cd[17]][k]; v[pd[18]][k] += 0.75*v[cd[17]][k]; v[pd[19]][k] += 0.75*v[cd[18]][k]; } } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ node0 = drdv->fe_space->mesh->node[FACE]; n0 = admin->n0_dof[FACE]; for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); cdi = cd[16]; switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*(v[cd[12]][k] + v[cdi][k] - v[cd[18]][k]); v[pd[1]][k] += 0.0625*(v[cd[12]][k] + v[cdi][k] + v[cd[18]][k]); v[pd[4]][k] += (0.0625*(-v[cd[12]][k] - v[cdi][k]) + 0.1875*v[cd[18]][k]); v[pd[5]][k] += (0.0625*(-v[cd[12]][k] - v[cdi][k]) - 0.1875*v[cd[18]][k]); v[pd[6]][k] += (-0.25*v[cd[12]][k] - 0.125*v[cdi][k] + 0.375*v[cd[18]][k]); v[pd[7]][k] += 0.5*v[cd[12]][k]; v[pd[8]][k] += -0.125*v[cdi][k]; v[pd[10]][k] += -0.25*v[cd[12]][k] + 0.125*(-v[cdi][k]-v[cd[18]][k]); v[pd[11]][k] += 0.5*v[cd[12]][k]; v[pd[12]][k] += -0.125*v[cdi][k]; v[pd[16]][k] += 0.5*v[cdi][k]; v[pd[17]][k] += 0.5*v[cdi][k]; v[pd[18]][k] += 0.25*v[cdi][k]; v[pd[19]][k] = (v[cd[13]][k] + 0.5*v[cd[12]][k] + 0.25*v[cdi][k] + 0.75*v[cd[18]][k]); } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*(v[cd[14]][k] + v[cdi][k] - v[cd[17]][k]); v[pd[1]][k] += 0.0625*(v[cd[14]][k] + v[cdi][k] + v[cd[17]][k]); v[pd[4]][k] += (0.0625*(-v[cd[14]][k] - v[cdi][k]) + 0.1875*v[cd[17]][k]); v[pd[5]][k] += (0.0625*(-v[cd[14]][k] - v[cdi][k]) - 0.1875*v[cd[17]][k]); v[pd[6]][k] += -0.125*v[cdi][k]; v[pd[8]][k] += (-0.25*v[cd[14]][k] - 0.125*v[cdi][k] + 0.375*v[cd[17]][k]); v[pd[9]][k] += 0.5*v[cd[14]][k]; v[pd[10]][k] += -0.125*v[cdi][k]; v[pd[12]][k] += -0.25*v[cd[14]][k] + 0.125*(-v[cdi][k]-v[cd[17]][k]); v[pd[13]][k] += 0.5*v[cd[14]][k]; v[pd[16]][k] += 0.5*v[cdi][k]; v[pd[17]][k] += 0.5*v[cdi][k]; v[pd[18]][k] = (v[cd[15]][k] + 0.5*v[cd[14]][k] + 0.25*v[cdi][k] + 0.75*v[cd[17]][k]); v[pd[19]][k] += 0.25*v[cdi][k]; } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*v[cdi][k]; v[pd[1]][k] += 0.0625*v[cdi][k]; v[pd[4]][k] += -0.0625*v[cdi][k]; v[pd[5]][k] += -0.0625*v[cdi][k]; v[pd[6]][k] += -0.125*v[cdi][k]; v[pd[8]][k] += -0.125*v[cdi][k]; v[pd[10]][k] += -0.125*v[cdi][k]; v[pd[12]][k] += -0.125*v[cdi][k]; v[pd[16]][k] += 0.5*v[cdi][k]; v[pd[17]][k] += 0.5*v[cdi][k]; v[pd[18]][k] += 0.25*v[cdi][k]; v[pd[19]][k] += 0.25*v[cdi][k]; } break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*v[cdi][k]; v[pd[1]][k] += -0.0625*v[cdi][k]; v[pd[4]][k] += -0.1875*v[cdi][k]; v[pd[5]][k] += 0.1875*v[cdi][k]; v[pd[6]][k] += -0.125*v[cdi][k]; v[pd[10]][k] += 0.375*v[cdi][k]; v[pd[19]][k] += 0.75*v[cdi][k]; } break; case 2: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*v[cdi][k]; v[pd[1]][k] += -0.0625*v[cdi][k]; v[pd[4]][k] += -0.1875*v[cdi][k]; v[pd[5]][k] += 0.1875*v[cdi][k]; v[pd[8]][k] += -0.125*v[cdi][k]; v[pd[12]][k] += 0.375*v[cdi][k]; v[pd[18]][k] += 0.75*v[cdi][k]; } break; } } else { switch(lr_set) { case 1: cdi = el->child[1]->dof[node0+2][n0]; DEBUG_TEST_EXIT(cdi == cd[18], "cdi != cd[18]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*v[cdi][k]; v[pd[1]][k] += -0.0625*v[cdi][k]; v[pd[4]][k] += -0.1875*v[cdi][k]; v[pd[5]][k] += 0.1875*v[cdi][k]; v[pd[6]][k] += -0.125*v[cdi][k]; v[pd[10]][k] += 0.375*v[cdi][k]; v[pd[19]][k] += 0.75*v[cdi][k]; } break; case 2: cdi = el->child[1]->dof[node0+1][n0]; DEBUG_TEST_EXIT(cdi == cd[17], "cdi != cd[17]\n"); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += 0.0625*v[cdi][k]; v[pd[1]][k] += -0.0625*v[cdi][k]; v[pd[4]][k] += -0.1875*v[cdi][k]; v[pd[5]][k] += 0.1875*v[cdi][k]; v[pd[8]][k] += -0.125*v[cdi][k]; v[pd[12]][k] += 0.375*v[cdi][k]; v[pd[18]][k] += 0.75*v[cdi][k]; } break; } } } return; } static BAS_FCT *phi3_3d[N_BAS3_3D] ={phi3v0_3d, phi3v1_3d,phi3v2_3d, phi3v3_3d, phi3e0_3d, phi3e1_3d,phi3e2_3d, phi3e3_3d, phi3e4_3d, phi3e5_3d,phi3e6_3d, phi3e7_3d, phi3e8_3d,phi3e9_3d,phi3e10_3d,phi3e11_3d, phi3c0_3d,phi3c1_3d,phi3c2_3d,phi3c3_3d}; static GRD_BAS_FCT *grd_phi3_3d[N_BAS3_3D] = {grd_phi3v0_3d, grd_phi3v1_3d, grd_phi3v2_3d, grd_phi3v3_3d, grd_phi3e0_3d, grd_phi3e1_3d, grd_phi3e2_3d, grd_phi3e3_3d, grd_phi3e4_3d, grd_phi3e5_3d, grd_phi3e6_3d, grd_phi3e7_3d, grd_phi3e8_3d, grd_phi3e9_3d, grd_phi3e10_3d, grd_phi3e11_3d, grd_phi3c0_3d, grd_phi3c1_3d, grd_phi3c2_3d, grd_phi3c3_3d}; static D2_BAS_FCT *D2_phi3_3d[N_BAS3_3D] = {D2_phi3v0_3d, D2_phi3v1_3d, D2_phi3v2_3d, D2_phi3v3_3d, D2_phi3e0_3d, D2_phi3e1_3d, D2_phi3e2_3d, D2_phi3e3_3d, D2_phi3e4_3d, D2_phi3e5_3d, D2_phi3e6_3d, D2_phi3e7_3d, D2_phi3e8_3d, D2_phi3e9_3d, D2_phi3e10_3d, D2_phi3e11_3d, D2_phi3c0_3d, D2_phi3c1_3d, D2_phi3c2_3d, D2_phi3c3_3d}; static const BAS_FCTS lagrange3_3d = {"lagrange3_3d", 3, N_BAS3_3D, 3, {1,0,2,1},/* VERTEX,CENTER,EDGE,FACE */ nil, phi3_3d, grd_phi3_3d, D2_phi3_3d, get_dof_indices3_3d, get_bound3_3d, interpol3_3d, interpol_d3_3d, get_int_vec3_3d, get_real_vec3_3d, get_real_d_vec3_3d, get_uchar_vec3_3d, get_schar_vec3_3d, real_refine_inter3_3d, real_coarse_inter3_3d, real_coarse_restr3_3d, real_d_refine_inter3_3d, real_d_coarse_inter3_3d, real_d_coarse_restr3_3d, bary3_3d,}; alberta-2.0.1/alberta/src/3d/lagrange_4_3d.c0000644000042300001440000043135510676724252015327 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: lagrange_4_3d.c */ /* */ /* description: piecewise quartic Lagrange elements in 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ #define N_BAS4_3D 35 static const REAL bary4_3d[N_BAS4_3D][N_LAMBDA] = { { 1.0, 0.0, 0.0, 0.0}, { 0.0, 1.0, 0.0, 0.0}, { 0.0, 0.0, 1.0, 0.0}, { 0.0, 0.0, 0.0, 1.0}, {3.0/4.0, 1.0/4.0, 0.0, 0.0}, { 0.5, 0.5, 0.0, 0.0}, {1.0/4.0, 3.0/4.0, 0.0, 0.0}, {3.0/4.0, 0.0, 1.0/4.0, 0.0}, { 0.5, 0.0, 0.5, 0.0}, {1.0/4.0, 0.0, 3.0/4.0, 0.0}, {3.0/4.0, 0.0, 0.0, 1.0/4.0}, { 0.5, 0.0, 0.0, 0.5}, {1.0/4.0, 0.0, 0.0, 3.0/4.0}, { 0.0, 3.0/4.0, 1.0/4.0, 0.0}, { 0.0, 0.5, 0.5, 0.0}, { 0.0, 1.0/4.0, 3.0/4.0, 0.0}, { 0.0, 3.0/4.0, 0.0, 1.0/4.0}, { 0.0, 0.5, 0.0, 0.5}, { 0.0, 1.0/4.0, 0.0, 3.0/4.0}, { 0.0, 0.0, 3.0/4.0, 1.0/4.0}, { 0.0, 0.0, 0.5, 0.5}, { 0.0, 0.0, 1.0/4.0, 3.0/4.0}, { 0.0, 1.0/2.0, 1.0/4.0, 1.0/4.0}, { 0.0, 1.0/4.0, 1.0/2.0, 1.0/4.0}, { 0.0, 1.0/4.0, 1.0/4.0, 1.0/2.0}, {1.0/2.0, 0.0, 1.0/4.0, 1.0/4.0}, {1.0/4.0, 0.0, 1.0/2.0, 1.0/4.0}, {1.0/4.0, 0.0, 1.0/4.0, 1.0/2.0}, {1.0/2.0, 1.0/4.0, 0.0, 1.0/4.0}, {1.0/4.0, 1.0/2.0, 0.0, 1.0/4.0}, {1.0/4.0, 1.0/4.0, 0.0, 1.0/2.0}, {1.0/2.0, 1.0/4.0, 1.0/4.0, 0.0}, {1.0/4.0, 1.0/2.0, 1.0/4.0, 0.0}, {1.0/4.0, 1.0/4.0, 1.0/2.0, 0.0}, {1.0/4.0, 1.0/4.0, 1.0/4.0, 1.0/4.0}}; /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4v0_3d(const REAL l[N_LAMBDA]) { return((((32.0*l[0] - 48.0)*l[0] + 22.0)*l[0] - 3.0)*l[0]/3.0); } static const REAL *grd_phi4v0_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128.0*l[0] - 144.0)*l[0] + 44.0)*l[0]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v0_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA] = {{0.0}}; D2[0][0] = (128.0*l[0] - 96.0)*l[0] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4v1_3d(const REAL l[N_LAMBDA]) { return((((32.0*l[1] - 48.0)*l[1] + 22.0)*l[1] - 3.0)*l[1]/3.0); } static const REAL *grd_phi4v1_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = ((128.0*l[1] - 144.0)*l[1] + 44.0)*l[1]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v1_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (128.0*l[1] - 96.0)*l[1] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4v2_3d(const REAL l[N_LAMBDA]) { return((((32.0*l[2] - 48.0)*l[2] + 22.0)*l[2] - 3.0)*l[2]/3.0); } static const REAL *grd_phi4v2_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[2] = ((128.0*l[2] - 144.0)*l[2] + 44.0)*l[2]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v2_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (128.0*l[2] - 96.0)*l[2] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at vertex 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4v3_3d(const REAL l[N_LAMBDA]) { return((((32.0*l[3] - 48.0)*l[3] + 22.0)*l[3] - 3.0)*l[3]/3.0); } static const REAL *grd_phi4v3_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[3] = ((128.0*l[3] - 144.0)*l[3] + 44.0)*l[3]/3.0 - 1.0; return((const REAL *) grd); } static const REAL (*D2_phi4v3_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = (128.0*l[3] - 96.0)*l[3] + 44.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4e00_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[0] - 96.0)*l[0] + 16.0)*l[0]*l[1]/3.0); } static const REAL *grd_phi4e00_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128*l[0] - 64.0)*l[0] + 16.0/3.0)*l[1]; grd[1] = ((128*l[0] - 96.0)*l[0] + 16.0)*l[0]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e00_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = (256.0*l[0] - 64.0)*l[1]; D2[0][1] = D2[1][0] = (128.0*l[0] - 64.0)*l[0] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4e01_3d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*(4.0*l[1] - 1.0)*l[1]*4.0); } static const REAL *grd_phi4e01_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 4.0*(8.0*l[0] - 1.0)*l[1]*(4.0*l[1] - 1.0); grd[1] = 4.0*l[0]*(4.0*l[0] - 1.0)*(8.0*l[1] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e01_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 32.0*l[1]*(4.0*l[1] - 1.0); D2[0][1] = D2[1][0] = 4.0*(8.0*l[0] - 1.0)*(8.0*l[1] - 1.0); D2[1][1] = 32.0*l[0]*(4.0*l[0] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e02_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[1] - 96.0)*l[1] + 16.0)*l[1]*l[0]/3.0); } static const REAL *grd_phi4e02_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128*l[1] - 96.0)*l[1] + 16.0)*l[1]/3.0; grd[1] = ((128*l[1] - 64.0)*l[1] + 16.0/3.0)*l[0]; return((const REAL *) grd); } static const REAL (*D2_phi4e02_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (256.0*l[1] - 64.0)*l[0]; D2[0][1] = D2[1][0] = (128.0*l[1] - 64.0)*l[1] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4e10_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[0] - 96.0)*l[0] + 16.0)*l[0]*l[2]/3.0); } static const REAL *grd_phi4e10_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128*l[0] - 64.0)*l[0] + 16.0/3.0)*l[2]; grd[2] = ((128*l[0] - 96.0)*l[0] + 16.0)*l[0]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e10_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = (256.0*l[0] - 64.0)*l[2]; D2[0][2] = D2[2][0] = (128.0*l[0] - 64.0)*l[0] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4e11_3d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*(4.0*l[2] - 1.0)*l[2]*4.0); } static const REAL *grd_phi4e11_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 4.0*(8.0*l[0] - 1.0)*l[2]*(4.0*l[2] - 1.0); grd[2] = 4.0*l[0]*(4.0*l[0] - 1.0)*(8.0*l[2] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e11_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 32.0*l[2]*(4.0*l[2] - 1.0); D2[0][2] = D2[2][0] = 4.0*(8.0*l[0] - 1.0)*(8.0*l[2] - 1.0); D2[2][2] = 32.0*l[0]*(4.0*l[0] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e12_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[2] - 96.0)*l[2] + 16.0)*l[2]*l[0]/3.0); } static const REAL *grd_phi4e12_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128*l[2] - 96.0)*l[2] + 16.0)*l[2]/3.0; grd[2] = ((128*l[2] - 64.0)*l[2] + 16.0/3.0)*l[0]; return((const REAL *) grd); } static const REAL (*D2_phi4e12_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (256.0*l[2] - 64.0)*l[0]; D2[0][2] = D2[2][0] = (128.0*l[2] - 64.0)*l[2] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e20_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[0] - 96.0)*l[0] + 16.0)*l[0]*l[3]/3.0); } static const REAL *grd_phi4e20_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128*l[0] - 64.0)*l[0] + 16.0/3.0)*l[3]; grd[3] = ((128*l[0] - 96.0)*l[0] + 16.0)*l[0]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e20_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = (256.0*l[0] - 64.0)*l[3]; D2[0][3] = D2[3][0] = (128.0*l[0] - 64.0)*l[0] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e21_3d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*(4.0*l[3] - 1.0)*l[3]*4.0); } static const REAL *grd_phi4e21_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 4.0*(8.0*l[0] - 1.0)*l[3]*(4.0*l[3] - 1.0); grd[3] = 4.0*l[0]*(4.0*l[0] - 1.0)*(8.0*l[3] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e21_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 32.0*l[3]*(4.0*l[3] - 1.0); D2[0][3] = D2[3][0] = 4.0*(8.0*l[0] - 1.0)*(8.0*l[3] - 1.0); D2[3][3] = 32.0*l[0]*(4.0*l[0] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4e22_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[3] - 96.0)*l[3] + 16.0)*l[3]*l[0]/3.0); } static const REAL *grd_phi4e22_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = ((128*l[3] - 96.0)*l[3] + 16.0)*l[3]/3.0; grd[3] = ((128*l[3] - 64.0)*l[3] + 16.0/3.0)*l[0]; return((const REAL *) grd); } static const REAL (*D2_phi4e22_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = (256.0*l[3] - 64.0)*l[0]; D2[0][3] = D2[3][0] = (128.0*l[3] - 64.0)*l[3] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4e30_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[1] - 96.0)*l[1] + 16.0)*l[1]*l[2]/3.0); } static const REAL *grd_phi4e30_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = ((128*l[1] - 64.0)*l[1] + 16.0/3.0)*l[2]; grd[2] = ((128*l[1] - 96.0)*l[1] + 16.0)*l[1]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e30_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (256.0*l[1] - 64.0)*l[2]; D2[1][2] = D2[2][1] = (128.0*l[1] - 64.0)*l[1] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4e31_3d(const REAL l[N_LAMBDA]) { return((4.0*l[1] - 1.0)*l[1]*(4.0*l[2] - 1.0)*l[2]*4.0); } static const REAL *grd_phi4e31_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = 4.0*(8.0*l[1] - 1.0)*l[2]*(4.0*l[2] - 1.0); grd[2] = 4.0*l[1]*(4.0*l[1] - 1.0)*(8.0*l[2] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e31_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 32.0*l[2]*(4.0*l[2] - 1.0); D2[1][2] = D2[2][1] = 4.0*(8.0*l[1] - 1.0)*(8.0*l[2] - 1.0); D2[2][2] = 32.0*l[1]*(4.0*l[1] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4e32_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[2] - 96.0)*l[2] + 16.0)*l[2]*l[1]/3.0); } static const REAL *grd_phi4e32_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = ((128*l[2] - 96.0)*l[2] + 16.0)*l[2]/3.0; grd[2] = ((128*l[2] - 64.0)*l[2] + 16.0/3.0)*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4e32_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (256.0*l[2] - 64.0)*l[1]; D2[1][2] = D2[2][1] = (128.0*l[2] - 64.0)*l[2] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 4 */ /*--------------------------------------------------------------------------*/ static REAL phi4e40_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[1] - 96.0)*l[1] + 16.0)*l[1]*l[3]/3.0); } static const REAL *grd_phi4e40_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = ((128*l[1] - 64.0)*l[1] + 16.0/3.0)*l[3]; grd[3] = ((128*l[1] - 96.0)*l[1] + 16.0)*l[1]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e40_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = (256.0*l[1] - 64.0)*l[3]; D2[1][3] = D2[3][1] = (128.0*l[1] - 64.0)*l[1] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 4 */ /*--------------------------------------------------------------------------*/ static REAL phi4e41_3d(const REAL l[N_LAMBDA]) { return((4.0*l[1] - 1.0)*l[1]*(4.0*l[3] - 1.0)*l[3]*4.0); } static const REAL *grd_phi4e41_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = 4.0*(8.0*l[1] - 1.0)*l[3]*(4.0*l[3] - 1.0); grd[3] = 4.0*l[1]*(4.0*l[1] - 1.0)*(8.0*l[3] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e41_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 32.0*l[3]*(4.0*l[3] - 1.0); D2[1][3] = D2[3][1] = 4.0*(8.0*l[1] - 1.0)*(8.0*l[3] - 1.0); D2[3][3] = 32.0*l[1]*(4.0*l[1] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 4 */ /*--------------------------------------------------------------------------*/ static REAL phi4e42_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[3] - 96.0)*l[3] + 16.0)*l[3]*l[1]/3.0); } static const REAL *grd_phi4e42_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = ((128*l[3] - 96.0)*l[3] + 16.0)*l[3]/3.0; grd[3] = ((128*l[3] - 64.0)*l[3] + 16.0/3.0)*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4e42_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = (256.0*l[3] - 64.0)*l[1]; D2[1][3] = D2[3][1] = (128.0*l[3] - 64.0)*l[3] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at edge 5 */ /*--------------------------------------------------------------------------*/ static REAL phi4e50_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[2] - 96.0)*l[2] + 16.0)*l[2]*l[3]/3.0); } static const REAL *grd_phi4e50_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[2] = ((128*l[2] - 64.0)*l[2] + 16.0/3.0)*l[3]; grd[3] = ((128*l[2] - 96.0)*l[2] + 16.0)*l[2]/3.0; return((const REAL *) grd); } static const REAL (*D2_phi4e50_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = (256.0*l[2] - 64.0)*l[3]; D2[2][3] = D2[3][2] = (128.0*l[2] - 64.0)*l[2] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at edge 5 */ /*--------------------------------------------------------------------------*/ static REAL phi4e51_3d(const REAL l[N_LAMBDA]) { return((4.0*l[2] - 1.0)*l[2]*(4.0*l[3] - 1.0)*l[3]*4.0); } static const REAL *grd_phi4e51_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[2] = 4.0*(8.0*l[2] - 1.0)*l[3]*(4.0*l[3] - 1.0); grd[3] = 4.0*l[2]*(4.0*l[2] - 1.0)*(8.0*l[3] - 1.0); return((const REAL *) grd); } static const REAL (*D2_phi4e51_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[2][2] = 32.0*l[3]*(4.0*l[3] - 1.0); D2[2][3] = D2[3][2] = 4.0*(8.0*l[2] - 1.0)*(8.0*l[3] - 1.0); D2[3][3] = 32.0*l[2]*(4.0*l[2] - 1.0); return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at edge 5 */ /*--------------------------------------------------------------------------*/ static REAL phi4e52_3d(const REAL l[N_LAMBDA]) { return(((128.0*l[3] - 96.0)*l[3] + 16.0)*l[3]*l[2]/3.0); } static const REAL *grd_phi4e52_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[2] = ((128*l[3] - 96.0)*l[3] + 16.0)*l[3]/3.0; grd[3] = ((128*l[3] - 64.0)*l[3] + 16.0/3.0)*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4e52_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[3][3] = (256.0*l[3] - 64.0)*l[2]; D2[2][3] = D2[3][2] = (128.0*l[3] - 64.0)*l[3] + 16.0/3.0; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at face 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4f30_3d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*l[1]*l[2]*32.0); } static const REAL *grd_phi4f30_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(8.0*l[0] - 1.0)*l[1]*l[2]; grd[1] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[2]; grd[2] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4f30_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 256.0*l[1]*l[2]; D2[0][1] = D2[1][0] = 32.0*(8.0*l[0] - 1.0)*l[2]; D2[0][2] = D2[2][0] = 32.0*(8.0*l[0] - 1.0)*l[1]; D2[1][2] = D2[2][1] = 32.0*(4.0*l[0] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at face 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4f31_3d(const REAL l[N_LAMBDA]) { return(l[0]*(4.0*l[1] - 1.0)*l[1]*l[2]*32.0); } static const REAL *grd_phi4f31_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(4.0*l[1] - 1.0)*l[1]*l[2]; grd[1] = 32.0*(8.0*l[1] - 1.0)*l[0]*l[2]; grd[2] = 32.0*(4.0*l[1] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4f31_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 32.0*(8.0*l[1] - 1.0)*l[2]; D2[0][2] = D2[2][0] = 32.0*(4.0*l[1] - 1.0)*l[1]; D2[1][1] = 256.0*l[0]*l[2]; D2[1][2] = D2[2][1] = 32.0*(8.0*l[1] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at face 3 */ /*--------------------------------------------------------------------------*/ static REAL phi4f32_3d(const REAL l[N_LAMBDA]) { return(l[0]*l[1]*(4.0*l[2] - 1.0)*l[2]*32.0); } static const REAL *grd_phi4f32_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(4.0*l[2] - 1.0)*l[1]*l[2]; grd[1] = 32.0*(4.0*l[2] - 1.0)*l[0]*l[2]; grd[2] = 32.0*(8.0*l[2] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4f32_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 32.0*(4.0*l[2] - 1.0)*l[2]; D2[0][2] = D2[2][0] = 32.0*(8.0*l[2] - 1.0)*l[1]; D2[1][2] = D2[2][1] = 32.0*(8.0*l[2] - 1.0)*l[0]; D2[2][2] = 256.0*l[0]*l[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at face 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4f20_3d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*l[1]*l[3]*32.0); } static const REAL *grd_phi4f20_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(8.0*l[0] - 1.0)*l[1]*l[3]; grd[1] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[3]; grd[3] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4f20_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 256.0*l[1]*l[3]; D2[0][1] = D2[1][0] = 32.0*(8.0*l[0] - 1.0)*l[3]; D2[0][3] = D2[3][0] = 32.0*(8.0*l[0] - 1.0)*l[1]; D2[1][3] = D2[3][1] = 32.0*(4.0*l[0] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at face 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4f21_3d(const REAL l[N_LAMBDA]) { return(l[0]*(4.0*l[1] - 1.0)*l[1]*l[3]*32.0); } static const REAL *grd_phi4f21_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(4.0*l[1] - 1.0)*l[1]*l[3]; grd[1] = 32.0*(8.0*l[1] - 1.0)*l[0]*l[3]; grd[3] = 32.0*(4.0*l[1] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4f21_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 32.0*(8.0*l[1] - 1.0)*l[3]; D2[0][3] = D2[3][0] = 32.0*(4.0*l[1] - 1.0)*l[1]; D2[1][1] = 256.0*l[0]*l[3]; D2[1][3] = D2[3][1] = 32.0*(8.0*l[1] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at face 2 */ /*--------------------------------------------------------------------------*/ static REAL phi4f22_3d(const REAL l[N_LAMBDA]) { return(l[0]*l[1]*(4.0*l[3] - 1.0)*l[3]*32.0); } static const REAL *grd_phi4f22_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(4.0*l[3] - 1.0)*l[1]*l[3]; grd[1] = 32.0*(4.0*l[3] - 1.0)*l[0]*l[3]; grd[3] = 32.0*(8.0*l[3] - 1.0)*l[0]*l[1]; return((const REAL *) grd); } static const REAL (*D2_phi4f22_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 32.0*(4.0*l[3] - 1.0)*l[3]; D2[0][3] = D2[3][0] = 32.0*(8.0*l[3] - 1.0)*l[1]; D2[1][3] = D2[3][1] = 32.0*(8.0*l[3] - 1.0)*l[0]; D2[3][3] = 256.0*l[0]*l[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at face 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4f10_3d(const REAL l[N_LAMBDA]) { return((4.0*l[0] - 1.0)*l[0]*l[2]*l[3]*32.0); } static const REAL *grd_phi4f10_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(8.0*l[0] - 1.0)*l[2]*l[3]; grd[2] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[3]; grd[3] = 32.0*(4.0*l[0] - 1.0)*l[0]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4f10_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][0] = 256.0*l[2]*l[3]; D2[0][2] = D2[2][0] = 32.0*(8.0*l[0] - 1.0)*l[3]; D2[0][3] = D2[3][0] = 32.0*(8.0*l[0] - 1.0)*l[2]; D2[2][3] = D2[3][2] = 32.0*(4.0*l[0] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at face 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4f11_3d(const REAL l[N_LAMBDA]) { return(l[0]*(4.0*l[2] - 1.0)*l[2]*l[3]*32.0); } static const REAL *grd_phi4f11_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(4.0*l[2] - 1.0)*l[2]*l[3]; grd[2] = 32.0*(8.0*l[2] - 1.0)*l[0]*l[3]; grd[3] = 32.0*(4.0*l[2] - 1.0)*l[0]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4f11_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][2] = D2[2][0] = 32.0*(8.0*l[2] - 1.0)*l[3]; D2[0][3] = D2[3][0] = 32.0*(4.0*l[2] - 1.0)*l[2]; D2[2][2] = 256.0*l[0]*l[3]; D2[2][3] = D2[3][2] = 32.0*(8.0*l[2] - 1.0)*l[0]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at face 1 */ /*--------------------------------------------------------------------------*/ static REAL phi4f12_3d(const REAL l[N_LAMBDA]) { return(l[0]*l[2]*(4.0*l[3] - 1.0)*l[3]*32.0); } static const REAL *grd_phi4f12_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 32.0*(4.0*l[3] - 1.0)*l[2]*l[3]; grd[2] = 32.0*(4.0*l[3] - 1.0)*l[0]*l[3]; grd[3] = 32.0*(8.0*l[3] - 1.0)*l[0]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4f12_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][2] = D2[2][0] = 32.0*(4.0*l[3] - 1.0)*l[3]; D2[0][3] = D2[3][0] = 32.0*(8.0*l[3] - 1.0)*l[2]; D2[2][3] = D2[3][2] = 32.0*(8.0*l[3] - 1.0)*l[0]; D2[3][3] = 256.0*l[0]*l[2]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 0 at face 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4f00_3d(const REAL l[N_LAMBDA]) { return((4.0*l[1] - 1.0)*l[1]*l[2]*l[3]*32.0); } static const REAL *grd_phi4f00_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = 32.0*(8.0*l[1] - 1.0)*l[2]*l[3]; grd[2] = 32.0*(4.0*l[1] - 1.0)*l[1]*l[3]; grd[3] = 32.0*(4.0*l[1] - 1.0)*l[1]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4f00_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][1] = 256.0*l[2]*l[3]; D2[1][2] = D2[2][1] = 32.0*(8.0*l[1] - 1.0)*l[3]; D2[1][3] = D2[3][1] = 32.0*(8.0*l[1] - 1.0)*l[2]; D2[2][3] = D2[3][2] = 32.0*(4.0*l[1] - 1.0)*l[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 1 at face 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4f01_3d(const REAL l[N_LAMBDA]) { return(l[1]*(4.0*l[2] - 1.0)*l[2]*l[3]*32.0); } static const REAL *grd_phi4f01_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = 32.0*(4.0*l[2] - 1.0)*l[2]*l[3]; grd[2] = 32.0*(8.0*l[2] - 1.0)*l[1]*l[3]; grd[3] = 32.0*(4.0*l[2] - 1.0)*l[1]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4f01_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][2] = D2[2][1] = 32.0*(8.0*l[2] - 1.0)*l[3]; D2[1][3] = D2[3][1] = 32.0*(4.0*l[2] - 1.0)*l[2]; D2[2][2] = 256.0*l[1]*l[3]; D2[2][3] = D2[3][2] = 32.0*(8.0*l[2] - 1.0)*l[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction 2 at face 0 */ /*--------------------------------------------------------------------------*/ static REAL phi4f02_3d(const REAL l[N_LAMBDA]) { return(l[1]*l[2]*(4.0*l[3] - 1.0)*l[3]*32.0); } static const REAL *grd_phi4f02_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[1] = 32.0*(4.0*l[3] - 1.0)*l[2]*l[3]; grd[2] = 32.0*(4.0*l[3] - 1.0)*l[1]*l[3]; grd[3] = 32.0*(8.0*l[3] - 1.0)*l[1]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4f02_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[1][2] = D2[2][1] = 32.0*(4.0*l[3] - 1.0)*l[3]; D2[1][3] = D2[3][1] = 32.0*(8.0*l[3] - 1.0)*l[2]; D2[2][3] = D2[3][2] = 32.0*(8.0*l[3] - 1.0)*l[1]; D2[3][3] = 256.0*l[1]*l[2]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* basisfunction at center */ /*--------------------------------------------------------------------------*/ static REAL phi4c_3d(const REAL l[N_LAMBDA]) { return(256.0*l[0]*l[1]*l[2]*l[3]); } static const REAL *grd_phi4c_3d(const REAL l[N_LAMBDA]) { static REAL grd[N_LAMBDA]; grd[0] = 256.0*l[1]*l[2]*l[3]; grd[1] = 256.0*l[0]*l[2]*l[3]; grd[2] = 256.0*l[0]*l[1]*l[3]; grd[3] = 256.0*l[0]*l[1]*l[2]; return((const REAL *) grd); } static const REAL (*D2_phi4c_3d(const REAL l[N_LAMBDA]))[N_LAMBDA] { static REAL D2[N_LAMBDA][N_LAMBDA]; D2[0][1] = D2[1][0] = 256.0*l[2]*l[3]; D2[0][2] = D2[2][0] = 256.0*l[1]*l[3]; D2[0][3] = D2[3][0] = 256.0*l[1]*l[2]; D2[1][2] = D2[2][1] = 256.0*l[0]*l[3]; D2[1][3] = D2[3][1] = 256.0*l[0]*l[2]; D2[2][3] = D2[3][2] = 256.0*l[0]*l[1]; return((const REAL (*)[N_LAMBDA]) D2); } /*--------------------------------------------------------------------------*/ /* functions for combining basisfunctions with coefficients */ /*--------------------------------------------------------------------------*/ static const int *order_e_indices_3d(const EL *el, int edge) { static int sorted[2][3] = {{0,1,2}, {2,1,0}}; DOF **dof = el->dof; if (dof[vertex_of_edge_3d[edge][0]][0] < dof[vertex_of_edge_3d[edge][1]][0]) return((const int *) sorted[0]); else return((const int *) sorted[1]); } static const int *order_f_indices_3d(const EL *el, int face) { FUNCNAME("order_f_indices_3d"); static int sorted[7][3] = {{0,0,0}, {0,2,1}, {1,0,2}, {0,1,2}, {2,1,0}, {1,2,0}, {2,0,1}}; static int vertex_of_face[4][3] = {{1,2,3}, {0,2,3}, {0,1,3}, {0,1,2}}; int no, *vof; DOF **dof = el->dof; vof = vertex_of_face[face]; no = 0; if (dof[vof[0]][0] < dof[vof[1]][0]) no++; if (dof[vof[1]][0] < dof[vof[2]][0]) no += 2; if (dof[vof[2]][0] < dof[vof[0]][0]) no += 4; if (no >= 1 && no <= 6) return((const int *) sorted[no]); else { MSG("can not sort face indices of element %d at face %d\n", INDEX(el), face); return(nil); } } static const DOF *get_dof_indices4_3d(const EL *el, const DOF_ADMIN *admin, DOF *idof) { FUNCNAME("get_dof_indices4_3d"); static DOF index_vec[N_BAS4_3D]; DOF *rvec = idof ? idof : index_vec; int i, j, k, n0, node0; const int *indi; DOF **dof = el->dof; n0 = admin->n0_dof[VERTEX]; for (j = i = 0; i < N_VERTICES_3D; i++) rvec[j++] = dof[i][n0]; n0 = admin->n0_dof[EDGE]; node0 = admin->mesh->node[EDGE]; for (i = 0; i < N_EDGES_3D; node0++, i++) { indi = order_e_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = dof[node0][n0+indi[k]]; } n0 = admin->n0_dof[FACE]; node0 = admin->mesh->node[FACE]; for (i = 0; i < N_FACES_3D; node0++, i++) { indi = order_f_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = dof[node0][n0+indi[k]]; } DEBUG_TEST_EXIT(j == N_BAS4_3D-1, "Did not find enough dofs.\n"); n0 = admin->n0_dof[CENTER]; node0 = admin->mesh->node[CENTER]; rvec[j] = dof[node0][n0]; return((const DOF *) rvec); } static const S_CHAR *get_bound4_3d(const EL_INFO *el_info, S_CHAR *bound) { FUNCNAME("get_bound4_3d"); static S_CHAR bound_vec[N_BAS4_3D]; S_CHAR *rvec = bound ? bound : bound_vec; int i, j; DEBUG_TEST_FLAG(FILL_BOUND, el_info); for (j = i = 0; i < N_VERTICES_3D; j++, i++) rvec[j] = el_info->vertex_bound[i]; for (i = 0; i < N_EDGES_3D; j += 3, i++) rvec[j] = rvec[j+1] = rvec[j+2] = el_info->edge_bound[i]; for (i = 0; i < N_FACES_3D; j += 3, i++) rvec[j] = rvec[j+1] = rvec[j+2] = el_info->face_bound[i]; rvec[j] = INTERIOR; return((const S_CHAR *) rvec); } static const int *get_int_vec4_3d(const EL *el, const DOF_INT_VEC *vec, int *ivec) { FUNCNAME("get_int_vec4_3d"); int i, j, k, n0, node0; const int *indi; static int local_vec[N_BAS4_3D]; int *v = nil, *rvec = ivec ? ivec : local_vec; DOF **dof = el->dof; const DOF_ADMIN *admin = nil; GET_DOF_VEC(v, vec); GET_STRUCT(admin,vec->fe_space); n0 = admin->n0_dof[VERTEX]; for (j = i = 0; i < N_VERTICES_3D; i++) rvec[j++] = v[dof[i][n0]]; n0 = admin->n0_dof[EDGE]; node0 = admin->mesh->node[EDGE]; for (i = 0; i < N_EDGES_3D; node0++, i++) { indi = order_e_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } n0 = admin->n0_dof[FACE]; node0 = admin->mesh->node[FACE]; for (i = 0; i < N_FACES_3D; node0++, i++) { indi = order_f_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } DEBUG_TEST_EXIT(j == N_BAS4_3D-1, "Did not find enough dofs\n"); n0 = admin->n0_dof[CENTER]; node0 = admin->mesh->node[CENTER]; rvec[j] = v[dof[node0][n0]]; return((const int *) rvec); } static const REAL *get_real_vec4_3d(const EL *el, const DOF_REAL_VEC *vec, REAL *Rvec) { FUNCNAME("get_real_vec4_3d"); int i, j, k, n0, node0; const int *indi; static REAL local_vec[N_BAS4_3D]; REAL *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; const DOF_ADMIN *admin = nil; GET_DOF_VEC(v, vec); GET_STRUCT(admin,vec->fe_space); n0 = admin->n0_dof[VERTEX]; for (j = i = 0; i < N_VERTICES_3D; i++) rvec[j++] = v[dof[i][n0]]; n0 = admin->n0_dof[EDGE]; node0 = admin->mesh->node[EDGE]; for (i = 0; i < N_EDGES_3D; node0++, i++) { indi = order_e_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } n0 = admin->n0_dof[FACE]; node0 = admin->mesh->node[FACE]; for (i = 0; i < N_FACES_3D; node0++, i++) { indi = order_f_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } DEBUG_TEST_EXIT(j == N_BAS4_3D-1, "Did not find enough dofs\n"); n0 = admin->n0_dof[CENTER]; node0 = admin->mesh->node[CENTER]; rvec[j] = v[dof[node0][n0]]; return((const REAL *) rvec); } static const REAL_D *get_real_d_vec4_3d(const EL *el, const DOF_REAL_D_VEC *vec, REAL_D *Rvec) { FUNCNAME("get_real_d_vec4_3d"); int i, j, k, l, n0, node0; const int *indi; static REAL_D local_vec[N_BAS4_3D]; REAL_D *v = nil, *rvec = Rvec ? Rvec : local_vec; DOF **dof = el->dof; const DOF_ADMIN *admin = nil; GET_DOF_VEC(v, vec); GET_STRUCT(admin,vec->fe_space); n0 = admin->n0_dof[VERTEX]; for (j = i = 0; i < N_VERTICES_3D; i++, j++) for (l = 0; l < DIM_OF_WORLD; l++) rvec[j][l] = v[dof[i][n0]][l]; n0 = admin->n0_dof[EDGE]; node0 = admin->mesh->node[EDGE]; for (i = 0; i < N_EDGES_3D; node0++, i++) { indi = order_e_indices_3d(el, i); for (k = 0; k < 3; k++, j++) for (l = 0; l < DIM_OF_WORLD; l++) rvec[j][l] = v[dof[node0][n0+indi[k]]][l]; } n0 = admin->n0_dof[FACE]; node0 = admin->mesh->node[FACE]; for (i = 0; i < N_FACES_3D; node0++, i++) { indi = order_f_indices_3d(el, i); for (k = 0; k < 3; k++, j++) for (l = 0; l < DIM_OF_WORLD; l++) rvec[j][l] = v[dof[node0][n0+indi[k]]][l]; } DEBUG_TEST_EXIT(j == N_BAS4_3D-1, "Did not find enough dofs\n"); n0 = admin->n0_dof[CENTER]; node0 = admin->mesh->node[CENTER]; for (l = 0; l < DIM_OF_WORLD; l++) rvec[j] [l]= v[dof[node0][n0]][l]; return((const REAL_D *) rvec); } static const U_CHAR *get_uchar_vec4_3d(const EL *el, const DOF_UCHAR_VEC *vec, U_CHAR *uvec) { FUNCNAME("get_uchar_vec4_3d"); int i, j, k, n0, node0; const int *indi; static U_CHAR local_vec[N_BAS4_3D]; U_CHAR *v = nil, *rvec = uvec ? uvec : local_vec; DOF **dof = el->dof; const DOF_ADMIN *admin = nil; GET_DOF_VEC(v, vec); GET_STRUCT(admin,vec->fe_space); n0 = admin->n0_dof[VERTEX]; for (j = i = 0; i < N_VERTICES_3D; i++) rvec[j++] = v[dof[i][n0]]; n0 = admin->n0_dof[EDGE]; node0 = admin->mesh->node[EDGE]; for (i = 0; i < N_EDGES_3D; node0++, i++) { indi = order_e_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } n0 = admin->n0_dof[FACE]; node0 = admin->mesh->node[FACE]; for (i = 0; i < N_FACES_3D; node0++, i++) { indi = order_f_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } DEBUG_TEST_EXIT(j == N_BAS4_3D-1, "Did not find enough dofs\n"); n0 = admin->n0_dof[CENTER]; node0 = admin->mesh->node[CENTER]; rvec[j] = v[dof[node0][n0]]; return((const U_CHAR *) rvec); } static const S_CHAR *get_schar_vec4_3d(const EL *el, const DOF_SCHAR_VEC *vec, S_CHAR *svec) { FUNCNAME("get_schar_vec4_3d"); int i, j, k, n0, node0; const int *indi; static S_CHAR local_vec[N_BAS4_3D]; S_CHAR *v = nil, *rvec = svec ? svec : local_vec; DOF **dof = el->dof; const DOF_ADMIN *admin = nil; GET_DOF_VEC(v, vec); GET_STRUCT(admin,vec->fe_space); n0 = admin->n0_dof[VERTEX]; for (j = i = 0; i < N_VERTICES_3D; i++) rvec[j++] = v[dof[i][n0]]; n0 = admin->n0_dof[EDGE]; node0 = admin->mesh->node[EDGE]; for (i = 0; i < N_EDGES_3D; node0++, i++) { indi = order_e_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } n0 = admin->n0_dof[FACE]; node0 = admin->mesh->node[FACE]; for (i = 0; i < N_FACES_3D; node0++, i++) { indi = order_f_indices_3d(el, i); for (k = 0; k < 3; k++) rvec[j++] = v[dof[node0][n0+indi[k]]]; } DEBUG_TEST_EXIT(j == N_BAS4_3D-1, "Did not find enough dofs\n"); n0 = admin->n0_dof[CENTER]; node0 = admin->mesh->node[CENTER]; rvec[j] = v[dof[node0][n0]]; return((const S_CHAR *) rvec); } /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of scalar functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL(,4,3,35) /*--------------------------------------------------------------------*/ /*--- function for local interpolaton of vector functions ---*/ /*--------------------------------------------------------------------*/ GENERATE_INTERPOL_D(,4,3,35) /*--------------------------------------------------------------------------*/ /* functions for interpolation/ restriction during refinement/coarsening */ /*--------------------------------------------------------------------------*/ static void real_refine_inter4_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_refine_inter4_3d"); DOF pd[N_BAS4_3D]; const DOF *cd; EL *el; REAL *v = nil; int i, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); v[cd[3]] = (v[pd[5]]); v[cd[10]] = (0.2734375*v[pd[0]] - 0.0390625*v[pd[1]] + 1.09375*v[pd[4]] - 0.546875*v[pd[5]] + 0.21875*v[pd[6]]); v[cd[11]] = (v[pd[4]]); v[cd[12]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.46875*v[pd[4]] + 0.703125*v[pd[5]] - 0.15625*v[pd[6]]); v[cd[16]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.1875*(v[pd[7]]+v[pd[13]]-v[pd[31]]-v[pd[32]]) + 0.375*(-v[pd[8]] - v[pd[14]]) + 0.5*(v[pd[9]] + v[pd[15]]) + 0.75*v[pd[33]]); v[cd[17]] = (v[pd[33]]); v[cd[18]] = (0.0234375*(v[pd[0]] + v[pd[1]]) + 0.09375*(-v[pd[4]] - v[pd[6]]) + 0.140625*v[pd[5]] + 0.0625*(-v[pd[7]] - v[pd[13]]) + 0.5625*(v[pd[31]] + v[pd[32]])); v[cd[19]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.1875*(v[pd[10]]+v[pd[16]]-v[pd[28]]-v[pd[29]]) + 0.375*(-v[pd[11]] - v[pd[17]]) + 0.5*(v[pd[12]] + v[pd[18]]) + 0.75*v[pd[30]]); v[cd[20]] = (v[pd[30]]); v[cd[21]] = (0.0234375*(v[pd[0]] + v[pd[1]]) + 0.09375*(-v[pd[4]] - v[pd[6]]) + 0.140625*v[pd[5]] + 0.0625*(-v[pd[10]] - v[pd[16]]) + 0.5625*(v[pd[28]] + v[pd[29]])); v[cd[22]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.125*(v[pd[7]]-v[pd[8]]+v[pd[13]]-v[pd[14]] -v[pd[31]]-v[pd[32]]) + 0.0625*(v[pd[10]]+v[pd[16]]-v[pd[28]]-v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[33]]) + 0.5*(v[pd[23]] + v[pd[26]] + v[pd[34]])); v[cd[23]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.0625*(v[pd[7]]+v[pd[13]]-v[pd[31]]-v[pd[32]]) + 0.125*(v[pd[10]]-v[pd[11]]+v[pd[16]]-v[pd[17]] -v[pd[28]]-v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[30]]) + 0.5*(v[pd[24]] + v[pd[27]] + v[pd[34]])); v[cd[24]] = (v[pd[34]]); v[cd[25]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.3125*(v[pd[10]] - v[pd[29]]) + 0.0625*v[pd[16]] + 0.9375*v[pd[28]]); v[cd[26]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.125*(-v[pd[10]] + v[pd[16]] - v[pd[17]]) + 0.375*(v[pd[11]] + v[pd[28]] - v[pd[29]]) + 0.75*v[pd[30]]); v[cd[27]] = (v[pd[28]]); v[cd[28]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.3125*(v[pd[7]] - v[pd[32]]) + 0.0625*v[pd[13]] + 0.9375*v[pd[31]]); v[cd[29]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.125*(-v[pd[7]] + v[pd[13]] - v[pd[14]]) + 0.375*(v[pd[8]] + v[pd[31]] - v[pd[32]]) + 0.75*v[pd[33]]); v[cd[30]] = (v[pd[31]]); v[cd[34]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.0625*(-v[pd[7]]-v[pd[10]]+v[pd[13]]+v[pd[16]]) - 0.125*v[pd[22]] + 0.375*v[pd[25]] + 0.1875*(v[pd[28]]-v[pd[29]]+v[pd[31]]-v[pd[32]]) + 0.75*v[pd[34]]); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ v[cd[10]] = (-0.0390625*v[pd[0]] + 0.2734375*v[pd[1]] + 0.21875*v[pd[4]] - 0.546875*v[pd[5]] + 1.09375*v[pd[6]]); v[cd[11]] = v[pd[6]]; v[cd[12]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.15625*v[pd[4]] + 0.703125*v[pd[5]] + 0.46875*v[pd[6]]); v[cd[25]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[7]] + 0.3125*(v[pd[13]] - v[pd[31]]) + 0.9375*v[pd[32]]); v[cd[26]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[7]] - v[pd[8]] - v[pd[13]]) + 0.375*(v[pd[14]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[33]]); v[cd[27]] = v[pd[32]]; v[cd[28]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[10]] + 0.3125*(v[pd[16]] - v[pd[28]]) + 0.9375*v[pd[29]]); v[cd[29]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[10]] - v[pd[11]] - v[pd[16]]) + 0.375*(v[pd[17]] - v[pd[28]] + v[pd[29]]) + 0.75*v[pd[30]]); v[cd[30]] = v[pd[29]]; v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] -v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] -v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ v[cd[10]] = (-0.0390625*v[pd[0]] + 0.2734375*v[pd[1]] + 0.21875*v[pd[4]] - 0.546875*v[pd[5]] + 1.09375*v[pd[6]]); v[cd[11]] = v[pd[6]]; v[cd[12]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.15625*v[pd[4]] + 0.703125*v[pd[5]] + 0.46875*v[pd[6]]); v[cd[25]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[10]] + 0.3125*(v[pd[16]] - v[pd[28]]) + 0.9375*v[pd[29]]); v[cd[26]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[10]] - v[pd[11]] - v[pd[16]]) + 0.375*(v[pd[17]] - v[pd[28]] + v[pd[29]]) + 0.75*v[pd[30]]); v[cd[27]] = v[pd[29]]; v[cd[28]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[7]] + 0.3125*(v[pd[13]] - v[pd[31]]) + 0.9375*v[pd[32]]); v[cd[29]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[7]] - v[pd[8]] - v[pd[13]]) + 0.375*(v[pd[14]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[33]]); v[cd[30]] = v[pd[32]]; v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: v[cd[16]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.1875*(v[pd[7]] + v[pd[13]] - v[pd[31]] - v[pd[32]]) + 0.375*(-v[pd[8]] - v[pd[14]]) + 0.5*(v[pd[9]] + v[pd[15]]) + 0.75*v[pd[33]]); v[cd[17]] = v[pd[33]]; v[cd[18]] = (0.0234375*(v[pd[0]] + v[pd[1]]) + 0.09375*(-v[pd[4]] - v[pd[6]]) + 0.140625*v[pd[5]] + 0.0625*(-v[pd[7]] - v[pd[13]]) + 0.5625*(v[pd[31]] + v[pd[32]])); v[cd[22]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.125*(v[pd[7]] - v[pd[8]] + v[pd[13]] - v[pd[14]] - v[pd[31]] - v[pd[32]]) + 0.0625*(v[pd[10]] + v[pd[16]] - v[pd[28]] - v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[33]]) + 0.5*(v[pd[23]] + v[pd[26]] + v[pd[34]])); v[cd[23]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.0625*(v[pd[7]] + v[pd[13]] - v[pd[31]] - v[pd[32]]) + 0.125*(v[pd[10]] - v[pd[11]] + v[pd[16]] - v[pd[17]] - v[pd[28]] - v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[30]]) + 0.5*(v[pd[24]] + v[pd[27]] + v[pd[34]])); v[cd[24]] = v[pd[34]]; v[cd[28]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.3125*(v[pd[7]] - v[pd[32]]) + 0.0625*v[pd[13]] + 0.9375*v[pd[31]]); v[cd[29]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.125*(-v[pd[7]] + v[pd[13]] - v[pd[14]]) + 0.375*(v[pd[8]] + v[pd[31]] - v[pd[32]]) + 0.75*v[pd[33]]); v[cd[30]] = v[pd[31]]; v[cd[34]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.0625*(-v[pd[7]] - v[pd[10]] + v[pd[13]] + v[pd[16]]) - 0.125*v[pd[22]] + 0.375*v[pd[25]] + 0.1875*(v[pd[28]] - v[pd[29]] + v[pd[31]] - v[pd[32]]) + 0.75*v[pd[34]]); break; case 2: v[cd[19]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.1875*(v[pd[10]] + v[pd[16]] - v[pd[28]] - v[pd[29]]) + 0.375*(-v[pd[11]] - v[pd[17]]) + 0.5*(v[pd[12]] + v[pd[18]]) + 0.75*v[pd[30]]); v[cd[20]] = v[pd[30]]; v[cd[21]] = (0.0234375*(v[pd[0]] + v[pd[1]]) + 0.09375*(-v[pd[4]] - v[pd[6]]) + 0.140625*v[pd[5]] + 0.0625*(-v[pd[10]] - v[pd[16]]) + 0.5625*(v[pd[28]] + v[pd[29]])); v[cd[22]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.125*(v[pd[7]] - v[pd[8]] + v[pd[13]] - v[pd[14]] - v[pd[31]] - v[pd[32]]) + 0.0625*(v[pd[10]] + v[pd[16]] - v[pd[28]] - v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[33]]) + 0.5*(v[pd[23]] + v[pd[26]] + v[pd[34]])); v[cd[23]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.0625*(v[pd[7]] + v[pd[13]] - v[pd[31]] - v[pd[32]]) + 0.125*(v[pd[10]] - v[pd[11]] + v[pd[16]] - v[pd[17]] - v[pd[28]] - v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[30]]) + 0.5*(v[pd[24]] + v[pd[27]] + v[pd[34]])); v[cd[24]] = v[pd[34]]; v[cd[25]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.3125*(v[pd[10]] - v[pd[29]]) + 0.0625*v[pd[16]] + 0.9375*v[pd[28]]); v[cd[26]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.125*(-v[pd[10]] + v[pd[16]] - v[pd[17]]) + 0.375*(v[pd[11]] + v[pd[28]] - v[pd[29]]) + 0.75*v[pd[30]]); v[cd[27]] = v[pd[28]]; v[cd[34]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.0625*(-v[pd[7]] - v[pd[10]] + v[pd[13]] + v[pd[16]]) - 0.125*v[pd[22]] + 0.375*v[pd[25]] + 0.1875*(v[pd[28]] - v[pd[29]] + v[pd[31]] - v[pd[32]]) + 0.75*v[pd[34]]); break; case 3: v[cd[22]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.125*(v[pd[7]] - v[pd[8]] + v[pd[13]] - v[pd[14]] - v[pd[31]] - v[pd[32]]) + 0.0625*(v[pd[10]] + v[pd[16]] - v[pd[28]] - v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[33]]) + 0.5*(v[pd[23]] + v[pd[26]] + v[pd[34]])); v[cd[23]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.03125*(v[pd[4]] + v[pd[6]]) + 0.015625*v[pd[5]] + 0.0625*(v[pd[7]] + v[pd[13]] - v[pd[31]] - v[pd[32]]) + 0.125*(v[pd[10]] - v[pd[11]] + v[pd[16]] - v[pd[17]] - v[pd[28]] - v[pd[29]]) + 0.25*(-v[pd[22]] - v[pd[25]] + v[pd[30]]) + 0.5*(v[pd[24]] + v[pd[27]] + v[pd[34]])); v[cd[24]] = v[pd[34]]; v[cd[34]] = (0.0234375*v[pd[0]] - 0.0390625*v[pd[1]] - 0.03125*v[pd[4]] - 0.046875*v[pd[5]] + 0.09375*v[pd[6]] + 0.0625*(-v[pd[7]] - v[pd[10]] + v[pd[13]] + v[pd[16]]) - 0.125*v[pd[22]] + 0.375*v[pd[25]] + 0.1875*(v[pd[28]] - v[pd[29]] + v[pd[31]] - v[pd[32]]) + 0.75*v[pd[34]]); break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: v[cd[25]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[7]] + 0.3125*(v[pd[13]] - v[pd[31]]) + 0.9375*v[pd[32]]); v[cd[26]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[7]] - v[pd[8]] - v[pd[13]]) + 0.375*(v[pd[14]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[33]]); v[cd[27]] = v[pd[32]]; v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); break; case 2: v[cd[28]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[10]] + 0.3125*(v[pd[16]] - v[pd[28]]) + 0.9375*v[pd[29]]); v[cd[29]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[10]] - v[pd[11]] - v[pd[16]]) + 0.375*(v[pd[17]] - v[pd[28]] + v[pd[29]]) + 0.75*v[pd[30]]); v[cd[30]] = v[pd[29]]; v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); break; case 3: v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); break; } } else { switch(lr_set) { case 1: v[cd[28]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[7]] + 0.3125*(v[pd[13]] - v[pd[31]]) + 0.9375*v[pd[32]]); v[cd[29]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[7]] - v[pd[8]] - v[pd[13]]) + 0.375*(v[pd[14]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[33]]); v[cd[30]] = v[pd[32]]; v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); break; case 2: v[cd[25]] = (0.0390625*(-v[pd[0]] - v[pd[1]]) + 0.15625*(v[pd[4]] + v[pd[6]]) - 0.234375*v[pd[5]] + 0.0625*v[pd[10]] + 0.3125*(v[pd[16]] - v[pd[28]]) + 0.9375*v[pd[29]]); v[cd[26]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.125*(v[pd[10]] - v[pd[11]] - v[pd[16]]) + 0.375*(v[pd[17]] - v[pd[28]] + v[pd[29]]) + 0.75*v[pd[30]]); v[cd[27]] = v[pd[29]]; v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); break; case 3: v[cd[34]] = (-0.0390625*v[pd[0]] + 0.0234375*v[pd[1]] + 0.09375*v[pd[4]] - 0.046875*v[pd[5]] - 0.03125*v[pd[6]] + 0.0625*(v[pd[7]] + v[pd[10]] - v[pd[13]] - v[pd[16]]) + 0.375*v[pd[22]] - 0.125*v[pd[25]] + 0.1875*(-v[pd[28]] + v[pd[29]] - v[pd[31]] + v[pd[32]]) + 0.75*v[pd[34]]); break; } } } return; } static void real_coarse_inter4_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_inter4_3d"); DOF pd[N_BAS4_3D]; const DOF *cd; EL *el; REAL *v = nil; int i, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); v[pd[4]] = v[cd[11]]; v[pd[5]] = v[cd[3]]; v[pd[28]] = v[cd[27]]; v[pd[30]] = v[cd[20]]; v[pd[31]] = v[cd[30]]; v[pd[33]] = v[cd[17]]; v[pd[34]] = v[cd[24]]; /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ v[pd[6]] = v[cd[11]]; v[pd[29]] = v[cd[30]]; v[pd[32]] = v[cd[27]]; } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ v[pd[6]] = v[cd[11]]; v[pd[29]] = v[cd[27]]; v[pd[32]] = v[cd[30]]; } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: v[pd[31]] = v[cd[30]]; v[pd[33]] = v[cd[17]]; v[pd[34]] = v[cd[24]]; break; case 2: v[pd[28]] = v[cd[27]]; v[pd[30]] = v[cd[20]]; v[pd[34]] = v[cd[24]]; break; case 3: v[pd[34]] = v[cd[24]]; break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: v[pd[32]] = v[cd[27]]; break; case 2: v[pd[29]] = v[cd[30]]; break; } } else { switch(lr_set) { case 1: v[pd[32]] = v[cd[30]]; break; case 2: v[pd[29]] = v[cd[27]]; break; } } } return; } static void real_coarse_restr4_3d(DOF_REAL_VEC *drv, RC_LIST_EL *list, int n) { FUNCNAME("real_coarse_restr4_3d"); DOF pd[N_BAS4_3D]; const DOF *cd; EL *el; REAL *v = nil; int i, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drv); GET_DOF_VEC(v, drv); if (!drv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drv)); return; } else if (!drv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drv->fe_space)); return; } get_dof_indices = drv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); v[pd[0]] += (0.2734375*v[cd[10]] + 0.0390625*(-v[cd[12]] - v[cd[16]] - v[cd[19]] - v[cd[22]] - v[cd[23]] - v[cd[25]] - v[cd[28]]) + 0.0234375*(v[cd[18]] + v[cd[21]] + v[cd[26]] + v[cd[29]] + v[cd[34]])); v[pd[1]] += (0.0390625*(-v[cd[10]] - v[cd[16]] - v[cd[19]] - v[cd[22]] - v[cd[23]] - v[cd[25]] - v[cd[26]] - v[cd[28]] - v[cd[29]] - v[cd[34]]) + 0.0234375*(v[cd[12]] + v[cd[18]] + v[cd[21]])); v[pd[4]] = (v[cd[11]] + 1.09375*v[cd[10]] + 0.46875*v[cd[12]] + 0.03125*(v[cd[16]] + v[cd[19]] + v[cd[22]] + v[cd[23]] - v[cd[26]] - v[cd[29]] - v[cd[34]]) + 0.09375*(-v[cd[18]] - v[cd[21]]) + 0.15625*(v[cd[25]] + v[cd[28]])); v[pd[5]] = (v[cd[3]] - 0.546875*v[cd[10]] + 0.703125*v[cd[12]] + 0.015625*(v[cd[16]] + v[cd[19]] + v[cd[22]] + v[cd[23]]) + 0.140625*(v[cd[18]] + v[cd[21]]) + 0.234375*(-v[cd[25]] - v[cd[28]]) + 0.046875*(-v[cd[26]] - v[cd[29]] - v[cd[34]])); v[pd[6]] = (0.21875*v[cd[10]] + 0.15625*(-v[cd[12]] + v[cd[25]] + v[cd[28]]) + 0.03125*(v[cd[16]] + v[cd[19]] + v[cd[22]] + v[cd[23]]) + 0.09375*(-v[cd[18]] - v[cd[21]] + v[cd[26]] + v[cd[29]] + v[cd[34]])); v[pd[7]] += (0.1875*v[cd[16]] + 0.0625*(-v[cd[18]] + v[cd[23]] - v[cd[34]]) + 0.125*(v[cd[22]] - v[cd[29]]) + 0.3125*v[cd[28]]); v[pd[8]] += (0.375*(-v[cd[16]] + v[cd[29]]) - 0.125*v[cd[22]]); v[pd[9]] += 0.5*v[cd[16]]; v[pd[10]] += (0.1875*v[cd[19]] + 0.0625*(-v[cd[21]] + v[cd[22]] - v[cd[34]]) + 0.125*(v[cd[23]] - v[cd[26]]) + 0.3125*v[cd[25]]); v[pd[11]] += (0.375*(-v[cd[19]] + v[cd[26]]) - 0.125*v[cd[23]]); v[pd[12]] += 0.5*v[cd[19]]; v[pd[13]] += (0.1875*v[cd[16]] + 0.0625*(-v[cd[18]] + v[cd[23]] + v[cd[28]] + v[cd[34]]) + 0.125*(v[cd[22]] + v[cd[29]])); v[pd[14]] += (-0.375*v[cd[16]] + 0.125*(-v[cd[22]] - v[cd[29]])); v[pd[15]] += 0.5*v[cd[16]]; v[pd[16]] += (0.1875*v[cd[19]] + 0.0625*(-v[cd[21]] + v[cd[22]] + v[cd[25]] + v[cd[34]]) + 0.125*(v[cd[23]] + v[cd[26]])); v[pd[17]] += (-0.375*v[cd[19]] + 0.125*(-v[cd[23]] - v[cd[26]])); v[pd[18]] += 0.5*v[cd[19]]; v[pd[22]] += (0.25*(-v[cd[22]] - v[cd[23]]) - 0.125*v[cd[34]]); v[pd[23]] += 0.5*v[cd[22]]; v[pd[24]] += 0.5*v[cd[23]]; v[pd[25]] += (0.25*(-v[cd[22]] - v[cd[23]]) + 0.375*v[cd[34]]); v[pd[26]] += 0.5*v[cd[22]]; v[pd[27]] += 0.5*v[cd[23]]; v[pd[28]] = (v[cd[27]] + 0.1875*(-v[cd[19]] + v[cd[34]]) + 0.5625*v[cd[21]] - 0.0625*v[cd[22]] - 0.125*v[cd[23]] + 0.9375*v[cd[25]] + 0.375*v[cd[26]]); v[pd[29]] = (0.1875*(-v[cd[19]] - v[cd[34]]) + 0.5625*v[cd[21]] - 0.0625*v[cd[22]] - 0.125*v[cd[23]] - 0.3125*v[cd[25]] - 0.375*v[cd[26]]); v[pd[30]] = (v[cd[20]] + 0.75*(v[cd[19]] + v[cd[26]]) + 0.25*v[cd[23]]); v[pd[31]] = (v[cd[30]] + 0.1875*(-v[cd[16]] + v[cd[34]]) + 0.5625*v[cd[18]] - 0.125*v[cd[22]] - 0.0625*v[cd[23]] + 0.9375*v[cd[28]] + 0.375*v[cd[29]]); v[pd[32]] = (0.1875*(-v[cd[16]] - v[cd[34]]) + 0.5625*v[cd[18]] - 0.125*v[cd[22]] - 0.0625*v[cd[23]] - 0.3125*v[cd[28]] - 0.375*v[cd[29]]); v[pd[33]] = (v[cd[17]] + 0.75*(v[cd[16]] + v[cd[29]]) + 0.25*v[cd[22]]); v[pd[34]] = (v[cd[24]] + 0.5*(v[cd[22]] + v[cd[23]]) + 0.75*v[cd[34]]); /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ v[pd[0]] += (0.0390625*(-v[cd[10]] - v[cd[25]] - v[cd[26]] - v[cd[28]] - v[cd[29]] - v[cd[34]]) + 0.0234375*v[cd[12]]); v[pd[1]] += (0.2734375*v[cd[10]] + 0.0390625*(-v[cd[12]] - v[cd[25]] - v[cd[28]]) + 0.0234375*(v[cd[26]] + v[cd[29]] + v[cd[34]])); v[pd[4]] += (0.21875*v[cd[10]] + 0.15625*(-v[cd[12]] + v[cd[25]] + v[cd[28]]) + 0.09375*(v[cd[26]] + v[cd[29]] + v[cd[34]])); v[pd[5]] += (-0.546875*v[cd[10]] + 0.703125*v[cd[12]] + 0.234375*(-v[cd[25]] - v[cd[28]]) + 0.046875*(-v[cd[26]] - v[cd[29]] - v[cd[34]])); v[pd[6]] += (v[cd[11]] + 1.09375*v[cd[10]] + 0.46875*v[cd[12]] + 0.15625*(v[cd[25]] + v[cd[28]]) + 0.03125*(-v[cd[26]] - v[cd[29]] - v[cd[34]])); v[pd[7]] += (0.0625*(v[cd[25]] + v[cd[34]]) + 0.125*v[cd[26]]); v[pd[8]] += -0.125*v[cd[26]]; v[pd[10]] += (0.0625*(v[cd[28]] + v[cd[34]]) + 0.125*v[cd[29]]); v[pd[11]] += -0.125*v[cd[29]]; v[pd[13]] += (0.3125*v[cd[25]] - 0.125*v[cd[26]] - 0.0625*v[cd[34]]); v[pd[14]] += 0.375*v[cd[26]]; v[pd[16]] += (0.3125*v[cd[28]] - 0.125*v[cd[29]] - 0.0625*v[cd[34]]); v[pd[17]] += 0.375*v[cd[29]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += (-0.3125*v[cd[28]] - 0.375*v[cd[29]] - 0.1875*v[cd[34]]); v[pd[29]] += (v[cd[30]] + 0.9375*v[cd[28]] + 0.375*v[cd[29]] + 0.1875*v[cd[34]]); v[pd[30]] += 0.75*v[cd[29]]; v[pd[31]] += (-0.3125*v[cd[25]] - 0.375*v[cd[26]] - 0.1875*v[cd[34]]); v[pd[32]] += (v[cd[27]] + 0.9375*v[cd[25]] + 0.375*v[cd[26]] + 0.1875*v[cd[34]]); v[pd[33]] += 0.75*v[cd[26]]; v[pd[34]] += 0.75*v[cd[34]]; } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ v[pd[0]] += (0.0390625*(-v[cd[10]] - v[cd[25]] - v[cd[26]] - v[cd[28]] - v[cd[29]] - v[cd[34]]) + 0.0234375*v[cd[12]]); v[pd[1]] += (0.2734375*v[cd[10]] + 0.0390625*(-v[cd[12]] - v[cd[25]] - v[cd[28]]) + 0.0234375*(v[cd[26]] + v[cd[29]] + v[cd[34]])); v[pd[4]] += (0.21875*v[cd[10]] + 0.15625*(-v[cd[12]] + v[cd[25]] + v[cd[28]]) + 0.09375*(v[cd[26]] + v[cd[29]] + v[cd[34]])); v[pd[5]] += (-0.546875*v[cd[10]] + 0.703125*v[cd[12]] + 0.234375*(-v[cd[25]] - v[cd[28]]) + 0.046875*(-v[cd[26]] - v[cd[29]] - v[cd[34]])); v[pd[6]] += (v[cd[11]] + 1.09375*v[cd[10]] + 0.46875*v[cd[12]] + 0.15625*(v[cd[25]] + v[cd[28]]) + 0.03125*(-v[cd[26]] - v[cd[29]] - v[cd[34]])); v[pd[7]] += (0.0625*(v[cd[28]] + v[cd[34]]) + 0.125*v[cd[29]]); v[pd[8]] += -0.125*v[cd[29]]; v[pd[10]] += (0.0625*(v[cd[25]] + v[cd[34]]) + 0.125*v[cd[26]]); v[pd[11]] += -0.125*v[cd[26]]; v[pd[13]] += (0.3125*v[cd[28]] - 0.125*v[cd[29]] - 0.0625*v[cd[34]]); v[pd[14]] += 0.375*v[cd[29]]; v[pd[16]] += (0.3125*v[cd[25]] - 0.125*v[cd[26]] - 0.0625*v[cd[34]]); v[pd[17]] += 0.375*v[cd[26]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += (-0.3125*v[cd[25]] - 0.375*v[cd[26]] - 0.1875*v[cd[34]]); v[pd[29]] += (v[cd[27]] + 0.9375*v[cd[25]] + 0.375*v[cd[26]] + 0.1875*v[cd[34]]); v[pd[30]] += 0.75*v[cd[26]]; v[pd[31]] += (-0.3125*v[cd[28]] - 0.375*v[cd[29]] - 0.1875*v[cd[34]]); v[pd[32]] += (v[cd[30]] + 0.9375*v[cd[28]] + 0.375*v[cd[29]] + 0.1875*v[cd[34]]); v[pd[33]] += 0.75*v[cd[29]]; v[pd[34]] += 0.75*v[cd[34]]; } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: v[pd[0]] += (0.0390625*(-v[cd[16]] - v[cd[22]] - v[cd[23]] - v[cd[28]]) + 0.0234375*(v[cd[18]] + v[cd[29]] + v[cd[34]])); v[pd[1]] += (0.0390625*(-v[cd[16]] - v[cd[22]] - v[cd[23]] - v[cd[28]] - v[cd[29]] - v[cd[34]]) + 0.0234375*v[cd[18]]); v[pd[4]] += (0.03125*(v[cd[16]] + v[cd[22]] + v[cd[23]] - v[cd[29]] - v[cd[34]]) - 0.09375*v[cd[18]] + 0.15625*v[cd[28]]); v[pd[5]] += (0.015625*(v[cd[16]] + v[cd[22]] + v[cd[23]]) + 0.140625*v[cd[18]] - 0.234375*v[cd[28]] + 0.046875*(-v[cd[29]] - v[cd[34]])); v[pd[6]] += (0.03125*(v[cd[16]] + v[cd[22]] + v[cd[23]]) + 0.09375*(-v[cd[18]] + v[cd[29]] + v[cd[34]]) + 0.15625*v[cd[28]]); v[pd[7]] += (0.1875*v[cd[16]] + 0.0625*(-v[cd[18]] + v[cd[23]] - v[cd[34]]) + 0.125*(v[cd[22]] - v[cd[29]]) + 0.3125*v[cd[28]]); v[pd[8]] += (0.375*(-v[cd[16]] + v[cd[29]]) - 0.125*v[cd[22]]); v[pd[9]] += 0.5*v[cd[16]]; v[pd[10]] += (0.0625*(v[cd[22]] - v[cd[34]]) + 0.125*v[cd[23]]); v[pd[11]] += -0.125*v[cd[23]]; v[pd[13]] += (0.1875*v[cd[16]] + 0.0625*(-v[cd[18]] + v[cd[23]] + v[cd[28]] + v[cd[34]]) + 0.125*(v[cd[22]] + v[cd[29]])); v[pd[14]] += (-0.375*v[cd[16]] + 0.125*(-v[cd[22]] - v[cd[29]])); v[pd[15]] += 0.5*v[cd[16]]; v[pd[16]] += (0.0625*(v[cd[22]] + v[cd[34]]) + 0.125*v[cd[23]]); v[pd[17]] += -0.125*v[cd[23]]; v[pd[22]] += (0.25*(-v[cd[22]] - v[cd[23]]) - 0.125*v[cd[34]]); v[pd[23]] += 0.5*v[cd[22]]; v[pd[24]] += 0.5*v[cd[23]]; v[pd[25]] += (0.25*(-v[cd[22]] - v[cd[23]]) + 0.375*v[cd[34]]); v[pd[26]] += 0.5*v[cd[22]]; v[pd[27]] += 0.5*v[cd[23]]; v[pd[28]] += (-0.0625*v[cd[22]] - 0.125*v[cd[23]] + 0.1875*v[cd[34]]); v[pd[29]] += (-0.0625*v[cd[22]] - 0.125*v[cd[23]] - 0.1875*v[cd[34]]); v[pd[30]] += 0.25*v[cd[23]]; v[pd[31]] = (v[cd[30]] + 0.1875*(-v[cd[16]] + v[cd[34]]) + 0.5625*v[cd[18]] - 0.125*v[cd[22]] - 0.0625*v[cd[23]] + 0.9375*v[cd[28]] + 0.375*v[cd[29]]); v[pd[32]] = (0.1875*(-v[cd[16]] - v[cd[34]]) + 0.5625*v[cd[18]] - 0.125*v[cd[22]] - 0.0625*v[cd[23]] - 0.3125*v[cd[28]] - 0.375*v[cd[29]]); v[pd[33]] = (v[cd[17]] + 0.75*(v[cd[16]] + v[cd[29]]) + 0.25*v[cd[22]]); v[pd[34]] = (v[cd[24]] + 0.5*(v[cd[22]] + v[cd[23]]) + 0.75*v[cd[34]]); break; case 2: v[pd[0]] += (0.0390625*(-v[cd[19]] - v[cd[22]] - v[cd[23]] - v[cd[25]]) + 0.0234375*(v[cd[21]] + v[cd[26]] + v[cd[34]])); v[pd[1]] += (0.0390625*(-v[cd[19]] - v[cd[22]] - v[cd[23]] - v[cd[25]] - v[cd[26]] - v[cd[34]]) + 0.0234375*v[cd[21]]); v[pd[4]] += (0.03125*(v[cd[19]] + v[cd[22]] + v[cd[23]] - v[cd[26]] - v[cd[34]]) - 0.09375*v[cd[21]] + 0.15625*v[cd[25]]); v[pd[5]] += (0.015625*(v[cd[19]] + v[cd[22]] + v[cd[23]]) + 0.140625*v[cd[21]] - 0.234375*v[cd[25]] + 0.046875*(-v[cd[26]] - v[cd[34]])); v[pd[6]] += (0.03125*(v[cd[19]] + v[cd[22]] + v[cd[23]]) + 0.09375*(-v[cd[21]] + v[cd[26]] + v[cd[34]]) + 0.15625*v[cd[25]]); v[pd[7]] += (0.125*v[cd[22]] + 0.0625*(v[cd[23]] - v[cd[34]])); v[pd[8]] += -0.125*v[cd[22]]; v[pd[10]] += (0.1875*v[cd[19]] + 0.0625*(-v[cd[21]] + v[cd[22]] - v[cd[34]]) + 0.125*(v[cd[23]] - v[cd[26]]) + 0.3125*v[cd[25]]); v[pd[11]] += (0.375*(-v[cd[19]] + v[cd[26]]) - 0.125*v[cd[23]]); v[pd[12]] += 0.5*v[cd[19]]; v[pd[13]] += (0.125*v[cd[22]] + 0.0625*(v[cd[23]] + v[cd[34]])); v[pd[14]] += -0.125*v[cd[22]]; v[pd[16]] += (0.1875*v[cd[19]] + 0.0625*(-v[cd[21]] + v[cd[22]] + v[cd[25]] + v[cd[34]]) + 0.125*(v[cd[23]] + v[cd[26]])); v[pd[17]] += (-0.375*v[cd[19]] + 0.125*(-v[cd[23]] - v[cd[26]])); v[pd[18]] += 0.5*v[cd[19]]; v[pd[22]] += (0.25*(-v[cd[22]] - v[cd[23]]) - 0.125*v[cd[34]]); v[pd[23]] += (0.5*v[cd[22]]); v[pd[24]] += (0.5*v[cd[23]]); v[pd[25]] += (0.25*(-v[cd[22]] - v[cd[23]]) + 0.375*v[cd[34]]); v[pd[26]] += (0.5*v[cd[22]]); v[pd[27]] += (0.5*v[cd[23]]); v[pd[28]] = (v[cd[27]] + 0.1875*(-v[cd[19]] + v[cd[34]]) + 0.5625*v[cd[21]] - 0.0625*v[cd[22]] - 0.125*v[cd[23]] + 0.9375*v[cd[25]] + 0.375*v[cd[26]]); v[pd[29]] = (0.1875*(-v[cd[19]] - v[cd[34]]) + 0.5625*v[cd[21]] - 0.0625*v[cd[22]] - 0.125*v[cd[23]] - 0.3125*v[cd[25]] - 0.375*v[cd[26]]); v[pd[30]] = (v[cd[20]] + 0.75*(v[cd[19]] + v[cd[26]]) + 0.25*v[cd[23]]); v[pd[31]] += (-0.125*v[cd[22]] - 0.0625*v[cd[23]] + 0.1875*v[cd[34]]); v[pd[32]] += (-0.125*v[cd[22]] - 0.0625*v[cd[23]] - 0.1875*v[cd[34]]); v[pd[33]] += 0.25*v[cd[22]]; v[pd[34]] = (v[cd[24]] + 0.5*(v[cd[22]] + v[cd[23]]) + 0.75*v[cd[34]]); break; case 3: v[pd[0]] += (0.0390625*(-v[cd[22]] - v[cd[23]]) + 0.0234375*v[cd[34]]); v[pd[1]] += (0.0390625*(-v[cd[22]] - v[cd[23]] - v[cd[34]])); v[pd[4]] += (0.03125*(v[cd[22]] + v[cd[23]] - v[cd[34]])); v[pd[5]] += (0.015625*(v[cd[22]] + v[cd[23]]) - 0.046875*v[cd[34]]); v[pd[6]] += (0.03125*(v[cd[22]] + v[cd[23]]) + 0.09375*v[cd[34]]); v[pd[7]] += (0.125*v[cd[22]] + 0.0625*(v[cd[23]] - v[cd[34]])); v[pd[8]] += -0.125*v[cd[22]]; v[pd[10]] += (0.0625*(v[cd[22]] - v[cd[34]]) + 0.125*v[cd[23]]); v[pd[11]] += -0.125*v[cd[23]]; v[pd[13]] += (0.125*v[cd[22]] + 0.0625*(v[cd[23]] + v[cd[34]])); v[pd[14]] += -0.125*v[cd[22]]; v[pd[16]] += (0.0625*(v[cd[22]] + v[cd[34]]) + 0.125*v[cd[23]]); v[pd[17]] += -0.125*v[cd[23]]; v[pd[22]] += (0.25*(-v[cd[22]] - v[cd[23]]) - 0.125*v[cd[34]]); v[pd[23]] += 0.5*v[cd[22]]; v[pd[24]] += 0.5*v[cd[23]]; v[pd[25]] += (0.25*(-v[cd[22]] - v[cd[23]]) + 0.375*v[cd[34]]); v[pd[26]] += 0.5*v[cd[22]]; v[pd[27]] += 0.5*v[cd[23]]; v[pd[28]] += (-0.0625*v[cd[22]] - 0.125*v[cd[23]] + 0.1875*v[cd[34]]); v[pd[29]] += (-0.0625*v[cd[22]] - 0.125*v[cd[23]] - 0.1875*v[cd[34]]); v[pd[30]] += 0.25*v[cd[23]]; v[pd[31]] += (-0.125*v[cd[22]] - 0.0625*v[cd[23]] + 0.1875*v[cd[34]]); v[pd[32]] += (-0.125*v[cd[22]] - 0.0625*v[cd[23]] - 0.1875*v[cd[34]]); v[pd[33]] += 0.25*v[cd[22]]; v[pd[34]] = (v[cd[24]] + 0.5*(v[cd[22]] + v[cd[23]]) + 0.75*v[cd[34]]); break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: v[pd[0]] += (0.0390625*(-v[cd[25]] - v[cd[26]] - v[cd[34]])); v[pd[1]] += (-0.0390625*v[cd[25]] + 0.0234375*(v[cd[26]] + v[cd[34]])); v[pd[4]] += (0.15625*v[cd[25]] + 0.09375*(v[cd[26]] + v[cd[34]])); v[pd[5]] += (-0.234375*v[cd[25]] + 0.046875*(-v[cd[26]] - v[cd[34]])); v[pd[6]] += (0.15625*v[cd[25]] + 0.03125*(-v[cd[26]] - v[cd[34]])); v[pd[7]] += (0.0625*(v[cd[25]] + v[cd[34]]) + 0.125*v[cd[26]]); v[pd[8]] += -0.125*v[cd[26]]; v[pd[10]] += 0.0625*v[cd[34]]; v[pd[13]] += (0.3125*v[cd[25]] - 0.125*v[cd[26]] - 0.0625*v[cd[34]]); v[pd[14]] += 0.375*v[cd[26]]; v[pd[16]] += -0.0625*v[cd[34]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += -0.1875*v[cd[34]]; v[pd[29]] += 0.1875*v[cd[34]]; v[pd[31]] += (-0.3125*v[cd[25]] - 0.375*v[cd[26]] - 0.1875*v[cd[34]]); v[pd[32]] += (v[cd[27]] + 0.9375*v[cd[25]] + 0.375*v[cd[26]] + 0.1875*v[cd[34]]); v[pd[33]] += 0.75*v[cd[26]]; v[pd[34]] += 0.75*v[cd[34]]; break; case 2: v[pd[0]] += (0.0390625*(-v[cd[28]] - v[cd[29]] - v[cd[34]])); v[pd[1]] += (-0.0390625*v[cd[28]] + 0.0234375*(v[cd[29]] + v[cd[34]])); v[pd[4]] += (0.15625*v[cd[28]] + 0.09375*(v[cd[29]] + v[cd[34]])); v[pd[5]] += (-0.234375*v[cd[28]] + 0.046875*(-v[cd[29]] - v[cd[34]])); v[pd[6]] += (0.15625*v[cd[28]] + 0.03125*(-v[cd[29]] - v[cd[34]])); v[pd[7]] += 0.0625*v[cd[34]]; v[pd[10]] += (0.0625*(v[cd[28]] + v[cd[34]]) + 0.125*v[cd[29]]); v[pd[11]] += -0.125*v[cd[29]]; v[pd[13]] += -0.0625*v[cd[34]]; v[pd[16]] += (0.3125*v[cd[28]] - 0.125*v[cd[29]] - 0.0625*v[cd[34]]); v[pd[17]] += 0.375*v[cd[29]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += (-0.3125*v[cd[28]] - 0.375*v[cd[29]] - 0.1875*v[cd[34]]); v[pd[29]] += (v[cd[30]] + 0.9375*v[cd[28]] + 0.375*v[cd[29]] + 0.1875*v[cd[34]]); v[pd[30]] += 0.75*v[cd[29]]; v[pd[31]] += -0.1875*v[cd[34]]; v[pd[32]] += 0.1875*v[cd[34]]; v[pd[34]] += 0.75*v[cd[34]]; break; case 3: v[pd[0]] += -0.0390625*v[cd[34]]; v[pd[1]] += 0.0234375*v[cd[34]]; v[pd[4]] += 0.09375*v[cd[34]]; v[pd[5]] += -0.046875*v[cd[34]]; v[pd[6]] += -0.03125*v[cd[34]]; v[pd[7]] += 0.0625*v[cd[34]]; v[pd[10]] += 0.0625*v[cd[34]]; v[pd[13]] += -0.0625*v[cd[34]]; v[pd[16]] += -0.0625*v[cd[34]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += -0.1875*v[cd[34]]; v[pd[29]] += 0.1875*v[cd[34]]; v[pd[31]] += -0.1875*v[cd[34]]; v[pd[32]] += 0.1875*v[cd[34]]; v[pd[34]] += 0.75*v[cd[34]]; break; } } else { switch(lr_set) { case 1: v[pd[0]] += (0.0390625*(-v[cd[28]] - v[cd[29]] - v[cd[34]])); v[pd[1]] += (-0.0390625*v[cd[28]] + 0.0234375*(v[cd[29]] + v[cd[34]])); v[pd[4]] += (0.15625*v[cd[28]] + 0.09375*(v[cd[29]] + v[cd[34]])); v[pd[5]] += (-0.234375*v[cd[28]] + 0.046875*(-v[cd[29]] - v[cd[34]])); v[pd[6]] += (0.15625*v[cd[28]] + 0.03125*(-v[cd[29]] - v[cd[34]])); v[pd[7]] += (0.0625*(v[cd[28]] + v[cd[34]]) + 0.125*v[cd[29]]); v[pd[8]] += -0.125*v[cd[29]]; v[pd[10]] += 0.0625*v[cd[34]]; v[pd[13]] += (0.3125*v[cd[28]] - 0.125*v[cd[29]] - 0.0625*v[cd[34]]); v[pd[14]] += 0.375*v[cd[29]]; v[pd[16]] += -0.0625*v[cd[34]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += -0.1875*v[cd[34]]; v[pd[29]] += 0.1875*v[cd[34]]; v[pd[31]] += (-0.3125*v[cd[28]] - 0.375*v[cd[29]] - 0.1875*v[cd[34]]); v[pd[32]] += (v[cd[30]] + 0.9375*v[cd[28]] + 0.375*v[cd[29]] + 0.1875*v[cd[34]]); v[pd[33]] += 0.75*v[cd[29]]; v[pd[34]] += 0.75*v[cd[34]]; break; case 2: v[pd[0]] += (0.0390625*(-v[cd[25]] - v[cd[26]] - v[cd[34]])); v[pd[1]] += (-0.0390625*v[cd[25]] + 0.0234375*(v[cd[26]] + v[cd[34]])); v[pd[4]] += (0.15625*v[cd[25]] + 0.09375*(v[cd[26]] + v[cd[34]])); v[pd[5]] += (-0.234375*v[cd[25]] + 0.046875*(-v[cd[26]] - v[cd[34]])); v[pd[6]] += (0.15625*v[cd[25]] + 0.03125*(-v[cd[26]] - v[cd[34]])); v[pd[7]] += 0.0625*v[cd[34]]; v[pd[10]] += (0.0625*(v[cd[25]] + v[cd[34]]) + 0.125*v[cd[26]]); v[pd[11]] += -0.125*v[cd[26]]; v[pd[13]] += -0.0625*v[cd[34]]; v[pd[16]] += (0.3125*v[cd[25]] - 0.125*v[cd[26]] - 0.0625*v[cd[34]]); v[pd[17]] += 0.375*v[cd[26]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += (-0.3125*v[cd[25]] - 0.375*v[cd[26]] - 0.1875*v[cd[34]]); v[pd[29]] += (v[cd[27]] + 0.9375*v[cd[25]] + 0.375*v[cd[26]] + 0.1875*v[cd[34]]); v[pd[30]] += 0.75*v[cd[26]]; v[pd[31]] += -0.1875*v[cd[34]]; v[pd[32]] += 0.1875*v[cd[34]]; v[pd[34]] += 0.75*v[cd[34]]; break; case 3: v[pd[0]] += -0.0390625*v[cd[34]]; v[pd[1]] += 0.0234375*v[cd[34]]; v[pd[4]] += 0.09375*v[cd[34]]; v[pd[5]] += -0.046875*v[cd[34]]; v[pd[6]] += -0.03125*v[cd[34]]; v[pd[7]] += 0.0625*v[cd[34]]; v[pd[10]] += 0.0625*v[cd[34]]; v[pd[13]] += -0.0625*v[cd[34]]; v[pd[16]] += -0.0625*v[cd[34]]; v[pd[22]] += 0.375*v[cd[34]]; v[pd[25]] += -0.125*v[cd[34]]; v[pd[28]] += -0.1875*v[cd[34]]; v[pd[29]] += 0.1875*v[cd[34]]; v[pd[31]] += -0.1875*v[cd[34]]; v[pd[32]] += 0.1875*v[cd[34]]; v[pd[34]] += 0.75*v[cd[34]]; break; } } } return; } static void real_d_refine_inter4_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_refine_inter4_3d"); DOF pd[N_BAS4_3D]; const DOF *cd; EL *el; REAL_D *v = nil; int i, k, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_d_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[3]][k] = (v[pd[5]][k]); v[cd[10]][k] = (0.2734375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] + 1.09375*v[pd[4]][k] - 0.546875*v[pd[5]][k] + 0.21875*v[pd[6]][k]); v[cd[11]][k] = (v[pd[4]][k]); v[cd[12]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.46875*v[pd[4]][k] + 0.703125*v[pd[5]][k] - 0.15625*v[pd[6]][k]); v[cd[16]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.1875*(v[pd[7]][k]+v[pd[13]][k] -v[pd[31]][k]-v[pd[32]][k]) + 0.375*(-v[pd[8]][k] - v[pd[14]][k]) + 0.5*(v[pd[9]][k] + v[pd[15]][k]) + 0.75*v[pd[33]][k]); v[cd[17]][k] = (v[pd[33]][k]); v[cd[18]][k] = (0.0234375*(v[pd[0]][k] + v[pd[1]][k]) + 0.09375*(-v[pd[4]][k] - v[pd[6]][k]) + 0.140625*v[pd[5]][k] + 0.0625*(-v[pd[7]][k] - v[pd[13]][k]) + 0.5625*(v[pd[31]][k] + v[pd[32]][k])); v[cd[19]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.1875*(v[pd[10]][k]+v[pd[16]][k] -v[pd[28]][k]-v[pd[29]][k]) + 0.375*(-v[pd[11]][k] - v[pd[17]][k]) + 0.5*(v[pd[12]][k] + v[pd[18]][k]) + 0.75*v[pd[30]][k]); v[cd[20]][k] = (v[pd[30]][k]); v[cd[21]][k] = (0.0234375*(v[pd[0]][k] + v[pd[1]][k]) + 0.09375*(-v[pd[4]][k] - v[pd[6]][k]) + 0.140625*v[pd[5]][k] + 0.0625*(-v[pd[10]][k] - v[pd[16]][k]) + 0.5625*(v[pd[28]][k] + v[pd[29]][k])); v[cd[22]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.125*(v[pd[7]][k]-v[pd[8]][k]+v[pd[13]][k]-v[pd[14]][k] -v[pd[31]][k]-v[pd[32]][k]) + 0.0625*(v[pd[10]][k]+v[pd[16]][k] -v[pd[28]][k]-v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[33]][k]) + 0.5*(v[pd[23]][k] + v[pd[26]][k] + v[pd[34]][k])); v[cd[23]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.0625*(v[pd[7]][k]+v[pd[13]][k] -v[pd[31]][k]-v[pd[32]][k]) + 0.125*(v[pd[10]][k] - v[pd[11]][k] + v[pd[16]][k] - v[pd[17]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[30]][k]) + 0.5*(v[pd[24]][k] + v[pd[27]][k] + v[pd[34]][k])); v[cd[24]][k] = (v[pd[34]][k]); v[cd[25]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.3125*(v[pd[10]][k] - v[pd[29]][k]) + 0.0625*v[pd[16]][k] + 0.9375*v[pd[28]][k]); v[cd[26]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.125*(-v[pd[10]][k] + v[pd[16]][k] - v[pd[17]][k]) + 0.375*(v[pd[11]][k] + v[pd[28]][k] - v[pd[29]][k]) + 0.75*v[pd[30]][k]); v[cd[27]][k] = (v[pd[28]][k]); v[cd[28]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.3125*(v[pd[7]][k] - v[pd[32]][k]) + 0.0625*v[pd[13]][k] + 0.9375*v[pd[31]][k]); v[cd[29]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.125*(-v[pd[7]][k] + v[pd[13]][k] - v[pd[14]][k]) + 0.375*(v[pd[8]][k] + v[pd[31]][k] - v[pd[32]][k]) + 0.75*v[pd[33]][k]); v[cd[30]][k] = (v[pd[31]][k]); v[cd[34]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.0625*(-v[pd[7]][k] - v[pd[10]][k] + v[pd[13]][k] + v[pd[16]][k]) - 0.125*v[pd[22]][k] + 0.375*v[pd[25]][k] + 0.1875*(v[pd[28]][k] - v[pd[29]][k] + v[pd[31]][k] - v[pd[32]][k]) + 0.75*v[pd[34]][k]); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[10]][k] = (-0.0390625*v[pd[0]][k] + 0.2734375*v[pd[1]][k] + 0.21875*v[pd[4]][k] - 0.546875*v[pd[5]][k] + 1.09375*v[pd[6]][k]); v[cd[11]][k] = v[pd[6]][k]; v[cd[12]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.15625*v[pd[4]][k] + 0.703125*v[pd[5]][k] + 0.46875*v[pd[6]][k]); v[cd[25]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[7]][k] + 0.3125*(v[pd[13]][k] - v[pd[31]][k]) + 0.9375*v[pd[32]][k]); v[cd[26]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] - v[pd[13]][k]) + 0.375*(v[pd[14]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[33]][k]); v[cd[27]][k] = v[pd[32]][k]; v[cd[28]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[10]][k] + 0.3125*(v[pd[16]][k] - v[pd[28]][k]) + 0.9375*v[pd[29]][k]); v[cd[29]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[10]][k] - v[pd[11]][k] - v[pd[16]][k]) + 0.375*(v[pd[17]][k] - v[pd[28]][k] + v[pd[29]][k]) + 0.75*v[pd[30]][k]); v[cd[30]][k] = v[pd[29]][k]; v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] -v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] -v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[10]][k] = (-0.0390625*v[pd[0]][k] + 0.2734375*v[pd[1]][k] + 0.21875*v[pd[4]][k] - 0.546875*v[pd[5]][k] + 1.09375*v[pd[6]][k]); v[cd[11]][k] = v[pd[6]][k]; v[cd[12]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.15625*v[pd[4]][k] + 0.703125*v[pd[5]][k] + 0.46875*v[pd[6]][k]); v[cd[25]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[10]][k] + 0.3125*(v[pd[16]][k] - v[pd[28]][k]) + 0.9375*v[pd[29]][k]); v[cd[26]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[10]][k] - v[pd[11]][k] - v[pd[16]][k]) + 0.375*(v[pd[17]][k] - v[pd[28]][k] + v[pd[29]][k]) + 0.75*v[pd[30]][k]); v[cd[27]][k] = v[pd[29]][k]; v[cd[28]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[7]][k] + 0.3125*(v[pd[13]][k] - v[pd[31]][k]) + 0.9375*v[pd[32]][k]); v[cd[29]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] - v[pd[13]][k]) + 0.375*(v[pd[14]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[33]][k]); v[cd[30]][k] = v[pd[32]][k]; v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[16]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.1875*(v[pd[7]][k] + v[pd[13]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.375*(-v[pd[8]][k] - v[pd[14]][k]) + 0.5*(v[pd[9]][k] + v[pd[15]][k]) + 0.75*v[pd[33]][k]); v[cd[17]][k] = v[pd[33]][k]; v[cd[18]][k] = (0.0234375*(v[pd[0]][k] + v[pd[1]][k]) + 0.09375*(-v[pd[4]][k] - v[pd[6]][k]) + 0.140625*v[pd[5]][k] + 0.0625*(-v[pd[7]][k] - v[pd[13]][k]) + 0.5625*(v[pd[31]][k] + v[pd[32]][k])); v[cd[22]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] + v[pd[13]][k] - v[pd[14]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.0625*(v[pd[10]][k] + v[pd[16]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[33]][k]) + 0.5*(v[pd[23]][k] + v[pd[26]][k] + v[pd[34]][k])); v[cd[23]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.0625*(v[pd[7]][k] + v[pd[13]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.125*(v[pd[10]][k] - v[pd[11]][k] + v[pd[16]][k] - v[pd[17]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[30]][k]) + 0.5*(v[pd[24]][k] + v[pd[27]][k] + v[pd[34]][k])); v[cd[24]][k] = v[pd[34]][k]; v[cd[28]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.3125*(v[pd[7]][k] - v[pd[32]][k]) + 0.0625*v[pd[13]][k] + 0.9375*v[pd[31]][k]); v[cd[29]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.125*(-v[pd[7]][k] + v[pd[13]][k] - v[pd[14]][k]) + 0.375*(v[pd[8]][k] + v[pd[31]][k] - v[pd[32]][k]) + 0.75*v[pd[33]][k]); v[cd[30]][k] = v[pd[31]][k]; v[cd[34]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.0625*(-v[pd[7]][k] - v[pd[10]][k] + v[pd[13]][k] + v[pd[16]][k]) - 0.125*v[pd[22]][k] + 0.375*v[pd[25]][k] + 0.1875*(v[pd[28]][k] - v[pd[29]][k] + v[pd[31]][k] - v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[19]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.1875*(v[pd[10]][k] + v[pd[16]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.375*(-v[pd[11]][k] - v[pd[17]][k]) + 0.5*(v[pd[12]][k] + v[pd[18]][k]) + 0.75*v[pd[30]][k]); v[cd[20]][k] = v[pd[30]][k]; v[cd[21]][k] = (0.0234375*(v[pd[0]][k] + v[pd[1]][k]) + 0.09375*(-v[pd[4]][k] - v[pd[6]][k]) + 0.140625*v[pd[5]][k] + 0.0625*(-v[pd[10]][k] - v[pd[16]][k]) + 0.5625*(v[pd[28]][k] + v[pd[29]][k])); v[cd[22]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] + v[pd[13]][k] - v[pd[14]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.0625*(v[pd[10]][k] + v[pd[16]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[33]][k]) + 0.5*(v[pd[23]][k] + v[pd[26]][k] + v[pd[34]][k])); v[cd[23]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.0625*(v[pd[7]][k] + v[pd[13]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.125*(v[pd[10]][k] - v[pd[11]][k] + v[pd[16]][k] - v[pd[17]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[30]][k]) + 0.5*(v[pd[24]][k] + v[pd[27]][k] + v[pd[34]][k])); v[cd[24]][k] = v[pd[34]][k]; v[cd[25]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.3125*(v[pd[10]][k] - v[pd[29]][k]) + 0.0625*v[pd[16]][k] + 0.9375*v[pd[28]][k]); v[cd[26]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.125*(-v[pd[10]][k] + v[pd[16]][k] - v[pd[17]][k]) + 0.375*(v[pd[11]][k] + v[pd[28]][k] - v[pd[29]][k]) + 0.75*v[pd[30]][k]); v[cd[27]][k] = v[pd[28]][k]; v[cd[34]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.0625*(-v[pd[7]][k] - v[pd[10]][k] + v[pd[13]][k] + v[pd[16]][k]) - 0.125*v[pd[22]][k] + 0.375*v[pd[25]][k] + 0.1875*(v[pd[28]][k] - v[pd[29]][k] + v[pd[31]][k] - v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[22]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] + v[pd[13]][k] - v[pd[14]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.0625*(v[pd[10]][k] + v[pd[16]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[33]][k]) + 0.5*(v[pd[23]][k] + v[pd[26]][k] + v[pd[34]][k])); v[cd[23]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.03125*(v[pd[4]][k] + v[pd[6]][k]) + 0.015625*v[pd[5]][k] + 0.0625*(v[pd[7]][k] + v[pd[13]][k] - v[pd[31]][k] - v[pd[32]][k]) + 0.125*(v[pd[10]][k] - v[pd[11]][k] + v[pd[16]][k] - v[pd[17]][k] - v[pd[28]][k] - v[pd[29]][k]) + 0.25*(-v[pd[22]][k] - v[pd[25]][k] + v[pd[30]][k]) + 0.5*(v[pd[24]][k] + v[pd[27]][k] + v[pd[34]][k])); v[cd[24]][k] = v[pd[34]][k]; v[cd[34]][k] = (0.0234375*v[pd[0]][k] - 0.0390625*v[pd[1]][k] - 0.03125*v[pd[4]][k] - 0.046875*v[pd[5]][k] + 0.09375*v[pd[6]][k] + 0.0625*(-v[pd[7]][k] - v[pd[10]][k] + v[pd[13]][k] + v[pd[16]][k]) - 0.125*v[pd[22]][k] + 0.375*v[pd[25]][k] + 0.1875*(v[pd[28]][k] - v[pd[29]][k] + v[pd[31]][k] - v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[25]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[7]][k] + 0.3125*(v[pd[13]][k] - v[pd[31]][k]) + 0.9375*v[pd[32]][k]); v[cd[26]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] - v[pd[13]][k]) + 0.375*(v[pd[14]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[33]][k]); v[cd[27]][k] = v[pd[32]][k]; v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[28]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[10]][k] + 0.3125*(v[pd[16]][k] - v[pd[28]][k]) + 0.9375*v[pd[29]][k]); v[cd[29]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[10]][k] - v[pd[11]][k] - v[pd[16]][k]) + 0.375*(v[pd[17]][k] - v[pd[28]][k] + v[pd[29]][k]) + 0.75*v[pd[30]][k]); v[cd[30]][k] = v[pd[29]][k]; v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; } } else { switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[28]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[7]][k] + 0.3125*(v[pd[13]][k] - v[pd[31]][k]) + 0.9375*v[pd[32]][k]); v[cd[29]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[7]][k] - v[pd[8]][k] - v[pd[13]][k]) + 0.375*(v[pd[14]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[33]][k]); v[cd[30]][k] = v[pd[32]][k]; v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[25]][k] = (0.0390625*(-v[pd[0]][k] - v[pd[1]][k]) + 0.15625*(v[pd[4]][k] + v[pd[6]][k]) - 0.234375*v[pd[5]][k] + 0.0625*v[pd[10]][k] + 0.3125*(v[pd[16]][k] - v[pd[28]][k]) + 0.9375*v[pd[29]][k]); v[cd[26]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.125*(v[pd[10]][k] - v[pd[11]][k] - v[pd[16]][k]) + 0.375*(v[pd[17]][k] - v[pd[28]][k] + v[pd[29]][k]) + 0.75*v[pd[30]][k]); v[cd[27]][k] = v[pd[29]][k]; v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[cd[34]][k] = (-0.0390625*v[pd[0]][k] + 0.0234375*v[pd[1]][k] + 0.09375*v[pd[4]][k] - 0.046875*v[pd[5]][k] - 0.03125*v[pd[6]][k] + 0.0625*(v[pd[7]][k] + v[pd[10]][k] - v[pd[13]][k] - v[pd[16]][k]) + 0.375*v[pd[22]][k] - 0.125*v[pd[25]][k] + 0.1875*(-v[pd[28]][k] + v[pd[29]][k] - v[pd[31]][k] + v[pd[32]][k]) + 0.75*v[pd[34]][k]); } break; } } } return; } static void real_d_coarse_inter4_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_inter4_3d"); DOF pd[N_BAS4_3D]; const DOF *cd; EL *el; REAL_D *v = nil; int i, k, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[4]][k] = v[cd[11]][k]; v[pd[5]][k] = v[cd[3]][k]; v[pd[28]][k] = v[cd[27]][k]; v[pd[30]][k] = v[cd[20]][k]; v[pd[31]][k] = v[cd[30]][k]; v[pd[33]][k] = v[cd[17]][k]; v[pd[34]][k] = v[cd[24]][k]; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[6]][k] = v[cd[11]][k]; v[pd[29]][k] = v[cd[30]][k]; v[pd[32]][k] = v[cd[27]][k]; } } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[6]][k] = v[cd[11]][k]; v[pd[29]][k] = v[cd[27]][k]; v[pd[32]][k] = v[cd[30]][k]; } } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[31]][k] = v[cd[30]][k]; v[pd[33]][k] = v[cd[17]][k]; v[pd[34]][k] = v[cd[24]][k]; } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[28]][k] = v[cd[27]][k]; v[pd[30]][k] = v[cd[20]][k]; v[pd[34]][k] = v[cd[24]][k]; } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) v[pd[34]][k] = v[cd[24]][k]; break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) v[pd[32]][k] = v[cd[27]][k]; break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) v[pd[29]][k] = v[cd[30]][k]; break; } } else { switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) v[pd[32]][k] = v[cd[30]][k]; break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) v[pd[29]][k] = v[cd[27]][k]; break; } } } return; } static void real_d_coarse_restr4_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("real_d_coarse_restr4_3d"); DOF pd[N_BAS4_3D]; const DOF *cd; EL *el; REAL_D *v = nil; int i, k, lr_set; U_CHAR typ; const DOF *(*get_dof_indices)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; if (n < 1) return; el = list->el_info.el; typ = list->el_info.el_type; GET_DOF_VEC(v, drdv); if (!drdv->fe_space) { ERROR("no fe_space in dof_real_vec %s\n", NAME(drdv)); return; } else if (!drdv->fe_space->bas_fcts) { ERROR("no basis functions in fe_space %s\n", NAME(drdv->fe_space)); return; } get_dof_indices = drdv->fe_space->bas_fcts->get_dof_indices; GET_STRUCT(admin,drdv->fe_space); get_dof_indices(el, admin, pd); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.2734375*v[cd[10]][k] + 0.0390625*(-v[cd[12]][k] - v[cd[16]][k] - v[cd[19]][k] - v[cd[22]][k] - v[cd[23]][k] - v[cd[25]][k] - v[cd[28]][k]) + 0.0234375*(v[cd[18]][k] + v[cd[21]][k] + v[cd[26]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[1]][k] += (0.0390625*(-v[cd[10]][k] - v[cd[16]][k] - v[cd[19]][k] - v[cd[22]][k] - v[cd[23]][k] - v[cd[25]][k] - v[cd[26]][k] - v[cd[28]][k] - v[cd[29]][k] - v[cd[34]][k]) + 0.0234375*(v[cd[12]][k] + v[cd[18]][k] + v[cd[21]][k])); v[pd[4]][k] = (v[cd[11]][k] + 1.09375*v[cd[10]][k] + 0.46875*v[cd[12]][k] + 0.03125*(v[cd[16]][k] + v[cd[19]][k] + v[cd[22]][k] + v[cd[23]][k] - v[cd[26]][k] - v[cd[29]][k] - v[cd[34]][k]) + 0.09375*(-v[cd[18]][k] - v[cd[21]][k]) + 0.15625*(v[cd[25]][k] + v[cd[28]][k])); v[pd[5]][k] = (v[cd[3]][k] - 0.546875*v[cd[10]][k] + 0.703125*v[cd[12]][k] + 0.015625*(v[cd[16]][k] + v[cd[19]][k] + v[cd[22]][k] + v[cd[23]][k]) + 0.140625*(v[cd[18]][k] + v[cd[21]][k]) + 0.234375*(-v[cd[25]][k] - v[cd[28]][k]) + 0.046875*(-v[cd[26]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[6]][k] = (0.21875*v[cd[10]][k] + 0.15625*(-v[cd[12]][k] + v[cd[25]][k] + v[cd[28]][k]) + 0.03125*(v[cd[16]][k] + v[cd[19]][k] + v[cd[22]][k] + v[cd[23]][k]) + 0.09375*(-v[cd[18]][k] - v[cd[21]][k] + v[cd[26]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[7]][k] += (0.1875*v[cd[16]][k] + 0.0625*(-v[cd[18]][k] + v[cd[23]][k] - v[cd[34]][k]) + 0.125*(v[cd[22]][k] - v[cd[29]][k]) + 0.3125*v[cd[28]][k]); v[pd[8]][k] += (0.375*(-v[cd[16]][k] + v[cd[29]][k]) - 0.125*v[cd[22]][k]); v[pd[9]][k] += 0.5*v[cd[16]][k]; v[pd[10]][k] += (0.1875*v[cd[19]][k] + 0.0625*(-v[cd[21]][k] + v[cd[22]][k] - v[cd[34]][k]) + 0.125*(v[cd[23]][k] - v[cd[26]][k]) + 0.3125*v[cd[25]][k]); v[pd[11]][k] += (0.375*(-v[cd[19]][k] + v[cd[26]][k]) - 0.125*v[cd[23]][k]); v[pd[12]][k] += 0.5*v[cd[19]][k]; v[pd[13]][k] += (0.1875*v[cd[16]][k] + 0.0625*(-v[cd[18]][k] + v[cd[23]][k] + v[cd[28]][k] + v[cd[34]][k]) + 0.125*(v[cd[22]][k] + v[cd[29]][k])); v[pd[14]][k] += (-0.375*v[cd[16]][k] + 0.125*(-v[cd[22]][k] - v[cd[29]][k])); v[pd[15]][k] += 0.5*v[cd[16]][k]; v[pd[16]][k] += (0.1875*v[cd[19]][k] + 0.0625*(-v[cd[21]][k] + v[cd[22]][k] + v[cd[25]][k] + v[cd[34]][k]) + 0.125*(v[cd[23]][k] + v[cd[26]][k])); v[pd[17]][k] += (-0.375*v[cd[19]][k] + 0.125*(-v[cd[23]][k] - v[cd[26]][k])); v[pd[18]][k] += 0.5*v[cd[19]][k]; v[pd[22]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) - 0.125*v[cd[34]][k]); v[pd[23]][k] += 0.5*v[cd[22]][k]; v[pd[24]][k] += 0.5*v[cd[23]][k]; v[pd[25]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) + 0.375*v[cd[34]][k]); v[pd[26]][k] += 0.5*v[cd[22]][k]; v[pd[27]][k] += 0.5*v[cd[23]][k]; v[pd[28]][k] = (v[cd[27]][k] + 0.1875*(-v[cd[19]][k] + v[cd[34]][k]) + 0.5625*v[cd[21]][k] - 0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] + 0.9375*v[cd[25]][k] + 0.375*v[cd[26]][k]); v[pd[29]][k] = (0.1875*(-v[cd[19]][k] - v[cd[34]][k]) + 0.5625*v[cd[21]][k] - 0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] - 0.3125*v[cd[25]][k] - 0.375*v[cd[26]][k]); v[pd[30]][k] = (v[cd[20]][k] + 0.75*(v[cd[19]][k] + v[cd[26]][k]) + 0.25*v[cd[23]][k]); v[pd[31]][k] = (v[cd[30]][k] + 0.1875*(-v[cd[16]][k] + v[cd[34]][k]) + 0.5625*v[cd[18]][k] - 0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] + 0.9375*v[cd[28]][k] + 0.375*v[cd[29]][k]); v[pd[32]][k] = (0.1875*(-v[cd[16]][k] - v[cd[34]][k]) + 0.5625*v[cd[18]][k] - 0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] - 0.3125*v[cd[28]][k] - 0.375*v[cd[29]][k]); v[pd[33]][k] = (v[cd[17]][k] + 0.75*(v[cd[16]][k] + v[cd[29]][k]) + 0.25*v[cd[22]][k]); v[pd[34]][k] = (v[cd[24]][k] + 0.5*(v[cd[22]][k] + v[cd[23]][k]) + 0.75*v[cd[34]][k]); } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { /*--------------------------------------------------------------------------*/ /* parent of el_type 0 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[10]][k] - v[cd[25]][k] - v[cd[26]][k] - v[cd[28]][k] - v[cd[29]][k] - v[cd[34]][k]) + 0.0234375*v[cd[12]][k]); v[pd[1]][k] += (0.2734375*v[cd[10]][k] + 0.0390625*(-v[cd[12]][k] - v[cd[25]][k] - v[cd[28]][k]) + 0.0234375*(v[cd[26]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[4]][k] += (0.21875*v[cd[10]][k] + 0.15625*(-v[cd[12]][k] + v[cd[25]][k] + v[cd[28]][k]) + 0.09375*(v[cd[26]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[5]][k] += (-0.546875*v[cd[10]][k] + 0.703125*v[cd[12]][k] + 0.234375*(-v[cd[25]][k] - v[cd[28]][k]) + 0.046875*(-v[cd[26]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[6]][k] += (v[cd[11]][k] + 1.09375*v[cd[10]][k] + 0.46875*v[cd[12]][k] + 0.15625*(v[cd[25]][k] + v[cd[28]][k]) + 0.03125*(-v[cd[26]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[7]][k] += (0.0625*(v[cd[25]][k] + v[cd[34]][k]) + 0.125*v[cd[26]][k]); v[pd[8]][k] += -0.125*v[cd[26]][k]; v[pd[10]][k] += (0.0625*(v[cd[28]][k] + v[cd[34]][k]) + 0.125*v[cd[29]][k]); v[pd[11]][k] += -0.125*v[cd[29]][k]; v[pd[13]][k] += (0.3125*v[cd[25]][k] - 0.125*v[cd[26]][k] - 0.0625*v[cd[34]][k]); v[pd[14]][k] += 0.375*v[cd[26]][k]; v[pd[16]][k] += (0.3125*v[cd[28]][k] - 0.125*v[cd[29]][k] - 0.0625*v[cd[34]][k]); v[pd[17]][k] += 0.375*v[cd[29]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += (-0.3125*v[cd[28]][k] - 0.375*v[cd[29]][k] - 0.1875*v[cd[34]][k]); v[pd[29]][k] += (v[cd[30]][k] + 0.9375*v[cd[28]][k] + 0.375*v[cd[29]][k] + 0.1875*v[cd[34]][k]); v[pd[30]][k] += 0.75*v[cd[29]][k]; v[pd[31]][k] += (-0.3125*v[cd[25]][k] - 0.375*v[cd[26]][k] - 0.1875*v[cd[34]][k]); v[pd[32]][k] += (v[cd[27]][k] + 0.9375*v[cd[25]][k] + 0.375*v[cd[26]][k] + 0.1875*v[cd[34]][k]); v[pd[33]][k] += 0.75*v[cd[26]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } } else { /*--------------------------------------------------------------------------*/ /* parent of el_type 1|2 */ /*--------------------------------------------------------------------------*/ for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[10]][k] - v[cd[25]][k] - v[cd[26]][k] - v[cd[28]][k] - v[cd[29]][k] - v[cd[34]][k]) + 0.0234375*v[cd[12]][k]); v[pd[1]][k] += (0.2734375*v[cd[10]][k] + 0.0390625*(-v[cd[12]][k] - v[cd[25]][k] - v[cd[28]][k]) + 0.0234375*(v[cd[26]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[4]][k] += (0.21875*v[cd[10]][k] + 0.15625*(-v[cd[12]][k] + v[cd[25]][k] + v[cd[28]][k]) + 0.09375*(v[cd[26]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[5]][k] += (-0.546875*v[cd[10]][k] + 0.703125*v[cd[12]][k] + 0.234375*(-v[cd[25]][k] - v[cd[28]][k]) + 0.046875*(-v[cd[26]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[6]][k] += (v[cd[11]][k] + 1.09375*v[cd[10]][k] + 0.46875*v[cd[12]][k] + 0.15625*(v[cd[25]][k] + v[cd[28]][k]) + 0.03125*(-v[cd[26]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[7]][k] += (0.0625*(v[cd[28]][k] + v[cd[34]][k]) + 0.125*v[cd[29]][k]); v[pd[8]][k] += -0.125*v[cd[29]][k]; v[pd[10]][k] += (0.0625*(v[cd[25]][k] + v[cd[34]][k]) + 0.125*v[cd[26]][k]); v[pd[11]][k] += -0.125*v[cd[26]][k]; v[pd[13]][k] += (0.3125*v[cd[28]][k] - 0.125*v[cd[29]][k] - 0.0625*v[cd[34]][k]); v[pd[14]][k] += 0.375*v[cd[29]][k]; v[pd[16]][k] += (0.3125*v[cd[25]][k] - 0.125*v[cd[26]][k] - 0.0625*v[cd[34]][k]); v[pd[17]][k] += 0.375*v[cd[26]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += (-0.3125*v[cd[25]][k] - 0.375*v[cd[26]][k] - 0.1875*v[cd[34]][k]); v[pd[29]][k] += (v[cd[27]][k] + 0.9375*v[cd[25]][k] + 0.375*v[cd[26]][k] + 0.1875*v[cd[34]][k]); v[pd[30]][k] += 0.75*v[cd[26]][k]; v[pd[31]][k] += (-0.3125*v[cd[28]][k] - 0.375*v[cd[29]][k] - 0.1875*v[cd[34]][k]); v[pd[32]][k] += (v[cd[30]][k] + 0.9375*v[cd[28]][k] + 0.375*v[cd[29]][k] + 0.1875*v[cd[34]][k]); v[pd[33]][k] += 0.75*v[cd[29]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } } /*--------------------------------------------------------------------------*/ /* adjust neighbour values */ /*--------------------------------------------------------------------------*/ for (i = 1; i < n; i++) { el = list[i].el_info.el; typ = list[i].el_info.el_type; get_dof_indices(el, admin, pd); lr_set = 0; if (list[i].neigh[0] && list[i].neigh[0]->no < i) lr_set = 1; if (list[i].neigh[1] && list[i].neigh[1]->no < i) lr_set += 2; DEBUG_TEST_EXIT(lr_set, "no values set on both neighbours\n"); /*--------------------------------------------------------------------------*/ /* values on child[0] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[0], admin, nil); switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[16]][k] - v[cd[22]][k] - v[cd[23]][k] - v[cd[28]][k]) + 0.0234375*(v[cd[18]][k] + v[cd[29]][k] + v[cd[34]][k])); v[pd[1]][k] += (0.0390625*(-v[cd[16]][k] - v[cd[22]][k] - v[cd[23]][k] - v[cd[28]][k]-v[cd[29]][k]-v[cd[34]][k]) + 0.0234375*v[cd[18]][k]); v[pd[4]][k] += (0.03125*(v[cd[16]][k] + v[cd[22]][k] + v[cd[23]][k] - v[cd[29]][k] - v[cd[34]][k]) - 0.09375*v[cd[18]][k] + 0.15625*v[cd[28]][k]); v[pd[5]][k] += (0.015625*(v[cd[16]][k] + v[cd[22]][k] + v[cd[23]][k]) + 0.140625*v[cd[18]][k] - 0.234375*v[cd[28]][k] + 0.046875*(-v[cd[29]][k] - v[cd[34]][k])); v[pd[6]][k] += (0.03125*(v[cd[16]][k] + v[cd[22]][k] + v[cd[23]][k]) + 0.09375*(-v[cd[18]][k]+v[cd[29]][k]+v[cd[34]][k]) + 0.15625*v[cd[28]][k]); v[pd[7]][k] += (0.1875*v[cd[16]][k] + 0.0625*(-v[cd[18]][k] + v[cd[23]][k] - v[cd[34]][k]) + 0.125*(v[cd[22]][k] - v[cd[29]][k]) + 0.3125*v[cd[28]][k]); v[pd[8]][k] += (0.375*(-v[cd[16]][k] + v[cd[29]][k]) - 0.125*v[cd[22]][k]); v[pd[9]][k] += 0.5*v[cd[16]][k]; v[pd[10]][k] += (0.0625*(v[cd[22]][k] - v[cd[34]][k]) + 0.125*v[cd[23]][k]); v[pd[11]][k] += -0.125*v[cd[23]][k]; v[pd[13]][k] += (0.1875*v[cd[16]][k] + 0.0625*(-v[cd[18]][k] + v[cd[23]][k] + v[cd[28]][k] + v[cd[34]][k]) + 0.125*(v[cd[22]][k] + v[cd[29]][k])); v[pd[14]][k] += (-0.375*v[cd[16]][k] + 0.125*(-v[cd[22]][k] - v[cd[29]][k])); v[pd[15]][k] += 0.5*v[cd[16]][k]; v[pd[16]][k] += (0.0625*(v[cd[22]][k] + v[cd[34]][k]) + 0.125*v[cd[23]][k]); v[pd[17]][k] += -0.125*v[cd[23]][k]; v[pd[22]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) - 0.125*v[cd[34]][k]); v[pd[23]][k] += 0.5*v[cd[22]][k]; v[pd[24]][k] += 0.5*v[cd[23]][k]; v[pd[25]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) + 0.375*v[cd[34]][k]); v[pd[26]][k] += 0.5*v[cd[22]][k]; v[pd[27]][k] += 0.5*v[cd[23]][k]; v[pd[28]][k] += (-0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] + 0.1875*v[cd[34]][k]); v[pd[29]][k] += (-0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] - 0.1875*v[cd[34]][k]); v[pd[30]][k] += 0.25*v[cd[23]][k]; v[pd[31]][k] = (v[cd[30]][k] + 0.1875*(-v[cd[16]][k] + v[cd[34]][k]) + 0.5625*v[cd[18]][k] - 0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] + 0.9375*v[cd[28]][k] + 0.375*v[cd[29]][k]); v[pd[32]][k] = (0.1875*(-v[cd[16]][k] - v[cd[34]][k]) + 0.5625*v[cd[18]][k] - 0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] - 0.3125*v[cd[28]][k] - 0.375*v[cd[29]][k]); v[pd[33]][k] = (v[cd[17]][k] + 0.75*(v[cd[16]][k] + v[cd[29]][k]) + 0.25*v[cd[22]][k]); v[pd[34]][k] = (v[cd[24]][k] + 0.5*(v[cd[22]][k] + v[cd[23]][k]) + 0.75*v[cd[34]][k]); } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[19]][k] - v[cd[22]][k] - v[cd[23]][k] - v[cd[25]][k]) + 0.0234375*(v[cd[21]][k] + v[cd[26]][k] + v[cd[34]][k])); v[pd[1]][k] += (0.0390625*(-v[cd[19]][k]-v[cd[22]][k]-v[cd[23]][k] - v[cd[25]][k]-v[cd[26]][k]-v[cd[34]][k]) + 0.0234375*v[cd[21]][k]); v[pd[4]][k] += (0.03125*(v[cd[19]][k] + v[cd[22]][k] + v[cd[23]][k] - v[cd[26]][k] - v[cd[34]][k]) - 0.09375*v[cd[21]][k] + 0.15625*v[cd[25]][k]); v[pd[5]][k] += (0.015625*(v[cd[19]][k] + v[cd[22]][k] + v[cd[23]][k]) + 0.140625*v[cd[21]][k] - 0.234375*v[cd[25]][k] + 0.046875*(-v[cd[26]][k] - v[cd[34]][k])); v[pd[6]][k] += (0.03125*(v[cd[19]][k] + v[cd[22]][k] + v[cd[23]][k]) + 0.09375*(-v[cd[21]][k]+v[cd[26]][k]+v[cd[34]][k]) + 0.15625*v[cd[25]][k]); v[pd[7]][k] += (0.125*v[cd[22]][k] + 0.0625*(v[cd[23]][k]-v[cd[34]][k])); v[pd[8]][k] += -0.125*v[cd[22]][k]; v[pd[10]][k] += (0.1875*v[cd[19]][k] + 0.0625*(-v[cd[21]][k]+v[cd[22]][k]-v[cd[34]][k]) + 0.125*(v[cd[23]][k] - v[cd[26]][k]) + 0.3125*v[cd[25]][k]); v[pd[11]][k] += (0.375*(-v[cd[19]][k] + v[cd[26]][k]) - 0.125*v[cd[23]][k]); v[pd[12]][k] += 0.5*v[cd[19]][k]; v[pd[13]][k] += (0.125*v[cd[22]][k] + 0.0625*(v[cd[23]][k] + v[cd[34]][k])); v[pd[14]][k] += -0.125*v[cd[22]][k]; v[pd[16]][k] += (0.1875*v[cd[19]][k] + 0.0625*(-v[cd[21]][k] + v[cd[22]][k] + v[cd[25]][k] + v[cd[34]][k]) + 0.125*(v[cd[23]][k] + v[cd[26]][k])); v[pd[17]][k] += (-0.375*v[cd[19]][k] + 0.125*(-v[cd[23]][k] - v[cd[26]][k])); v[pd[18]][k] += 0.5*v[cd[19]][k]; v[pd[22]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) - 0.125*v[cd[34]][k]); v[pd[23]][k] += (0.5*v[cd[22]][k]); v[pd[24]][k] += (0.5*v[cd[23]][k]); v[pd[25]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) + 0.375*v[cd[34]][k]); v[pd[26]][k] += (0.5*v[cd[22]][k]); v[pd[27]][k] += (0.5*v[cd[23]][k]); v[pd[28]][k] = (v[cd[27]][k] + 0.1875*(-v[cd[19]][k] + v[cd[34]][k]) + 0.5625*v[cd[21]][k] - 0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] + 0.9375*v[cd[25]][k] + 0.375*v[cd[26]][k]); v[pd[29]][k] = (0.1875*(-v[cd[19]][k] - v[cd[34]][k]) + 0.5625*v[cd[21]][k] - 0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] - 0.3125*v[cd[25]][k] - 0.375*v[cd[26]][k]); v[pd[30]][k] = (v[cd[20]][k] + 0.75*(v[cd[19]][k] + v[cd[26]][k]) + 0.25*v[cd[23]][k]); v[pd[31]][k] += (-0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] + 0.1875*v[cd[34]][k]); v[pd[32]][k] += (-0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] - 0.1875*v[cd[34]][k]); v[pd[33]][k] += 0.25*v[cd[22]][k]; v[pd[34]][k] = (v[cd[24]][k] + 0.5*(v[cd[22]][k] + v[cd[23]][k]) + 0.75*v[cd[34]][k]); } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[22]][k] - v[cd[23]][k]) + 0.0234375*v[cd[34]][k]); v[pd[1]][k] += (0.0390625*(-v[cd[22]][k] - v[cd[23]][k] - v[cd[34]][k])); v[pd[4]][k] += (0.03125*(v[cd[22]][k] + v[cd[23]][k] - v[cd[34]][k])); v[pd[5]][k] += (0.015625*(v[cd[22]][k] + v[cd[23]][k]) - 0.046875*v[cd[34]][k]); v[pd[6]][k] += (0.03125*(v[cd[22]][k] + v[cd[23]][k]) + 0.09375*v[cd[34]][k]); v[pd[7]][k] += (0.125*v[cd[22]][k] + 0.0625*(v[cd[23]][k] - v[cd[34]][k])); v[pd[8]][k] += -0.125*v[cd[22]][k]; v[pd[10]][k] += (0.0625*(v[cd[22]][k] - v[cd[34]][k]) + 0.125*v[cd[23]][k]); v[pd[11]][k] += -0.125*v[cd[23]][k]; v[pd[13]][k] += (0.125*v[cd[22]][k] + 0.0625*(v[cd[23]][k] + v[cd[34]][k])); v[pd[14]][k] += -0.125*v[cd[22]][k]; v[pd[16]][k] += (0.0625*(v[cd[22]][k] + v[cd[34]][k]) + 0.125*v[cd[23]][k]); v[pd[17]][k] += -0.125*v[cd[23]][k]; v[pd[22]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) - 0.125*v[cd[34]][k]); v[pd[23]][k] += 0.5*v[cd[22]][k]; v[pd[24]][k] += 0.5*v[cd[23]][k]; v[pd[25]][k] += (0.25*(-v[cd[22]][k] - v[cd[23]][k]) + 0.375*v[cd[34]][k]); v[pd[26]][k] += 0.5*v[cd[22]][k]; v[pd[27]][k] += 0.5*v[cd[23]][k]; v[pd[28]][k] += (-0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] + 0.1875*v[cd[34]][k]); v[pd[29]][k] += (-0.0625*v[cd[22]][k] - 0.125*v[cd[23]][k] - 0.1875*v[cd[34]][k]); v[pd[30]][k] += 0.25*v[cd[23]][k]; v[pd[31]][k] += (-0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] + 0.1875*v[cd[34]][k]); v[pd[32]][k] += (-0.125*v[cd[22]][k] - 0.0625*v[cd[23]][k] - 0.1875*v[cd[34]][k]); v[pd[33]][k] += 0.25*v[cd[22]][k]; v[pd[34]][k] = (v[cd[24]][k] + 0.5*(v[cd[22]][k] + v[cd[23]][k]) + 0.75*v[cd[34]][k]); } break; } /*--------------------------------------------------------------------------*/ /* values on child[1] */ /*--------------------------------------------------------------------------*/ cd = get_dof_indices(el->child[1], admin, nil); if (typ == 0) { switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[25]][k] - v[cd[26]][k] - v[cd[34]][k])); v[pd[1]][k] += (-0.0390625*v[cd[25]][k] + 0.0234375*(v[cd[26]][k] + v[cd[34]][k])); v[pd[4]][k] += (0.15625*v[cd[25]][k] + 0.09375*(v[cd[26]][k] + v[cd[34]][k])); v[pd[5]][k] += (-0.234375*v[cd[25]][k] + 0.046875*(-v[cd[26]][k] - v[cd[34]][k])); v[pd[6]][k] += (0.15625*v[cd[25]][k] + 0.03125*(-v[cd[26]][k] - v[cd[34]][k])); v[pd[7]][k] += (0.0625*(v[cd[25]][k] + v[cd[34]][k]) + 0.125*v[cd[26]][k]); v[pd[8]][k] += -0.125*v[cd[26]][k]; v[pd[10]][k] += 0.0625*v[cd[34]][k]; v[pd[13]][k] += (0.3125*v[cd[25]][k] - 0.125*v[cd[26]][k] - 0.0625*v[cd[34]][k]); v[pd[14]][k] += 0.375*v[cd[26]][k]; v[pd[16]][k] += -0.0625*v[cd[34]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += -0.1875*v[cd[34]][k]; v[pd[29]][k] += 0.1875*v[cd[34]][k]; v[pd[31]][k] += (-0.3125*v[cd[25]][k] - 0.375*v[cd[26]][k] - 0.1875*v[cd[34]][k]); v[pd[32]][k] += (v[cd[27]][k] + 0.9375*v[cd[25]][k] + 0.375*v[cd[26]][k] + 0.1875*v[cd[34]][k]); v[pd[33]][k] += 0.75*v[cd[26]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[28]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[1]][k] += (-0.0390625*v[cd[28]][k] + 0.0234375*(v[cd[29]][k] + v[cd[34]][k])); v[pd[4]][k] += (0.15625*v[cd[28]][k] + 0.09375*(v[cd[29]][k] + v[cd[34]][k])); v[pd[5]][k] += (-0.234375*v[cd[28]][k] + 0.046875*(-v[cd[29]][k] - v[cd[34]][k])); v[pd[6]][k] += (0.15625*v[cd[28]][k] + 0.03125*(-v[cd[29]][k] - v[cd[34]][k])); v[pd[7]][k] += 0.0625*v[cd[34]][k]; v[pd[10]][k] += (0.0625*(v[cd[28]][k] + v[cd[34]][k]) + 0.125*v[cd[29]][k]); v[pd[11]][k] += -0.125*v[cd[29]][k]; v[pd[13]][k] += -0.0625*v[cd[34]][k]; v[pd[16]][k] += (0.3125*v[cd[28]][k] - 0.125*v[cd[29]][k] - 0.0625*v[cd[34]][k]); v[pd[17]][k] += 0.375*v[cd[29]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += (-0.3125*v[cd[28]][k] - 0.375*v[cd[29]][k] - 0.1875*v[cd[34]][k]); v[pd[29]][k] += (v[cd[30]][k] + 0.9375*v[cd[28]][k] + 0.375*v[cd[29]][k] + 0.1875*v[cd[34]][k]); v[pd[30]][k] += 0.75*v[cd[29]][k]; v[pd[31]][k] += -0.1875*v[cd[34]][k]; v[pd[32]][k] += 0.1875*v[cd[34]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += -0.0390625*v[cd[34]][k]; v[pd[1]][k] += 0.0234375*v[cd[34]][k]; v[pd[4]][k] += 0.09375*v[cd[34]][k]; v[pd[5]][k] += -0.046875*v[cd[34]][k]; v[pd[6]][k] += -0.03125*v[cd[34]][k]; v[pd[7]][k] += 0.0625*v[cd[34]][k]; v[pd[10]][k] += 0.0625*v[cd[34]][k]; v[pd[13]][k] += -0.0625*v[cd[34]][k]; v[pd[16]][k] += -0.0625*v[cd[34]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += -0.1875*v[cd[34]][k]; v[pd[29]][k] += 0.1875*v[cd[34]][k]; v[pd[31]][k] += -0.1875*v[cd[34]][k]; v[pd[32]][k] += 0.1875*v[cd[34]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } break; } } else { switch(lr_set) { case 1: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[28]][k] - v[cd[29]][k] - v[cd[34]][k])); v[pd[1]][k] += (-0.0390625*v[cd[28]][k] + 0.0234375*(v[cd[29]][k] + v[cd[34]][k])); v[pd[4]][k] += (0.15625*v[cd[28]][k] + 0.09375*(v[cd[29]][k] + v[cd[34]][k])); v[pd[5]][k] += (-0.234375*v[cd[28]][k] + 0.046875*(-v[cd[29]][k] - v[cd[34]][k])); v[pd[6]][k] += (0.15625*v[cd[28]][k] + 0.03125*(-v[cd[29]][k] - v[cd[34]][k])); v[pd[7]][k] += (0.0625*(v[cd[28]][k] + v[cd[34]][k]) + 0.125*v[cd[29]][k]); v[pd[8]][k] += -0.125*v[cd[29]][k]; v[pd[10]][k] += 0.0625*v[cd[34]][k]; v[pd[13]][k] += (0.3125*v[cd[28]][k] - 0.125*v[cd[29]][k] - 0.0625*v[cd[34]][k]); v[pd[14]][k] += 0.375*v[cd[29]][k]; v[pd[16]][k] += -0.0625*v[cd[34]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += -0.1875*v[cd[34]][k]; v[pd[29]][k] += 0.1875*v[cd[34]][k]; v[pd[31]][k] += (-0.3125*v[cd[28]][k] - 0.375*v[cd[29]][k] - 0.1875*v[cd[34]][k]); v[pd[32]][k] += (v[cd[30]][k] + 0.9375*v[cd[28]][k] + 0.375*v[cd[29]][k] + 0.1875*v[cd[34]][k]); v[pd[33]][k] += 0.75*v[cd[29]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } break; case 2: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += (0.0390625*(-v[cd[25]][k] - v[cd[26]][k] - v[cd[34]][k])); v[pd[1]][k] += (-0.0390625*v[cd[25]][k] + 0.0234375*(v[cd[26]][k] + v[cd[34]][k])); v[pd[4]][k] += (0.15625*v[cd[25]][k] + 0.09375*(v[cd[26]][k] + v[cd[34]][k])); v[pd[5]][k] += (-0.234375*v[cd[25]][k] + 0.046875*(-v[cd[26]][k] - v[cd[34]][k])); v[pd[6]][k] += (0.15625*v[cd[25]][k] + 0.03125*(-v[cd[26]][k] - v[cd[34]][k])); v[pd[7]][k] += 0.0625*v[cd[34]][k]; v[pd[10]][k] += (0.0625*(v[cd[25]][k] + v[cd[34]][k]) + 0.125*v[cd[26]][k]); v[pd[11]][k] += -0.125*v[cd[26]][k]; v[pd[13]][k] += -0.0625*v[cd[34]][k]; v[pd[16]][k] += (0.3125*v[cd[25]][k] - 0.125*v[cd[26]][k] - 0.0625*v[cd[34]][k]); v[pd[17]][k] += 0.375*v[cd[26]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += (-0.3125*v[cd[25]][k] - 0.375*v[cd[26]][k] - 0.1875*v[cd[34]][k]); v[pd[29]][k] += (v[cd[27]][k] + 0.9375*v[cd[25]][k] + 0.375*v[cd[26]][k] + 0.1875*v[cd[34]][k]); v[pd[30]][k] += 0.75*v[cd[26]][k]; v[pd[31]][k] += -0.1875*v[cd[34]][k]; v[pd[32]][k] += 0.1875*v[cd[34]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } break; case 3: for (k = 0; k < DIM_OF_WORLD; k++) { v[pd[0]][k] += -0.0390625*v[cd[34]][k]; v[pd[1]][k] += 0.0234375*v[cd[34]][k]; v[pd[4]][k] += 0.09375*v[cd[34]][k]; v[pd[5]][k] += -0.046875*v[cd[34]][k]; v[pd[6]][k] += -0.03125*v[cd[34]][k]; v[pd[7]][k] += 0.0625*v[cd[34]][k]; v[pd[10]][k] += 0.0625*v[cd[34]][k]; v[pd[13]][k] += -0.0625*v[cd[34]][k]; v[pd[16]][k] += -0.0625*v[cd[34]][k]; v[pd[22]][k] += 0.375*v[cd[34]][k]; v[pd[25]][k] += -0.125*v[cd[34]][k]; v[pd[28]][k] += -0.1875*v[cd[34]][k]; v[pd[29]][k] += 0.1875*v[cd[34]][k]; v[pd[31]][k] += -0.1875*v[cd[34]][k]; v[pd[32]][k] += 0.1875*v[cd[34]][k]; v[pd[34]][k] += 0.75*v[cd[34]][k]; } break; } } } return; } /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ static BAS_FCT *phi4_3d[N_BAS4_3D] = {phi4v0_3d, phi4v1_3d, phi4v2_3d, phi4v3_3d, phi4e00_3d, phi4e01_3d, phi4e02_3d, phi4e10_3d, phi4e11_3d, phi4e12_3d, phi4e20_3d, phi4e21_3d, phi4e22_3d, phi4e30_3d, phi4e31_3d, phi4e32_3d, phi4e40_3d, phi4e41_3d, phi4e42_3d, phi4e50_3d, phi4e51_3d, phi4e52_3d, phi4f00_3d, phi4f01_3d, phi4f02_3d, phi4f10_3d, phi4f11_3d, phi4f12_3d, phi4f20_3d, phi4f21_3d, phi4f22_3d, phi4f30_3d, phi4f31_3d, phi4f32_3d, phi4c_3d}; static GRD_BAS_FCT *grd_phi4_3d[N_BAS4_3D] = { grd_phi4v0_3d, grd_phi4v1_3d, grd_phi4v2_3d, grd_phi4v3_3d, grd_phi4e00_3d, grd_phi4e01_3d, grd_phi4e02_3d, grd_phi4e10_3d, grd_phi4e11_3d, grd_phi4e12_3d, grd_phi4e20_3d, grd_phi4e21_3d, grd_phi4e22_3d, grd_phi4e30_3d, grd_phi4e31_3d, grd_phi4e32_3d, grd_phi4e40_3d, grd_phi4e41_3d, grd_phi4e42_3d, grd_phi4e50_3d, grd_phi4e51_3d, grd_phi4e52_3d, grd_phi4f00_3d, grd_phi4f01_3d, grd_phi4f02_3d, grd_phi4f10_3d, grd_phi4f11_3d, grd_phi4f12_3d, grd_phi4f20_3d, grd_phi4f21_3d, grd_phi4f22_3d, grd_phi4f30_3d, grd_phi4f31_3d, grd_phi4f32_3d, grd_phi4c_3d}; static D2_BAS_FCT *D2_phi4_3d[N_BAS4_3D] = {D2_phi4v0_3d, D2_phi4v1_3d, D2_phi4v2_3d, D2_phi4v3_3d, D2_phi4e00_3d, D2_phi4e01_3d, D2_phi4e02_3d, D2_phi4e10_3d, D2_phi4e11_3d, D2_phi4e12_3d, D2_phi4e20_3d, D2_phi4e21_3d, D2_phi4e22_3d, D2_phi4e30_3d, D2_phi4e31_3d, D2_phi4e32_3d, D2_phi4e40_3d, D2_phi4e41_3d, D2_phi4e42_3d, D2_phi4e50_3d, D2_phi4e51_3d, D2_phi4e52_3d, D2_phi4f00_3d, D2_phi4f01_3d, D2_phi4f02_3d, D2_phi4f10_3d, D2_phi4f11_3d, D2_phi4f12_3d, D2_phi4f20_3d, D2_phi4f21_3d, D2_phi4f22_3d, D2_phi4f30_3d, D2_phi4f31_3d, D2_phi4f32_3d, D2_phi4c_3d}; static const BAS_FCTS lagrange4_3d = {"lagrange4_3d", 3, N_BAS4_3D, 4, {1,1,3,3}, /* VERTEX,CENTER,EDGE,FACE */ nil, phi4_3d, grd_phi4_3d, D2_phi4_3d, get_dof_indices4_3d, get_bound4_3d, interpol4_3d, interpol_d4_3d, get_int_vec4_3d, get_real_vec4_3d, get_real_d_vec4_3d, get_uchar_vec4_3d, get_schar_vec4_3d, real_refine_inter4_3d, real_coarse_inter4_3d, real_coarse_restr4_3d, real_d_refine_inter4_3d, real_d_coarse_inter4_3d, real_d_coarse_restr4_3d, bary4_3d,}; alberta-2.0.1/alberta/src/3d/level_3d.c0000644000042300001440000004064410676724252014430 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: level_common.c */ /* */ /* description: routines for extracting level set of a piecewise linear */ /* fe-function, 3d part */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* file includes ../Common/level_common.c */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de/ */ /* */ /*--------------------------------------------------------------------------*/ /* (c) by A. Schmidt and K.G. Siebert (1996-2004) */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* any later version. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /*--------------------------------------------------------------------------*/ REAL level_element_det_3d(const REAL_D coord[N_VERTICES_2D]) { REAL_D e1, e2, normal; int i; for (i = 0; i < DIM_OF_WORLD; i++) { e1[i] = coord[1][i] - coord[0][i]; e2[i] = coord[2][i] - coord[0][i]; } normal[0] = e1[1]*e2[2] - e1[2]*e2[1]; normal[1] = e1[2]*e2[0] - e1[0]*e2[2]; normal[2] = e1[0]*e2[1] - e1[1]*e2[0]; return(sqrt(SCP_DOW(normal,normal))); } void level_coord_to_world_3d(const REAL_D coord[N_VERTICES_2D], const REAL_B lambda, REAL_D world) { int k; for (k = 0; k < DIM_OF_WORLD; k++) world[k] = (lambda[0]*coord[0][k] + lambda[1]*coord[1][k] + lambda[2]*coord[2][k]); return; } void level_coord_to_el_coord_3d(const REAL_B v_lambda[N_VERTICES_2D], const REAL_B lambda, REAL_B el_lambda) { int k; for (k = 0; k < N_VERTICES_3D; k++) el_lambda[k] = (lambda[0]*v_lambda[0][k] + lambda[1]*v_lambda[1][k] + lambda[2]*v_lambda[2][k]); return; } static int n_tri = 0, n_quad = 0; static const BAS_FCTS *linear; /****************************************************************************/ /* N=3: triangle 2 1 */ /* /\ /\ */ /* / \ or / \ */ /* 0/____\1 0/____\2 */ /* */ /* N=4: quadrilateral */ /* 3______2 3______2 */ /* | \ |2 1/\ */ /* | \ | II / 2\ */ /* | \ | / \ */ /* | \ | / I \ */ /* | \ |0/0 1\ */ /* |___________\ |/__________\ */ /* 0 1 0 1 */ /* */ /****************************************************************************/ static void new_face_3d(const EL_INFO *el_info, REAL v[], int N, int face, REAL_B lambda[]) { int n, j, k; REAL_D coord[N_VERTICES_2D]; if (init_element && !(*init_element)(el_info, v, N, face, (void *) lambda)) return; if (N == 3) n_tri++; else n_quad++; for (n = 0; n < 3; n++) { for (k = 0; k < DIM_OF_WORLD; k++) { coord[n][k] = 0.0; for (j = 0; j < N_VERTICES_3D; j++) coord[n][k] += lambda[n][j]*el_info->coord[j][k]; } } if (cal_element) (*cal_element)(el_info, v, 0, face, (void *) lambda, (void *) coord); if (N == 4) { for (k = 0; k < DIM_OF_WORLD; k++) { coord[1][k] = coord[2][k]; coord[2][k] = 0.0; for (j = 0; j < N_VERTICES_3D; j++) coord[2][k] += lambda[3][j]*el_info->coord[j][k]; } for (j = 0; j < N_VERTICES_3D; j++) { lambda[1][j] = lambda[2][j]; lambda[2][j] = lambda[3][j]; } if (cal_element) (*cal_element)(el_info, v, 1, face, (void *) lambda, (void *) coord); } return; } static void level_fct_3d(const EL_INFO *el_info, void *dummy) { FUNCNAME("level_fct"); static REAL_B lambdaT[N_VERTICES_3D] = {{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}; static REAL_B lambdaf[N_FACES_3D][N_VERTICES_2D] = {{{0,1,0,0},{0,0,1,0},{0,0,0,1}}, {{1,0,0,0},{0,0,1,0},{0,0,0,1}}, {{1,0,0,0},{0,1,0,0},{0,0,0,1}}, {{1,0,0,0},{0,1,0,0},{0,0,1,0}}}; REAL s; REAL_B v; REAL_BB lambda; int i, j, i1, i2; int n_p = 0, n_m = 0, n_0 = 0, index_p[4], index_m[4], index_0[4]; get_real_vec(el_info->el, level, v); /****************************************************************************/ /* count the number of positve, negative and zero values at the vertices */ /****************************************************************************/ for (i = 0; i < N_VERTICES_3D; i++) { if (v[i] - level_value > small) index_p[n_p++] = i; else if (v[i] - level_value < -small) index_m[n_m++] = i; else index_0[n_0++] = i; } TEST_EXIT(n_p + n_m + n_0 == N_VERTICES_3D, "n_p + n_m + n_0 = %d != N_VERTICES_3D\n", n_p + n_m + n_0); switch(n_0) { case 4: /****************************************************************************/ /* all four faces belong to the level: */ /* => four triangles (if not collected by the neighbour!) */ /****************************************************************************/ for (i = 0; i < N_NEIGH_3D; i++) new_face_3d(el_info, v, 3, i, lambdaf[i]); break; case 3: /****************************************************************************/ /* one faces belongs to the level: */ /* => one triangle (if not collected by the neighbour!) */ /****************************************************************************/ i = n_p ? index_p[0] : index_m[0]; new_face_3d(el_info, v, 3, i, lambdaf[i]); break; case 2: /****************************************************************************/ /* one of the other vertices is positive and the other negativ */ /* => one (interior) triangle */ /* otherwise the zero level is only an edge => nothing to do */ /****************************************************************************/ if (n_p == 1 && n_m == 1) { i1 = index_p[0]; i2 = index_m[0]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) { lambda[0][j] = lambdaT[index_0[0]][j]; lambda[1][j] = lambdaT[index_0[1]][j]; lambda[2][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; } new_face_3d(el_info, v, 3, -1, lambda); } break; case 1: /****************************************************************************/ /* there are either two positive and one negative vertex or one positive */ /* and two negative vertices => one (interior) triangle */ /* otherwise the zero level is a single vertex => nothing to do */ /****************************************************************************/ if (n_p == 2 && n_m == 1) { for (j = 0; j < N_VERTICES_3D; j++) lambda[0][j] = lambdaT[index_0[0]][j]; i1 = index_m[0]; i2 = index_p[0]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[1][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; i2 = index_p[1]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[2][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; new_face_3d(el_info, v, 3, -1, lambda); } else if (n_p == 1 && n_m == 2) { for (j = 0; j < N_VERTICES_3D; j++) lambda[0][j] = lambdaT[index_0[0]][j]; i1 = index_p[0]; i2 = index_m[0]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[1][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; i2 = index_m[1]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[2][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; new_face_3d(el_info, v, 3, -1, lambda); } break; case 0: /****************************************************************************/ /* all other cases: */ /* 4 positive vertices: nothing */ /* 3 positive vertices and 1 negative vertex: 1 interior triangle */ /* 2 positive vertices and 2 negative vertices: 1 interior quadrilateral */ /* 1 positive vertex and 3 negative vertices: 1 interior triangle */ /* 4 negative vertices: nothing */ /****************************************************************************/ switch (n_p) { case 3: i1 = index_m[0]; for (i = 0; i < 3; i++) { i2 = index_p[i]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[i][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; } new_face_3d(el_info, v, 3, -1, lambda); break; case 2: i1 = index_p[0]; i2 = index_m[0]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[0][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; i1 = index_m[0]; i2 = index_p[1]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[1][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; i1 = index_p[1]; i2 = index_m[1]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[2][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; i1 = index_m[1]; i2 = index_p[0]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[3][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; new_face_3d(el_info, v, 4, -1, lambda); break; case 1: i1 = index_p[0]; for (i = 0; i < 3; i++) { i2 = index_m[i]; s = (level_value - v[i1])/(v[i2] - v[i1]); for (j = 0; j < N_VERTICES_3D; j++) lambda[i][j] = (1.0 - s)*lambdaT[i1][j] + s*lambdaT[i2][j]; } new_face_3d(el_info, v, 3, -1, lambda); break; } break; } return; } #if 0 /* cH: just too lazy ATM. */ /****************************************************************************/ /* functions for writing a movi-file of the iso-level */ /****************************************************************************/ static int nt, nv; static FILE *movi_file; static int (*is_domain)(const EL *); static int movi_init0(const EL_INFO *el_info, REAL v[], int N, int f, const REAL lambda[][DIM+1]) { EL *n; el_info->el->mark = 0; if (f >= 0) { if ((n = NEIGH(el_info->el,el_info)[f])) { if (!n->mark) return(0); if (is_domain && !is_domain(el_info->el) && !is_domain(n)) return(0); } else { if (is_domain && !is_domain(el_info->el)) return(0); } } if (N == 3) nt++; else nt += 2; nv += N; return(0); } static int movi_init1(const EL_INFO *el_info, REAL v[], int N, int f, const REAL lambda[][DIM+1]) { EL *n; el_info->el->mark = 0; if (f >= 0) { if ((n = NEIGH(el_info->el,el_info)[f])) { if (!n->mark) return(0); if (is_domain && !is_domain(el_info->el) && !is_domain(n)) return(0); } else { if (is_domain && !is_domain(el_info->el)) return(0); } } return(1); } static void movi_element(const EL_INFO *el_info, REAL v[], int i, int f, const REAL vlambda[][DIM+1], const REAL_D coord[DIM]) { int j; if (i == 0) { for (j = 0; j < 3; j++) fprintf(movi_file, "%12.5e %12.5e %12.5e\n", coord[j][0], coord[j][1], coord[j][2]); nv += 3; } else { fprintf(movi_file, "%12.5e %12.5e %12.5e\n", coord[2][0], coord[2][1], coord[2][2]); nv++; } return; } static int movi_init2(const EL_INFO *el_info, REAL v[], int N, int f, const REAL lambda[][DIM+1]) { EL *n; el_info->el->mark = 0; if (f >= 0) { if ((n = NEIGH(el_info->el,el_info)[f])) { if (!n->mark) return(0); if (is_domain && !is_domain(el_info->el) && !is_domain(n)) return(0); } else { if (is_domain && !is_domain(el_info->el)) return(0); } } if (N == 3) { fprintf(movi_file, "%4d %4d %4d\n", nv+1, nv+2, -(nv+3)); nv += 3; } else { fprintf(movi_file, "%4d %4d %4d\n", nv+1, nv+2, -(nv+3)); fprintf(movi_file, "%4d %4d %4d\n", nv+1, nv+3, -(nv+4)); nv += 4; } return(0); } void movi_find_level(MESH *mesh, const DOF_REAL_VEC *level, REAL value, int (*is_d)(const EL *), const char *filename) { FUNCNAME("movi_find_level"); int n_v; if (!(movi_file = fopen(filename, "w"))) { ERROR("can not open file <%s>\n", filename); return; } is_domain = is_d; nv = nt = 0; set_element_mark(mesh, CALL_LEAF_EL, 1); find_level(mesh, FILL_COORDS|FILL_NEIGH, level, value, movi_init0, nil); fprintf(movi_file, "1 %d %d %d 0\n", n_v = nv, nt, 3*nt); fprintf(movi_file, "1 %d\n", nt); nv = nt = 0; set_element_mark(mesh, CALL_LEAF_EL, 1); find_level(mesh, FILL_COORDS|FILL_NEIGH, level, value, movi_init1, movi_element); nv = nt = 0; set_element_mark(mesh, CALL_LEAF_EL, 1); find_level(mesh, FILL_COORDS|FILL_NEIGH, level, value, movi_init2, nil); set_element_mark(mesh, CALL_LEAF_EL, 0); if (nv != n_v) { ERROR("nv = %d != %d = n_v\n", nv, n_v); WAIT; } fclose(movi_file); return; } #endif /* 0 */ alberta-2.0.1/alberta/src/3d/macro_3d.c0000644000042300001440000003241210676724252014414 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: macro.c */ /* */ /* */ /* description: dimension dependent part of reading/writing macro */ /* triangulations for 3d */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* Daniel Koester */ /* Institut fuer Mathematik */ /* Albert-Ludwigs-Universitaet Freiburg */ /* Hermann-Herder-Str. 10 */ /* D-79104 Freiburg */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* new_bound_val_3d(): determine the value of the subsimplex being checked */ /* The type of a boundary subsimplex is set to the highest type of all */ /* boundary faces containg the subsimplex. */ /*--------------------------------------------------------------------------*/ static S_CHAR new_bound_val_3d(S_CHAR face, S_CHAR edge_or_vertex) { if (face) { if (face >= DIRICHLET) return(MAX(face, edge_or_vertex)); else if (edge_or_vertex != INTERIOR) return(MAX(face, edge_or_vertex)); else return(face); } return(edge_or_vertex); } /*--------------------------------------------------------------------------*/ /* fill_bound_info_3d(): fill boundary info on faces from MACRO_DATA *data */ /* into corresponding macro elements, set boundary types of vertices (edges */ /* are handled later in fill_more_bound_info_3d) using new_bound_val_3d() */ /*--------------------------------------------------------------------------*/ static void fill_bound_info_3d(MESH *mesh, const MACRO_DATA *data) { MACRO_EL *mel = mesh->macro_els; int i, j, k; int ne = mesh->n_elements; int nv = mesh->n_vertices; S_CHAR *bound = MEM_ALLOC(nv, S_CHAR); /*--------------------------------------------------------------------------*/ /* The first N_FACES_3D entries of mel[].boundary will contain pointers to */ /* BOUNDARY structures corresponding to the elements' faces. These are the */ /* crucial infos provided externally, the other subsimplices (here vertices)*/ /* are set to a boundary type depending on the face containing them. */ /*--------------------------------------------------------------------------*/ for(i = 0; i < data->n_macro_elements; i++) for(j = 0; j < N_FACES_3D; j++) mel[i].face_bound[j] = data->boundary[NEIGH_IND(3,i,j)]; for (i = 0; i < nv; i++) bound[i] = INTERIOR; for (i = 0; i < ne; i++) { for (j = 0; j < N_FACES_3D; j++) { for (k = 1; k < 4; k++) bound[data->mel_vertices[VERT_IND(3,i,(j+k)%4)]] = new_bound_val_3d(mel[i].face_bound[j], bound[data->mel_vertices[VERT_IND(3,i,(j+k)%4)]]); } } for (i = 0; i < ne; i++) for (j = 0; j < N_VERTICES_3D; j++) mel[i].vertex_bound[j] = bound[data->mel_vertices[VERT_IND(3,i,j)]]; MEM_FREE(bound, nv, S_CHAR); return; } /*--------------------------------------------------------------------------*/ /* new_edge_3d(): This procedure counts the number of faces */ /* sharing the edge. Another important task is setting the boundary type of */ /* the edge depending on the types of these faces via new_bound_val_3d(). */ /*--------------------------------------------------------------------------*/ static int new_edge_3d(const MACRO_DATA *data, MACRO_EL *mel, int mel_edge_no,int *n_neigh) { FUNCNAME("new_edge_3d"); typedef S_CHAR *LIST_BOUND; MACRO_EL *neigh; int j, k, opp_v, mel_index, edge_no, vertex[2]; S_CHAR bound = INTERIOR; int max_no_list_el = 20; LIST_BOUND *list_bound = MEM_ALLOC(max_no_list_el, LIST_BOUND); static int next_el[6][2] = {{3,2},{1,3},{1,2},{0,3},{0,2},{0,1}}; mel_index = mel->index; edge_no = mel_edge_no; list_bound[0] = &(mel->edge_bound[edge_no]); for (j = 0; j < 2; j++) vertex[j] = data->mel_vertices [VERT_IND(3,mel_index,vertex_of_edge_3d[edge_no][j])]; /*--------------------------------------------------------------------------*/ /* first look for all neighbours in one direction until a boundary is */ /* reached :-( or we are back to mel :-) */ /* if the index of a neighbour is smaller than the element index, the edge */ /* is counted by this neighbour, return 0. */ /* If we are back to element, return 1, to count the edge */ /*--------------------------------------------------------------------------*/ neigh = mel->neigh[next_el[edge_no][0]]; opp_v = mel->opp_vertex[next_el[edge_no][0]]; bound = new_bound_val_3d(mel->face_bound[next_el[edge_no][0]], bound); while (neigh && neigh != mel) { if (neigh->index < mel_index) { MEM_FREE(list_bound, max_no_list_el, LIST_BOUND); return(0); } for (j = 0; j < N_VERTICES_3D; j++) if (data->mel_vertices[VERT_IND(3,neigh->index,j)] == vertex[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (data->mel_vertices[VERT_IND(3,neigh->index,k)] == vertex[1]) break; edge_no = edge_of_dofs_3d[j][k]; if (*n_neigh == max_no_list_el) { list_bound = MEM_REALLOC(list_bound, max_no_list_el, max_no_list_el + 20, LIST_BOUND); max_no_list_el += 20; } list_bound[(*n_neigh)++] = &(neigh->edge_bound[edge_no]); if (next_el[edge_no][0] != opp_v) { bound = new_bound_val_3d(neigh->face_bound[next_el[edge_no][0]], bound); opp_v = neigh->opp_vertex[next_el[edge_no][0]]; neigh = neigh->neigh[next_el[edge_no][0]]; } else { bound = new_bound_val_3d(neigh->face_bound[next_el[edge_no][1]], bound); opp_v = neigh->opp_vertex[next_el[edge_no][1]]; neigh = neigh->neigh[next_el[edge_no][1]]; } } if (!neigh) { /*--------------------------------------------------------------------------*/ /* while looping around the edge the domain's boundary was reached. Now, */ /* loop in the other direction to the domain's boundary */ /*--------------------------------------------------------------------------*/ edge_no = mel_edge_no; neigh = mel->neigh[next_el[edge_no][1]]; opp_v = mel->opp_vertex[next_el[edge_no][1]]; bound = new_bound_val_3d(mel->face_bound[next_el[edge_no][1]], bound); while (neigh) { if (neigh->index < mel_index) { MEM_FREE(list_bound, max_no_list_el, LIST_BOUND); return(0); } for (j = 0; j < N_VERTICES_3D; j++) if (data->mel_vertices[VERT_IND(3,neigh->index,j)] == vertex[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (data->mel_vertices[VERT_IND(3,neigh->index,k)] == vertex[1]) break; edge_no = edge_of_dofs_3d[j][k]; if (*n_neigh == max_no_list_el) { list_bound = MEM_REALLOC(list_bound, max_no_list_el, max_no_list_el + 20, LIST_BOUND); max_no_list_el += 20; } list_bound[(*n_neigh)++] = &(neigh->edge_bound[edge_no]); if (next_el[edge_no][0] != opp_v) { bound = new_bound_val_3d(neigh->face_bound[next_el[edge_no][0]],bound); opp_v = neigh->opp_vertex[next_el[edge_no][0]]; neigh = neigh->neigh[next_el[edge_no][0]]; } else { bound = new_bound_val_3d(neigh->face_bound[next_el[edge_no][1]],bound); opp_v = neigh->opp_vertex[next_el[edge_no][1]]; neigh = neigh->neigh[next_el[edge_no][1]]; } } } for (j = 0; j < *n_neigh; j++) *(list_bound[j]) = bound; MEM_FREE(list_bound, max_no_list_el, LIST_BOUND); return(1); } /*--------------------------------------------------------------------------*/ /* fill_more_bound_info_3d(): This function fills boundary information using*/ /* the function new_edge_3d() above. It also counts faces and edges. */ /*--------------------------------------------------------------------------*/ static void fill_more_bound_info_3d(MESH *mesh, const MACRO_DATA *data) { /* FUNCNAME("fill_more_bound_info_3d"); */ int i, k, node, ne = mesh->n_elements; int n_edges = 0, n_faces = 0, max_n_neigh = 0, n_neigh; MACRO_EL *mel = mesh->macro_els, *neigh; mesh->max_edge_neigh = 8; node = mesh->node[FACE]; for (i = 0; i < ne; i++) { for (k = 0; k < N_EDGES_3D; k++) { /*--------------------------------------------------------------------------*/ /* check for not counted edges */ /*--------------------------------------------------------------------------*/ n_neigh = 1; if (new_edge_3d(data, mel+i, k, &n_neigh)) { n_edges++; max_n_neigh = MAX(max_n_neigh, n_neigh); } } for (k = 0; k < N_NEIGH_3D; k++) { neigh = mel[i].neigh[k]; /*--------------------------------------------------------------------------*/ /* face is counted by the element with bigger index */ /*--------------------------------------------------------------------------*/ if (neigh && (neigh->index > mel[i].index)) continue; n_faces++; } } mesh->max_edge_neigh = MAX(mesh->max_edge_neigh, 2*max_n_neigh); mesh->n_edges = n_edges; mesh->n_faces = n_faces; return; } /*--------------------------------------------------------------------------*/ /* AI_get_orientation(): This function calculates an elements orientation */ /* and returns it as a signed integer suitable for the MACRO_EL orientation */ /* field. Also called from read_mesh.c */ /*--------------------------------------------------------------------------*/ S_CHAR AI_get_orientation(MACRO_EL *mel) { int i,j; double a[3][3], s; for (i = 0; i < 3; i++) { for (j=0; j<3; j++) { a[i][j] = mel->coord[i+1][j] - mel->coord[0][j]; } } s = (a[0][1]*a[1][2] - a[0][2]*a[1][1])*a[2][0] + (a[0][2]*a[1][0] - a[0][0]*a[1][2])*a[2][1] + (a[0][0]*a[1][1] - a[0][1]*a[1][0])*a[2][2]; return (s >= 0) ? 1 : -1; } /*--------------------------------------------------------------------------*/ /* macro_test_3d(): Check data for potential cycles during refinement */ /* At the moment, a correction (and subsequent writing of a correct macro */ /* data file) can only be done in 2D. */ /*--------------------------------------------------------------------------*/ #if 0 ALBERTA_UNUSED(static int check_cycles_3d(MACRO_DATA *)); #endif static void macro_test_3d(MACRO_DATA *data, const char *new_name) { FUNCNAME("macro_test_3d"); #if 1 WARNING("not implemented for 3d yet: no check is performed\n"); #else U_CHAR error_found = false; int i = -1; i = check_cycles_3d(data); if (i >= 0) { error_found = true; WARNING("There is a cycle beginning in macro element %d.\n", i); ERROR_EXIT("Correction of cycles not implemented yet in 3D\n"); } if (error_found && new_name) { MSG("Attempting to write corrected macro data to file %s...\n", new_name); write_macro_data(data, new_name); } #endif return; } alberta-2.0.1/alberta/src/3d/memory_3d.c0000644000042300001440000012350610676724252014630 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: memory_3d.c */ /* */ /* */ /* description: special routines for getting new FE_SPACEs, 3D-Version */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* LOGICAL_EL_3D: */ /* This structure defines a MESH element at any point in the hierarchy in */ /* terms of global indices for vertices, edges, faces, and elements. This */ /* information is calculated by the routines below. A temporary */ /* representation of the entire mesh is used to fill DOF pointers on all */ /* elements. This rather general (and costly) approach was used since this */ /* information might be useful in other contexts in the future */ /* */ /* The entries are self-explanatory, except for "neigh", which is slightly */ /* complicated. "neigh" is defined to be the neighbour on the same */ /* refinement level. If there is no such neighbour due to non-matching */ /* refinement edges, we take a neighbour one level higher. */ /****************************************************************************/ typedef struct logical_el_3d LOGICAL_EL_3D; struct logical_el_3d { int parent; int child[2]; int neigh[N_NEIGH_3D]; int vertex[N_VERTICES_3D]; int edge[N_EDGES_3D]; int face[N_FACES_3D]; U_CHAR el_type; EL *el; }; /****************************************************************************/ /* next_el[edge][direction]: */ /* Gives the neighbour to move to when looping around an edge. */ /* Needed in macro_edge_loop_3d() and hier_edge_loop_3d(). */ /****************************************************************************/ static const int next_el[6][2] = {{3,2},{1,3},{1,2},{0,3},{0,2},{0,1}}; /****************************************************************************/ /* fill_logical_el_rec_3d(l_els, el, current_el, index, */ /* current_level, max_level): */ /* This routine fills basic information on logical els, namely childhood */ /* relationships, element types, EL pointers. Elements are also counted */ /* here, and the maximum depth of the refinement tree is determined */ /* (max_level == maximum number of parent generations above an element). */ /****************************************************************************/ static void fill_logical_el_rec_3d(LOGICAL_EL_3D *l_els, EL *el, int current_el, int *index, int current_level, int *max_level) { /* FUNCNAME("fill_logical_el_rec_3d"); */ int i_child, child_ind[2]; if(current_level > *max_level) *max_level = current_level; if(el->child[0]) { /* Fill basic child information. */ for(i_child = 0; i_child < 2; i_child++) { child_ind[i_child] = *index + i_child; l_els[current_el].child[i_child] = child_ind[i_child]; l_els[child_ind[i_child]].el = el->child[i_child]; l_els[child_ind[i_child]].el_type = (l_els[current_el].el_type + 1)%3; l_els[child_ind[i_child]].parent = current_el; } *index += 2; /* Now recurse to the two children. */ fill_logical_el_rec_3d(l_els, el->child[0], child_ind[0], index, current_level + 1, max_level); fill_logical_el_rec_3d(l_els, el->child[1], child_ind[1], index, current_level + 1, max_level); } return; } /****************************************************************************/ /* fill_child_vertices_3d(l_els, el): During descend_tree_3d() we need to */ /* fill as much vertex information as possible. This routine takes care of */ /* the task. */ /****************************************************************************/ static void fill_child_vertices_3d(LOGICAL_EL_3D *l_els, int el) { FUNCNAME("descend_tree_3d"); int child[2]; child[0] = l_els[el].child[0]; child[1] = l_els[el].child[1]; DEBUG_TEST_EXIT(child[0] > -1, "Did not find child 0 of %d!\n", el); DEBUG_TEST_EXIT(child[1] > -1, "Did not find child 1 of %d!\n", el); l_els[child[0]].vertex[0] = l_els[el].vertex[0]; l_els[child[0]].vertex[1] = l_els[el].vertex[2]; l_els[child[0]].vertex[2] = l_els[el].vertex[3]; l_els[child[1]].vertex[0] = l_els[el].vertex[1]; if(l_els[el].el_type == 0) { l_els[child[1]].vertex[1] = l_els[el].vertex[3]; l_els[child[1]].vertex[2] = l_els[el].vertex[2]; } else { l_els[child[1]].vertex[1] = l_els[el].vertex[2]; l_els[child[1]].vertex[2] = l_els[el].vertex[3]; } return; } /****************************************************************************/ /* descend_tree_3d(l_els, orig_el, in_el, n, out_els, out_adjc): */ /* While working on edges we wish to make sure that we are using a neighbour*/ /* element whose current refinement edge corresponds to the refinement edge */ /* of "el". In 3D this involves going downwards up to three elements in */ /* the tree. We are then guaranteed to have correct edges lined up if the */ /* triangulation is conforming. */ /* We also need to examine if the 0-vertex on neigh corresponds to the */ /* 0-vertex of el. This means adjc=0. Otherwise we set adjc=1. */ /****************************************************************************/ static void descend_tree_3d(LOGICAL_EL_3D *l_els, int orig_el, int in_el, int *n, int *out_els, int *out_adjc) { FUNCNAME("descend_tree_3d"); int i, vertex[2], in_vertex[N_VERTICES_3D]; U_CHAR in_type = l_els[in_el].el_type; DEBUG_TEST_EXIT(orig_el != in_el, "Why is orig_el == in_el == %d???\n", orig_el); vertex[0] = l_els[orig_el].vertex[0]; vertex[1] = l_els[orig_el].vertex[1]; DEBUG_TEST_EXIT(vertex[0] > -1, "Oops, unknown vertex 0 on element %d!\n", orig_el); DEBUG_TEST_EXIT(vertex[1] > -1, "Oops, unknown vertex 1 on element %d!\n", orig_el); /* If necessary, fill vertex information on in_el from the parent. This is*/ /* necessary in a few exotic cases! */ if(l_els[in_el].parent > -1) fill_child_vertices_3d(l_els, l_els[in_el].parent); for(i = 0; i < N_VERTICES_3D; i++) { in_vertex[i] = l_els[in_el].vertex[i]; DEBUG_TEST_EXIT(in_vertex[i] > -1, "Oops, unknown vertex %d on element %d!\n", i, in_el); } if((vertex[0] == in_vertex[0] && vertex[1] == in_vertex[1]) || (vertex[0] == in_vertex[1] && vertex[1] == in_vertex[0])) { *n = 1; out_els[0] = in_el; } else { if((vertex[0] == in_vertex[0] && vertex[1] == in_vertex[2]) || (vertex[0] == in_vertex[2] && vertex[1] == in_vertex[0])) { *n = 1; /* Pass down as much vertex information as possible. */ fill_child_vertices_3d(l_els, in_el); out_els[0] = l_els[in_el].child[0]; } else if((vertex[0] == in_vertex[0] && vertex[1] == in_vertex[3]) || (vertex[0] == in_vertex[3] && vertex[1] == in_vertex[0])) { *n = 1; fill_child_vertices_3d(l_els, in_el); out_els[0] = l_els[in_el].child[0]; fill_child_vertices_3d(l_els, out_els[0]); out_els[0] = l_els[out_els[0]].child[0]; } else if((vertex[0] == in_vertex[1] && vertex[1] == in_vertex[2]) || (vertex[0] == in_vertex[2] && vertex[1] == in_vertex[1])) { *n = 1; fill_child_vertices_3d(l_els, in_el); out_els[0] = l_els[in_el].child[1]; if(in_type == 0) { fill_child_vertices_3d(l_els, out_els[0]); out_els[0] = l_els[out_els[0]].child[0]; } } else if((vertex[0] == in_vertex[1] && vertex[1] == in_vertex[3]) || (vertex[0] == in_vertex[3] && vertex[1] == in_vertex[1])) { *n = 1; fill_child_vertices_3d(l_els, in_el); out_els[0] = l_els[in_el].child[1]; if(in_type != 0) { fill_child_vertices_3d(l_els, out_els[0]); out_els[0] = l_els[out_els[0]].child[0]; } } else if((vertex[0] == in_vertex[2] && vertex[1] == in_vertex[3]) || (vertex[0] == in_vertex[3] && vertex[1] == in_vertex[2])) { *n = 2; fill_child_vertices_3d(l_els, in_el); out_els[0] = l_els[in_el].child[0]; out_els[1] = l_els[in_el].child[1]; fill_child_vertices_3d(l_els, out_els[0]); fill_child_vertices_3d(l_els, out_els[1]); out_els[0] = l_els[out_els[0]].child[1]; out_els[1] = l_els[out_els[1]].child[1]; if(in_type == 2) { fill_child_vertices_3d(l_els, out_els[0]); fill_child_vertices_3d(l_els, out_els[1]); out_els[0] = l_els[out_els[0]].child[0]; out_els[1] = l_els[out_els[1]].child[0]; } } } /* Calculate adjacencies. */ for(i = 0; i < *n; i++) { if(l_els[out_els[i]].vertex[0] == vertex[0]) out_adjc[i] = 0; else if (l_els[out_els[i]].vertex[0] == vertex[1]) out_adjc[i] = 1; else ERROR_EXIT("Nonconforming triangulation!\n"); } return; } /****************************************************************************/ /* get_opp_v_3d(l_els, el, neigh): */ /* Simple routine to determine the opposite vertex (semantics as in EL, */ /* EL_INFO, or MACRO_EL) since this is not stored on LOGICAL_EL structures. */ /****************************************************************************/ static int get_opp_v_3d(LOGICAL_EL_3D *l_els, int el, int neigh) { FUNCNAME("get_opp_v_3d"); int i, tmp; if(neigh > -1) { for(i = 0; i < N_NEIGH_3D; i++) { tmp = l_els[neigh].neigh[i]; if(tmp > -1 && (tmp == el || tmp == l_els[el].parent)) return i; } ERROR_EXIT("Problems while looking for opp_vertex!\n"); } return -1; } /****************************************************************************/ /* hier_edge_loop_3d(l_els, el, new_vertex, new_edge) */ /* A routine to loop around the refinement edge of "el". We must set the new*/ /* vertex and new edges on all child elements of the elements the loop runs */ /* through. Face and neighbour information is not assigned by this routine. */ /* We must take care of the adjacency of the new edges relative to the */ /* starting element "el". (VERTEX 0 - VERTEX 0 or VERTEX 0 - VERTEX 1 on the*/ /* refinement edge). */ /* Looping around an edge is ugly since several cases are possible in 3D. */ /* Simple case: We start at "el" and manage to run around completely until */ /* we are back at el. Ugly case: We encounter a boundary. Then we have to */ /* start again and loop in the other direction until we hit another */ /* boundary. */ /****************************************************************************/ static void hier_edge_loop_3d(LOGICAL_EL_3D *l_els, int el, int new_vertex, int *new_edge) { FUNCNAME("hier_edge_loop_3d"); int vertex[2], vertices[N_VERTICES_3D]; int i, j, k, old_el, neigh, opp_v, edge_no = 0; int n, sub_neigh[2], adjc[2]; int child[2]; DEBUG_TEST_EXIT(l_els[el].vertex[0] > -1, "Oops, unknown vertex 0 on element %d!\n", el); DEBUG_TEST_EXIT(l_els[el].vertex[1] > -1, "Oops, unknown vertex 1 on element %d!\n", el); for (i = 0; i < 2; i++) vertex[i] = l_els[el].vertex[i]; /*--------------------------------------------------------------------------*/ /* first look for all neighbours in one direction until a boundary is */ /* reached :-( or we are back to el :-) */ /*--------------------------------------------------------------------------*/ edge_no = 0; old_el = el; neigh = l_els[old_el].neigh[next_el[edge_no][0]]; opp_v = get_opp_v_3d(l_els, old_el, neigh); while (neigh > -1 && neigh != el) { for (j = 0; j < N_VERTICES_3D; j++) vertices[j] = l_els[neigh].vertex[j]; for (j = 0; j < N_VERTICES_3D; j++) if (vertices[j] == vertex[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (vertices[k] == vertex[1]) break; DEBUG_TEST_EXIT(j < N_VERTICES_3D && k < N_VERTICES_3D, "Did not find the edge again!\n"); edge_no = edge_of_dofs_3d[j][k]; descend_tree_3d(l_els, el, neigh, &n, sub_neigh, adjc); for(i = 0; i < n; i++) { child[0] = l_els[sub_neigh[i]].child[0]; child[1] = l_els[sub_neigh[i]].child[1]; /* Here we assign the necessary information: New vertices and edges. */ if(new_vertex > -1) l_els[child[0]].vertex[3] = l_els[child[1]].vertex[3] = new_vertex; if(new_edge[0] > -1) { l_els[child[adjc[i]]].edge[2] = new_edge[0]; l_els[child[1-adjc[i]]].edge[2] = new_edge[1]; } } if (next_el[edge_no][0] != opp_v) { old_el = neigh; neigh = l_els[neigh].neigh[next_el[edge_no][0]]; opp_v = get_opp_v_3d(l_els, old_el, neigh); } else { old_el = neigh; neigh = l_els[neigh].neigh[next_el[edge_no][1]]; opp_v = get_opp_v_3d(l_els, old_el, neigh); } } if (neigh < 0) { /*--------------------------------------------------------------------------*/ /* while looping around the edge the domain's boundary was reached. Now, */ /* loop in the other direction to the domain's boundary */ /*--------------------------------------------------------------------------*/ edge_no = 0; old_el = el; neigh = l_els[el].neigh[next_el[edge_no][1]]; opp_v = get_opp_v_3d(l_els, old_el, neigh); while (neigh > -1) { for (j = 0; j < N_VERTICES_3D; j++) vertices[j] = l_els[neigh].vertex[j]; for (j = 0; j < N_VERTICES_3D; j++) if (vertices[j] == vertex[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (vertices[k] == vertex[1]) break; DEBUG_TEST_EXIT(j < N_VERTICES_3D && k < N_VERTICES_3D, "Did not find the edge again!\n"); edge_no = edge_of_dofs_3d[j][k]; descend_tree_3d(l_els, el, neigh, &n, sub_neigh, adjc); for(i = 0; i < n; i++) { child[0] = l_els[sub_neigh[i]].child[0]; child[1] = l_els[sub_neigh[i]].child[1]; /* Here we assign the necessary information: New vertices and edges.*/ if(new_vertex > -1) l_els[child[0]].vertex[3] = l_els[child[1]].vertex[3] = new_vertex; if(new_edge[0] > -1) { l_els[child[adjc[i]]].edge[2] = new_edge[0]; l_els[child[1-adjc[i]]].edge[2] = new_edge[1]; } } if (next_el[edge_no][0] != opp_v) { old_el = neigh; neigh = l_els[neigh].neigh[next_el[edge_no][0]]; opp_v = get_opp_v_3d(l_els, old_el, neigh); } else { old_el = neigh; neigh = l_els[neigh].neigh[next_el[edge_no][1]]; opp_v = get_opp_v_3d(l_els, old_el, neigh); } } } return; } /****************************************************************************/ /* fill_connectivity_rec_3d(l_els, current_el, v_index, e_index, f_index, */ /* current_level, desired_level): */ /* This routine is the workhorse for filling a LOGICAL_EL array. It sets */ /* vertex, edge, face, and neighbour indices on the children of */ /* "current_el". It is not a simple recursion, but is called for each */ /* refinement level (see below). Only thus are we guaranteed to have correct*/ /* neighbourhood information which is vital for setting edge, face, and */ /* vertex indices correctly. A pointer to each index type is handed through */ /* all calls of this routine and advanced for each new entity counted. */ /****************************************************************************/ static void fill_connectivity_rec_3d(LOGICAL_EL_3D *l_els, int current_el, int *v_index, int *e_index, int *f_index, int current_level, int desired_level) { FUNCNAME("fill_connectivity_rec_3d"); extern int n_child_face_3d[3][2][2]; /* defined in refine_3d.c */ extern int n_child_edge_3d[3][2][2]; extern int adjacent_child_3d[2][2]; int i_child, child_ind[2], opp_v[N_NEIGH_3D] = {-1,-1,-1,-1}, neigh, adjc; int i, j, neigh_child[2], new_vertex = -1, new_edge[2] = {-1,-1}; int i_neigh, j_neigh, sub_opp_v, sub_neigh, sub_type; int el_type = (int)l_els[current_el].el_type; if(l_els[current_el].child[0] > -1) { for(i_child = 0; i_child < 2; i_child++) child_ind[i_child] = l_els[current_el].child[i_child]; if(current_level == desired_level - 1) { /* Fill opposite vertex information. */ for(i = 0; i < N_NEIGH_3D; i++) opp_v[i] = get_opp_v_3d(l_els, current_el, l_els[current_el].neigh[i]); /* Fill face information. Two faces are handed down from parents. */ l_els[child_ind[0]].face[3] = l_els[current_el].face[1]; l_els[child_ind[1]].face[3] = l_els[current_el].face[0]; /* One face is allocated where the two children of "current_el" meet. */ l_els[child_ind[0]].face[0] = l_els[child_ind[1]].face[0] = *f_index; *f_index += 1; /* Four remaining faces are shared with exterior neighbours and might */ /* already have been set by these neighbours. */ if(l_els[child_ind[0]].face[1] < 0) { l_els[child_ind[0]].face[n_child_face_3d[el_type][0][0]] = *f_index; l_els[child_ind[1]].face[n_child_face_3d[el_type][1][0]] = *f_index +1; *f_index += 2; } if(l_els[child_ind[0]].face[2] < 0) { l_els[child_ind[0]].face[n_child_face_3d[el_type][0][1]] = *f_index; l_els[child_ind[1]].face[n_child_face_3d[el_type][1][1]] = *f_index +1; *f_index += 2; } /* Fill edge information. Five edges of "current_el" are passed to */ /* children -- all edges except the refinement edge. Take care of */ /* different local indices depending on el_type. */ l_els[child_ind[0]].edge[0] = l_els[current_el].edge[1]; l_els[child_ind[0]].edge[1] = l_els[current_el].edge[2]; l_els[child_ind[0]].edge[3] = l_els[current_el].edge[5]; l_els[child_ind[1]].edge[3] = l_els[current_el].edge[5]; if(el_type == 0) { l_els[child_ind[1]].edge[0] = l_els[current_el].edge[4]; l_els[child_ind[1]].edge[1] = l_els[current_el].edge[3]; } else { l_els[child_ind[1]].edge[0] = l_els[current_el].edge[3]; l_els[child_ind[1]].edge[1] = l_els[current_el].edge[4]; } /* Two subedges of the refinement edge are allocated. These might also*/ /* have been allocated by neighbour elements and passed around by */ /* hier_edge_loop_3d(). */ new_edge[0] = new_edge[1] = -1; if(l_els[child_ind[0]].edge[2] < 0) { l_els[child_ind[0]].edge[2] = *e_index; l_els[child_ind[1]].edge[2] = *e_index + 1; new_edge[0] = *e_index; new_edge[1] = *e_index + 1; *e_index += 2; } /* Four edges are shared with neighbour elements. We spread this */ /* information below. */ if(l_els[child_ind[0]].edge[5] < 0) { l_els[child_ind[0]].edge[5] = *e_index; if(el_type == 0) l_els[child_ind[1]].edge[4] = *e_index; else l_els[child_ind[1]].edge[5] = *e_index; *e_index += 1; } if(l_els[child_ind[0]].edge[4] < 0) { l_els[child_ind[0]].edge[4] = *e_index; if(el_type == 0) l_els[child_ind[1]].edge[5] = *e_index; else l_els[child_ind[1]].edge[4] = *e_index; *e_index += 1; } /* Fill vertex information. All "current_el" vertices are passed to */ /* children. */ l_els[child_ind[0]].vertex[0] = l_els[current_el].vertex[0]; l_els[child_ind[0]].vertex[1] = l_els[current_el].vertex[2]; l_els[child_ind[0]].vertex[2] = l_els[current_el].vertex[3]; l_els[child_ind[1]].vertex[0] = l_els[current_el].vertex[1]; if(el_type == 0) { l_els[child_ind[1]].vertex[1] = l_els[current_el].vertex[3]; l_els[child_ind[1]].vertex[2] = l_els[current_el].vertex[2]; } else { l_els[child_ind[1]].vertex[1] = l_els[current_el].vertex[2]; l_els[child_ind[1]].vertex[2] = l_els[current_el].vertex[3]; } /* One new vertex is shared by the two children and possibly by */ /* neighbouring children. The new vertex is passed to neighbours by */ /* hier_edge_loop_3d below. */ new_vertex = -1; if(l_els[child_ind[0]].vertex[3] < 0) { l_els[child_ind[0]].vertex[3] = l_els[child_ind[1]].vertex[3] = *v_index; new_vertex = *v_index; *v_index += 1; } /* Set neighbourhood information among children of "current_el". */ l_els[child_ind[0]].neigh[0] = child_ind[1]; l_els[child_ind[1]].neigh[0] = child_ind[0]; /* Now spread neighbourhood info, edges, and faces to the direct */ /* neighbours. The subedges of the "current_el" refinement edge and */ /* the new vertex are special: we must loop around the refinement edge*/ /* to set these. */ for(i = 0; i < N_NEIGH_3D; i++) { neigh = l_els[current_el].neigh[i]; if(neigh > -1 && l_els[neigh].child[0] > -1) { if(i < 2) { /* These are faces which do not contain the refinement edge. */ if(opp_v[i] < 2) { neigh_child[0] = l_els[neigh].child[0]; neigh_child[1] = l_els[neigh].child[1]; l_els[child_ind[1-i]].neigh[3] = neigh_child[1-opp_v[i]]; l_els[neigh_child[1-opp_v[i]]].neigh[3] = child_ind[1-i]; l_els[neigh_child[1-opp_v[i]]].face[3] = l_els[child_ind[1-i]].face[3]; } else l_els[child_ind[1-i]].neigh[3] = neigh; } else { /* These are faces which contain the refinement edge. We might */ /* need to descend one level on the neighbouring elements to */ /* find child elements corresponding to child elements of */ /* "current_el". The remaining code was adapted from refine_3d.c*/ descend_tree_3d(l_els, current_el, neigh, &j, &sub_neigh, &adjc); DEBUG_TEST_EXIT(j == 1, "Found two sub elements!\n"); if(sub_neigh == neigh) sub_opp_v = opp_v[i]; else { DEBUG_TEST_EXIT((l_els[neigh].child[0]==sub_neigh)|| (l_els[neigh].child[1]==sub_neigh), "Oops, nonconforming triangulation!\n"); sub_opp_v = 3; } sub_type = (int)l_els[sub_neigh].el_type; neigh_child[0] = l_els[sub_neigh].child[0]; neigh_child[1] = l_els[sub_neigh].child[1]; for (i_child = 0; i_child < 2; i_child++) { j = adjacent_child_3d[adjc][i_child]; i_neigh = n_child_face_3d[el_type][i_child][i-2]; j_neigh = n_child_face_3d[sub_type][j][sub_opp_v-2]; l_els[child_ind[i_child]].neigh[i_neigh] = neigh_child[j]; l_els[neigh_child[j]].neigh[j_neigh] = child_ind[i_child]; l_els[neigh_child[j]].edge[n_child_edge_3d[sub_type][j][sub_opp_v-2]] = l_els[child_ind[i_child]].edge[n_child_edge_3d[el_type][i_child][i-2]]; l_els[neigh_child[j]].face[j_neigh] = l_els[child_ind[i_child]].face[i_neigh]; } } } } /* Now that all this is done we loop around the refinement edge. */ if(new_vertex > -1 || new_edge[0] > -1) hier_edge_loop_3d(l_els, current_el, new_vertex, new_edge); } /* Now recurse to the two children. */ if(current_level < desired_level) { fill_connectivity_rec_3d(l_els, child_ind[0], v_index, e_index, f_index, current_level + 1, desired_level); fill_connectivity_rec_3d(l_els, child_ind[1], v_index, e_index, f_index, current_level + 1, desired_level); } } return; } /****************************************************************************/ /* macro_edge_loop_3d(l_els, macro_els, el, el_edge_no, e_index): */ /* We loop around the given edge using the same principle as above. Here we */ /* are on a macro triangulation and thus only set the l_els[].edge[] entry. */ /****************************************************************************/ static void macro_edge_loop_3d(LOGICAL_EL_3D *l_els, MACRO_EL *macro_els, int el, int el_edge_no, int e_index) { FUNCNAME("macro_edge_loop_3d"); int vertex[2], vertices[N_VERTICES_3D]; int j, k, neigh, opp_v, edge_no; edge_no = el_edge_no; for (j = 0; j < 2; j++) vertex[j] = l_els[el].vertex[vertex_of_edge_3d[edge_no][j]]; /*--------------------------------------------------------------------------*/ /* first look for all neighbours in one direction until a boundary is */ /* reached :-( or we are back to el :-) */ /*--------------------------------------------------------------------------*/ opp_v = (int) macro_els[el].opp_vertex[next_el[edge_no][0]]; neigh = l_els[el].neigh[next_el[edge_no][0]]; while (neigh > -1 && neigh != el) { for (j = 0; j < N_VERTICES_3D; j++) vertices[j] = l_els[neigh].vertex[j]; for (j = 0; j < N_VERTICES_3D; j++) if (vertices[j] == vertex[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (vertices[k] == vertex[1]) break; DEBUG_TEST_EXIT(j < N_VERTICES_3D && k < N_VERTICES_3D, "Did not find the edge again!\n"); edge_no = edge_of_dofs_3d[j][k]; l_els[neigh].edge[edge_no] = e_index; if (next_el[edge_no][0] != opp_v) { opp_v = (int) macro_els[neigh].opp_vertex[next_el[edge_no][0]]; neigh = l_els[neigh].neigh[next_el[edge_no][0]]; } else { opp_v = (int) macro_els[neigh].opp_vertex[next_el[edge_no][1]]; neigh = l_els[neigh].neigh[next_el[edge_no][1]]; } } if (neigh < 0) { /*--------------------------------------------------------------------------*/ /* while looping around the edge the domain's boundary was reached. Now, */ /* loop in the other direction to the domain's boundary */ /*--------------------------------------------------------------------------*/ edge_no = el_edge_no; neigh = l_els[el].neigh[next_el[edge_no][1]]; opp_v = (int) macro_els[el].opp_vertex[next_el[edge_no][1]]; while (neigh > -1) { for (j = 0; j < N_VERTICES_3D; j++) vertices[j] = l_els[neigh].vertex[j]; for (j = 0; j < N_VERTICES_3D; j++) if (vertices[j] == vertex[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (vertices[k] == vertex[1]) break; DEBUG_TEST_EXIT(j < N_VERTICES_3D && k < N_VERTICES_3D, "Did not find the edge again!\n"); edge_no = edge_of_dofs_3d[j][k]; l_els[neigh].edge[edge_no] = e_index; if (next_el[edge_no][0] != opp_v) { opp_v = (int) macro_els[neigh].opp_vertex[next_el[edge_no][0]]; neigh = l_els[neigh].neigh[next_el[edge_no][0]]; } else { opp_v = (int) macro_els[neigh].opp_vertex[next_el[edge_no][1]]; neigh = l_els[neigh].neigh[next_el[edge_no][1]]; } } } return; } /****************************************************************************/ /* fill_logical_els_3d(mesh, n_elements, n_vertices, n_edges, n_faces): */ /* Return a filled array of LOGICAL_EL_3D elements corresponding to the */ /* current state of the mesh refinement tree. */ /****************************************************************************/ static LOGICAL_EL_3D *fill_logical_els_3d(MESH *mesh, int *n_elements, int *n_vertices, int *n_edges, int *n_faces) { FUNCNAME("fill_logical_els_3d"); REAL_D *coords = ((MESH_MEM_INFO *)mesh->mem_info)->coords; int i, j, n_els = mesh->n_hier_elements, neigh, opp_v; LOGICAL_EL_3D *l_els = nil; int index, v_index = 0, e_index = 0, f_index = 0, max_level = 0; MACRO_EL *mel; l_els = MEM_ALLOC(n_els, LOGICAL_EL_3D); /* First pass: Initialize everything, set some information on macro */ /* elements: Neighbour indices, vertices, el_types. */ /* Make use of the fact that macro coordinates are stored in a simple */ /* linear array to get vertex indices! */ for(i = 0; i < n_els; i++) { l_els[i].parent = -1; l_els[i].child[0] = -1; l_els[i].child[1] = -1; if(i < mesh->n_macro_el) { mel = mesh->macro_els + i; for(j = 0; j < N_NEIGH_3D; j++) if(mel->neigh[j]) l_els[i].neigh[j] = mel->neigh[j]->index; else l_els[i].neigh[j] = -1; for(j = 0; j < N_VERTICES_3D; j++) l_els[i].vertex[j] = (REAL_D *)(mel->coord[j]) - coords; l_els[i].el = mel->el; l_els[i].el_type = mel->el_type; } else { for(j = 0; j < N_NEIGH_3D; j++) l_els[i].neigh[j] = -1; for(j = 0; j < N_VERTICES_3D; j++) l_els[i].vertex[j] = -1; } for(j = 0; j < N_EDGES_3D; j++) l_els[i].edge[j] = -1; for(j = 0; j < N_FACES_3D; j++) l_els[i].face[j] = -1; } /* Second pass: Now that we know vertices and neighbours on the macro */ /* triangulation we set faces and edges. */ for(i = 0; i < mesh->n_macro_el; i++) { for(j = 0; j < N_EDGES_3D; j++) if(l_els[i].edge[j] < 0) { l_els[i].edge[j] = e_index; macro_edge_loop_3d(l_els, mesh->macro_els, i, j, e_index); e_index++; } for(j = 0; j < N_FACES_3D; j++) if(l_els[i].face[j] < 0) { l_els[i].face[j] = f_index; neigh = l_els[i].neigh[j]; if(neigh > -1) { opp_v = (int)mesh->macro_els[i].opp_vertex[j]; l_els[neigh].face[opp_v] = f_index; } f_index++; } } index = mesh->n_macro_el; v_index = ((MESH_MEM_INFO *)mesh->mem_info)->count; /* Now we fill basic information about all mesh elements. */ for(i = 0; i < mesh->n_macro_el; i++) fill_logical_el_rec_3d(l_els, mesh->macro_els[i].el, i, &index, 0, &max_level); /* Connectivity and vertex/edge/face indices is built in layers for each */ /* level in the refinement tree. The reason is the interdepence between */ /* neighbour information and vertex/edge/face information. */ for(i = 1; i <= max_level; i++) for(j = 0; j < mesh->n_macro_el; j++) fill_connectivity_rec_3d(l_els, j, &v_index, &e_index, &f_index, 0, i); #if ALBERTA_DEBUG == 1 /* Do a quick and cheap check. For more checks please call check_mesh(). */ for(i = 0; i < index; i++) { for(j = 0; j < N_VERTICES_3D; j++) DEBUG_TEST_EXIT(l_els[i].vertex[j] > -1, "Error while checking element %d, vertex %d==-1!\n", i, j); for(j = 0; j < N_EDGES_3D; j++) DEBUG_TEST_EXIT(l_els[i].edge[j] > -1, "Error while checking element %d, edge %d==-1!\n", i, j); for(j = 0; j < N_FACES_3D; j++) DEBUG_TEST_EXIT(l_els[i].face[j] > -1, "Error while checking element %d, face %d==-1!\n", i, j); } #endif *n_elements = index; *n_vertices = v_index; *n_edges = e_index; *n_faces = f_index; return l_els; } /****************************************************************************/ /* adjust_dofs_and_dof_ptrs_3d(mesh, new_admin, old_n_node_el, */ /* old_n_dof, old_node): */ /* 1) If el->dof pointers have changed, adjust these. Keep old information! */ /* 2) Determine what types of new DOF pointers must be allocated. */ /* 3) Build an index based mesh representation using fill_logical_els() */ /* 4) Change all DOFs on the leaf level. (non-coarse DOFs!) */ /* 5) Change all coarse DOFs on non-leaf elements. */ /****************************************************************************/ static void adjust_dofs_and_dof_ptrs_3d(MESH *mesh, DOF_ADMIN *new_admin, int old_n_node_el, int *old_n_dof, int *old_node) { FUNCNAME("adjust_dofs_and_dof_ptrs_3d"); DOF **old_dof_ptr; int i, n, n_elements = 0, n_hier_elements; int n_vertices, n_edges = 0, n_hier_edges; int n_faces = 0, n_hier_faces, node; int change_dofs[N_NODE_TYPES] = {0}; EL *el; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info = nil; LOGICAL_EL_3D *l_els = nil; DOF **new_vertex_dofs = nil, **new_edge_dofs = nil, **new_face_dofs = nil; /* Adjust the length of el->dof pointer fields. Allocate new ones if */ /* necessary and transfer old information. */ if(mesh->n_node_el > old_n_node_el) { el_info = traverse_first(stack, mesh, -1, CALL_EVERY_EL_PREORDER); while(el_info) { el = el_info->el; old_dof_ptr = el->dof; el->dof = get_dof_ptrs(mesh); if(old_n_dof[VERTEX]) for(i = 0; i < N_VERTICES_3D; i++) el->dof[mesh->node[VERTEX] + i] = old_dof_ptr[old_node[VERTEX] + i]; if(old_n_dof[EDGE]) for(i = 0; i < N_EDGES_3D; i++) el->dof[mesh->node[EDGE] + i] = old_dof_ptr[old_node[EDGE] + i]; if(old_n_dof[FACE]) for(i = 0; i < N_FACES_3D; i++) el->dof[mesh->node[FACE] + i] = old_dof_ptr[old_node[FACE] + i]; if(old_n_dof[CENTER]) el->dof[mesh->node[CENTER]] = old_dof_ptr[old_node[CENTER]]; el_info = traverse_next(stack, el_info); } } /* Determine which DOF types have changed on the mesh with the new admin. */ for(n = 0; n < N_NODE_TYPES; n++) if(mesh->n_dof[n] > old_n_dof[n]) change_dofs[n] = 1; /* Build an array containing an index based mesh representation. */ l_els = fill_logical_els_3d(mesh, &n_hier_elements, &n_vertices, &n_hier_edges,&n_hier_faces); /* Allocate an array containing new DOF pointers. We make use of the */ /* index based mesh representation to ensure the correct setting. */ if(change_dofs[VERTEX]) new_vertex_dofs = MEM_CALLOC(n_vertices, DOF *); if(change_dofs[EDGE]) new_edge_dofs = MEM_CALLOC(n_hier_edges, DOF *); if(change_dofs[FACE]) new_face_dofs = MEM_CALLOC(n_hier_faces, DOF *); /* First pass: Change all DOFs on the leaf level. FACE and EDGE DOFs on */ /* some parents of the leaf elements will still be in use and must thus */ /* be marked correctly in this pass! */ for(n = 0; n < n_hier_elements; n++) { el = l_els[n].el; if(!el->child[0]) { n_elements++; if(change_dofs[VERTEX]) { node = mesh->node[VERTEX]; for(i = 0; i < N_VERTICES_3D; i++) { if(!new_vertex_dofs[l_els[n].vertex[i]]) new_vertex_dofs[l_els[n].vertex[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], VERTEX, false); el->dof[node + i] = new_vertex_dofs[l_els[n].vertex[i]]; } } if(change_dofs[CENTER]) { node = mesh->node[CENTER]; el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, false); } if(change_dofs[EDGE]) { node = mesh->node[EDGE]; for(i = 0; i < N_EDGES_3D; i++) { if(!new_edge_dofs[l_els[n].edge[i]]) { n_edges++; new_edge_dofs[l_els[n].edge[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], EDGE, false); } el->dof[node + i] = new_edge_dofs[l_els[n].edge[i]]; } } if(change_dofs[FACE]) { node = mesh->node[FACE]; for(i = 0; i < N_FACES_3D; i++) { if(!new_face_dofs[l_els[n].face[i]]) { n_faces++; new_face_dofs[l_els[n].face[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], FACE, false); } el->dof[node + i] = new_face_dofs[l_els[n].face[i]]; } } } } /* Second pass: Change all DOFs which were not yet set. These will be */ /* coarse DOFs in the case of EDGE/FACE/CENTER DOFs, therefore call */ /* transfer_dofs() with "is_coarse_dof=true"! */ for(n = 0; n < n_hier_elements; n++) { el = l_els[n].el; if(el->child[0]) { if(change_dofs[VERTEX]) { node = mesh->node[VERTEX]; /* All VERTEX DOFs must have been set on the leaf level. */ for(i = 0; i < N_VERTICES_3D; i++) { DEBUG_TEST_EXIT(new_vertex_dofs[l_els[n].vertex[i]], "Why is this VERTEX DOF not set on leaf level?\n"); el->dof[node + i] = new_vertex_dofs[l_els[n].vertex[i]]; } } if(change_dofs[CENTER]) { node = mesh->node[CENTER]; el->dof[node] = transfer_dofs(mesh, new_admin, el->dof[node], CENTER, true); } if(change_dofs[EDGE]) { node = mesh->node[EDGE]; for(i = 0; i < N_EDGES_3D; i++) { if(!new_edge_dofs[l_els[n].edge[i]]) new_edge_dofs[l_els[n].edge[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], EDGE, true); el->dof[node + i] = new_edge_dofs[l_els[n].edge[i]]; } } if(change_dofs[FACE]) { node = mesh->node[FACE]; for(i = 0; i < N_FACES_3D; i++) { if(!new_face_dofs[l_els[n].face[i]]) new_face_dofs[l_els[n].face[i]] = transfer_dofs(mesh, new_admin, el->dof[node + i], FACE, true); el->dof[node + i] = new_face_dofs[l_els[n].face[i]]; } } } } /* A few checks and settings. */ TEST_EXIT(n_elements == mesh->n_elements, "Did not count correct number of leaf elements in mesh!\n"); if(mesh->n_vertices > -1) { TEST_EXIT(n_vertices == mesh->n_vertices, "Did not count correct number of vertices in mesh!\n"); } else mesh->n_vertices = n_vertices; if(change_dofs[EDGE]) { if(mesh->n_edges > -1) { TEST_EXIT(n_edges == mesh->n_edges, "Did not count correct number of leaf edges in mesh!\n"); } else mesh->n_edges = n_edges; } if(change_dofs[FACE]) { if(mesh->n_faces > -1) { TEST_EXIT(n_faces == mesh->n_faces, "Did not count correct number of leaf faces in mesh!\n"); } else mesh->n_faces = n_faces; } /* Clean up operations. */ if(new_vertex_dofs) MEM_FREE(new_vertex_dofs, n_vertices, DOF *); if(new_edge_dofs) MEM_FREE(new_edge_dofs, n_hier_edges, DOF *); if(new_face_dofs) MEM_FREE(new_face_dofs, n_hier_faces, DOF *); if(l_els) MEM_FREE(l_els, n_elements, LOGICAL_EL_3D); free_traverse_stack(stack); return; } /****************************************************************************/ /* fill_missing_dofs_3d(mesh): See master routine in memory.c. */ /****************************************************************************/ static void fill_missing_dofs_3d(MESH *mesh) { FUNCNAME("fill_missing_dofs_3d"); int i, n, n_elements, n_vertices, n_edges, n_faces, node; EL *el; LOGICAL_EL_3D *l_els = nil; DOF **new_edge_dofs = nil, **new_face_dofs = nil; if(!mesh->n_dof[CENTER] && !mesh->n_dof[EDGE] && !mesh->n_dof[FACE]) return; l_els = fill_logical_els_3d(mesh, &n_elements, &n_vertices, &n_edges, &n_faces); if(mesh->n_dof[EDGE]) new_edge_dofs = MEM_CALLOC(n_edges, DOF *); if(mesh->n_dof[FACE]) new_face_dofs = MEM_CALLOC(n_faces, DOF *); /* All new DOFs are set to -1 (unused) by transfer_dofs(). */ for(n = 0; n < n_elements; n++) { el = l_els[n].el; if(mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; if(!el->dof[node]) el->dof[node] = transfer_dofs(mesh, nil, nil, CENTER, false); } if(mesh->n_dof[EDGE]) { node = mesh->node[EDGE]; for(i = 0; i < N_EDGES_3D; i++) if(!el->dof[node + i]) { DEBUG_TEST_EXIT(el->child[0], "No edge DOFs on a LEAF element??\n"); if(!new_edge_dofs[l_els[n].edge[i]]) new_edge_dofs[l_els[n].edge[i]] = transfer_dofs(mesh, nil, nil, EDGE, false); el->dof[node + i] = new_edge_dofs[l_els[n].edge[i]]; } } if(mesh->n_dof[FACE]) { node = mesh->node[FACE]; for(i = 0; i < N_FACES_3D; i++) if(!el->dof[node + i]) { DEBUG_TEST_EXIT(el->child[0], "No face DOFs on a LEAF element??\n"); if(!new_face_dofs[l_els[n].face[i]]) new_face_dofs[l_els[n].face[i]] = transfer_dofs(mesh, nil, nil, FACE, false); el->dof[node + i] = new_face_dofs[l_els[n].face[i]]; } } } /* Clean up operations. */ if(new_edge_dofs) MEM_FREE(new_edge_dofs, n_edges, DOF *); if(new_face_dofs) MEM_FREE(new_face_dofs, n_faces, DOF *); MEM_FREE(l_els, n_elements, LOGICAL_EL_3D); return; } alberta-2.0.1/alberta/src/3d/parametric_3d.c0000644000042300001440000006431010676724252015444 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: parametric_3d.c */ /* */ /* */ /* description: Support for parametric elements in 3D */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ static const REAL_B bary2_3d[N_VERTICES(3) + N_EDGES(3)] = { {1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.0, 0.0, 0.0, 1.0}, {0.5, 0.5, 0.0, 0.0}, {0.5, 0.0, 0.5, 0.0}, {0.5, 0.0, 0.0, 0.5}, {0.0, 0.5, 0.5, 0.0}, {0.0, 0.5, 0.0, 0.5}, {0.0, 0.0, 0.5, 0.5} }; /*--------------------------------------------------------------------------*/ /* Functions for affine elements as parametric elements. (suffix 1_3d) */ /*--------------------------------------------------------------------------*/ static void det1_3d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL dets[]) { REAL_D *local_coords = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data)->local_coords; REAL_D e[3]; REAL det; int i, j; for(i = 0; i < 3; i++) for (j = 0; j < DIM_OF_WORLD; j++) e[i][j] = local_coords[i+1][j] - local_coords[0][j]; det = e[0][0] * (e[1][1]*e[2][2] - e[1][2]*e[2][1]) - e[0][1] * (e[1][0]*e[2][2] - e[1][2]*e[2][0]) + e[0][2] * (e[1][0]*e[2][1] - e[1][1]*e[2][0]); det = ABS(det); if (quad) N = quad->n_points; for (i = 0; i < N; i++) dets[i] = det; return; } static void grd_lambda1_3d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D grd_lam[][N_LAMBDA], REAL dets[]) { /* FUNCNAME("grd_lambda1_3d"); */ REAL_D *local_coords = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data)->local_coords; int i, j, n; REAL_D e[3]; REAL adet, det; REAL a11, a12, a13, a21, a22, a23, a31, a32, a33; REAL_D grd_lambda[N_LAMBDA]; for (i = 0; i < 3; i++) for(j = 0; j < DIM_OF_WORLD; j++) e[i][j] = local_coords[i+1][j] - local_coords[0][j]; det = e[0][0] * (e[1][1]*e[2][2] - e[1][2]*e[2][1]) - e[0][1] * (e[1][0]*e[2][2] - e[1][2]*e[2][0]) + e[0][2] * (e[1][0]*e[2][1] - e[1][1]*e[2][0]); adet = ABS(det); det = 1.0 / det; a11 = (e[1][1]*e[2][2] - e[1][2]*e[2][1]) * det; a12 = (e[1][2]*e[2][0] - e[1][0]*e[2][2]) * det; a13 = (e[1][0]*e[2][1] - e[1][1]*e[2][0]) * det; a21 = (e[0][2]*e[2][1] - e[0][1]*e[2][2]) * det; a22 = (e[0][0]*e[2][2] - e[0][2]*e[2][0]) * det; a23 = (e[0][1]*e[2][0] - e[0][0]*e[2][1]) * det; a31 = (e[0][1]*e[1][2] - e[0][2]*e[1][1]) * det; a32 = (e[0][2]*e[1][0] - e[0][0]*e[1][2]) * det; a33 = (e[0][0]*e[1][1] - e[0][1]*e[1][0]) * det; grd_lambda[1][0] = a11; grd_lambda[1][1] = a12; grd_lambda[1][2] = a13; grd_lambda[2][0] = a21; grd_lambda[2][1] = a22; grd_lambda[2][2] = a23; grd_lambda[3][0] = a31; grd_lambda[3][1] = a32; grd_lambda[3][2] = a33; grd_lambda[0][0] = -grd_lambda[1][0] -grd_lambda[2][0] -grd_lambda[3][0]; grd_lambda[0][1] = -grd_lambda[1][1] -grd_lambda[2][1] -grd_lambda[3][1]; grd_lambda[0][2] = -grd_lambda[1][2] -grd_lambda[2][2] -grd_lambda[3][2]; if (quad) N = quad->n_points; for (n = 0; n < N; n++) { for (i = 0; i < N_LAMBDA; i++) for (j = 0; j < DIM_OF_WORLD; j++) grd_lam[n][i][j] = grd_lambda[i][j]; dets[n] = adet; } return; } /****************************************************************************/ /* fill_coords1_3d(data): initialize the DOF_REAL_D_VEC coords containing */ /* the position data of the parametric elements (coordinates of vertices in */ /* this case). */ /****************************************************************************/ static void fill_coords1_3d(LAGRANGE_PARAM_DATA *data) { DOF_REAL_D_VEC *coords = data->coords; DOF_UCHAR_VEC *touched_coords = data->touched_coords; NODE_PROJECTION *n_proj = data->n_proj, *active_proj; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; int i, n; get_dof = coords->fe_space->bas_fcts->get_dof_indices; admin = coords->fe_space->admin; el_info = traverse_first(stack, coords->fe_space->mesh, -1, fill_flag); while (el_info) { const DOF *dof = (*get_dof)(el_info->el, admin, nil); REAL *vec; for (i = 0; i < N_VERTICES_3D; i++) { vec = coords->vec[dof[i]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = el_info->coord[i][n]; /* Look for a projection function that applies to vertex[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[i]] = 0; if(n_proj && (n_proj->func)) { active_proj = el_info->projections[1 + (i+1)%4]; if(!active_proj) active_proj = el_info->projections[1 + (i+2)%4]; if(!active_proj) active_proj = el_info->projections[1 + (i+3)%4]; if(!active_proj) active_proj = el_info->projections[0]; if(active_proj == n_proj) { n_proj->func(vec, el_info, bary2_3d[i]); if(touched_coords) touched_coords->vec[dof[i]] = 1; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } /****************************************************************************/ /* refine_interpol1_3d(drdv,list,n): update coords vector during refinement.*/ /****************************************************************************/ static void refine_interpol1_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("refine_interpol1_3d"); EL *el; REAL_D *vec = nil; DOF dof_new, dof0, dof1; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)drdv->fe_space->mesh->parametric->data; NODE_PROJECTION *n_proj = data->n_proj; DOF_UCHAR_VEC *touched_coords = data->touched_coords; int n0, j; static const REAL_B middle_bary = {0.5, 0.5, 0.0, 0.0}; GET_DOF_VEC(vec, drdv); n0 = drdv->fe_space->admin->n0_dof[VERTEX]; el = list->el_info.el; dof0 = el->dof[0][n0]; /* 1st endpoint of refinement edge */ dof1 = el->dof[1][n0]; /* 2nd endpoint of refinement edge */ dof_new = el->child[0]->dof[3][n0]; /* vertex[3] is newest vertex */ for (j = 0; j < DIM_OF_WORLD; j++) vec[dof_new][j] = 0.5*(vec[dof0][j] + vec[dof1][j]); if(touched_coords) touched_coords->vec[dof_new] = 0; if(n_proj && n_proj->func) { if(list->el_info.active_projection == n_proj) { (n_proj->func)(vec[dof_new], &list->el_info, middle_bary); if(touched_coords) touched_coords->vec[dof_new] = 1; } } return; } /*--------------------------------------------------------------------------*/ /* Common functions for higher order elements. (suffix y_3d) */ /*--------------------------------------------------------------------------*/ #define N_BAS2_3D 10 typedef struct DD_data_3d DD_DATA_3D; struct DD_data_3d { const QUAD *quad; int n_bas_fcts; REAL (*DD)[N_BAS2_3D][3]; DD_DATA_3D *next; }; static DD_DATA_3D *init_dd_data_3d(const QUAD *quad, const BAS_FCTS *bas_fcts) { FUNCNAME("init_dd_data_3d"); static DD_DATA_3D *first_dd_data = nil; DD_DATA_3D *data; int iq, i; const REAL *grd; DEBUG_TEST_EXIT(bas_fcts->n_bas_fcts <= N_BAS2_3D, "Sorry, only up to 10 local DOFs at the moment.\n"); for (data = first_dd_data; data; data = data->next) if (data->quad == quad) break; if (data) return(data); data = MEM_ALLOC(1, DD_DATA_3D); data->quad = quad; data->n_bas_fcts = bas_fcts->n_bas_fcts; data->next = first_dd_data; first_dd_data = data; data->DD = (REAL (*)[N_BAS2_3D][3]) alberta_alloc(quad->n_points*sizeof(REAL [N_BAS2_3D][3]), funcName, __FILE__, __LINE__); for (iq = 0; iq < quad->n_points; iq++) { for (i = 0; i < bas_fcts->n_bas_fcts; i++) { grd = (*bas_fcts->grd_phi[i])(quad->lambda[iq]); data->DD[iq][i][0] = -grd[0] + grd[1]; data->DD[iq][i][1] = -grd[0] + grd[2]; data->DD[iq][i][2] = -grd[0] + grd[3]; } } return(data); } /*--------------------------------------------------------------------------*/ /*--- compute D^t and D^t D, return det(D^t D) ---*/ /*--------------------------------------------------------------------------*/ static REAL Dt_and_DtD_3d(REAL_D *F, REAL DD[][3], int n_bas, REAL_DD Dt, REAL_DD DtD) { FUNCNAME("Dt_and_DtD_3d"); int i, j, n, m; REAL val; for (m = 0; m < 3; m++) { for (n = 0; n < DIM_OF_WORLD; n++) { for (Dt[m][n] = i = 0; i < n_bas; i++) Dt[m][n] += F[i][n]*DD[i][m]; } } for (i = 0; i < 3; i++) { for (j = i; j < 3; j++) { for (val = n = 0; n < DIM_OF_WORLD; n++) val += Dt[i][n]*Dt[j][n]; DtD[i][j] = DtD[j][i] = val; } } val = DtD[0][0]*DtD[1][1]*DtD[2][2] + DtD[0][1]*DtD[1][2]*DtD[2][0] + DtD[0][2]*DtD[1][0]*DtD[2][1] - DtD[0][2]*DtD[1][1]*DtD[2][0] - DtD[0][1]*DtD[1][0]*DtD[2][2] - DtD[0][0]*DtD[1][2]*DtD[2][1]; if (val < 0.0) { WARNING("val = %e\n", val); for (i = 0; i < n_bas; i++) PRINT_REAL_VEC("F", F[i], DIM_OF_WORLD); WAIT_REALLY; } return(val); } static void dety_3d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL dets[]) { /* FUNCNAME("dety_3d"); */ REAL_DD Dt, DtD; int iq; const BAS_FCTS *bas_fcts; LAGRANGE_PARAM_DATA *data = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data); REAL_D *local_coords = data->local_coords; /* First of all, check if we are on a parametric simplex. */ /* If not, treat this simplex as an affine simplex, even though some */ /* higher order vertices might be shifted. */ if(data->i_am_affine) { det1_3d(el_info, quad, N, lambda, dets); return; } if (quad) { static DD_DATA_3D *dd_data = nil; if (!dd_data || dd_data->quad != quad) { bas_fcts = data->coords->fe_space->bas_fcts; dd_data = init_dd_data_3d(quad, bas_fcts); } for (iq = 0; iq < quad->n_points; iq++) dets[iq] = sqrt(Dt_and_DtD_3d(local_coords, dd_data->DD[iq], dd_data->n_bas_fcts, Dt, DtD)); } else { REAL DD[N_BAS2_3D][3]; const REAL *grd; int i, n_bas; bas_fcts = data->coords->fe_space->bas_fcts; n_bas = bas_fcts->n_bas_fcts; for (iq = 0; iq < N; iq++) { for (i = 0; i < n_bas; i++) { grd = (*bas_fcts->grd_phi[i])(lambda[iq]); DD[i][0] = -grd[0] + grd[1]; DD[i][1] = -grd[0] + grd[2]; DD[i][2] = -grd[0] + grd[3]; } dets[iq] = sqrt(Dt_and_DtD_3d(local_coords, DD, n_bas, Dt, DtD)); } } return; } static REAL Lambda_iq_3d(REAL_D *const F, REAL DD[][3], int n_bas, REAL_D Lambda[N_LAMBDA]) { REAL_DD Dt, DtD; REAL_DD DtD_1, DFS_1 = {}; REAL det, det_1; int i, j, n; det = Dt_and_DtD_3d(F, DD, n_bas, Dt, DtD); det_1 = 1.0/det; /*--------------------------------------------------------------------------*/ /*--- now, invert DtD ---*/ /*--------------------------------------------------------------------------*/ DtD_1[0][0] = ( DtD[1][1]*DtD[2][2] - DtD[1][2]*DtD[2][1])*det_1; DtD_1[1][0] = (-DtD[0][1]*DtD[2][2] + DtD[0][2]*DtD[2][1])*det_1; DtD_1[2][0] = ( DtD[0][1]*DtD[1][2] - DtD[0][2]*DtD[1][1])*det_1; DtD_1[1][1] = ( DtD[0][0]*DtD[2][2] - DtD[0][2]*DtD[2][0])*det_1; DtD_1[2][1] = (-DtD[0][0]*DtD[1][2] + DtD[0][2]*DtD[1][0])*det_1; DtD_1[2][2] = ( DtD[0][0]*DtD[1][1] - DtD[0][1]*DtD[1][0])*det_1; DtD_1[0][1] = DtD_1[1][0]; DtD_1[0][2] = DtD_1[2][0]; DtD_1[1][2] = DtD_1[2][1]; /*--------------------------------------------------------------------------*/ /*--- compute DF_S^{-1} = (D^t D)^{-1} D^t ---*/ /*--------------------------------------------------------------------------*/ for(i = 0; i < DIM_OF_WORLD; i++) for(j = 0; j < DIM_OF_WORLD; j++) for(n = 0; n < DIM_OF_WORLD; n++) DFS_1[i][j] += DtD_1[i][n]*Dt[n][j]; /*--------------------------------------------------------------------------*/ /*--- finally, \Lambda = \hat\Lambda DF_S^{-1} ---*/ /*--------------------------------------------------------------------------*/ for (n = 0; n < DIM_OF_WORLD; n++) { Lambda[0][n] = -DFS_1[0][n] - DFS_1[1][n] - DFS_1[2][n]; Lambda[1][n] = DFS_1[0][n]; Lambda[2][n] = DFS_1[1][n]; Lambda[3][n] = DFS_1[2][n]; } return(sqrt(det)); } static void grd_lambday_3d(const EL_INFO *el_info, const QUAD *quad, int N, const REAL lambda[][N_LAMBDA], REAL_D Lambda[][N_LAMBDA], REAL dets[]) { /* FUNCNAME("grd_lambday_3d"); */ int iq; const BAS_FCTS *bas_fcts; LAGRANGE_PARAM_DATA *data = ((LAGRANGE_PARAM_DATA *)el_info->mesh->parametric->data); REAL_D *local_coords = data->local_coords; /* First of all, check if we are on a parametric simplex. */ /* If not, treat this simplex as an affine simplex, even though some */ /* higher order vertices might be shifted. */ if(data->i_am_affine) { grd_lambda1_3d(el_info,quad, N, lambda, Lambda, dets); return; } if (quad) { static DD_DATA_3D *dd_data = nil; if (!dd_data || dd_data->quad != quad) { bas_fcts = data->coords->fe_space->bas_fcts; dd_data = init_dd_data_3d(quad, bas_fcts); } for (iq = 0; iq < quad->n_points; iq++) dets[iq] = Lambda_iq_3d(local_coords, dd_data->DD[iq], dd_data->n_bas_fcts, Lambda[iq]); } else { REAL DD[N_BAS2_3D][3]; const REAL *grd; int i, n_bas; bas_fcts = data->coords->fe_space->bas_fcts; n_bas = bas_fcts->n_bas_fcts; for (iq = 0; iq < N; iq++) { for (i = 0; i < n_bas; i++) { grd = (*bas_fcts->grd_phi[i])(lambda[iq]); DD[i][0] = -grd[0] + grd[1]; DD[i][1] = -grd[0] + grd[2]; DD[i][2] = -grd[0] + grd[3]; } dets[iq] = Lambda_iq_3d(local_coords, DD, n_bas, Lambda[iq]); } } return; } /*--------------------------------------------------------------------------*/ /* Functions for quadratic elements. (suffix 2_3d) */ /*--------------------------------------------------------------------------*/ static void refine_interpol2_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("refine_interpol2_3d"); EL *el; REAL_D *vec = nil; int i, j, k, node_e, n0_e, node_v, n0_v, result, elem; DOF cdof[4], pdof, cdof_e[N_EDGES_3D],cdof_v[N_VERTICES_3D]; REAL_D x[4]; NODE_PROJECTION *n_proj; const MESH *mesh = drdv->fe_space->mesh; const EL_INFO *el_info; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)list->el_info.mesh->parametric->data; DOF_UCHAR_VEC *touched_coords = data->touched_coords; static const REAL_B lambda[4] = { {0.25, 0.25, 0.5, 0.0}, {0.25, 0.25, 0.0, 0.5}, {0.75, 0.25, 0.0, 0.0}, {0.25, 0.75, 0.0, 0.0} }; GET_DOF_VEC(vec, drdv); node_e = mesh->node[EDGE]; node_v = mesh->node[VERTEX]; n0_e = drdv->fe_space->admin->n0_dof[EDGE]; n0_v = drdv->fe_space->admin->n0_dof[VERTEX]; n_proj = data->n_proj; /****************************************************************************/ /* Loop over all patch elements. */ /****************************************************************************/ for(elem = 0; elem < n; elem++) { el_info = &list[elem].el_info; el = el_info->el; /****************************************************************************/ /* Step 1: Initialize the parametric element. */ /****************************************************************************/ param_init_element(el_info, mesh->parametric); /****************************************************************************/ /* Step 2: Now we need to determine four points: The midpoint on the two */ /* edges between the two children and the two midpoints of the children */ /* along the current refinement edge. */ /* If strategy is 0 or 1 we use the (nonlinear) barycentric coords. */ /* For strategy 2 we use geometric midpoints. */ /****************************************************************************/ if(mesh->parametric->not_all <= 1) param_coord_to_world(el_info, nil, 4, lambda, x); else { cdof_e[0] = el->dof[node_e+0][n0_e]; for(i = 0; i < N_VERTICES_3D; i++) cdof_v[i] = el->dof[node_v+i][n0_v]; for(i = 0; i < DIM_OF_WORLD; i++) { x[0][i] = 0.5 * (vec[cdof_e[0]][i] + vec[cdof_v[2]][i]); x[1][i] = 0.5 * (vec[cdof_e[0]][i] + vec[cdof_v[3]][i]); x[2][i] = 0.5 * (vec[cdof_e[0]][i] + vec[cdof_v[0]][i]); x[3][i] = 0.5 * (vec[cdof_e[0]][i] + vec[cdof_v[1]][i]); } } /****************************************************************************/ /* Step 3: We check if any projections need to be done on these three */ /* points. While doing this, we keep track of touched coordinates. */ /****************************************************************************/ cdof[0] = el->child[0]->dof[node_e+4][n0_e]; cdof[1] = el->child[0]->dof[node_e+5][n0_e]; cdof[2] = el->child[0]->dof[node_e+2][n0_e]; cdof[3] = el->child[1]->dof[node_e+2][n0_e]; if(touched_coords) { touched_coords->vec[cdof[0]] = 0; touched_coords->vec[cdof[1]] = 0; touched_coords->vec[cdof[2]] = 0; touched_coords->vec[cdof[3]] = 0; } if(n_proj && n_proj->func) { if(el_info->projections[4] == n_proj || el_info->projections[0] == n_proj) { (n_proj->func)(x[0], el_info, lambda[0]); if(touched_coords) touched_coords->vec[cdof[0]] = 1; } if(el_info->projections[3] == n_proj || el_info->projections[0] == n_proj) { (n_proj->func)(x[1], el_info, lambda[1]); if(touched_coords) touched_coords->vec[cdof[1]] = 1; } if(el_info->active_projection == n_proj) { (n_proj->func)(x[2], el_info, lambda[2]); (n_proj->func)(x[3], el_info, lambda[3]); if(touched_coords) { touched_coords->vec[cdof[2]] = 1; touched_coords->vec[cdof[3]] = 1; } } } /****************************************************************************/ /* Step 4: Now that any projection has taken place, copy the values stored */ /* in x[i] to the DOF_REAL_D_VEC. */ /****************************************************************************/ for(i = 0; i < 4; i++) for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof[i]][j] = x[i][j]; /****************************************************************************/ /* Step 5: We hand down the data corresponding to the parent edge vertex */ /* in the refinement edge (its DOF could be deleted!). This concerns coords */ /* and touched coords. This only needs to be done once. */ /****************************************************************************/ if(elem == 0) { pdof = el->dof[node_e+0][n0_e]; cdof[0] = el->child[0]->dof[node_v+3][n0_v]; for (j = 0; j < DIM_OF_WORLD; j++) vec[cdof[0]][j] = vec[pdof][j]; if(touched_coords) touched_coords->vec[cdof[0]] = touched_coords->vec[pdof]; } /****************************************************************************/ /* Step 6: Correct the children, if not all elements are to be parametric. */ /* If the parent element was already affine, then the children will already */ /* have the correct coordinates. */ /****************************************************************************/ if(touched_coords && !data->i_am_affine) for(i = 0; i < 2; i++) { result = 0; for(j = 0; j < N_EDGES_3D; j++) { cdof[0] = el->child[i]->dof[node_e+j][n0_e]; if(touched_coords->vec[cdof[0]]) { result = 1; break; } } if(result == 0) { for(j = 0; j < N_EDGES_3D; j++) cdof_e[j] = el->child[i]->dof[node_e+j][n0_e]; for(j = 0; j < N_VERTICES_3D; j++) cdof_v[j] = el->child[i]->dof[node_v+j][n0_v]; for (j = 0; j < N_EDGES_3D; j++) for (k = 0; k < DIM_OF_WORLD; k++) vec[cdof_e[j]][k] = 0.5*(vec[cdof_v[vertex_of_edge_3d[j][0]]][k] + vec[cdof_v[vertex_of_edge_3d[j][1]]][k]); } } } return; } static void coarse_interpol2_3d(DOF_REAL_D_VEC *drdv, RC_LIST_EL *list, int n) { FUNCNAME("coarse_interpol2_3d"); EL *el; REAL_D *vec = nil; int node_v, node_e, n0_v, n0_e, j; DOF cdof, pdof; LAGRANGE_PARAM_DATA *data = (LAGRANGE_PARAM_DATA *)list->el_info.mesh->parametric->data; DOF_UCHAR_VEC *touched_coords = data->touched_coords; if (n < 1) return; GET_DOF_VEC(vec, drdv); el = list->el_info.el; node_v = drdv->fe_space->mesh->node[VERTEX]; node_e = drdv->fe_space->mesh->node[EDGE]; n0_v = drdv->fe_space->admin->n0_dof[VERTEX]; n0_e = drdv->fe_space->admin->n0_dof[EDGE]; /****************************************************************************/ /* copy values at refinement vertex to the parent refinement edge. */ /****************************************************************************/ cdof = el->child[0]->dof[node_v+3][n0_v]; /* newest vertex is dim */ pdof = el->dof[node_e][n0_e]; for (j = 0; j < DIM_OF_WORLD; j++) vec[pdof][j] = vec[cdof][j]; if(touched_coords) touched_coords->vec[pdof] = touched_coords->vec[cdof]; return; } static void fill_coords2_3d(LAGRANGE_PARAM_DATA *data) { DOF_REAL_D_VEC *coords = data->coords; DOF_UCHAR_VEC *touched_coords = data->touched_coords; NODE_PROJECTION *n_proj = data->n_proj, *active_proj; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; FLAGS fill_flag = CALL_LEAF_EL|FILL_COORDS|FILL_PROJECTION; const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const DOF_ADMIN *admin; int i, n; static const int faces_of_edge[6][2] = {{2,3},{1,3},{1,2},{0,3},{0,2},{0,1}}; get_dof = coords->fe_space->bas_fcts->get_dof_indices; admin = coords->fe_space->admin; el_info = traverse_first(stack, coords->fe_space->mesh, -1, fill_flag); while (el_info) { const DOF *dof = (*get_dof)(el_info->el, admin, nil); REAL *vec, *vec0, *vec1; for (i = 0; i < N_VERTICES_3D; i++) { vec = coords->vec[dof[i]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = el_info->coord[i][n]; /* Look for a projection function that applies to vertex[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[i]] = 0; if(n_proj && n_proj->func) { active_proj = el_info->projections[1 + (i+1)%4]; if(!active_proj) active_proj = el_info->projections[1 + (i+2)%4]; if(!active_proj) active_proj = el_info->projections[1 + (i+3)%4]; if(!active_proj) active_proj = el_info->projections[0]; if(active_proj == n_proj) { (n_proj->func)(vec, el_info, bary2_3d[i]); if(touched_coords) touched_coords->vec[dof[i]] = 1; } } } for (i = 0; i < N_EDGES_3D; i++) { int *voe = vertex_of_edge_3d[i]; vec = coords->vec[dof[N_VERTICES_3D+i]]; vec0 = coords->vec[dof[voe[0]]]; vec1 = coords->vec[dof[voe[1]]]; for (n = 0; n < DIM_OF_WORLD; n++) vec[n] = 0.5*(vec0[n] + vec1[n]); /* Look for a projection function that applies to edge[i]. */ /* Apply this projection if found. */ if(touched_coords) touched_coords->vec[dof[N_VERTICES_3D + i]] = 0; if(n_proj && n_proj->func) { active_proj = el_info->projections[1 + faces_of_edge[i][0]]; if(!active_proj) active_proj = el_info->projections[1 + faces_of_edge[i][1]]; if(!active_proj) active_proj = el_info->projections[0]; if(active_proj == n_proj) { (n_proj->func)(vec, el_info, bary2_3d[N_VERTICES(3) + i]); if(touched_coords) touched_coords->vec[dof[N_VERTICES_3D + i]] = 1; } } } el_info = traverse_next(stack, el_info); } free_traverse_stack(stack); return; } static PARAMETRIC lagrange_parametric1_3d = {"3D Lagrange parametric elements of degree 1", param_init_element, param_coord_to_world, nil, det1_3d, grd_lambda1_3d, false, false, nil}; static PARAMETRIC lagrange_parametric2_3d = {"3D Lagrange parametric elements of degree 2", param_init_element, param_coord_to_world, nil, dety_3d, grd_lambday_3d, false, false, nil}; alberta-2.0.1/alberta/src/3d/refine_3d.c0000644000042300001440000007007110676724251014565 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: refine_3d.c */ /* */ /* description: recursive refinement of 3 dim. hierarchical meshes; */ /* implementation of the newest vertex bisection */ /* file contains all routines depending on DIM == 3; */ /* */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* sets neighbour connectivity inside the refinement/coarsening patch */ /*--------------------------------------------------------------------------*/ void AI_get_neigh_on_patch_3d(RC_LIST_EL ref_list[],int n_neigh, int bound) { FUNCNAME("AI_get_neigh_on_patch_3d"); int i, j, k, dir; EL *el, *neigh; for (i = 0; i < n_neigh; i++) { el = ref_list[i].el_info.el; ref_list[i].no = i; for (dir = 0; dir < 2; dir++) { for (j = 0; j < n_neigh; j++) { if ((neigh = ref_list[j].el_info.el) == el) continue; for (k = 0; k < 2; k++) { if (neigh->dof[2+k] == el->dof[3-dir]) { ref_list[i].neigh[dir] = ref_list+j; ref_list[i].opp_vertex[dir] = 3-k; break; } } if (k < 2) break; } if (j >= n_neigh) { DEBUG_TEST_EXIT(bound, "neighbour of element %d in list not found\n", INDEX(el)); ref_list[i].neigh[dir] = nil; ref_list[i].opp_vertex[dir] = -1; } } } return; } /*--------------------------------------------------------------------------*/ /* edge_of_dofs_3d[i][j]: gives the local index of edge with vertices i, j */ /*--------------------------------------------------------------------------*/ U_CHAR edge_of_dofs_3d[4][4] = {{255,0,1,2}, {0,255,3,4}, {1,3,255,5}, {2,4,5,255}}; /*--------------------------------------------------------------------------*/ /* n_child_edge_3d[el_type][ichild][dir] */ /* gives local index of new edge on child[ichild] part of face [2+dir] on */ /* the parent */ /*--------------------------------------------------------------------------*/ int n_child_edge_3d[3][2][2] = {{{5,4},{4,5}}, {{5,4},{5,4}}, {{5,4},{5,4}}}; /*--------------------------------------------------------------------------*/ /* n_child_face_3d[el_type][ichild][dir] */ /* gives local index of sub-face on child[ichild] part of face [2+dir] on */ /* the parent */ /*--------------------------------------------------------------------------*/ int n_child_face_3d[3][2][2] = {{{1,2},{2,1}},{{1,2},{1,2}}, {{1,2},{1,2}}}; /*--------------------------------------------------------------------------*/ /* adjacent_child_3d[position][ichild] */ /* gives number of the adjacent child on a neighbour element */ /* position = 0 same position of element and neigh at refinement edge */ /* position = 1 different ... */ /*--------------------------------------------------------------------------*/ int adjacent_child_3d[2][2] = {{0,1}, {1,0}}; static void fill_patch_connectivity_3d(MESH *mesh, RC_LIST_EL *ref_list) { FUNCNAME("fill_patch_connectivity_3d"); EL *el = ref_list->el_info.el, *neigh; int dir, n_type = 0; int el_type = ref_list->el_info.el_type; int adjc, i, j, i_neigh, j_neigh; int node0, node1, opp_v = 0; for (dir = 0; dir < 2; dir++) { if (ref_list->neigh[dir]) { neigh = ref_list->neigh[dir]->el_info.el; n_type = ref_list->neigh[dir]->el_info.el_type; opp_v = ref_list->opp_vertex[dir]; } else neigh = nil; if (!neigh || !neigh->child[0]) { /*--------------------------------------------------------------------------*/ /* get new dof's in the midedge of the face of el and for the two midpoints*/ /* of the sub-faces. If face is an interior face those pointers have to be */ /* adjusted by the neighbour element also (see below) */ /*--------------------------------------------------------------------------*/ if (mesh->n_dof[EDGE]) { node0 = node1 = mesh->node[EDGE]; node0 += n_child_edge_3d[el_type][0][dir]; node1 += n_child_edge_3d[el_type][1][dir]; el->child[0]->dof[node0] = el->child[1]->dof[node1] = get_dof(mesh, EDGE); } if (mesh->n_dof[FACE]) { node0 = mesh->node[FACE] + n_child_face_3d[el_type][0][dir]; el->child[0]->dof[node0] = get_dof(mesh, FACE); node1 = mesh->node[FACE] + n_child_face_3d[el_type][1][dir]; el->child[1]->dof[node1] = get_dof(mesh, FACE); } } else /* if (!neigh || !neigh->child[0]) */ { /*--------------------------------------------------------------------------*/ /* interior face and neighbour has been refined, look for position at the */ /* refinement edge */ /*--------------------------------------------------------------------------*/ if (el->dof[0] == neigh->dof[0]) { /*--------------------------------------------------------------------------*/ /* same position at refinement edge */ /*--------------------------------------------------------------------------*/ adjc = 0; } else { /*--------------------------------------------------------------------------*/ /* different position at refinement edge */ /*--------------------------------------------------------------------------*/ adjc = 1; } for (i = 0; i < 2; i++) { j = adjacent_child_3d[adjc][i]; i_neigh = n_child_face_3d[el_type][i][dir]; j_neigh = n_child_face_3d[n_type][j][opp_v-2]; /*--------------------------------------------------------------------------*/ /* adjust dof pointer in the edge in the common face of el and neigh and */ /* the dof pointer in the sub-face child_i-child_j (allocated by neigh!) */ /*--------------------------------------------------------------------------*/ if (mesh->n_dof[EDGE]) { node0 = mesh->node[EDGE] +n_child_edge_3d[el_type][i][dir]; node1 = mesh->node[EDGE] +n_child_edge_3d[n_type][j][opp_v-2]; DEBUG_TEST_EXIT(neigh->child[j]->dof[node1], "no dof on neighbour %d at node %d\n", INDEX(neigh->child[j]), node1); el->child[i]->dof[node0] = neigh->child[j]->dof[node1]; } if (mesh->n_dof[FACE]) { node0 = mesh->node[FACE] + i_neigh; node1 = mesh->node[FACE] + j_neigh; DEBUG_TEST_EXIT(neigh->child[j]->dof[node1], "no dof on neighbour %d at node %d\n", INDEX(neigh->child[j]), node1); el->child[i]->dof[node0] = neigh->child[j]->dof[node1]; } } /* for (i = 0; i < 2; i++) */ } /* else of if (!neigh || !neigh->child[0]) */ } /* for (dir = 0; dir < 2; dir++) */ return; } static void bisect_element_3d(MESH *mesh, RC_LIST_EL *ref_list, DOF *dof[3], DOF *edge[2]) { EL *el = ref_list->el_info.el, *child[2]; int i, node; int el_type = ref_list->el_info.el_type; child[0] = get_element(mesh); child[1] = get_element(mesh); child[0]->mark = child[1]->mark = MAX(0, el->mark-1); el->mark = 0; /*--------------------------------------------------------------------------*/ /* transfer hidden data from parent to children */ /*--------------------------------------------------------------------------*/ if (el->child[1] && ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->refine_leaf_data) ((MESH_MEM_INFO *)mesh->mem_info)->leaf_data_info->refine_leaf_data(el, child); AI_free_leaf_data((void *) el->child[1], mesh); el->child[0] = child[0]; el->child[1] = child[1]; if (child[0]->mark > 0) do_more_refine_3d = true; child[0]->dof[N_VERTICES_3D-1] = child[1]->dof[N_VERTICES_3D-1] = dof[0]; for (i = 0; i < N_VERTICES_3D-1; i++) { child[0]->dof[i] = el->dof[child_vertex_3d[el_type][0][i]]; child[1]->dof[i] = el->dof[child_vertex_3d[el_type][1][i]]; } /*--------------------------------------------------------------------------*/ /* there is one more leaf element and two more hierachical elements */ /*--------------------------------------------------------------------------*/ mesh->n_elements++; mesh->n_hier_elements +=2; /*--------------------------------------------------------------------------*/ /* first set those dof pointers for higher order without neighbour */ /* information */ /*--------------------------------------------------------------------------*/ if (mesh->n_dof[EDGE]) { node = mesh->node[EDGE]; /*--------------------------------------------------------------------------*/ /* set pointers to those dof's that are handed on from the parant */ /*--------------------------------------------------------------------------*/ child[0]->dof[node] = el->dof[node+child_edge_3d[el_type][0][0]]; child[1]->dof[node] = el->dof[node+child_edge_3d[el_type][1][0]]; child[0]->dof[node+1] = el->dof[node+child_edge_3d[el_type][0][1]]; child[1]->dof[node+1] = el->dof[node+child_edge_3d[el_type][1][1]]; child[0]->dof[node+3] = el->dof[node+child_edge_3d[el_type][0][3]]; child[1]->dof[node+3] = el->dof[node+child_edge_3d[el_type][1][3]]; /*--------------------------------------------------------------------------*/ /* adjust pointers to the dof's in the refinement edge */ /*--------------------------------------------------------------------------*/ if (el->dof[0] == edge[0]) { child[0]->dof[node+2] = dof[1]; child[1]->dof[node+2] = dof[2]; } else { child[0]->dof[node+2] = dof[2]; child[1]->dof[node+2] = dof[1]; } } if (mesh->n_dof[FACE]) { node = mesh->node[FACE]; /*--------------------------------------------------------------------------*/ /* set pointers to those dof's that are handed on from the parent */ /*--------------------------------------------------------------------------*/ child[0]->dof[node+3] = el->dof[node+1]; child[1]->dof[node+3] = el->dof[node+0]; /*--------------------------------------------------------------------------*/ /* get new dof for the common face of child0 and child1 */ /*--------------------------------------------------------------------------*/ child[0]->dof[node] = child[1]->dof[node] = get_dof(mesh, FACE); } if (mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; child[0]->dof[node] = get_dof(mesh, CENTER); child[1]->dof[node] = get_dof(mesh, CENTER); } if (mesh->n_dof[EDGE] || mesh->n_dof[FACE]) fill_patch_connectivity_3d(mesh, ref_list); return; } /*--------------------------------------------------------------------------*/ /* remove dof pointers from parent */ /*--------------------------------------------------------------------------*/ static void remove_dof_parent_3d(MESH *mesh, RC_LIST_EL *ref_list) { EL *el = ref_list->el_info.el; RC_LIST_EL *neigh; int node; if (mesh->n_dof[FACE]) { node = mesh->node[FACE]; neigh = ref_list->neigh[0]; if ((!neigh) || (neigh > ref_list)) free_dof(el->dof[node+2], mesh, FACE, true); /* face 2 */ neigh = ref_list->neigh[1]; if ((!neigh) || (neigh > ref_list)) free_dof(el->dof[node+3], mesh, FACE, true); /* face 3 */ } if (mesh->n_dof[CENTER]) { node = mesh->node[CENTER]; free_dof(el->dof[node], mesh, CENTER, true); } return; } static void bisect_patch_3d(MESH *mesh, DOF *edge[2], RC_LIST_EL ref_list[], int n_neigh, int bound) { int i; EL *el = ref_list->el_info.el; /* first element in the list */ DOF *dof[3] = {nil, nil, nil}; int *n_dof = mesh->n_dof; /*--------------------------------------------------------------------------*/ /* get new dof's in the refinement edge */ /*--------------------------------------------------------------------------*/ dof[0] = get_dof(mesh, VERTEX); mesh->n_vertices++; if (mesh->n_dof[EDGE]) { dof[1] = get_dof(mesh, EDGE); dof[2] = get_dof(mesh, EDGE); } for (i = 0; i < n_neigh; i++) bisect_element_3d(mesh, ref_list+i, dof, edge); /*--------------------------------------------------------------------------*/ /* if there are functions to interpolate data to the finer grid, do so */ /*--------------------------------------------------------------------------*/ if (call_refine_interpol_3d) refine_interpol(mesh, ref_list, n_neigh); /*--------------------------------------------------------------------------*/ /* if there should be no dof information on interior leaf elements remove */ /* dofs from edges, faces and the centers of parents */ /*--------------------------------------------------------------------------*/ if (n_dof[EDGE]) { /*--------------------------------------------------------------------------*/ /* remove dof of the midpoint of the common refinement edge */ /*--------------------------------------------------------------------------*/ el = ref_list->el_info.el; free_dof(el->dof[mesh->node[EDGE]], mesh, EDGE, true); } if (n_dof[EDGE] || n_dof[FACE] || n_dof[CENTER]) for (i = 0; i < n_neigh; i++) remove_dof_parent_3d(mesh, ref_list+i); /*--------------------------------------------------------------------------*/ /* update the number of edges and faces; depends whether refinement edge */ /* is a boundary edge or not */ /*--------------------------------------------------------------------------*/ if (bound) { mesh->n_edges += n_neigh + 2; mesh->n_faces += 2*n_neigh + 1; } else { mesh->n_edges += n_neigh + 1; mesh->n_faces += 2*n_neigh; } return; } static const EL_INFO *refine_function_3d(const EL_INFO *el_info); /*--------------------------------------------------------------------------*/ /* get_refine_patch: */ /* gets the elements around the refinement edge with vertices node[0] and */ /* node[1] ; refines those elements at this edge are not compatible */ /* devisible; */ /* dir determines the direction of the first neighbour */ /* We write 1 into "boundary_reached" if the domain's boundary was reached */ /* while looping around the refinement edge, otherwise 0. */ /* The return value is an EL_INFO pointer, since traverse_neighbour() could*/ /* change the traverse stack. */ /*--------------------------------------------------------------------------*/ static const EL_INFO *get_refine_patch_3d(const EL_INFO *el_info, DOF *edge[2], int dir, RC_LIST_EL ref_list[], int *n_neigh, int *boundary_reached) { FUNCNAME("get_refine_patch_3d"); #if ALBERTA_DEBUG MESH *mesh = el_info->mesh; #endif const EL_INFO *neigh_info; EL *el, *neigh; int i, j, k, opp_v; int edge_no, neigh_el_type; el = el_info->el; if (el_info->neigh[3-dir] == nil) { *boundary_reached = 1; return(el_info); } opp_v = el_info->opp_vertex[3-dir]; neigh_info = traverse_neighbour(stack_3d, el_info, 3-dir); neigh_el_type = neigh_info->el_type; neigh = neigh_info->el; while (neigh != el) { for (j = 0; j < N_VERTICES_3D; j++) if (neigh->dof[j] == edge[0]) break; for (k = 0; k < N_VERTICES_3D; k++) if (neigh->dof[k] == edge[1]) break; DEBUG_TEST_EXIT(j < N_VERTICES_3D && k < N_VERTICES_3D, "dof %d or dof %d not found on element %d with nodes (%d %d %d %d)\n", edge[0][0], edge[1][0], INDEX(neigh), neigh->dof[0][0], neigh->dof[1][0], neigh->dof[2][0], neigh->dof[3][0]); if ((edge_no = edge_of_dofs_3d[j][k])) { /*--------------------------------------------------------------------------*/ /* neigh has not a compatible refinement edge */ /*--------------------------------------------------------------------------*/ neigh->mark = MAX(neigh->mark, 1); neigh_info = refine_function_3d(neigh_info); /*--------------------------------------------------------------------------*/ /* now, go to a child at the edge and determine the opposite vertex for */ /* this child; continue the looping around the edge with this element */ /*--------------------------------------------------------------------------*/ neigh_info = traverse_next(stack_3d, neigh_info); neigh_el_type = neigh_info->el_type; switch (edge_no) { case 1: opp_v = opp_v == 1 ? 3 : 2; break; case 2: opp_v = opp_v == 2 ? 1 : 3; break; case 3: neigh_info = traverse_next(stack_3d, neigh_info); neigh_el_type = neigh_info->el_type; if (neigh_el_type != 1) opp_v = opp_v == 0 ? 3 : 2; else opp_v = opp_v == 0 ? 3 : 1; break; case 4: neigh_info = traverse_next(stack_3d, neigh_info); neigh_el_type = neigh_info->el_type; if (neigh_el_type != 1) opp_v = opp_v == 0 ? 3 : 1; else opp_v = opp_v == 0 ? 3 : 2; break; case 5: if (neigh_el_type != 1) { neigh_info = traverse_next(stack_3d, neigh_info); neigh_el_type = neigh_info->el_type; } opp_v = 3; break; } neigh = neigh_info->el; } else { /*--------------------------------------------------------------------------*/ /* neigh is compatibly divisible; put neigh to the list of patch elements; */ /* go to next neighbour */ /*--------------------------------------------------------------------------*/ DEBUG_TEST_EXIT(*n_neigh < mesh->max_edge_neigh, "too many neighbours %d in refine patch\n", *n_neigh); ref_list[*n_neigh].el_info = *neigh_info; /*--------------------------------------------------------------------------*/ /* we have to go back to the starting element via opp_v values */ /* correct information is produced by AI_get_neigh_on_patch_3d() */ /*--------------------------------------------------------------------------*/ ref_list[*n_neigh].opp_vertex[0] = opp_v; ++*n_neigh; if (opp_v != 3) i = 3; else i = 2; if (neigh_info->neigh[i]) { opp_v = neigh_info->opp_vertex[i]; neigh_info = traverse_neighbour(stack_3d, neigh_info, i); neigh_el_type = neigh_info->el_type; neigh = neigh_info->el; } else break; } } if (neigh == el) { el_info = neigh_info; *boundary_reached = 0; return(el_info); } /*--------------------------------------------------------------------------*/ /* the domain's boundary is reached; loop back to the starting el */ /*--------------------------------------------------------------------------*/ i = *n_neigh-1; opp_v = ref_list[i].opp_vertex[0]; do { DEBUG_TEST_EXIT(neigh_info->neigh[opp_v] && i > 0, "while looping back domains boundary was reached or i == 0\n"); opp_v = ref_list[i--].opp_vertex[0]; neigh_info = traverse_neighbour(stack_3d, neigh_info, opp_v); } while(neigh_info->el != el); el_info = neigh_info; *boundary_reached = 1; return(el_info); } /*--------------------------------------------------------------------------*/ /* refine_function_3d: gets the refinement patch via get_refine_patch_3d() */ /* and checks whether it compatibly divisible (same refinement edge) or */ /* not; in the first case the patch is refined by refine_patch_3d() in the */ /* second the incompatible neighbour(s) is (are) refined first via a */ /* recursive call of refine_function_3d() in get_refine_patch_3d(). */ /*--------------------------------------------------------------------------*/ static const EL_INFO *refine_function_3d(const EL_INFO *el_info) { MESH *mesh = el_info->mesh; int n_neigh, bound = false, edge_reached; DOF *edge[2]; RC_LIST_EL *ref_list; if (el_info->el->mark <= 0) return(el_info); /* element may not be refined */ /*--------------------------------------------------------------------------*/ /* get memory for a list of all elements at the refinement edge */ /*--------------------------------------------------------------------------*/ ref_list = get_rc_list(mesh); ref_list->el_info = *el_info; n_neigh = 1; /*--------------------------------------------------------------------------*/ /* give the refinement edge the right orientation */ /*--------------------------------------------------------------------------*/ if (el_info->el->dof[0][0] < el_info->el->dof[1][0]) { edge[0] = el_info->el->dof[0]; edge[1] = el_info->el->dof[1]; } else { edge[1] = el_info->el->dof[0]; edge[0] = el_info->el->dof[1]; } /*--------------------------------------------------------------------------*/ /* get the refinement patch */ /*--------------------------------------------------------------------------*/ el_info = get_refine_patch_3d(el_info, edge, 0, ref_list, &n_neigh, &edge_reached); if (edge_reached) { /*--------------------------------------------------------------------------*/ /* domain's boundary was reached while looping around the refinement edge */ /*--------------------------------------------------------------------------*/ el_info = get_refine_patch_3d(el_info, edge, 1, ref_list, &n_neigh, &edge_reached); bound = true; } /*--------------------------------------------------------------------------*/ /* fill neighbour information inside the patch in the refinement list */ /*--------------------------------------------------------------------------*/ AI_get_neigh_on_patch_3d(ref_list, n_neigh, bound); /*--------------------------------------------------------------------------*/ /* and now refine the patch */ /*--------------------------------------------------------------------------*/ bisect_patch_3d(mesh, edge, ref_list, n_neigh, bound); AI_update_elinfo_stack_3d(stack_3d); free_rc_list(mesh, ref_list); return(el_info); } /*--------------------------------------------------------------------------*/ /* post_refine_3d(mesh): Projects all new vertices with user supplied */ /* projection routines. */ /*--------------------------------------------------------------------------*/ static const EL_INFO *new_coords_fct_3d(const EL_INFO *el_info) { EL *el = el_info->el; int j; int i, n_neigh, edge_reached; DOF *edge[2]; static const REAL_B mid_bary = { 0.5, 0.5, 0.0, 0.0}; if (el->child[0] && el_info->active_projection && el_info->active_projection->func && (el->new_coord == nil)) { el->new_coord = get_real_d(el_info->mesh); for (j = 0; j < DIM_OF_WORLD; j++) el->new_coord[j] = 0.5*(el_info->coord[0][j] + el_info->coord[1][j]); el_info->active_projection->func(el->new_coord, el_info, mid_bary); /*--------------------------------------------------------------------------*/ /* now, information should be passed on to patch neighbours... */ /* get the refinement patch */ /*--------------------------------------------------------------------------*/ static_ref_list_3d->el_info = *el_info; n_neigh = 1; for (i = 0; i < 2; i++) edge[i] = el_info->el->dof[i]; el_info = get_refine_patch_3d(el_info, edge, 0, static_ref_list_3d, &n_neigh, &edge_reached); if (edge_reached) { /*--------------------------------------------------------------------------*/ /* domain's boundary was reached while looping around the refinement edge */ /*--------------------------------------------------------------------------*/ el_info = get_refine_patch_3d(el_info, edge, 1, static_ref_list_3d, &n_neigh, &edge_reached); } for (i = 1; i < n_neigh; i++) /* start with 1, as list[0]=el */ { DEBUG_TEST(static_ref_list_3d[i].el_info.el->new_coord == nil, "non-nil new_coord in el %d ref_list[%d] el %d (n_neigh=%d)\n", INDEX(el), i, INDEX(static_ref_list_3d[i].el_info.el), n_neigh); static_ref_list_3d[i].el_info.el->new_coord = el->new_coord; } } return el_info; } static void post_refine_3d(MESH *mesh) { FLAGS fill_flag = CALL_EVERY_EL_PREORDER|FILL_PROJECTION|FILL_COORDS; const EL_INFO *el_info; static_ref_list_3d = get_rc_list(mesh); fill_flag |= FILL_NEIGH; el_info = traverse_first(stack_3d, mesh, -1, fill_flag); while (el_info) { el_info = new_coords_fct_3d(el_info); el_info = traverse_next(stack_3d, el_info); } free_rc_list(mesh, static_ref_list_3d); static_ref_list_3d = nil; return; } static U_CHAR refine_3d(MESH *mesh) { int n_elements = mesh->n_elements; FLAGS fill_flag = CALL_LEAF_EL|FILL_NEIGH|FILL_BOUND|FILL_ORIENTATION; const EL_INFO *el_info; /* Ensure that we have a DOF_ADMIN for vertices. */ get_vertex_admin(mesh); if(mesh->parametric) fill_flag |= FILL_PROJECTION; call_refine_interpol_3d = count_refine_interpol(mesh); stack_3d = get_traverse_stack(); do_more_refine_3d = true; while (do_more_refine_3d) { do_more_refine_3d = false; el_info = traverse_first(stack_3d, mesh, -1, fill_flag); while (el_info) { if (el_info->el->mark > 0) { do_more_refine_3d |= (el_info->el->mark > 1); el_info = refine_function_3d(el_info); } el_info = traverse_next(stack_3d, el_info); } } free_traverse_stack(stack_3d); n_elements = mesh->n_elements - n_elements; return(n_elements ? MESH_REFINED : 0); } alberta-2.0.1/alberta/src/3d/submesh_3d.c0000644000042300001440000007323510676724252014771 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: submesh_3d.c */ /* */ /* */ /* description: Support for master/slave meshes for master->dim == 3 */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2005) */ /*--------------------------------------------------------------------------*/ /****************************************************************************/ /* n_child_face_3d[el_type][face][i_child] */ /* gives face index on child "i_child" corresponding to "face" on the */ /* parent element of type "el_type". */ /****************************************************************************/ static const int n_child_face_3d[3][4][2] = {/* type 0: */ { /* face 0: */ {-1, 3}, /* face 1: */ { 3,-1}, /* face 2: */ { 1, 2}, /* face 3: */ { 2, 1}}, /* type 1: */ { /* face 0: */ {-1, 3}, /* face 1: */ { 3,-1}, /* face 2: */ { 1, 1}, /* face 3: */ { 2, 2}}, /* type 2: */ { /* face 0: */ {-1, 3}, /* face 1: */ { 3,-1}, /* face 2: */ { 1, 1}, /* face 3: */ { 2, 2}}}; static void get_slave_elements_rec_3d(MESH *master, MESH *slave, int neigh, EL *m_el, EL *s_el, S_CHAR orientation, U_CHAR el_type) { /* FUNCNAME("get_slave_elements_rec_3d"); */ int child_face[2]; S_CHAR child_1_orient; EL *s_child[2]; if(m_el->child[0]) { child_face[0] = n_child_face_3d[el_type][neigh][0]; child_face[1] = n_child_face_3d[el_type][neigh][1]; if(el_type == 0) child_1_orient = orientation; else child_1_orient = -orientation; if(neigh == 0) { get_slave_elements_rec_3d(master, slave, 3, m_el->child[1], s_el, child_1_orient, (el_type + 1)%3); } else if (neigh == 1) { get_slave_elements_rec_3d(master, slave, 3, m_el->child[0], s_el, orientation, (el_type + 1)%3); } else if(neigh == 2) { AI_bisect_element_2d(slave, s_el, nil); if(orientation > 0) { s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; } else { s_child[1] = s_el->child[0]; s_child[0] = s_el->child[1]; } get_slave_elements_rec_3d(master, slave, child_face[0], m_el->child[0], s_child[0], orientation, (el_type + 1)%3); get_slave_elements_rec_3d(master, slave, child_face[1], m_el->child[1], s_child[1], child_1_orient, (el_type + 1)%3); } else if (neigh == 3) { AI_bisect_element_2d(slave, s_el, nil); if(orientation > 0) { s_child[1] = s_el->child[0]; s_child[0] = s_el->child[1]; } else { s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; } get_slave_elements_rec_3d(master, slave, child_face[0], m_el->child[0], s_child[0], orientation, (el_type + 1)%3); get_slave_elements_rec_3d(master, slave, child_face[1], m_el->child[1], s_child[1], child_1_orient, (el_type + 1)%3); } } return; } static void get_slave_elements_3d(MESH *master, MESH *slave, int (*binding_method) (MESH *master, MACRO_EL *el, int face, void *data), void *data) { FUNCNAME("get_slave_elements_3d"); MACRO_EL *m_mel, *s_mel; int n, i; s_mel = slave->macro_els; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_NEIGH_3D; i++) if(binding_method(master, m_mel, i, data)) { DEBUG_TEST_EXIT(s_mel, "Ran out of slave macro elements... Wrong meshes?\n"); get_slave_elements_rec_3d(master, slave, i, m_mel->el, s_mel->el, m_mel->orientation, m_mel->el_type); s_mel++; } } return; } /****************************************************************************/ /* master interpolation/restriction routines. */ /* These call the corresponding refinement/coarsening routines for the slave*/ /* mesh patchwise. */ /****************************************************************************/ static void master_interpol_3d(DOF_PTR_VEC *m_dpv, RC_LIST_EL *m_rclist, int mn) { FUNCNAME("master_interpol_3d"); MESH_MEM_INFO *m_mem_info = (MESH_MEM_INFO *) m_dpv->fe_space->admin->mesh->mem_info; int m_n0 = m_dpv->fe_space->admin->n0_dof[FACE]; int m_n = m_dpv->fe_space->admin->mesh->node[FACE]; EL *m_el, *s_el; EL *s_child[2], *m_child[2]; int n_slaves = m_mem_info->n_slaves; int s_n0, s_n, i, j, sn = 0; MESH *slave = nil; DOF_PTR_VEC *s_dpv; RC_LIST_EL s_rclist[2] = {{{0}}}; S_CHAR m_orientation; U_CHAR m_type; NODE_PROJECTION *s_proj; /****************************************************************************/ /* Retrieve the slave mesh. Rather unelegant, sorry... */ /****************************************************************************/ for (j = 0; j < n_slaves; j++) { slave = m_mem_info->slaves[j]; if(((MESH_MEM_INFO *)slave->mem_info)->slave_binding == m_dpv) break; } DEBUG_TEST_EXIT(j < n_slaves, "Slave mesh not found!\n"); s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; /****************************************************************************/ /* Run over all patch elements. Check if any faces belong to slave elements.*/ /* Build a 2D refinement patch (RC_LIST_EL list). */ /****************************************************************************/ for(i = 0; i < mn; i++) { m_el = m_rclist[i].el_info.el; m_type = m_rclist[i].el_info.el_type; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; /****************************************************************************/ /* Set the master child DOFs to nil on the new faces. */ /****************************************************************************/ m_dpv->vec[m_child[0]->dof[m_n+0][m_n0]] = nil; m_dpv->vec[m_child[1]->dof[m_n+0][m_n0]] = nil; /* These are the faces along the ref. edge. */ for(j = 2; j < N_FACES_3D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { DEBUG_TEST_EXIT(sn < 2, "Too many slave elements along refinement edge!\n"); s_el->mark = MAX(s_el->mark, 1); s_rclist[sn].el_info.el = s_el; s_rclist[sn].el_info.mesh = slave; s_rclist[sn].no = sn; /* Fill active projection on slave rclist for parametric meshes. */ s_proj = m_rclist[i].el_info.projections[1+j]; if(!s_proj) s_proj = m_rclist[i].el_info.projections[0]; s_rclist[sn].el_info.active_projection = s_rclist[sn].el_info.projections[0] = s_proj; sn++; } else { /****************************************************************************/ /* Set more master child DOFs to nil. */ /****************************************************************************/ if(m_type == 0) { m_dpv->vec[m_child[0]->dof[m_n + j - 1][m_n0]] = nil; m_dpv->vec[m_child[1]->dof[m_n + 4 - j][m_n0]] = nil; } else { m_dpv->vec[m_child[0]->dof[m_n + j - 1][m_n0]] = nil; m_dpv->vec[m_child[1]->dof[m_n + j - 1][m_n0]] = nil; } } } } /****************************************************************************/ /* Send the slave refinement list to AI_bisect_patch_2d() for bisection. */ /* This routine can call refine_fct_1d() in turn if necessary, if the */ /* current slave has 1D slaves itself. Take care of coarse DOFs as above. */ /****************************************************************************/ if(sn) AI_bisect_patch_2d(slave, s_rclist, sn); /****************************************************************************/ /* Run over all master patch elements again. Set all necessary DOFs. */ /****************************************************************************/ for(i = 0; i < mn; i++) { m_el = m_rclist[i].el_info.el; m_orientation = m_rclist[i].el_info.orientation; m_type = m_rclist[i].el_info.el_type; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; for(j = 0; j < N_FACES_3D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { if(j == 2) { /****************************************************************************/ /* We are on a face along the refinement edge. Retrieve new slave children */ /* and set DOF pointers. There are two cases concerning whether slave child */ /* 0 belongs to master child 0 or master child 1. */ /****************************************************************************/ if(m_orientation > 0) { s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; } else { s_child[1] = s_el->child[0]; s_child[0] = s_el->child[1]; } m_dpv->vec[m_child[0]->dof[m_n+n_child_face_3d[m_type][2][0]][m_n0]] = s_child[0]; m_dpv->vec[m_child[1]->dof[m_n+n_child_face_3d[m_type][2][1]][m_n0]] = s_child[1]; s_dpv->vec[s_child[0]->dof[s_n][s_n0]] = m_child[0]; s_dpv->vec[s_child[1]->dof[s_n][s_n0]] = m_child[1]; } else if (j == 3) { if(m_orientation > 0) { s_child[1] = s_el->child[0]; s_child[0] = s_el->child[1]; } else { s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; } m_dpv->vec[m_child[0]->dof[m_n+n_child_face_3d[m_type][3][0]][m_n0]] = s_child[0]; m_dpv->vec[m_child[1]->dof[m_n+n_child_face_3d[m_type][3][1]][m_n0]] = s_child[1]; s_dpv->vec[s_child[0]->dof[s_n][s_n0]] = m_child[0]; s_dpv->vec[s_child[1]->dof[s_n][s_n0]] = m_child[1]; } else { /****************************************************************************/ /* If we are not on a refinement edge, set the correct master child */ /* pointer to point to the slave element. */ /****************************************************************************/ m_dpv->vec[m_child[1-j]->dof[m_n+3][m_n0]] = s_el; s_dpv->vec[s_el->dof[s_n][s_n0]] = m_child[1-j]; } } } } return; } static void master_restrict_3d(DOF_PTR_VEC *m_dpv, RC_LIST_EL *m_rclist,int mn) { FUNCNAME("master_restrict_3d"); MESH_MEM_INFO *m_mem_info = (MESH_MEM_INFO *) m_dpv->fe_space->admin->mesh->mem_info; int m_n0 = m_dpv->fe_space->admin->n0_dof[FACE]; int m_n = m_dpv->fe_space->admin->mesh->node[FACE]; EL *m_el, *s_el, *cm_el; EL *m_child[2]; int n_slaves = m_mem_info->n_slaves; int s_n0, s_n, i, j, sn = 0; MESH *slave = nil; DOF_PTR_VEC *s_dpv; RC_LIST_EL s_rclist[2] = {{{0}}}; /****************************************************************************/ /* Retrieve the slave mesh. Rather unelegant, sorry... */ /****************************************************************************/ for (j = 0; j < n_slaves; j++) { slave = m_mem_info->slaves[j]; if(((MESH_MEM_INFO *)slave->mem_info)->slave_binding == m_dpv) break; } DEBUG_TEST_EXIT(j < n_slaves, "Slave mesh not found!\n"); s_dpv = ((MESH_MEM_INFO *)slave->mem_info)->master_binding; s_n0 = s_dpv->fe_space->admin->n0_dof[CENTER]; s_n = slave->node[CENTER]; /****************************************************************************/ /* Run over all patch elements. Check if any faces belong to slave elements.*/ /* Build a 2D coarsening patch (RC_LIST_EL list). */ /****************************************************************************/ for(i = 0; i < mn; i++) { m_el = m_rclist[i].el_info.el; for(j = 0; j < N_FACES_3D; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el && m_el==(EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]) { if(j == 2 || j == 3) { /* These are the faces along the coa. edge. */ DEBUG_TEST_EXIT(sn < 2, "Too many slave elements along coarsening edge!\n"); s_el->child[0]->mark = -1; s_el->child[1]->mark = -1; s_rclist[sn].el_info.el = s_el; s_rclist[sn].no = sn; sn++; } } } } /****************************************************************************/ /* Run over all master patch elements again. Set all necessary DOFs. */ /****************************************************************************/ for(i = 0; i < mn; i++) { m_el = m_rclist[i].el_info.el; m_child[0] = m_el->child[0]; m_child[1] = m_el->child[1]; for(j = 0; j < 2; j++) { s_el = (EL *)m_dpv->vec[m_el->dof[m_n+j][m_n0]]; if(s_el) { cm_el = (EL *)s_dpv->vec[s_el->dof[s_n][s_n0]]; if ((cm_el==m_child[0] || cm_el==m_child[1])) /****************************************************************************/ /* If we are not on a refinement edge, set the correct slave pointer to */ /* point to the master parent element. */ /****************************************************************************/ s_dpv->vec[s_el->dof[s_n][s_n0]] = m_el; } } } /****************************************************************************/ /* Send the slave coarsening list to AI_coarse_patch_2d() for coarsening. */ /* This routine can call coarse_recursive_1d() in turn if necessary, when */ /*the slave has 1D slaves itself. */ /****************************************************************************/ if(sn) AI_coarse_patch_2d(slave, s_rclist, sn); return; } static void join_elements_recursive_3d(const MESH *master, const MESH *slave, const DOF_ADMIN *m_admin, const DOF_ADMIN *s_admin, const DOF_PTR_VEC *m_dpv, const DOF_PTR_VEC *s_dpv, const int subsimplex, const EL *m_el, const EL *s_el, const S_CHAR m_orientation, const U_CHAR m_type) { FUNCNAME("join_elements_recursive_3d"); s_dpv->vec[s_el->dof[slave->node[CENTER]] [s_admin->n0_dof[CENTER]]] = (void *)m_el; m_dpv->vec[m_el->dof[master->node[FACE] + subsimplex] [m_admin->n0_dof[FACE]]] = (void*)s_el; if(m_el->child[0]) { EL *s_child[2]; extern S_CHAR child_orientation_3d[3][2]; /* defined in traverse_r.c */ if (subsimplex == 2) { /* first face along ref. edge */ /* Determine which slave child belongs to which master child. */ DEBUG_TEST_EXIT(s_el->child[0], "Could not find slave children!\n"); if(m_orientation > 0) { s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; } else { s_child[1] = s_el->child[0]; s_child[0] = s_el->child[1]; } join_elements_recursive_3d(master, slave, m_admin, s_admin, m_dpv, s_dpv, n_child_face_3d[m_type][2][0], m_el->child[0], s_child[0], m_orientation*child_orientation_3d[m_type][0], (m_type + 1) % 3); join_elements_recursive_3d(master, slave, m_admin, s_admin, m_dpv, s_dpv, n_child_face_3d[m_type][2][1], m_el->child[1], s_child[1], m_orientation*child_orientation_3d[m_type][1], (m_type + 1) % 3); } else if (subsimplex == 3) { /* second face along ref. edge */ /* Determine which slave child belongs to which master child. */ DEBUG_TEST_EXIT(s_el->child[0], "Could not find slave children!\n"); if(m_orientation > 0) { s_child[1] = s_el->child[0]; s_child[0] = s_el->child[1]; } else { s_child[0] = s_el->child[0]; s_child[1] = s_el->child[1]; } join_elements_recursive_3d(master, slave, m_admin, s_admin, m_dpv, s_dpv, n_child_face_3d[m_type][3][0], m_el->child[0], s_child[0], m_orientation*child_orientation_3d[m_type][0], (m_type + 1) % 3); join_elements_recursive_3d(master, slave, m_admin, s_admin, m_dpv, s_dpv, n_child_face_3d[m_type][3][1], m_el->child[1], s_child[1], m_orientation*child_orientation_3d[m_type][1], (m_type + 1) % 3); } else join_elements_recursive_3d(master, slave, m_admin, s_admin, m_dpv, s_dpv, 3, m_el->child[1 - subsimplex], s_el, m_orientation*child_orientation_3d[m_type][0], (m_type + 1) % 3); } return; } /****************************************************************************/ /* slave_numbering_3d[type=0,1][orientation][face][vertex]: Define the local*/ /* slave vertex index given in all cases for master orientation and face. */ /* The rules are: slave numbering is counterclockwise when looking */ /* at the slave triangle from outside the master tetrahedron. The numbering */ /* is defined so that a master refinement edge always corresponds to a slave*/ /* refinement edge. Unfortunately, the numbering must depend on the parent */ /* orientation to remain consistent. */ /* */ /* master_edge_3d[orientation][master face][slave edge]: Gives the master */ /* edge corresponding to the slave edge. */ /****************************************************************************/ static const int slave_numbering_3d[2][2][N_FACES_3D][N_VERTICES_3D] = {/* type 0 */ {/* orientation + */ {/* face 0 */ {-1, 1, 2, 0}, /* face 1 */ { 1,-1, 0, 2}, /* face 2 */ { 0, 1,-1, 2}, /* face 3 */ { 1, 0, 2,-1}}, /* orientation - */ {/* face 0 */ {-1, 0, 2, 1}, /* face 1 */ { 0,-1, 1, 2}, /* face 2 */ { 1, 0,-1, 2}, /* face 3 */ { 0, 1, 2,-1}}}, /* type 1 */ {/* orientation + */ {/* face 0 */ {-1, 0, 1, 2}, /* face 1 */ { 1,-1, 0, 2}, /* face 2 */ { 0, 1,-1, 2}, /* face 3 */ { 1, 0, 2,-1}}, /* orientation - */ {/* face 0 */ {-1, 1, 0, 2}, /* face 1 */ { 0,-1, 1, 2}, /* face 2 */ { 1, 0,-1, 2}, /* face 3 */ { 0, 1, 2,-1}}}}; static const int master_edge_3d[2][2][N_FACES_3D][N_EDGES_2D] = {/* type 0 */ {/* orientation + */ {/* face 0 */ { 3, 5, 4}, /* face 1 */ { 2, 5, 1}, /* face 2 */ { 4, 2, 0}, /* face 3 */ { 1, 3, 0}}, /* orientation - */ {/* face 0 */ { 5, 3, 4}, /* face 1 */ { 5, 2, 1}, /* face 2 */ { 2, 4, 0}, /* face 3 */ { 3, 1, 0}}}, /* type 1 */ {/* orientation + */ {/* face 0 */ { 4, 3, 5}, /* face 1 */ { 2, 5, 1}, /* face 2 */ { 4, 2, 0}, /* face 3 */ { 1, 3, 0}}, /* orientation - */ {/* face 0 */ { 4, 5, 3}, /* face 1 */ { 5, 2, 1}, /* face 2 */ { 2, 4, 0}, /* face 3 */ { 3, 1, 0}}}}; /****************************************************************************/ /* get_submesh_3d(master, name, binding_method, data): returns a 2D submesh */ /* of master based on the information given by the user routine */ /* binding_method(). */ /****************************************************************************/ static MESH *get_submesh_3d(MESH *master, const char *name, int (*binding_method) (MESH *master, MACRO_EL *el, int face, void *data), void *data) { FUNCNAME("get_submesh_3d"); MACRO_DATA s_data = {}; MESH_MEM_INFO *m_info, *s_info; MESH *slave = nil; const FE_SPACE *slave_space, *master_space; DOF_PTR_VEC *slave_to_master_binding; DOF_PTR_VEC *master_to_slave_binding; int s_n_dof[N_NODE_TYPES] = {}, m_n_dof[N_NODE_TYPES] = {}; MACRO_EL *m_mel, *s_mel; const DOF_ADMIN *m_admin, *s_admin; int i, j, k, n, ne = 0, nv = 0, *vert_ind = nil, index; S_CHAR bound; char new_name[1024]; m_info = ((MESH_MEM_INFO *)master->mem_info); /****************************************************************************/ /* Count all needed vertices and elements. */ /****************************************************************************/ s_data.dim = 2; s_data.coords = MEM_ALLOC(master->n_vertices, REAL_D); /* resized later! */ vert_ind = MEM_ALLOC(master->n_vertices, int); for(i = 0; i < master->n_vertices; i++) vert_ind[i] = -1; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_FACES_3D; i++) if(binding_method(master, m_mel, i, data)) { ne++; for(j = 0; j < N_VERTICES_3D; j++) if(j != i) { /* Make use of the slave->mem_info->coords vector to get vertex indices. */ index = (m_mel->coord[j] - m_info->coords[0]) / DIM_OF_WORLD; if (vert_ind[index] < 0) { vert_ind[index] = nv; for(k = 0; k < DIM_OF_WORLD; k++) s_data.coords[nv][k] = m_info->coords[index][k]; nv++; } } } } /****************************************************************************/ /* Allocate the needed amount of macro elements and coordinates. */ /* Fill element and coordinate information. */ /****************************************************************************/ TEST_EXIT(nv, "Bad mesh: no vertices counted!\n"); TEST_EXIT(ne, "Bad mesh: no elements counted!\n"); s_data.n_total_vertices = nv; s_data.n_macro_elements = ne; s_data.coords = MEM_REALLOC(s_data.coords, master->n_vertices, nv, REAL_D); s_data.mel_vertices = MEM_ALLOC(ne * N_NEIGH_2D, int); ne = 0; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_FACES_3D; i++) if(binding_method(master, m_mel, i, data)) { for(j = 0; j < N_VERTICES_3D; j++) if(j != i) { index = (m_mel->coord[j] - m_info->coords[0]) / DIM_OF_WORLD; nv = vert_ind[index]; s_data.mel_vertices[N_VERTICES_2D * ne + slave_numbering_3d[(m_mel->el_type > 0)? 1 : 0] [(m_mel->orientation > 0)? 0:1][i][j]] = nv; } ne++; } } compute_neigh_fast(&s_data); /* First assign a standard Dirichlet boundary. Correct later. */ dirichlet_boundary(&s_data); /* Now correct the boundary values if the master edge has nonzero type. */ ne = 0; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_FACES_3D; i++) if(binding_method(master, m_mel, i, data)) { for(j = 0; j < N_EDGES_2D; j++) if((s_data.boundary[N_NEIGH_2D * ne + j] == DIRICHLET) && (bound = m_mel->edge_bound [master_edge_3d[(m_mel->el_type > 0)? 1 : 0] [(m_mel->orientation > 0)?0:1][i][j]])) s_data.boundary[N_NEIGH_2D * ne + j] = bound; ne++; } } /****************************************************************************/ /* Allocate a submesh. */ /****************************************************************************/ if(!name) { static int count_3d = 1; sprintf(new_name, "Submesh %d of %s", count_3d, master->name); name = new_name; count_3d++; } slave = GET_MESH(2, name, &s_data, nil); /****************************************************************************/ /* Clean up. */ /****************************************************************************/ nv = s_data.n_total_vertices; ne = s_data.n_macro_elements; MEM_FREE(s_data.coords, nv, REAL_D); MEM_FREE(s_data.mel_vertices, ne*N_VERTICES_2D, int); MEM_FREE(s_data.neigh, ne*N_NEIGH_2D, int); MEM_FREE(s_data.boundary, ne*N_NEIGH_2D, S_CHAR); MEM_FREE(vert_ind, master->n_vertices, int); /****************************************************************************/ /* Fill more slave elements, if the master mesh was already refined. */ /****************************************************************************/ get_slave_elements_3d(master, slave, binding_method, data); /****************************************************************************/ /* We set slave->n_vertices/n_edges to an invalid value since this */ /* information is not accessible using get_slave_elements_3d(). */ /****************************************************************************/ if(slave->n_elements < slave->n_hier_elements) { slave->n_vertices = -1; slave->n_edges = -1; } /****************************************************************************/ /* Allocate special FE spaces for the slave. */ /****************************************************************************/ s_n_dof[CENTER] = 1; slave_space = get_fe_space(slave, "Center dof fe_space", s_n_dof, nil, 1); slave_to_master_binding = get_dof_ptr_vec("Slave - master pointers", slave_space); /****************************************************************************/ /* Allocate special FE spaces for master. */ /****************************************************************************/ m_n_dof[FACE] = 1; master_space = get_fe_space(master, "Face dof fe_space", m_n_dof, nil, 1); #if ALBERTA_DEBUG == 1 check_mesh(slave); #endif /****************************************************************************/ /* Allocate special DOF_PTR_VECs for both master and slave. These serve to */ /* help find the corresponding subsimplex to each boundary master simplex */ /* during refinement and vice versa. */ /****************************************************************************/ master_to_slave_binding = get_dof_ptr_vec("Master - slave pointers", master_space); master_to_slave_binding->refine_interpol = master_interpol_3d; master_to_slave_binding->coarse_restrict = master_restrict_3d; /****************************************************************************/ /* Set the special pointers in the MESH_MEM_INFO components of both master */ /* and slave grids. */ /****************************************************************************/ s_info = (MESH_MEM_INFO *)slave->mem_info; s_info->master = master; s_info->binding_method = binding_method; s_info->slave_binding = master_to_slave_binding; s_info->master_binding = slave_to_master_binding; m_info->slaves = MEM_REALLOC(m_info->slaves, m_info->n_slaves, m_info->n_slaves + 1, MESH *); m_info->slaves[m_info->n_slaves] = slave; m_info->n_slaves++; /****************************************************************************/ /* Set the element pointer vec entries to the correct values. */ /* This assumes that slave macro elements were allocated in the order given */ /* by the loop below. */ /****************************************************************************/ m_admin = master_to_slave_binding->fe_space->admin; s_admin = slave_to_master_binding->fe_space->admin; FOR_ALL_DOFS(s_admin, slave_to_master_binding->vec[dof] = nil); FOR_ALL_DOFS(m_admin, master_to_slave_binding->vec[dof] = nil); s_mel = slave->macro_els; for(n = 0; n < master->n_macro_el; n++) { m_mel = master->macro_els + n; for(i = 0; i < N_NEIGH_3D; i++) if(binding_method(master, m_mel, i, data)) { DEBUG_TEST_EXIT(s_mel, "Ran out of slave macro elements... Wrong meshes?\n"); /* Here we take care of node projection function transfer. */ if(m_mel->projection[i+1]) s_mel->projection[0] = m_mel->projection[i+1]; else s_mel->projection[0] = m_mel->projection[0]; join_elements_recursive_3d(master, slave, m_admin, s_admin, master_to_slave_binding, slave_to_master_binding, i, m_mel->el, s_mel->el, m_mel->orientation, m_mel->el_type); s_mel++; } } /****************************************************************************/ /* Now project all new vertices if the mesh was already refined. */ /****************************************************************************/ if(slave->n_elements < slave->n_hier_elements) AI_post_refine_2d(slave); return slave; } alberta-2.0.1/alberta/src/3d/traverse_nr_3d.c0000644000042300001440000002517410676724252015654 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_nr_3d.c */ /* */ /* description: */ /* nonrecursive mesh traversal, 3d routines */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* to_do: */ /* use memcopy() for stack copy in traverse_neighbour() */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Refinement/Coarsening vertex numbering */ /* like Baensch / Kossaczky */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* vertex_of_edge[edge][i], i = 1,2 are the two vertices of edge */ /*--------------------------------------------------------------------------*/ /* int vertex_of_edge[6][2]={{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}; */ /* father.neigh[coarse_nb[father.typ][i][j]] == child[i-1].neigh[j] */ static int coarse_nb_3d[3][3][4] = {{{-2,-2,-2,-2}, {-1,2,3,1}, {-1,3,2,0}}, {{-2,-2,-2,-2}, {-1,2,3,1}, {-1,2,3,0}}, {{-2,-2,-2,-2}, {-1,2,3,1}, {-1,2,3,0}}}; /*--------------------------------------------------------------------------*/ /* traverse_neighbour_3d: */ /* ------------------- */ /* walk through hierarchy tree and look for a neighbour */ /*--------------------------------------------------------------------------*/ static const EL_INFO *traverse_neighbour_3d(TRAVERSE_STACK *stack, const EL_INFO *elinfo_old, int neighbour) { FUNCNAME("traverse_neighbour_3d"); EL *el, *el2; EL_INFO *old_elinfo, *elinfo, *elinfo2; DOF *dof; int i, nb, opp_vertex, stack2_used, typ; int sav_index, sav_neighbour = neighbour; DEBUG_TEST_EXIT(stack->stack_used > 0, "no current element\n"); /* TEST_EXIT(traverse_fill_flag & CALL_LEAF_EL, "invalid traverse_fill_flag=%d\n", traverse_fill_flag); */ DEBUG_TEST_EXIT(elinfo_old == stack->elinfo_stack+stack->stack_used, "invalid old elinfo\n"); DEBUG_TEST_FLAG(FILL_NEIGH, (stack->elinfo_stack+stack->stack_used)); el = stack->elinfo_stack[stack->stack_used].el; sav_index = INDEX(el); /* first, goto to leaf level, if necessary... */ if (stack->traverse_fill_flag & CALL_LEAF_EL) { if ((el->child[0]) && (neighbour < 2)) { if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = 1 - neighbour; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->info_stack[stack->stack_used] = i+1; stack->stack_used++; stack->info_stack[stack->stack_used] = 0; neighbour = 3; } } /* save information about current element and its position in the tree */ stack->save_traverse_mel = stack->traverse_mel; stack->save_stack_used = stack->stack_used; nb = neighbour; while (stack->stack_used > 1) /* go up in tree until we can go down again */ { stack->stack_used--; typ = (stack->elinfo_stack+stack->stack_used)->el_type; nb = coarse_nb_3d[typ][stack->info_stack[stack->stack_used]][nb]; if (nb == -1) break; DEBUG_TEST_EXIT(nb >= 0, "invalid coarse_nb_3d %d\n",nb); } /* save hierarchy information about current element */ for (i=stack->stack_used; i<=stack->save_stack_used; i++) { stack->save_info_stack[i] = stack->info_stack[i]; stack->save_elinfo_stack[i] = stack->elinfo_stack[i]; } old_elinfo = stack->save_elinfo_stack+stack->save_stack_used; opp_vertex = old_elinfo->opp_vertex[neighbour]; if (nb >= 0) { /* go to macro element neighbour */ i = stack->traverse_mel->opp_vertex[nb]; stack->traverse_mel = stack->traverse_mel->neigh[nb]; if (stack->traverse_mel == nil) return(nil); if ((nb < 2) && (stack->save_stack_used > 1)) { stack2_used = 2; /* go down one level in OLD hierarchy */ } else { stack2_used = 1; } elinfo2 = stack->save_elinfo_stack+stack2_used; el2 = elinfo2->el; stack->stack_used = 1; fill_macro_info(stack->traverse_mesh, stack->traverse_mel, stack->elinfo_stack+stack->stack_used); stack->info_stack[stack->stack_used] = 0; nb = i; } else { /* goto other child */ stack2_used = stack->stack_used + 1; if (stack->save_stack_used > stack2_used) { stack2_used++; /* go down one level in OLD hierarchy */ } elinfo2 = stack->save_elinfo_stack+stack2_used; el2 = elinfo2->el; if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); i = 2 - stack->info_stack[stack->stack_used]; stack->info_stack[stack->stack_used] = i+1; fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; stack->info_stack[stack->stack_used] = 0; nb = 0; } elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; while(el->child[0]) { if (nb < 2) { /* go down one level in hierarchy */ if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); stack->info_stack[stack->stack_used] = 2-nb; fill_elinfo(1-nb, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; stack->info_stack[stack->stack_used] = 0; elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; nb = 3; } if (stack->save_stack_used > stack2_used) { /* `refine' both el and el2 */ DEBUG_TEST_EXIT(el->child[0], "invalid NEW refinement?\n"); if (el->dof[0] == el2->dof[0]) i = stack->save_info_stack[stack2_used] - 1; else if (el->dof[1] == el2->dof[0]) i = 2 - stack->save_info_stack[stack2_used]; else ERROR_EXIT("no common refinement edge"); if (el->child[0] && el->child[i]->dof[1] == el->dof[nb]) { /* el->child[0] Kuni 22.08.96 */ nb = 1; } else { nb = 2; } stack->info_stack[stack->stack_used] = i+1; if (stack->stack_used >= stack->stack_size-1) enlarge_traverse_stack(stack); fill_elinfo(i, stack->elinfo_stack+stack->stack_used, stack->elinfo_stack+stack->stack_used+1); stack->stack_used++; stack->info_stack[stack->stack_used] = 0; elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; stack2_used++; elinfo2 = stack->save_elinfo_stack+stack2_used; el2 = elinfo2->el; if (stack->save_stack_used > stack2_used) { dof = el2->dof[1]; if (dof != el->dof[1] && dof != el->dof[2]) { stack2_used++; /* go down one level in OLD hierarchy */ elinfo2 = stack->save_elinfo_stack+stack2_used; el2 = elinfo2->el; } } } else { /* now we're done... */ elinfo = stack->elinfo_stack+stack->stack_used; el = elinfo->el; break; } } if (elinfo->neigh[opp_vertex] != old_elinfo->el) { MSG(" looking for neighbour %d of element %d at %p\n", neighbour, INDEX(old_elinfo->el), old_elinfo->el); MSG(" originally: neighbour %d of element %d at %p\n", sav_neighbour, sav_index, old_elinfo->el); MSG(" got element %d at %p with opp_vertex %d neigh %d\n", INDEX(elinfo->el), elinfo->el, opp_vertex, INDEX(elinfo->neigh[opp_vertex])); DEBUG_TEST_EXIT(elinfo->neigh[opp_vertex] == old_elinfo->el, "didn't succeed !?!?!?\n"); } if (stack->traverse_fill_flag & CALL_EVERY_EL_POSTORDER) stack->info_stack[stack->stack_used] = 3; else if (stack->traverse_fill_flag & CALL_EVERY_EL_INORDER) stack->info_stack[stack->stack_used] = 1; /* ??? */ return(elinfo); } /*--------------------------------------------------------------------------*/ /* AI_update_elinfo_stack_3d: */ /* -------------------- */ /* update EL_INFO structures after refinement */ /*--------------------------------------------------------------------------*/ void AI_update_elinfo_stack_3d(TRAVERSE_STACK *stack) { int i; for (i = stack->stack_used; i > 0; i--) { AI_update_elinfo_3d(stack->elinfo_stack+i); } return; } alberta-2.0.1/alberta/src/3d/traverse_r_3d.c0000644000042300001440000003243210676724252015471 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: traverse_r_3d.c */ /* */ /* description: */ /* recursive mesh traversal - 3d routines: */ /* fill_macro_info_3d(), fill_elinfo_3d() */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Alfred Schmidt */ /* Zentrum fuer Technomathematik */ /* Fachbereich 3 Mathematik/Informatik */ /* Universitaet Bremen */ /* Bibliothekstr. 2 */ /* D-28359 Bremen, Germany */ /* */ /* Kunibert G. Siebert */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.mathematik.uni-freiburg.de/IAM/ALBERTA */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996-2003) */ /* */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* Refinement/Coarsening vertex numbering */ /* like Baensch / Kossaczky */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* fill_macro_info_3d: */ /* ---------------- */ /* fill EL_INFO structure for a macro element */ /*--------------------------------------------------------------------------*/ static void fill_macro_info_3d(MESH *mesh, const MACRO_EL *mel, EL_INFO *elinfo) { FUNCNAME("fill_macro_info_3d"); EL *nb; MACRO_EL *mnb; int i, j, k; FLAGS fill_opp_coords; elinfo->mesh = mesh; elinfo->macro_el = mel; elinfo->el = mel->el; elinfo->parent = nil; elinfo->level = 0; elinfo->el_type = mel->el_type; if (elinfo->fill_flag & FILL_COORDS) { for (i=0; icoord[i], "no mel->coord[%d]\n",i); for (j=0;jcoord[i][j] = mel->coord[i][j]; } } if (elinfo->fill_flag & (FILL_OPP_COORDS | FILL_NEIGH)) { fill_opp_coords = (elinfo->fill_flag & FILL_OPP_COORDS); for (i=0; i < N_NEIGH_3D; i++) { if ((mnb = mel->neigh[i])) { nb = elinfo->neigh[i] = mel->neigh[i]->el; k = elinfo->opp_vertex[i] = mel->opp_vertex[i]; if (nb->child[0] && (k < 2)) { /*make nb nearest el.*/ if (k==1) { nb = elinfo->neigh[i] = nb->child[0]; } else { nb = elinfo->neigh[i] = nb->child[1]; } k = elinfo->opp_vertex[i] = 3; if (fill_opp_coords) { /* always edge between vertices 0 and 1 is bisected! */ if (mnb->el->new_coord) for (j=0;jopp_coord[i][j] = mnb->el->new_coord[j]; else for (j=0;jopp_coord[i][j] = (mnb->coord[0][j] + mnb->coord[1][j]) / 2; } } else { if (fill_opp_coords) { for (j=0;jopp_coord[i][j] = mnb->coord[k][j]; } } } else { elinfo->neigh[i] = nil; } } } if (elinfo->fill_flag & FILL_BOUND) { for (i = 0; i < N_VERTICES_3D; i++) elinfo->vertex_bound[i] = mel->vertex_bound[i]; for (i = 0; i < N_EDGES_3D; i++) elinfo->edge_bound[i] = mel->edge_bound[i]; for (i = 0; i < N_FACES_3D; i++) elinfo->face_bound[i] = mel->face_bound[i]; } if(elinfo->fill_flag & FILL_PROJECTION) { for(i = 0; i < N_FACES_3D + 1; i++) elinfo->projections[i] = mel->projection[i]; elinfo->active_projection = mel->projection[0]; /* If we have projection functions for faces, these take precedence! */ if(mel->projection[3]) elinfo->active_projection = mel->projection[3]; else if(mel->projection[4]) elinfo->active_projection = mel->projection[4]; } if (elinfo->fill_flag & FILL_ORIENTATION) elinfo->orientation = mel->orientation; return; } /*--------------------------------------------------------------------------*/ /* fill_elinfo_3d: */ /* ------------ */ /* fill EL_INFO structure for one child of an element */ /*--------------------------------------------------------------------------*/ static void fill_elinfo_3d(int ichild, const EL_INFO *elinfo_old, EL_INFO *elinfo) { FUNCNAME("fill_elinfo_3d"); int i,j,k; int el_type = 0; /* el_type in {0,1,2} */ int ochild = 0; /* index of other child = 1-ichild */ int *cv = NULL; /* cv = child_vertex_3d[el_type][ichild] */ int (*cvg)[4] = {NULL}; /* cvg = child_vertex_3d[el_type] */ int *ce; /* ce = child_edge_3d[el_type][ichild] */ int iedge; EL *nb, *nbk, **neigh_old; EL *el_old = elinfo_old->el; FLAGS fill_flag = elinfo_old->fill_flag; DOF *dof; int ov; EL **neigh; FLAGS fill_opp_coords; U_CHAR *opp_vertex; DEBUG_TEST_EXIT(el_old->child[0], "missing child?\n"); /* Kuni 22.08.96 */ elinfo->el = el_old->child[ichild]; elinfo->macro_el = elinfo_old->macro_el; elinfo->fill_flag = fill_flag; elinfo->mesh = elinfo_old->mesh; elinfo->parent = el_old; elinfo->level = elinfo_old->level + 1; elinfo->el_type = (elinfo_old->el_type + 1) % 3; DEBUG_TEST_EXIT(elinfo->el, "missing child %d?\n", ichild); if (fill_flag) { el_type = elinfo_old->el_type; cvg = child_vertex_3d[el_type]; cv = cvg[ichild]; ochild = 1-ichild; } if (fill_flag & FILL_COORDS) { for (i=0; i<3; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { elinfo->coord[i][j] = elinfo_old->coord[cv[i]][j]; } } if (el_old->new_coord) for (j = 0; j < DIM_OF_WORLD; j++) elinfo->coord[3][j] = el_old->new_coord[j]; else for (j = 0; j < DIM_OF_WORLD; j++) elinfo->coord[3][j] = (elinfo_old->coord[0][j] + elinfo_old->coord[1][j]) / 2; } if (fill_flag & (FILL_NEIGH | FILL_OPP_COORDS)) { neigh = elinfo->neigh; neigh_old = (EL **) elinfo_old->neigh; opp_vertex = elinfo->opp_vertex; fill_opp_coords = (fill_flag & FILL_OPP_COORDS); /*----- nb[0] is other child --------------------------------------------*/ /* if (nb = el_old->child[ochild]) old version */ if (el_old->child[0] && (nb = el_old->child[ochild])) /*Kuni 22.08.96*/ { if (nb->child[0]) { /* go down one level for direct neighbour */ if (fill_opp_coords) { if (nb->new_coord) { for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[0][j] = nb->new_coord[j]; } else { k = cvg[ochild][1]; for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[0][j] = (elinfo_old->coord[ochild][j] + elinfo_old->coord[k][j]) / 2; } } neigh[0] = nb->child[1]; opp_vertex[0] = 3; } else { if (fill_opp_coords) { for (j = 0; j < DIM_OF_WORLD; j++) { elinfo->opp_coord[0][j] = elinfo_old->coord[ochild][j]; } } neigh[0] = nb; opp_vertex[0] = 0; } } else { ERROR_EXIT("no other child"); neigh[0] = nil; } /*----- nb[1],nb[2] are childs of old neighbours nb_old[cv[i]] ----------*/ for (i=1; i<3; i++) { if ((nb = neigh_old[cv[i]])) { DEBUG_TEST_EXIT(nb->child[0], "nonconforming triangulation\n"); for (k=0; k<2; k++) /* look at both childs of old neighbour */ { nbk = nb->child[k]; if (nbk->dof[0] == el_old->dof[ichild]) { dof = nb->dof[elinfo_old->opp_vertex[cv[i]]]; /* opp. vertex */ if (dof == nbk->dof[1]) { ov = 1; if (nbk->child[0]) { if (fill_opp_coords) { if (nbk->new_coord) for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[i][j] = nbk->new_coord[j]; else for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[i][j] = (elinfo_old->opp_coord[cv[i]][j] + elinfo_old->coord[ichild][j]) / 2; } neigh[i] = nbk->child[0]; opp_vertex[i] = 3; break; } } else { DEBUG_TEST_EXIT(dof == nbk->dof[2], "opp_vertex not found\n"); ov = 2; } if (fill_opp_coords) { for (j = 0; j < DIM_OF_WORLD; j++) { elinfo->opp_coord[i][j] = elinfo_old->opp_coord[cv[i]][j]; } } neigh[i] = nbk; opp_vertex[i] = ov; break; } } /* end for k */ DEBUG_TEST_EXIT(k<2, "child not found with vertex\n"); } else { neigh[i] = nil; } } /* end for i */ /*----- nb[3] is old neighbour neigh_old[ochild] ------------------------*/ if ((neigh[3] = neigh_old[ochild])) { opp_vertex[3] = elinfo_old->opp_vertex[ochild]; if (fill_opp_coords) { for (j = 0; j < DIM_OF_WORLD; j++) { elinfo->opp_coord[3][j] = elinfo_old->opp_coord[ochild][j]; } } } } if(fill_flag & FILL_PROJECTION) { elinfo->projections[0] = elinfo_old->projections[0]; elinfo->projections[1] = elinfo_old->projections[0]; elinfo->projections[2] = elinfo_old->projections[cv[1]+1]; elinfo->projections[3] = elinfo_old->projections[cv[2]+1]; elinfo->projections[4] = elinfo_old->projections[ochild+1]; if(elinfo->projections[3]) elinfo->active_projection = elinfo->projections[3]; else if(elinfo->projections[4]) elinfo->active_projection = elinfo->projections[4]; else elinfo->active_projection = elinfo->projections[0]; } if (fill_flag & FILL_BOUND) { for (i = 0; i < 3; i++) { elinfo->vertex_bound[i] = elinfo_old->vertex_bound[cv[i]]; } elinfo->vertex_bound[3] = elinfo_old->edge_bound[0]; elinfo->face_bound[0] = INTERIOR; elinfo->face_bound[1] = elinfo_old->face_bound[cv[1]]; elinfo->face_bound[2] = elinfo_old->face_bound[cv[2]]; elinfo->face_bound[3] = elinfo_old->face_bound[ochild]; ce = child_edge_3d[el_type][ichild]; for (iedge=0; iedge<4; iedge++) { elinfo->edge_bound[iedge] = elinfo_old->edge_bound[ce[iedge]]; } for (iedge=4; iedge<6; iedge++) { i = 5 - cv[iedge-3]; /* old vertex opposite new edge */ elinfo->edge_bound[iedge] = elinfo_old->face_bound[i]; } } if (elinfo->fill_flag & FILL_ORIENTATION) { elinfo->orientation = elinfo_old->orientation * child_orientation_3d[el_type][ichild]; } } /*--------------------------------------------------------------------------*/ /* AI_update_elinfo_3d: */ /* -------------- */ /* update EL_INFO structure after refinement (of some neighbours) */ /*--------------------------------------------------------------------------*/ void AI_update_elinfo_3d(EL_INFO *elinfo) { FUNCNAME("AI_update_elinfo_3d"); EL *el = elinfo->el; DEBUG_TEST_EXIT(el, "missing element?\n"); if (elinfo->fill_flag & (FILL_NEIGH | FILL_OPP_COORDS)) { EL *nb; int ineigh, ov, j, k; FLAGS fill_opp_coords = (elinfo->fill_flag & FILL_OPP_COORDS); for (ineigh=0; ineigh < N_NEIGH_3D; ineigh++) { if ((nb = elinfo->neigh[ineigh])) { ov = elinfo->opp_vertex[ineigh]; if (ov < 2 && nb->child[0]) { if (fill_opp_coords) { k = -1; for (j=0; jdof[j] == nb->dof[1-ov]) k = j; DEBUG_TEST_EXIT(k >= 0, "neighbour dof not found\n"); if (nb->new_coord) for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[ineigh][j] = nb->new_coord[j]; else for (j = 0; j < DIM_OF_WORLD; j++) elinfo->opp_coord[ineigh][j] = (elinfo->opp_coord[ineigh][j] + elinfo->coord[k][j]) / 2; } elinfo->neigh[ineigh] = nb->child[1-ov]; elinfo->opp_vertex[ineigh] = 3; } } } } } alberta-2.0.1/add_ons/0000777000042300001440000000000011067147344011537 500000000000000alberta-2.0.1/add_ons/magic0000644000042300001440000001036110676724261012463 00000000000000############################################################################### # # An entry for the ALBERTA xdr mesh file. # ############################################################################### 4 string ALBERTA:\ Version\ 2.0 ALBERTA Version 2 xdr mesh file. >48 string >\0 Name "%s". >24 belong >0 DIM %d. >28 belong >0 DOW %d. >48 string >\0 >>&0 belong >0 %d vertices. >24 belong >1 >>48 string >\0 >>>&4 belong >0 %d edges. >>>&8 belong >0 %d elements. >>>&12 belong >0 %d hierarchical elements. >>>24 belong >2 >>>>48 string >\0 >>>>>&16 belong >0 %d faces. ############################################################################### # # An entry for the ALBERTA xdr DOF_REAL_D_VEC file. # ############################################################################### 4 string DOF_REAL_D_VEC\ \ ALBERTA xdr DOF_REAL_D_VEC. >24 belong >0 >>28 string >\0 Name "%s". >24 belong <5 >>&7 byte <>0 Preserved coarse DOFs. >>&7 byte >>>&0 belong >0 %d vertex DOF(s). >>>&4 belong >0 %d center DOF(s). >>>&8 belong >0 %d edge DOF(s). >>>&12 belong >0 %d face DOF(s). >>>&20 belong >0 >>>>&0 string >\0 Basis functions "%s". >>>&20 belong <5 >>>>&4 belong x %d DOFs. >>>&20 belong >4 >>>>&-4 belong <9 >>>>>&8 belong x %d DOFs. >>>&20 belong >8 >>>>&-4 belong <13 >>>>>&12 belong x %d DOFs. >>>&20 belong >12 >>>>&-4 belong <17 >>>>>&16 belong x %d DOFs. >24 belong >4 >>24 belong <9 >>&7 byte <>0 Preserved coarse DOFs. >>&7 byte >>>&0 belong >0 %d vertex DOF(s). >>>&4 belong >0 %d center DOF(s). >>>&8 belong >0 %d edge DOF(s). >>>&12 belong >0 %d face DOF(s). >>>&20 belong >0 >>>>&0 string >\0 Basis functions "%s". >>>&20 belong <5 >>>>&4 belong x %d DOFs. >>>&20 belong >4 >>>>&-4 belong <9 >>>>>&8 belong x %d DOFs. >>>&20 belong >8 >>>>&-4 belong <13 >>>>>&12 belong x %d DOFs. >>>&20 belong >12 >>>>&-4 belong <17 >>>>>&16 belong x %d DOFs. >24 belong >8 >>24 belong <13 >>&7 byte <>0 Preserved coarse DOFs. >>&7 byte >>>&0 belong >0 %d vertex DOF(s). >>>&4 belong >0 %d center DOF(s). >>>&8 belong >0 %d edge DOF(s). >>>&12 belong >0 %d face DOF(s). >>>&20 belong >0 >>>>&0 string >\0 Basis functions "%s". >>>&20 belong <5 >>>>&4 belong x %d DOFs. >>>&20 belong >4 >>>>&-4 belong <9 >>>>>&8 belong x %d DOFs. >>>&20 belong >8 >>>>&-4 belong <13 >>>>>&12 belong x %d DOFs. >>>&20 belong >12 >>>>&-4 belong <17 >>>>>&16 belong x %d DOFs. ############################################################################### # # An entry for the ALBERTA xdr DOF_REAL_VEC file. # ############################################################################### 4 string DOF_REAL_VEC\ \ \ \ ALBERTA xdr DOF_REAL_VEC. >24 belong >0 >>28 string >\0 Name "%s". >24 belong <5 >>&7 byte <>0 Preserved coarse DOFs. >>&7 byte >>>&0 belong >0 %d vertex DOF(s). >>>&4 belong >0 %d center DOF(s). >>>&8 belong >0 %d edge DOF(s). >>>&12 belong >0 %d face DOF(s). >>>&20 belong >0 >>>>&0 string >\0 Basis functions "%s". >>>&20 belong <5 >>>>&4 belong x %d DOFs. >>>&20 belong >4 >>>>&-4 belong <9 >>>>>&8 belong x %d DOFs. >>>&20 belong >8 >>>>&-4 belong <13 >>>>>&12 belong x %d DOFs. >>>&20 belong >12 >>>>&-4 belong <17 >>>>>&16 belong x %d DOFs. >24 belong >4 >>24 belong <9 >>&7 byte <>0 Preserved coarse DOFs. >>&7 byte >>>&0 belong >0 %d vertex DOF(s). >>>&4 belong >0 %d center DOF(s). >>>&8 belong >0 %d edge DOF(s). >>>&12 belong >0 %d face DOF(s). >>>&20 belong >0 >>>>&0 string >\0 Basis functions "%s". >>>&20 belong <5 >>>>&4 belong x %d DOFs. >>>&20 belong >4 >>>>&-4 belong <9 >>>>>&8 belong x %d DOFs. >>>&20 belong >8 >>>>&-4 belong <13 >>>>>&12 belong x %d DOFs. >>>&20 belong >12 >>>>&-4 belong <17 >>>>>&16 belong x %d DOFs. >24 belong >8 >>24 belong <13 >>&7 byte <>0 Preserved coarse DOFs. >>&7 byte >>>&0 belong >0 %d vertex DOF(s). >>>&4 belong >0 %d center DOF(s). >>>&8 belong >0 %d edge DOF(s). >>>&12 belong >0 %d face DOF(s). >>>&20 belong >0 >>>>&0 string >\0 Basis functions "%s". >>>&20 belong <5 >>>>&4 belong x %d DOFs. >>>&20 belong >4 >>>>&-4 belong <9 >>>>>&8 belong x %d DOFs. >>>&20 belong >8 >>>>&-4 belong <13 >>>>>&12 belong x %d DOFs. >>>&20 belong >12 >>>>&-4 belong <17 >>>>>&16 belong x %d DOFs. alberta-2.0.1/add_ons/Makefile.am0000644000042300001440000000045510701404615013502 00000000000000SUBDIRS = if GEOMVIEW # # alberta2oogl does not need support libraries, so we can compile it anyway. # SUBDIRS += geomview endif if GRAPE SUBDIRS += grape endif if HAVE_SILO SUBDIRS += meshtv endif EXTRA_DIST = alberta2netcdf slip_bound write_mesh_fig triangle2alberta dist_pkgdata_DATA = magic alberta-2.0.1/add_ons/Makefile.in0000644000042300001440000004370311067146145013525 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # # alberta2oogl does not need support libraries, so we can compile it anyway. # @GEOMVIEW_TRUE@am__append_1 = geomview @GRAPE_TRUE@am__append_2 = grape @HAVE_SILO_TRUE@am__append_3 = meshtv subdir = add_ons DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgdatadir)" dist_pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_pkgdata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = geomview grape meshtv DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) EXTRA_DIST = alberta2netcdf slip_bound write_mesh_fig triangle2alberta dist_pkgdata_DATA = magic all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-dist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dist_pkgdataDATA install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-dist_pkgdataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_pkgdataDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_pkgdataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/alberta2netcdf/0000777000042300001440000000000011067147346014421 500000000000000alberta-2.0.1/add_ons/alberta2netcdf/CenterCornerSwitch.net0000644000042300001440000000744510701404614020616 00000000000000// // time: Tue Apr 3 10:56:32 2007 // // version: 3.2.0 (format), 4.3.2 (DX) // // // Begin MDF // MODULE CenterCornerSwitch // CATEGORY Macros // DESCRIPTION switches automatically between cell centered data input and position dependant data. // INPUT input_1; field; (no default); // OUTPUT output_1; object; // End MDF // workspace: width = 500, height = 400 // layout: snap = 0, width = 50, height = 50, align = NN // macro CenterCornerSwitch( input_1 ) -> ( output_1 ) { // // node Input[1]: x = 0, y = 0, inputs = 0, label = Input // parameter: position = 1, name = 'input_1', value = ' ', descriptive = 0, description = ' ', required = 0, visible = 1 // CenterCornerSwitch_Input_1_out_1 = input_1; // // node Inquire[17]: x = 0, y = 80, inputs = 3, label = Inquire // input[2]: defaulting = 0, visible = 0, type = 32, value = "data counts" // input[3]: visible = 0 // CenterCornerSwitch_Inquire_17_out_1[cache: 0] = Inquire( CenterCornerSwitch_Input_1_out_1, "data counts", NULL ) [instance: 17, cache: 1]; // // node Inquire[18]: x = 76, y = 80, inputs = 3, label = Inquire // input[2]: defaulting = 0, visible = 0, type = 32, value = "connection counts" // input[3]: visible = 0 // CenterCornerSwitch_Inquire_18_out_1[cache: 0] = Inquire( CenterCornerSwitch_Input_1_out_1, "connection counts", NULL ) [instance: 18, cache: 1]; // // node Compute[112]: x = 10, y = 180, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0==$1?1:2" // expression: value = a==b?1:2 // name[2]: value = a // name[3]: value = b // CenterCornerSwitch_Compute_112_out_1[cache: 0] = Compute( "$0==$1?1:2", CenterCornerSwitch_Inquire_17_out_1, CenterCornerSwitch_Inquire_18_out_1 ) [instance: 112, cache: 1]; // // node Extract[6]: x = 141, y = 81, inputs = 2, label = Extract // input[2]: visible = 0 // CenterCornerSwitch_Extract_6_out_1[cache: 0] = Extract( CenterCornerSwitch_Input_1_out_1, NULL ) [instance: 6, cache: 1]; // // node Options[5]: x = 137, y = 149, inputs = 5, label = Options // input[2]: defaulting = 0, visible = 0, type = 32, value = "dep" // input[3]: defaulting = 0, visible = 0, type = 32, value = "connections" // input[4]: visible = 0 // input[5]: visible = 0 // CenterCornerSwitch_Options_5_out_1[cache: 0] = Options( CenterCornerSwitch_Extract_6_out_1, "dep", "connections", NULL, NULL ) [instance: 5, cache: 1]; // // node Replace[7]: x = 180, y = 220, inputs = 4, label = Replace // input[3]: visible = 0 // input[4]: visible = 0 // CenterCornerSwitch_Replace_7_out_1[cache: 0] = Replace( CenterCornerSwitch_Options_5_out_1, CenterCornerSwitch_Input_1_out_1, NULL, NULL ) [instance: 7, cache: 1]; // // node Switch[48]: x = 175, y = 291, inputs = 3, label = Switch // CenterCornerSwitch_Switch_48_out_1[cache: 0] = Switch( CenterCornerSwitch_Compute_112_out_1, CenterCornerSwitch_Replace_7_out_1, CenterCornerSwitch_Input_1_out_1 ) [instance: 48, cache: 1]; // // node Output[1]: x = 0, y = 371, inputs = 1, label = Output // parameter: position = 1, name = 'output_1', value = ' ', descriptive = 0, description = ' ', required = 0, visible = 1 // output_1 = CenterCornerSwitch_Switch_48_out_1; // network: end of macro body } CenterCornerSwitch_Input_1_out_1 = NULL; CenterCornerSwitch_Inquire_17_out_1 = NULL; CenterCornerSwitch_Inquire_18_out_1 = NULL; CenterCornerSwitch_Compute_112_out_1 = NULL; CenterCornerSwitch_Extract_6_out_1 = NULL; CenterCornerSwitch_Options_5_out_1 = NULL; CenterCornerSwitch_Replace_7_out_1 = NULL; CenterCornerSwitch_Switch_48_out_1 = NULL; alberta-2.0.1/add_ons/alberta2netcdf/dxexport.cc0000644000042300001440000002251210701404614016507 00000000000000/* * dxexport2 -- for use with alberta2 * creates a netcdf file for the current mesh * to be used in OpenDX */ // This is part of ALBERTA C++ wrappers // link with libnetcdf_c++ and libnetcdf #include "netcdfcpp.h" #include "alberta.h" #include "dxexport.hh" // pick up extern "C" if necessary static const FE_SPACE *fe_space=nil; // output needs floats typedef float FLOAT; //man kann vielleicht mal alle n_ auf grid direkt zurueckfuehren und Variablennamen sparen... typedef struct dxexport_data DXEXPORT_DATA; struct dxexport_data { const int n_vertices; //ist eigentlich alles im Mesh und wird nur im Destruktor gebraucht... const int n_elements; const int mesh_dim; // eigentlich DIM_OF_WORLD noetig const int n_values; // bit flags for cell-centered data const unsigned long int cflags; FLOAT *coords; /* Length will be n_vertices*dim */ int *vertices /*[N_VERTICES(DIM)*/; /* vertices[i][j]: global index of */ /* jth vertex of element i */ FLOAT **values; /* Contains n_values ptrs */ ~dxexport_data(); dxexport_data(int nv, int ne, int md, int nd, unsigned long int cflags, FLAGS flag); }; dxexport_data::~dxexport_data() { delete [] coords; delete [] vertices; for(int i=0;idim, 1); TEST_EXIT(lagrange, "no lagrange BAS_FCTS\n"); fe_space = get_fe_space(mesh, lagrange->name, nil, lagrange, 0U); return; } //basiert auf static MACRO_DATA *mesh2macro_data(MESH *mesh) static int mesh2dxexport_data(MESH *mesh, DXEXPORT_DATA *data, const DOF_REAL_VEC* const * const vecs, int n_vecs) { FUNCNAME("mesh2dxexport_data"); TRAVERSE_STACK *stack; static const DOF *(*get_dof)(const EL *, const DOF_ADMIN *, DOF *); const EL_INFO *el_info; int /* n0,*/ ne, nv, i, j, *vert_ind = nil; const int vert_max = N_VERTICES(mesh->dim); const REAL* uh_loc; U_CHAR new_vertex; // n0 = fe_space->admin->n0_dof[VERTEX]; static const DOF_INT_VEC* dof_vert_ind = get_dof_int_vec("vertex indices", fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(fe_space->admin, vert_ind[dof] = -1); get_dof = fe_space->bas_fcts->get_dof_indices; nv = ne = 0; stack = get_traverse_stack(); /*--------------------------------------------------------------------------*/ /* The first pass counts elements and vertices, checks these against the */ /* entries of mesh->n_elements, mesh->n_vertices, and fills data->coords. */ /* A check on whether an element has nonzero el_type is also done. */ /*--------------------------------------------------------------------------*/ for(el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL | FILL_COORDS); el_info; el_info = traverse_next(stack, el_info)) { const DOF *dof = (*get_dof)(el_info->el, fe_space->admin, nil); // const DOF *dof = GET_DOF_INDICES(fe_space->bas_fcts, el_info->el, // fe_space->admin,nil); new_vertex = false; for (i = 0; i < vert_max; i++) { // if (vert_ind[el_info->el->dof[i][n0]] == -1) if (vert_ind[dof[i]] == -1) { /*--------------------------------------------------------------------------*/ /* assign a global index to each vertex */ /*--------------------------------------------------------------------------*/ data->vertices[ne*vert_max+i] = vert_ind[dof[i]]= nv; new_vertex = true; for (j = 0; j < DIM_OF_WORLD; j++) data->coords[nv*DIM_OF_WORLD+j] = (FLOAT) el_info->coord[i][j]; nv++; if(nv > mesh->n_vertices) { free_traverse_stack(stack); ERROR("mesh %s: n_vertices (==%d) is too small! " "Writing aborted\n", mesh->name, mesh->n_vertices); return(1); } } else { data->vertices[ne*vert_max+i] = vert_ind[dof[i]]; } } for (int comp=0; compcflags & (1<fe_space->bas_fcts->get_real_vec(el_info->el, vecs[comp], nil); data->values[comp][ne] = (FLOAT) uh_loc[0]; } // position-dependent data: nur falls neue Ecken aufgetaucht sind else if(new_vertex) for (i = 0; i < N_VERTICES(DIM); i++) { uh_loc = vecs[comp]->fe_space->bas_fcts->get_real_vec(el_info->el, vecs[comp], nil); data->values[comp][data->vertices[ne*vert_max+i]] = (FLOAT)uh_loc[i]; } } ne++; if(ne > mesh->n_elements) { free_traverse_stack(stack); ERROR("mesh %s: n_elements (==%d) is too small! Writing aborted\n", mesh->name, mesh->n_elements); return(1); } } if(ne < mesh->n_elements) { free_traverse_stack(stack); ERROR("mesh %s: n_elements (==%d) is too large: " "only %d leaf elements counted -- writing aborted\n", mesh->name, mesh->n_elements, ne); return(1); } if(nv < mesh->n_vertices) { free_traverse_stack(stack); ERROR("mesh %s: n_vertices (==%d) is too large: " "only %d vertices counted -- writing of mesh aborted\n", mesh->name, mesh->n_vertices, nv); return(1); } free_traverse_stack(stack); return(0); } // filename ohne endung int dxexport(MESH *mesh, const char *filename, REAL time, const DOF_REAL_VEC * const *vecs, int n_vecs) // ,const DOF_REAL_VEC* const * const deg0vecs, int n_deg0vecs) { FUNCNAME("dxexport"); char key[128]; DXEXPORT_DATA *export_data; unsigned long int cflags=0; if (!mesh) { ERROR("no mesh - no file created\n"); return 1; } // dof_compress(mesh); // kriegen das die vecs mit? //hier Daten pruefen... (assumes intbits>=32) TEST_EXIT(n_vecs<32,"too many datavectors (>32).\n"); for (int i=0; ife_space->name,"lagrange0")==0) cflags |= 1<n_vertices, mesh->n_elements, mesh->dim, n_vecs, cflags, 0); if(mesh2dxexport_data(mesh,export_data, vecs, n_vecs)) {delete export_data;return 2;} snprintf(key, 127, "%s.nc", filename); NcFile Nc(key, NcFile::Replace, NULL, 0, NcFile::Classic); if (!Nc.is_valid()) { ERROR("cannot create netCDF file %s\n", filename); delete export_data; return 1; } /*** Create dimensions ***/ const int dim = DIM; const int dim_of_world = DIM_OF_WORLD; const int simplex = dim+1; // size of a simplex (triangle,tetrahedron) const int n_vertices = export_data->n_vertices; const int n_elements = export_data->n_elements; // NcDim* Dim = Nc.add_dim("dim", dim); NcDim* Dim_of_world = Nc.add_dim("dim_of_world", dim_of_world); NcDim* Simplex = Nc.add_dim("simplex", simplex); NcDim* N_vertices = Nc.add_dim("n_vertices", n_vertices); NcDim* N_elements = Nc.add_dim("n_elements", n_elements); // NcDim* N_phases = Nc.add_dim("n_phases", n_phases); /*** Create variables ***/ NcVar* Values[n_vecs]; for (int i=0; iadd_att("field", vecs[i]->name); #if DIM==1 Values[i]->add_att("connections", "elements, lines"); #elif DIM==2 Values[i]->add_att("connections", "elements, triangles"); #elif DIM==3 Values[i]->add_att("connections", "elements, tetrahedra"); #endif Values[i]->add_att("positions", "coordinates"); } NcVar* Elements = Nc.add_var("elements", ncLong, N_elements, Simplex); NcVar* Coordinates = Nc.add_var("coordinates", ncFloat, N_vertices, Dim_of_world); NcVar* Time = Nc.add_var("time", ncDouble); /*** Global attributes ***/ Nc.add_att("Creator", ALBERTA_VERSION); /*** Start writing data ***/ Time->put(&time,1); Coordinates->put(&export_data->coords[0], n_vertices, dim_of_world); // Coordinates->edges()); Elements->put(&export_data->vertices[0], n_elements, simplex); // Elements->edges()); for(int i=0;ivalues[i]; Values[i]->put(&val[0], (cflags & (1< A^\tilde_ii = | a_21 a_22 a_23 | */ /* | a_31 a_32 a_33 | | a_31 a_32 a_33 | */ /* */ /* Vectors (typically unknown and right hand side of the problem) can be */ /* changed as follows: */ /* */ /* | u_1 | | 0 | */ /* U_i = | u_2 | ---> U^\tilde_i = | u_2 | */ /* | u_3 | | u_3 | */ /* */ /* for u \cdot \nu = 0. */ /* */ /* This can be generalized to the case of non-parallel slip walls. In this */ /* case, we need a local projection operator P in the direction of \nu. It */ /* can be defined as P_i = Id_3 - \nu \otimes \nu, where \otimes denotes */ /* a tensor product. We then have */ /* */ /* A^\tilde_ii = P_i A_ii and U^\tilde_i = P_i U_i */ /* */ /* Unfortunately, this approach fails due to rounding errors, since we */ /* cannot guarantee a residual of EXACTLY 0.0 in the direction of \nu. */ /* */ /* The solution implemented here is to transform matrices and vectors using */ /* a Householder transformation so that b.c. can be applied as in the */ /* parallel wall case. This produces residuals which are exactly 0.0. */ /* */ /* The Householder matrix S applied is */ /* */ /* | \nu_1 +- 1 | (sign chosen to avoid loss of precision) */ /* a^\tilde = | \nu_2 | */ /* | \nu_3 | */ /* */ /* a = a^\tilde / |a^\tilde| */ /* */ /* S = Id_n - 2.0 a \otimes a */ /* */ /****************************************************************************/ /****************************************************************************/ /* sb_get_status_dof_real_d_vec(drdv) get the transformation status of a */ /* DOF_REAL_D_VEC drdv. The private pointer drdv->mem_info is used for this */ /* purpose. */ /****************************************************************************/ SB_STATUS sb_get_status_dof_real_d_vec(const DOF_REAL_D_VEC *drdv) { FUNCNAME("sb_get_status_dof_real_d_vec"); SLIP_BOUND_HANDLER *sbh = (SLIP_BOUND_HANDLER *)drdv->mem_info; if(!sbh) return SB_UNDEFINED; else { if(sbh->status == SB_UNDEFINED) return SB_UNDEFINED; else if (sbh->status == SB_NORMAL) return SB_NORMAL; else if (sbh->status == SB_TRANSFORMED) return SB_TRANSFORMED; else ERROR_EXIT("Error while getting SB_STATUS!\n"); } return 0; } /****************************************************************************/ /* sb_get_status_dof_dowb_matrix(ddm) same thing for DOF_DOWB_MATRICES. */ /****************************************************************************/ SB_STATUS sb_get_status_dof_dowb_matrix(const DOF_DOWB_MATRIX *ddm) { FUNCNAME("sb_get_status_dof_real_vec"); SLIP_BOUND_HANDLER *sbh = (SLIP_BOUND_HANDLER *)ddm->mem_info; if(!sbh) return SB_UNDEFINED; else { if(sbh->status == SB_UNDEFINED) return SB_UNDEFINED; else if (sbh->status == SB_NORMAL) return SB_NORMAL; else if (sbh->status == SB_TRANSFORMED) return SB_TRANSFORMED; else ERROR_EXIT("Error while getting SB_STATUS!\n"); } return 0; } /****************************************************************************/ /* sb_set_status_dof_real_d_vec(drdv, status): Set the status for vectors. */ /****************************************************************************/ void sb_set_status_dof_real_d_vec(DOF_REAL_D_VEC *drdv, SB_STATUS status) { FUNCNAME("sb_set_status_dof_real_d_vec"); SLIP_BOUND_HANDLER *sbh = (SLIP_BOUND_HANDLER *)drdv->mem_info; if(!sbh) { sbh = MEM_ALLOC(1, SLIP_BOUND_HANDLER); drdv->mem_info = (void *)sbh; } TEST_EXIT((status == SB_UNDEFINED) || (status == SB_NORMAL) || (status == SB_TRANSFORMED), "Illegal SB_STATUS!\n"); sbh->status = status; return; } /****************************************************************************/ /* sb_set_status_dof_dowb_matrix(ddm, status): Same thing for matrices. */ /****************************************************************************/ void sb_set_status_dof_dowb_matrix(DOF_DOWB_MATRIX *ddm, SB_STATUS status) { FUNCNAME("sb_set_status_dof_dowb_matrix"); SLIP_BOUND_HANDLER *sbh = (SLIP_BOUND_HANDLER *)ddm->mem_info; if(!sbh) { sbh = MEM_ALLOC(1, SLIP_BOUND_HANDLER); ddm->mem_info = (void *)sbh; } TEST_EXIT((status == SB_UNDEFINED) || (status == SB_NORMAL) || (status == SB_TRANSFORMED), "Illegal SB_STATUS!\n"); sbh->status = status; return; } /****************************************************************************/ /* sb_unset_status_dof_real_d_vec(drdv): Unset the status for vectors. */ /****************************************************************************/ void sb_unset_status_dof_real_d_vec(DOF_REAL_D_VEC *drdv) { FUNCNAME("sb_unset_status_dof_real_d_vec"); SLIP_BOUND_HANDLER *sbh = (SLIP_BOUND_HANDLER *)drdv->mem_info; if(sbh) { SB_STATUS status = sbh->status; TEST_EXIT((status == SB_UNDEFINED) || (status == SB_NORMAL) || (status == SB_TRANSFORMED), "Illegal SB_STATUS!\n"); MEM_FREE(sbh, 1, SLIP_BOUND_HANDLER); drdv->mem_info = nil; } return; } /****************************************************************************/ /* sb_unset_status_dof_dowb_matrix(ddm): Same thing for matrices. */ /****************************************************************************/ void sb_unset_status_dof_dowb_matrix(DOF_DOWB_MATRIX *ddm) { FUNCNAME("sb_unset_status_dof_dowb_matrix"); SLIP_BOUND_HANDLER *sbh = (SLIP_BOUND_HANDLER *)ddm->mem_info; if(sbh) { SB_STATUS status = sbh->status; TEST_EXIT((status == SB_UNDEFINED) || (status == SB_NORMAL) || (status == SB_TRANSFORMED), "Illegal SB_STATUS!\n"); MEM_FREE(sbh, 1, SLIP_BOUND_HANDLER); ddm->mem_info = nil; } return; } /****************************************************************************/ /* sb_transform_dof_real_d_vec(drdv1, drdv2, normal, bound, current_status):*/ /* transform up to two vectors using the outer unit normal vector "normal", */ /* and the boundary vector "bound". FE_SPACEs must match in all vectors. */ /* */ /* The parameter "current_status" is used to check if the vectors are passed*/ /* in an incorrect state by mistake. It must match the private setting */ /* obtained by sb_get_status_dof_real_d_vec(). */ /****************************************************************************/ void sb_transform_dof_real_d_vec(DOF_REAL_D_VEC *drdv1, DOF_REAL_D_VEC *drdv2, const DOF_REAL_D_VEC *normal, const DOF_SCHAR_VEC *bound, SB_STATUS current_status) { FUNCNAME("sb_transform_dof_real_d_vec"); SB_STATUS status; const FE_SPACE *fe_space; REAL_D a; REAL scp1, scp2; TEST_EXIT(drdv1||drdv2, "No DOF_REAL_D_VEC supplied!\n"); TEST_EXIT(normal, "No outer unit normal vector supplied!\n"); TEST_EXIT(bound, "No boundary vector supplied!\n"); if(!drdv1) { drdv1 = drdv2; drdv2 = nil; } fe_space = drdv1->fe_space; TEST_EXIT(fe_space, "DOF_REAL_D_VEC is lacking an fe_space!\n"); TEST_EXIT((fe_space == normal->fe_space) && (fe_space == bound->fe_space), "FE_SPACEs in vectors do not match!\n"); if(drdv2) { TEST_EXIT(fe_space == drdv2->fe_space, "FE_SPACEs in vectors do not match!\n"); } if(current_status == SB_UNDEFINED) current_status = SB_NORMAL; TEST_EXIT((current_status == SB_NORMAL)||(current_status ==SB_TRANSFORMED), "Bogus current status given!\n"); status = sb_get_status_dof_real_d_vec(drdv1); TEST_EXIT((current_status == status) || (status == SB_UNDEFINED), "Vector 1 seems to be in wrong state!\n"); if(drdv2) { status = sb_get_status_dof_real_d_vec(drdv2); TEST_EXIT((current_status == status) || (status == SB_UNDEFINED), "Vector 2 seems to be in wrong state!\n"); } FOR_ALL_DOFS(fe_space->admin, if(bound->vec[dof] == SLIP) { COPY_DOW(normal->vec[dof], a); if(a[0] >= 0.0) a[0] += 1.0; else a[0] -= 1.0; AX_DOW(1.0 / NORM_DOW(a), a); scp1 = SCP_DOW(drdv1->vec[dof], a); AXPY_DOW(-2.0 * scp1, a, drdv1->vec[dof]); if(drdv2) { scp2 = SCP_DOW(drdv2->vec[dof], a); AXPY_DOW(-2.0 * scp2, a, drdv2->vec[dof]); } }); if(current_status == SB_NORMAL) { sb_set_status_dof_real_d_vec(drdv1, SB_TRANSFORMED); if(drdv2) sb_set_status_dof_real_d_vec(drdv2, SB_TRANSFORMED); } else { sb_set_status_dof_real_d_vec(drdv1, SB_NORMAL); if(drdv2) sb_set_status_dof_real_d_vec(drdv2, SB_NORMAL); } return; } /****************************************************************************/ /* sb_transform_dof_dowb_matrix(ddm, normal, bound, current_status): */ /* transform a system matrix using the outer unit normal vector "normal", */ /* and the boundary vector "bound". FE_SPACEs must match as above. */ /* */ /* The parameter "current_status" is used as a consistency check as above. */ /* */ /* Two types of DOF_DOWB_MATRIXes are supported at the moment: dowbm_full */ /* and dowbm_diag, the latter being used to store a matrix operating from */ /* a scalar FE space to a vector valued space (e.g. discrete gradient */ /* operators for a Stokes problem). */ /****************************************************************************/ void sb_transform_dof_dowb_matrix(DOF_DOWB_MATRIX *ddm, const DOF_REAL_D_VEC *normal, const DOF_SCHAR_VEC *bound, SB_STATUS current_status) { FUNCNAME("sb_transform_dof_dowb_matrix"); SB_STATUS status; const FE_SPACE *fe_space; DOWB_MATRIX_ROW *row = nil; REAL_DD *s_vector, tmp_dd, *entry_dd; DOF jcol; REAL_D a, *entry_d, tmp_d; int j, k, l, m; DOWBM_TYPE type; TEST_EXIT(ddm, "No DOF_DOWB_MATRIX supplied!\n"); type = ddm->type; TEST_EXIT(type == dowbm_full, "DOF_DOWB_MATRIX must be of type dowbm_full!\n"); TEST_EXIT(normal, "No outer unit normal vector supplied!\n"); TEST_EXIT(bound, "No boundary vector supplied!\n"); TEST_EXIT((current_status == SB_NORMAL) || (current_status ==SB_TRANSFORMED), "Bogus current status given!\n"); fe_space = ddm->fe_space; TEST_EXIT(fe_space, "DOF_DOWB_MATRIX is lacking an fe_space!\n"); TEST_EXIT((fe_space == normal->fe_space) && (fe_space == bound->fe_space), "FE_SPACEs in vectors do not match!\n"); status = sb_get_status_dof_dowb_matrix(ddm); TEST_EXIT((current_status == status) || (status == SB_UNDEFINED), "Bogus status of matrix!\n"); s_vector = MEM_ALLOC(fe_space->admin->size_used, REAL_DD); FOR_ALL_DOFS(fe_space->admin, if(bound->vec[dof] == SLIP) { COPY_DOW(normal->vec[dof], a); if(a[0] >= 0.0) a[0] += 1.0; else a[0] -= 1.0; AX_DOW(1.0 / NORM_DOW(a), a); for(k = 0; k < DIM_OF_WORLD; k++) for(l = 0; l < DIM_OF_WORLD; l++) { if(k == l) s_vector[dof][k][k] = 1.0; else s_vector[dof][k][l] = 0.0; s_vector[dof][k][l] -= 2.0 * a[k]*a[l]; } } ); FOR_ALL_DOFS(fe_space->admin, for (row = ddm->matrix_row[dof]; row; row = row->next) for (j=0; jcol[j]; if (ENTRY_USED(jcol)) { entry_dd = row->entry.full; if(bound->vec[dof] == SLIP) { MM_DOW(s_vector[dof], entry_dd[j], tmp_dd); MCOPY_DOW(tmp_dd, entry_dd[j]); } if(bound->vec[jcol] == SLIP) { MM_DOW(entry_dd[j], s_vector[jcol], tmp_dd); MCOPY_DOW(tmp_dd, entry_dd[j]); } } else if (jcol == NO_MORE_ENTRIES) break; } ); if(current_status == SB_NORMAL) sb_set_status_dof_dowb_matrix(ddm, SB_TRANSFORMED); else sb_set_status_dof_dowb_matrix(ddm, SB_NORMAL); return; } /****************************************************************************/ /* sb_slip_bound(ddm, drdv1, drdv2, bound): */ /* Set boundary conditions in the matrix "ddm" and one or both vectors. */ /* Please note that the system matrix acts as the identity on the slip bound*/ /* DOF in the x[0]-direction. This behaviour could be changed, but then */ /* a different treatment for unknown and right hand side vectors would be */ /* necessary. The current behaviour is analogous to Dirichlet boundary */ /* treatment in ALBERTA. */ /****************************************************************************/ void sb_slip_bound(DOF_DOWB_MATRIX *ddm, DOF_REAL_D_VEC *drdv1, DOF_REAL_D_VEC *drdv2, DOF_SCHAR_VEC *bound) { FUNCNAME("sb_slip_bound"); const FE_SPACE *fe_space = nil; DOWB_MATRIX_ROW *row = nil; REAL_DD *entry_dd; DOWBM_TYPE type; REAL_D *entry_d; DOF jcol; int j, k; if(ddm) { type = ddm->type; TEST_EXIT(type == dowbm_full || type == dowbm_diag, "DOF_DOWB_MATRIX must be of type dowbm_full or dowbm_diag!\n"); TEST_EXIT(sb_get_status_dof_dowb_matrix(ddm) == SB_TRANSFORMED, "Matrix does not seem to be transformed!\n"); fe_space = ddm->fe_space; } if(drdv1) { TEST_EXIT(sb_get_status_dof_real_d_vec(drdv1) == SB_TRANSFORMED, "Vector 1 does not seem to be transformed!\n"); if(fe_space) TEST_EXIT(fe_space == drdv1->fe_space, "FE_SPACEs do no match!\n"); else fe_space = drdv1->fe_space; } if(drdv2) { TEST_EXIT(sb_get_status_dof_real_d_vec(drdv2) == SB_TRANSFORMED, "Vector 2 does not seem to be transformed!\n"); if(fe_space) TEST_EXIT(fe_space == drdv2->fe_space, "FE_SPACEs do no match!\n"); else fe_space = drdv2->fe_space; } if(!ddm && !drdv1 && !drdv2) return; TEST_EXIT(bound, "No boundary vector given!\n"); TEST_EXIT(fe_space == bound->fe_space, "FE_SPACEs do not match!\n"); TEST_EXIT(fe_space, "No FE_SPACEs found!\n"); FOR_ALL_DOFS(fe_space->admin, if(bound->vec[dof] == SLIP) { if(ddm) { for (row = ddm->matrix_row[dof]; row; row = row->next) for (j = 0; j < ROW_LENGTH; j++) { jcol = row->col[j]; if (ENTRY_USED(jcol)) { if(type == dowbm_diag) { entry_d = row->entry.diag; for(k = 0; k < DIM_OF_WORLD; k++) entry_d[j][k] = 0.0; if(jcol == dof) entry_d[j][0] = 1.0; } else { entry_dd = row->entry.full; for (k = 0; k < DIM_OF_WORLD; k++) entry_dd[j][0][k] = 0.0; if(jcol == dof) entry_dd[j][0][0] = 1.0; } } else if (jcol == NO_MORE_ENTRIES) break; } } if(drdv1) drdv1->vec[dof][0] = 0.0; if(drdv2) drdv2->vec[dof][0] = 0.0; } ); return; } alberta-2.0.1/add_ons/slip_bound/slip_bound.h0000644000042300001440000000604110676723611016123 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: slip_bound.h */ /* */ /* */ /* description: header for slip_bound.c */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /*--------------------------------------------------------------------------*/ typedef enum bound_type {FREE=-3, DO_NOTHING=-2, SLIP=-1, NO_SLIP=1} BOUND_TYPE; /* Slip boundary transformation status */ #define SB_UNDEFINED 0 #define SB_NORMAL 1 #define SB_TRANSFORMED 2 typedef int SB_STATUS; static inline void MM_DOW(REAL_DD a, REAL_DD b, REAL_DD res) { int i, j, k; for (i = 0; i < DIM_OF_WORLD; i++) { for (j = 0; j < DIM_OF_WORLD; j++) { for (res[i][j] = k = 0; k < DIM_OF_WORLD; k++) { res[i][j] += a[i][k] * b[k][j]; } } } return; } SB_STATUS sb_get_status_dof_real_d_vec(const DOF_REAL_D_VEC *drdv); SB_STATUS sb_get_status_dof_dowb_matrix(const DOF_DOWB_MATRIX *ddm); void sb_set_status_dof_real_d_vec(DOF_REAL_D_VEC *drdv, SB_STATUS status); void sb_set_status_dof_dowb_matrix(DOF_DOWB_MATRIX *ddm, SB_STATUS status); void sb_unset_status_dof_real_d_vec(DOF_REAL_D_VEC *drdv); void sb_unset_status_dof_dowb_matrix(DOF_DOWB_MATRIX *ddm); void sb_transform_dof_real_d_vec(DOF_REAL_D_VEC *drdv1, DOF_REAL_D_VEC *drdv2, DOF_REAL_D_VEC *normal, DOF_SCHAR_VEC *bound, SB_STATUS current_status); void sb_transform_dof_dowb_matrix(DOF_DOWB_MATRIX *ddm, DOF_REAL_D_VEC *normal, DOF_SCHAR_VEC *bound, SB_STATUS current_status); void sb_slip_bound(DOF_DOWB_MATRIX *ddm, DOF_REAL_D_VEC *drdv1, DOF_REAL_D_VEC *drdv2, DOF_SCHAR_VEC *bound); alberta-2.0.1/add_ons/write_mesh_fig/0000777000042300001440000000000011067147346014534 500000000000000alberta-2.0.1/add_ons/write_mesh_fig/write_mesh_fig.c0000644000042300001440000001247210676724261017617 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /*--------------------------------------------------------------------------*/ /* */ /* file: write_mesh_fig.c */ /* */ /* */ /* description: This program converts ALBERTA meshes */ /* into the fig format, version 3.2 */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2006) */ /*--------------------------------------------------------------------------*/ #include "alberta.h" /***************************************************************************/ /* User interface */ /***************************************************************************/ /***************************************************************************/ /* write_mesh_fig(): */ /* Write 2d meshes (parametric or standard) as Xfig objects. */ /* */ /* Return value is 0 for OK and 1 for ERROR. */ /***************************************************************************/ int write_mesh_fig(MESH *mesh, const char *file_name) { FUNCNAME("write_mesh_fig"); FILE *file = nil; TRAVERSE_STACK *stack; const EL_INFO *el_info; const PARAMETRIC *parametric; int is_parametric, i, n; const double factor = 1000.0; if(!mesh) { ERROR("no mesh - no file created!\n"); return(1); } TEST_EXIT(mesh->dim == 2, "Only for 2d!\n"); TEST_EXIT(DIM_OF_WORLD == 2, "Only for DIM_OF_WORLD==2!\n"); file = fopen(file_name, "w"); if(!file) { ERROR("cannot open file %s\n",file_name); return(1); } /* Write file header. */ fprintf(file, "#FIG 3.2\n"); fprintf(file, "Portrait\n"); fprintf(file, "Center\n"); fprintf(file, "Metric\n"); fprintf(file, "A4\n"); fprintf(file, "100.00\n"); fprintf(file, "Single\n"); fprintf(file, "-2\n"); fprintf(file, "# Created with ALBERTA using write_mesh_fig().\n"); fprintf(file, "1200 2\n"); /* Define user defined color number 32 to be a nice gray. */ fprintf(file, "0 32 #a0a0a0\n"); /* Now dump the elements as polylines. */ parametric = mesh->parametric; stack = get_traverse_stack(); for(el_info = traverse_first(stack, mesh, -1, FILL_COORDS|CALL_LEAF_EL); el_info; el_info = traverse_next(stack, el_info)) { if(parametric) { REAL_D coords[6]; const REAL_B lambdas[6] = {{1.0, 0.0, 0.0, 0.0}, {0.5, 0.5, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.5, 0.5, 0.0}, {0.0, 0.0, 1.0, 0.0}, {0.5, 0.0, 0.5, 0.0}}; is_parametric = parametric->init_element(el_info, parametric); parametric->coord_to_world(el_info, nil, 6, lambdas, coords); if(is_parametric) { /* Write a filled X-spline */ fprintf(file, "3 5 0 1 -1 32 50 -1 20 0.000 0 0 0 7\n\t"); for(i = 0; i < 6; i++) for(n = 0; n < DIM_OF_WORLD; n++) fprintf(file, "%d ", (int)(coords[i][n] * factor)); for(n = 0; n < DIM_OF_WORLD; n++) fprintf(file, "%d ", (int)(coords[0][n] * factor)); fprintf(file, "\n"); fprintf(file, "\t0 -1 0 -1 0 -1 0\n"); } else { /* Write an unfilled polygon */ fprintf(file, "2 3 0 1 -1 0 50 -1 -1 0.000 0 0 -1 0 0 4\n\t"); for(i = 0; i < 3; i++) for(n = 0; n < DIM_OF_WORLD; n++) fprintf(file, "%d ", (int)(coords[i*2][n] * factor)); for(n = 0; n < DIM_OF_WORLD; n++) fprintf(file, "%d ", (int)(coords[0][n] * factor)); fprintf(file, "\n"); } } else { /* Write an unfilled polygon */ fprintf(file, "2 3 0 1 -1 0 50 -1 -1 0.000 0 0 -1 0 0 4\n\t"); for(i = 0; i < 3; i++) for(n = 0; n < DIM_OF_WORLD; n++) fprintf(file, "%d ", (int)(el_info->coord[i][n] * factor)); for(n = 0; n < DIM_OF_WORLD; n++) fprintf(file, "%d ", (int)(el_info->coord[0][n] * factor)); fprintf(file, "\n"); } } free_traverse_stack(stack); fclose(file); return(0); } alberta-2.0.1/add_ons/triangle2alberta/0000777000042300001440000000000011067147346014763 500000000000000alberta-2.0.1/add_ons/triangle2alberta/triangle2alberta.c0000644000042300001440000003463310676724260020277 00000000000000/*--------------------------------------------------------------------------*/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques for scientific Applications */ /* */ /* file: triangle2alberta.c */ /* */ /* description: Interface between the Triangle mesh generator and ALBERTA */ /* */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* http://www.alberta-fem.de */ /* */ /* (c) by D. Koester (2006) */ /* */ /*--------------------------------------------------------------------------*/ #include "alberta.h" #define VERT_IND(i,j) ((i)*N_VERTICES_2D+(j)) #define NEIGH_IND(i,j) ((i)*N_NEIGH_2D+(j)) /*--------------------------------------------------------------------------*/ /* read_indices() reads 3 indices from file into id[0-2], */ /* returns true if 3 inputs arguments could be read successfully by */ /* fscanf(), else false */ /*--------------------------------------------------------------------------*/ static int read_indices(FILE *file, int id[]) { int i; for (i = 0; i <= 2; i++) if (fscanf(file, "%d", id+i) != 1) return(false); return(true); } /*--------------------------------------------------------------------------*/ /* read_triangle_files() */ /* read Triangle .node, .ele, .neigh files and converts the information */ /* into a macro_data structure */ /* called by triangle2macro_data() below. */ /*--------------------------------------------------------------------------*/ static MACRO_DATA *read_triangle_files(const char *basename) { FUNCNAME("read_triangle_files"); FILE *node_file, *ele_file, *neigh_file = nil; MACRO_DATA *macro_data = nil; int dim, nv, ne, i, j, ind[3], i_tmp, longest_edge = 0; int n_node_attr, n_ele_attr, n_bound; REAL d_tmp, max_norm; char node_name[2048], ele_name[2048], neigh_name[2048]; S_CHAR *bound_vec = nil; /*--------------------------------------------------------------------------*/ /* Check for user errors. */ /*--------------------------------------------------------------------------*/ TEST_EXIT(basename,"no base name specified\n"); TEST_EXIT(strlen(basename) < (unsigned int) 2047, "can only handle filenames up to 2047 characters\n"); /*--------------------------------------------------------------------------*/ /* Open the files. A .neigh file is not necessary. */ /*--------------------------------------------------------------------------*/ snprintf(node_name, 2048, "%s.node", basename); TEST_EXIT((node_file=fopen(node_name,"r")), "cannot open file '%s'\n", node_name); snprintf(ele_name, 2048, "%s.ele", basename); TEST_EXIT((ele_file=fopen(ele_name,"r")), "cannot open file '%s'\n", ele_name); snprintf(neigh_name, 2048, "%s.neigh", basename); neigh_file = fopen(neigh_name, "r"); /*--------------------------------------------------------------------------*/ /* Start reading the .node file. */ /*--------------------------------------------------------------------------*/ /* Number of vertices: */ TEST_EXIT(fscanf(node_file, "%d", &nv) == 1, "node file '%s': can not read number of vertices correctly\n", node_name); TEST_EXIT(nv > 0, "node file '%s': number of vertices = %d must be bigger than 0\n", node_name, nv); /* Dimension of the triangulation, always 2 since this is Triangle :-P */ TEST_EXIT(fscanf(node_file, "%d", &dim) == 1, "node file '%s': can not read dim correctly\n", node_name); TEST_EXIT(dim <= DIM_OF_WORLD, "node file '%s': dimension = %d > DIM_OF_WORLD = %d\n", node_name, dim, DIM_OF_WORLD); TEST_EXIT(dim == 2, "node file '%s': weird dimension %d, should be 2\n", node_name, dim); /* Number of node attributes, not used at the moment: */ TEST_EXIT(fscanf(node_file, "%d", &n_node_attr) == 1, "node file '%s': can not read number of node attributes correctly\n", node_name); /* Number of boundary markers: */ TEST_EXIT(fscanf(node_file, "%d", &n_bound) == 1, "node file '%s': can not read number of boundary markers correctly\n", node_name); if(n_bound) bound_vec = MEM_ALLOC(nv, S_CHAR); /*--------------------------------------------------------------------------*/ /* Start reading the .ele file. */ /*--------------------------------------------------------------------------*/ /* Number of triangles: */ TEST_EXIT(fscanf(ele_file, "%d", &ne) == 1, "ele file '%s': can not read number of triangles correctly\n", ele_name); TEST_EXIT(ne > 0, "ele file '%s': number of elements = %d must be bigger than 0\n", ele_name, ne); /* Number of nodes per triangle, only 3 supported: */ TEST_EXIT(fscanf(ele_file, "%d", &i_tmp) == 1, "ele file '%s': can not read number of nodes per triangle\n", ele_name); TEST_EXIT(i_tmp == 3, "ele file '%s': only three nodes per triangle supported\n", ele_name); /* Number of element attributes, not used at the moment: */ TEST_EXIT(fscanf(ele_file, "%d", &n_ele_attr) == 1, "ele file '%s': can not read number of element attributes correctly\n", ele_name); /*--------------------------------------------------------------------------*/ /* Start reading the .neigh file. */ /*--------------------------------------------------------------------------*/ if(neigh_file) { /* Number of triangles, just to check: */ TEST_EXIT(fscanf(neigh_file, "%d", &i_tmp) == 1, "neigh file '%s': can not read number of triangles correctly\n", neigh_name); TEST_EXIT(ne == i_tmp, "neigh file '%s': number of elements = %d must be bigger than 0\n", ele_name, ne); /* Number of neighbors per triangle, must be 3: */ TEST_EXIT(fscanf(neigh_file, "%d", &i_tmp) == 1, "neigh file '%s': can not read number of neighbors per triangle\n", neigh_name); TEST_EXIT(i_tmp == 3, "neigh file '%s': only three neighbors per triangle supported\n", neigh_name); } /*--------------------------------------------------------------------------*/ /* Allocate a MACRO_DATA structure. */ /*--------------------------------------------------------------------------*/ macro_data = alloc_macro_data(dim, nv, ne, (neigh_file ? FILL_NEIGH : 0)|(n_bound ? FILL_BOUND : 0)); /*--------------------------------------------------------------------------*/ /* Now read the vertex data. */ /*--------------------------------------------------------------------------*/ for (i = 0; i < nv; i++) { /* Take care of the node index. */ TEST_EXIT(fscanf(node_file, "%d", &i_tmp) == 1, "node file '%s': can not read node index for node %d\n", node_name, i); TEST_EXIT(i_tmp == i+1, "node file '%s': node index must start with 1 and be consecutive, read %d for node %d\n", node_name, i_tmp, i); /* Now read node coordinates. Add a 0.0 for DIM_OF_WORLD==3 */ TEST_EXIT(fscanf(node_file, "%lf", &d_tmp) == 1, "node file '%s': error while reading coordinate 0 of element %d\n", node_name, i); macro_data->coords[i][0] = d_tmp; TEST_EXIT(fscanf(node_file, "%lf", &d_tmp) == 1, "node file '%s': error while reading coordinate 1 of element %d\n", node_name, i); macro_data->coords[i][1] = d_tmp; #if DIM_OF_WORLD == 3 macro_data->coords[i][2] = 0.0; #endif /* Skip the node attributes. */ for(j = 0; j < n_node_attr; j++) TEST_EXIT(fscanf(node_file, "%lf", &d_tmp) == 1, "node file '%s': can not read attribute no. %d of %d on node %d\n", node_name, j, n_node_attr, i); /* Fill the boundary vector. */ if(n_bound) { TEST_EXIT(fscanf(node_file, "%d", &i_tmp) == 1, "node file '%s': can not read boundary type for node %d\n", node_name, i); bound_vec[i] = (S_CHAR)i_tmp; } } /*--------------------------------------------------------------------------*/ /* Read the element data. */ /*--------------------------------------------------------------------------*/ for (i = 0; i < ne; i++) { /* Take care of the element index. */ TEST_EXIT(fscanf(ele_file, "%d", &i_tmp) == 1, "ele file '%s': can not read element index for element %d\n", ele_name, i); TEST_EXIT(i_tmp == i+1, "ele file '%s': element index must start with 1 and be consecutive, read %d for element %d\n", ele_name, i_tmp, i); /* Now read the vertex indices. */ TEST_EXIT(read_indices(ele_file, ind), "file %s: can not read vertex indices of element %d\n", ele_name, i); for (j = 0; j < N_VERTICES_2D; j++) macro_data->mel_vertices[VERT_IND(i,j)] = ind[j] - 1; /* Skip the element attributes. */ for(j = 0; j < n_ele_attr; j++) TEST_EXIT(fscanf(ele_file, "%lf", &d_tmp) == 1, "ele file '%s': can not read attribute no. %d of %d on element %d\n", ele_name, j, n_ele_attr, i); } /*--------------------------------------------------------------------------*/ /* Fill neighbor information if present. */ /*--------------------------------------------------------------------------*/ if(neigh_file) { for (i = 0; i < ne; i++) { /* Again, check the element index. */ TEST_EXIT(fscanf(neigh_file, "%d", &i_tmp) == 1, "neigh file '%s': can not read element index for element %d\n", neigh_name, i); TEST_EXIT(i_tmp == i+1, "neigh file '%s': element index must start with 1 and be consecutive, read %d for element %d\n", neigh_name, i_tmp, i); /* Now read the neighbors. */ TEST_EXIT(read_indices(neigh_file, ind), "neigh file %s: can not read neighbour info of element %d\n", neigh_name, i); for(j = 0; j < N_NEIGH_2D; j++) { if(ind[j] == -1) macro_data->neigh[NEIGH_IND(i,j)] = ind[j]; else macro_data->neigh[NEIGH_IND(i,j)] = ind[j] - 1; } } } else /* or compute neighbors ourselves */ compute_neigh_fast(macro_data); /*--------------------------------------------------------------------------*/ /* Sort the boundary data into the macro_data->boundary array. */ /*--------------------------------------------------------------------------*/ if(n_bound) { for (i = 0; i < ne; i++) { for(j = 0; j < N_NEIGH_2D; j++) { ind[0] = macro_data->mel_vertices[VERT_IND(i,(j+1)%3)]; ind[1] = macro_data->mel_vertices[VERT_IND(i,(j+2)%3)]; if(macro_data->neigh[NEIGH_IND(i,j)] == -1) { macro_data->boundary[NEIGH_IND(i,j)] = MIN(bound_vec[ind[0]], bound_vec[ind[1]]); } } } } else /* or provide a default Dirichlet boundary */ dirichlet_boundary(macro_data); /*--------------------------------------------------------------------------*/ /* Adjust the local numbering of nodes, so that the longest edge will be */ /* the 0-1 edge. */ /*--------------------------------------------------------------------------*/ for (i = 0; i < ne; i++) { max_norm = 0.0; for (j = 0; j < N_NEIGH_2D; j++) { ind[0] = macro_data->mel_vertices[VERT_IND(i,(j+0)%3)]; ind[1] = macro_data->mel_vertices[VERT_IND(i,(j+1)%3)]; d_tmp = DIST_DOW(macro_data->coords[ind[0]], macro_data->coords[ind[1]]); if(d_tmp > max_norm) { max_norm = d_tmp; longest_edge = j; } } if(longest_edge != 0) { for (j = 0; j < N_VERTICES_2D; j++) ind[j] = macro_data->mel_vertices[VERT_IND(i,j)]; for (j = 0; j < N_VERTICES_2D; j++) macro_data->mel_vertices[VERT_IND(i, j)] = ind[(j+longest_edge)%3]; for (j = 0; j < N_NEIGH_2D; j++) ind[j] = (int)macro_data->boundary[NEIGH_IND(i,j)]; for (j = 0; j < N_NEIGH_2D; j++) macro_data->boundary[NEIGH_IND(i,j)] = (S_CHAR)ind[(j+longest_edge)%3]; for (j = 0; j < N_NEIGH_2D; j++) ind[j] = macro_data->neigh[NEIGH_IND(i,j)]; for (j = 0; j < N_NEIGH_2D; j++) macro_data->neigh[NEIGH_IND(i,j)] = ind[(j+longest_edge)%3]; } } /*--------------------------------------------------------------------------*/ /* Finally, clean up. */ /*--------------------------------------------------------------------------*/ if(n_bound) MEM_FREE(bound_vec, nv, S_CHAR); fclose(ele_file); fclose(node_file); if(neigh_file) fclose(neigh_file); return(macro_data); } /*--------------------------------------------------------------------------*/ /* triangle2macro_data(): Read an ALBERTA macro triangulation from */ /* Triangle files. */ /*--------------------------------------------------------------------------*/ extern MACRO_DATA *triangle2macro_data(const char *basename) { MACRO_DATA *macro_data = nil; char filenew[1024]; macro_data = read_triangle_files(basename); strncpy(filenew, basename, 1024); filenew[1023] = 0; strncat(filenew, ".new", 1024); filenew[1023] = 0; macro_test(macro_data, filenew); return macro_data; } alberta-2.0.1/add_ons/geomview/0000777000042300001440000000000011067147344013361 500000000000000alberta-2.0.1/add_ons/geomview/Makefile.am0000644000042300001440000000222610676724260015336 00000000000000AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 3 ALBERTA_DEBUG = 0 # # Names of the programs to build. # bin_PROGRAMS = alberta2oogl # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # alberta2oogl_SOURCES = alberta2oogl.c # # linker flags and libraries for all programs # alberta2oogl_LDADD = $(ALBERTA_LIBS_3) alberta2oogl_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_3) alberta2oogl_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) \ -DDIM=1/0 # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ $(EXTRA_INC) alberta-2.0.1/add_ons/geomview/Makefile.in0000644000042300001440000004257611067146145015356 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = alberta2oogl$(EXEEXT) subdir = add_ons/geomview DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_alberta2oogl_OBJECTS = alberta2oogl.$(OBJEXT) alberta2oogl_OBJECTS = $(am_alberta2oogl_OBJECTS) am__DEPENDENCIES_1 = alberta2oogl_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta2oogl_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(alberta2oogl_SOURCES) DIST_SOURCES = $(alberta2oogl_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) \ -DDIM=1/0 DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 3 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # alberta2oogl_SOURCES = alberta2oogl.c # # linker flags and libraries for all programs # alberta2oogl_LDADD = $(ALBERTA_LIBS_3) alberta2oogl_DEPENDENCIES = # otherwise automake emits a dependency alberta2oogl_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ $(EXTRA_INC) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/geomview/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/geomview/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done alberta2oogl$(EXEEXT): $(alberta2oogl_OBJECTS) $(alberta2oogl_DEPENDENCIES) @rm -f alberta2oogl$(EXEEXT) $(alberta2oogl_LINK) $(alberta2oogl_OBJECTS) $(alberta2oogl_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta2oogl.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # on $(ALBERTA_LIBS_3) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/geomview/alberta2oogl.c0000644000042300001440000001527310676724260016031 00000000000000/* author: Claus-Justus Heine * * Institut f"ur Angewandte Mathematik * Albert-Ludwigs-Universit"at Freiburg * Hermann-Herder-Str. 10 * 79104 Freiburg * Germany * * (C) 1998-2005 C.-J. Heine , * 2005 Carsten Eilks . */ /* convert a mesh + coordinate vector to oogl format */ #include #include #include #include #include #if DIM_OF_WORLD != 3 # error Only for parametric surfaces in 2d #endif #define FE_DIM 2 typedef struct { FILE *of; const DOF_ADMIN *admin; DOF_INT_VEC *map[8]; DOF_REAL_VEC *con; REAL con_max; DOF_REAL_D_VEC *coords; unsigned int flags; int v_ind; /* global vertex index */ int n_elem; REAL val_min, val_max, val_fac; } DUMP_EL_DATA; static int verbose; static REAL opt_val_min = HUGE_VAL; static REAL opt_val_max = HUGE_VAL; /* count vertices and create dof->vertex number mapping */ static void count_vertices(const EL_INFO *elinfo, DUMP_EL_DATA *data) { int n0 = data->admin->n0_dof[VERTEX]; DOF dof; int i; data->n_elem ++; /* if (data->flags & ERROR_COLORS) { value = get_el_est(elinfo->el); data->val_min = MIN(data->val_min, value); data->val_max = MAX(data->val_max, value); } */ for (i = 0; i < N_VERTICES(FE_DIM); i++) { dof = elinfo->el->dof[i][n0]; if (data->map[0]->vec[dof] == -1) { data->v_ind ++; } } for (i = 0; i < N_VERTICES(FE_DIM); i++) { dof = elinfo->el->dof[i][n0]; if (data->map[0]->vec[dof] == -1) { data->map[0]->vec[dof] = 1; } } } /* count vertices and create dof->vertex number mapping */ static void dump_vertices(const EL_INFO *elinfo, DUMP_EL_DATA *data) { int n0 = data->admin->n0_dof[VERTEX]; DOF dof; int i; for (i = 0; i < N_VERTICES(FE_DIM); i++) { dof = elinfo->el->dof[i][n0]; if (data->map[0]->vec[dof] == -1) { data->map[0]->vec[dof] = data->v_ind ++; fprintf(data->of, "%e %e %e\n", data->coords->vec[dof][0], data->coords->vec[dof][1], data->coords->vec[dof][2]); } } } static REAL get_con_value(const EL_INFO *el_info,DOF_REAL_VEC *con,REAL con_max) { const DOF *dof=con->fe_space->bas_fcts->get_dof_indices(el_info->el,con->fe_space->admin,nil); return (con->vec[dof[0]]+con->vec[dof[1]]+con->vec[dof[2]]+3*con_max)/(6*con_max); } static void dump_elements(const EL_INFO *elinfo, DUMP_EL_DATA *data) { int n0 = data->admin->n0_dof[VERTEX]; DOF **dof = elinfo->el->dof; REAL vv; fprintf(data->of, "3 %d %d %d", data->map[0]->vec[dof[0][n0]], data->map[0]->vec[dof[1][n0]], data->map[0]->vec[dof[2][n0]]); if(data->con) { vv=get_con_value(elinfo,data->con,data->con_max); fprintf(data->of, "% f %f %f", vv, 4.0*vv*(1.0 -vv), 1.0 - vv); } fprintf(data->of, "\n"); } void mesh2oogl(FILE *of, MESH *mesh, DOF_REAL_D_VEC *coords, DOF_REAL_VEC *con, unsigned int flags) { DUMP_EL_DATA data; unsigned int i; TRAVERSE_STACK *stack = get_traverse_stack(); const EL_INFO *el_info; for (i = 0; i < 8; i++) { if ((flags & i) == i) { data.map[i] = get_dof_int_vec("index map", coords->fe_space); FOR_ALL_DOFS(coords->fe_space->admin, data.map[i]->vec[dof] = -1); } } data.of = of; data.admin = coords->fe_space->admin; data.coords = coords; data.con=con; data.con_max=0.0; FOR_ALL_DOFS(con->fe_space->admin, data.con_max = MAX(data.con_max, fabs(con->vec[dof]))) data.flags = flags; data.v_ind = 0; data.n_elem = 0; if (finite(opt_val_min) && finite(opt_val_max)) { data.val_max = opt_val_max; data.val_min = opt_val_min; } else { data.val_max = -(data.val_min = 1.0E20); } el_info = traverse_first(stack,mesh, -1,CALL_LEAF_EL|FILL_BOUND); while (el_info) { count_vertices(el_info,&data); el_info=traverse_next(stack,el_info); } FOR_ALL_DOFS(coords->fe_space->admin, data.map[0]->vec[dof] = -1); fprintf(of, "OFF\n"); fprintf(of, "%d %d %d\n", data.v_ind, data.n_elem, -1); data.v_ind = 0; el_info = traverse_first(stack,mesh, -1,CALL_LEAF_EL|FILL_BOUND); while (el_info) { dump_vertices(el_info,&data); el_info=traverse_next(stack,el_info); } /* dump the elements. Only vertex dofs are used */ el_info = traverse_first(stack,mesh, -1,CALL_LEAF_EL|FILL_BOUND|FILL_COORDS); while (el_info) { dump_elements(el_info,&data); el_info=traverse_next(stack,el_info); } free_traverse_stack(stack); } static void update_data_d(MESH *mesh, DOF_REAL_D_VEC *foo) { /* nothing */ } void (*update_data_d_hook)(MESH *mesh, DOF_REAL_D_VEC *uh) = update_data_d; void usage(void) { fprintf(stderr, "albert2oogl " "--mesh|-m MESH --coords|-c COORDS --real_vec|-s REAL_VEC\n" " [--out-file|-o OUTFILE] [--function-bounds|b MIN:MAX\n" " [--verbose|-v]\n"); } static const struct option long_options[] = { { "coords", 1, 0, 'c' }, { "mesh", 1, 0, 'm' }, { "real_vec", 1, 0, 's'}, { "out-file", 1, 0, 'o' }, { "function-bounds", 1, 0, 'b' }, { "verbose", 0, 0, 'v' }, { NULL, 0, 0, 0 } }; const char *short_options = "b:c:sm:o:v"; extern void *xmalloc(size_t size); int main(int argc, char *argv[]) { const char *mesh_file = NULL; const char *coords_file = NULL; const char *kon_file = NULL; const char *out_file = NULL; MESH *mesh = NULL; DOF_REAL_D_VEC *coords = NULL; DOF_REAL_VEC *con=NULL; FILE *of = NULL; unsigned int flags = 0x0; /* sigfpe_init(); */ while (1) { int c = getopt_long(argc, argv, short_options, long_options, NULL); if (c == -1) { break; } switch (c) { case 'b': sscanf(optarg, "%lf:%lf", &opt_val_min, &opt_val_max); break; case 'v': verbose ++; break; case 'o': out_file = optarg; break; case 'm': mesh_file = optarg; break; case 'c': coords_file = optarg; break; case 's': kon_file = optarg; break; default: usage(); exit(1); break; } } if (out_file != NULL) { if (!(of = fopen(out_file, "w"))) { ERROR_EXIT("Couldn't open info file %s because of %s", out_file, strerror(errno)); } } else { of = stdout; } if (mesh_file == NULL || coords_file == NULL) { usage(); exit(1); } mesh = read_mesh(mesh_file, NULL, NULL); coords = read_dof_real_d_vec(coords_file, mesh, NULL); if(kon_file) { con=read_dof_real_vec(kon_file,mesh,NULL); } mesh2oogl(of, mesh, coords,con, flags); if (out_file != NULL) { if (fclose(of) != 0) { ERROR_EXIT("Couldn't close info file %s because of %s", out_file, strerror(errno)); } } return 0; } alberta-2.0.1/add_ons/grape/0000777000042300001440000000000011067147344012635 500000000000000alberta-2.0.1/add_ons/grape/Makefile.am0000644000042300001440000000001610676723611014604 00000000000000SUBDIRS = meshalberta-2.0.1/add_ons/grape/Makefile.in0000644000042300001440000004065011067146146014622 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = add_ons/grape DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = mesh all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/grape/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/grape/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/grape/mesh/0000777000042300001440000000000011067147344013571 500000000000000alberta-2.0.1/add_ons/grape/mesh/Makefile.am0000644000042300001440000000031610676724261015545 00000000000000SUBDIRS = if ALBERTA_2 SUBDIRS += 2d endif if ALBERTA_3 SUBDIRS += 3d endif dist-hook: @echo Copying Common/ to $(distdir) mkdir -p $(distdir)/Common cp -pR $(srcdir)/Common/*.[ch] $(distdir)/Common/ alberta-2.0.1/add_ons/grape/mesh/Makefile.in0000644000042300001440000004137211067146146015560 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ALBERTA_2_TRUE@am__append_1 = 2d @ALBERTA_3_TRUE@am__append_2 = 3d subdir = add_ons/grape/mesh DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = 2d 3d DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(am__append_1) $(am__append_2) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/grape/mesh/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/grape/mesh/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am dist-hook: @echo Copying Common/ to $(distdir) mkdir -p $(distdir)/Common cp -pR $(srcdir)/Common/*.[ch] $(distdir)/Common/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/grape/mesh/2d/0000777000042300001440000000000011067147344014076 500000000000000alberta-2.0.1/add_ons/grape/mesh/2d/Makefile.am0000644000042300001440000000505710701404614016043 00000000000000AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of elements and surrounding world (DIM != DIM_OF_WORLD e.g. for # parametric FE) # DIM_OF_WORLD = 2 ALBERTA_DEBUG = 0 # # Names of the programs to build. # bin_PROGRAMS = alberta_grape22 alberta_movi22 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_grape22_SOURCES = alberta_grape.c mesh_interface_common.h alberta_grape22_SOURCES = mesh_interface.c nodist_alberta_movi22_SOURCES = \ alberta_movi.c tsc_timebar.c mesh_interface_common.h alberta_movi22_SOURCES = mesh_interface.c # # linker flags and libraries for all programs # # # NOTE: GRAPE must come _before_ ALBERTA_LIBS... Caused by # GRAPE/gltools symbol-name clash # alberta_grape22_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_2) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_grape22_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_2) alberta_grape22_LDFLAGS = $(LDFLAGS) \ -R $(ALBERTA_LIB_PATH) \ -R $(GRAPE_LIB_PATH) \ -R $(ALBERTA_LIB_PATH) # # unluckily, automake-1.6 has problems with this construct # # alberta_movi22_LDADD = $(ALBERTA_LIBS_$(DIM)$(DIM_OF_WORLD)) $(GRAPE_LIB) alberta_movi22_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_2) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_movi22_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_2) alberta_movi22_LDFLAGS = $(LDFLAGS) \ -R $(ALBERTA_LIB_PATH) \ -R $(GRAPE_LIB_PATH) \ -R $(ALBERTA_LIB_PATH) # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DFE_DIM=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@GRAPE_INCLUDE_PATH@ \ -I@GNUCOMPAT_INCLUDE_PATH@ \ $(EXTRA_INC) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common # # Let "make dist" include our precious macro triangulations # EXTRA_DIST = $(wildcard Macro/macro.*) $(wildcard INIT/*.dat) alberta-2.0.1/add_ons/grape/mesh/2d/Makefile.in0000644000042300001440000004732611067146146016072 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = alberta_grape22$(EXEEXT) alberta_movi22$(EXEEXT) subdir = add_ons/grape/mesh/2d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_alberta_grape22_OBJECTS = mesh_interface.$(OBJEXT) nodist_alberta_grape22_OBJECTS = alberta_grape.$(OBJEXT) alberta_grape22_OBJECTS = $(am_alberta_grape22_OBJECTS) \ $(nodist_alberta_grape22_OBJECTS) am__DEPENDENCIES_1 = alberta_grape22_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_grape22_LDFLAGS) $(LDFLAGS) -o $@ am_alberta_movi22_OBJECTS = mesh_interface.$(OBJEXT) nodist_alberta_movi22_OBJECTS = alberta_movi.$(OBJEXT) \ tsc_timebar.$(OBJEXT) alberta_movi22_OBJECTS = $(am_alberta_movi22_OBJECTS) \ $(nodist_alberta_movi22_OBJECTS) alberta_movi22_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_movi22_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(alberta_grape22_SOURCES) $(nodist_alberta_grape22_SOURCES) \ $(alberta_movi22_SOURCES) $(nodist_alberta_movi22_SOURCES) DIST_SOURCES = $(alberta_grape22_SOURCES) $(alberta_movi22_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DFE_DIM=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of elements and surrounding world (DIM != DIM_OF_WORLD e.g. for # parametric FE) # DIM_OF_WORLD = 2 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_grape22_SOURCES = alberta_grape.c mesh_interface_common.h alberta_grape22_SOURCES = mesh_interface.c nodist_alberta_movi22_SOURCES = \ alberta_movi.c tsc_timebar.c mesh_interface_common.h alberta_movi22_SOURCES = mesh_interface.c # # linker flags and libraries for all programs # # # NOTE: GRAPE must come _before_ ALBERTA_LIBS... Caused by # GRAPE/gltools symbol-name clash # alberta_grape22_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_2) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_grape22_DEPENDENCIES = # otherwise automake emits a dependency alberta_grape22_LDFLAGS = $(LDFLAGS) \ -R $(ALBERTA_LIB_PATH) \ -R $(GRAPE_LIB_PATH) \ -R $(ALBERTA_LIB_PATH) # # unluckily, automake-1.6 has problems with this construct # # alberta_movi22_LDADD = $(ALBERTA_LIBS_$(DIM)$(DIM_OF_WORLD)) $(GRAPE_LIB) alberta_movi22_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_2) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_movi22_DEPENDENCIES = # otherwise automake emits a dependency alberta_movi22_LDFLAGS = $(LDFLAGS) \ -R $(ALBERTA_LIB_PATH) \ -R $(GRAPE_LIB_PATH) \ -R $(ALBERTA_LIB_PATH) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@GRAPE_INCLUDE_PATH@ \ -I@GNUCOMPAT_INCLUDE_PATH@ \ $(EXTRA_INC) # # Let "make dist" include our precious macro triangulations # EXTRA_DIST = $(wildcard Macro/macro.*) $(wildcard INIT/*.dat) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/grape/mesh/2d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/grape/mesh/2d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done alberta_grape22$(EXEEXT): $(alberta_grape22_OBJECTS) $(alberta_grape22_DEPENDENCIES) @rm -f alberta_grape22$(EXEEXT) $(alberta_grape22_LINK) $(alberta_grape22_OBJECTS) $(alberta_grape22_LDADD) $(LIBS) alberta_movi22$(EXEEXT): $(alberta_movi22_OBJECTS) $(alberta_movi22_DEPENDENCIES) @rm -f alberta_movi22$(EXEEXT) $(alberta_movi22_LINK) $(alberta_movi22_OBJECTS) $(alberta_movi22_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_grape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_movi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesh_interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsc_timebar.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # on $(ALBERTA_LIBS_2) # on $(ALBERTA_LIBS_2) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/grape/mesh/2d/mesh_interface.c0000644000042300001440000001074210676724261017142 00000000000000#include #undef REFINE #undef COARSE #include "alberta.h" #ifndef G_CONST #define G_CONST #endif #if ADD_Z static float z(float x, float y) { #if 0 return(0.0); #endif #if 1 return(sin(x)+sin(y)); #endif } #endif /****************************************************************************/ /* Grape definitions for triangles */ /****************************************************************************/ static G_CONST double t_c_0[3] = {1., 0., 0.}, t_c_1[3] = {0., 1., 0.}; static G_CONST double t_c_2[3] = {0., 0., 1.}; static G_CONST double *tria_coord[3] = {t_c_0,t_c_1,t_c_2}; /****************************************************************************/ /* transformations between local and global coordinates */ /****************************************************************************/ static int tria_check_inside(ELEMENT2D *el, double G_CONST *coord) { if (coord[0] < 0.0) return(0); else if (coord[1] < 0.0) return(1); else if (coord[2] < 0.0) return(2); else return(INSIDE); } /****************************************************************************/ static int tria_world_to_coord(ELEMENT2D *el, double G_CONST *xyz, double *coord) { FUNCNAME("tria_world_to_coord"); EL_INFO *el_info; MATRIX22 a; VEC2 b; int i,j; ASSURE(el, "no element", return(-2)); ASSURE(el_info = (EL_INFO *)el->user_data, "no EL_INFO", return(-2)); TEST_FLAG(FILL_COORDS, el_info); /* compute the barycentric coordinates of point xyx */ /* by solving the linear system: ( x0-x2 x1-x2 ) ( coord[0] ) = ( x - x2) ( y0-y2 y1-y2 ) ( coord[1] ) = ( y - y2) coord[2] : = 1 - coord[0] - coord[1] */ for (i=0; i<2; i++) for (j=0; j<2; j++) a[j][i] = el->vertex[i][j] - el->vertex[2][j]; for (j=0; j<2; j++) b[j] = xyz[j] - el->vertex[2][j]; if(!g_solve2((void *) a, b, coord)){ printf("ERROR in g_solve2()\n"); return(-2); } coord[2] = 1.0 - coord[0] - coord[1]; return(tria_check_inside(el,coord)); } /****************************************************************************/ static void tria_coord_to_world(ELEMENT2D *el, double G_CONST *coord, double *world) { FUNCNAME("tria_coord_to_world"); EL_INFO *elinfo = (EL_INFO *)(el->user_data); TEST_FLAG(FILL_COORDS, elinfo); world[0] = coord[0] * elinfo->coord[0][0] + coord[1] * elinfo->coord[1][0] + coord[2] * elinfo->coord[2][0] ; world[1] = coord[0] * elinfo->coord[0][1] + coord[1] * elinfo->coord[1][1] + coord[2] * elinfo->coord[2][1] ; #if DIM_OF_WORLD > 2 world[2] = coord[0] * elinfo->coord[0][2] + coord[1] * elinfo->coord[1][2] + coord[2] * elinfo->coord[2][2] ; #else #if ADD_Z world[2] = z(world[0],world[1]); #endif #endif return; } /****************************************************************************/ static ELEMENT2D *tria_neighbour(ELEMENT2D *el, int pn, int ii, double *coord, double *xyz, MESH_ELEMENT_FLAGS flags) { FUNCNAME("tria_neighbour"); MSG("not yet implemented\n"); /* traverse_neighbour(...); */ return(nil); } /****************************************************************************/ static int tria_boundary(ELEMENT2D *el, int pn) { FUNCNAME("tria_boundary"); EL_INFO *elinfo = (EL_INFO *)(el->user_data); ASSURE(el, "tria_boundary: no element", return(-2)); ASSURE(elinfo, "tria_boundary: no EL_INFO", return(-2)); TEST_FLAG(FILL_BOUND, elinfo); return elinfo->edge_bound[(pn+2)%3]; } /****************************************************************************/ /****************************************************************************/ static ELEMENT2D_DESCRIPTION tria_description = { 0, /* dindex. cH: offset into a C-style array. Keep it at zero */ 3, /* number_of_vertices */ 3, /* dimension_of_coord */ tria_coord, 1, /* parametric_degree */ tria_world_to_coord, tria_coord_to_world, tria_check_inside, tria_neighbour, tria_boundary }; /****************************************************************************/ /* common routines for triangles and tetrahedra */ /* including typedefs for: GRAPE_ELEMENT, GRAPE_MESH, F_EL_INFO, F_DATA */ /****************************************************************************/ #include "../Common/mesh_interface_common.c" /****************************************************************************/ alberta-2.0.1/add_ons/grape/mesh/3d/0000777000042300001440000000000011067147344014077 500000000000000alberta-2.0.1/add_ons/grape/mesh/3d/Makefile.am0000644000042300001440000000473410701404615016046 00000000000000AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of elements and surrounding world (DIM != DIM_OF_WORLD e.g. for # parametric FE) # DIM_OF_WORLD = 3 ALBERTA_DEBUG = 0 # # Names of the programs to build. # bin_PROGRAMS = alberta_grape33 alberta_movi33 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. Some sources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_grape33_SOURCES = alberta_grape.c mesh_interface_common.h alberta_grape33_SOURCES = mesh_interface.c nodist_alberta_movi33_SOURCES = alberta_movi.c tsc_timebar.c \ mesh_interface_common.h alberta_movi33_SOURCES = mesh_interface.c # # linker flags and libraries for all programs # alberta_grape33_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_3) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_grape33_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_$(DIM)$(DIM_OF_WORLD)) alberta_grape33_LDFLAGS = $(LDFLAGS) \ -R $(ALBERTA_LIB_PATH) \ -R $(GRAPE_LIB_PATH) \ -R $(ALBERTA_LIB_PATH) # # NOTE: GRAPE must come _before_ ALBERTA_LIBS... Caused by # GRAPE/gltools symbol-name clash # alberta_movi33_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_3) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_movi33_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_3) alberta_movi33_LDFLAGS = $(LDFLAGS) \ -rpath $(ALBERTA_LIB_PATH) \ -rpath $(GRAPE_LIB_PATH) \ -rpath $(ALBERTA_LIB_PATH) # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ # # Defines. @...@ is substituded by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DFE_DIM=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@GRAPE_INCLUDE_PATH@ \ -I@GNUCOMPAT_INCLUDE_PATH@ \ $(EXTRA_INC) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common # # Let "make dist" include our precious macro triangulations # EXTRA_DIST = $(wildcard Macro/macro.*) $(wildcard INIT/*.dat)alberta-2.0.1/add_ons/grape/mesh/3d/Makefile.in0000644000042300001440000004720611067146146016070 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = alberta_grape33$(EXEEXT) alberta_movi33$(EXEEXT) subdir = add_ons/grape/mesh/3d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_alberta_grape33_OBJECTS = mesh_interface.$(OBJEXT) nodist_alberta_grape33_OBJECTS = alberta_grape.$(OBJEXT) alberta_grape33_OBJECTS = $(am_alberta_grape33_OBJECTS) \ $(nodist_alberta_grape33_OBJECTS) am__DEPENDENCIES_1 = alberta_grape33_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_grape33_LDFLAGS) $(LDFLAGS) -o $@ am_alberta_movi33_OBJECTS = mesh_interface.$(OBJEXT) nodist_alberta_movi33_OBJECTS = alberta_movi.$(OBJEXT) \ tsc_timebar.$(OBJEXT) alberta_movi33_OBJECTS = $(am_alberta_movi33_OBJECTS) \ $(nodist_alberta_movi33_OBJECTS) alberta_movi33_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_movi33_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(alberta_grape33_SOURCES) $(nodist_alberta_grape33_SOURCES) \ $(alberta_movi33_SOURCES) $(nodist_alberta_movi33_SOURCES) DIST_SOURCES = $(alberta_grape33_SOURCES) $(alberta_movi33_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ # # Defines. @...@ is substituded by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DFE_DIM=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of elements and surrounding world (DIM != DIM_OF_WORLD e.g. for # parametric FE) # DIM_OF_WORLD = 3 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. Some sources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_grape33_SOURCES = alberta_grape.c mesh_interface_common.h alberta_grape33_SOURCES = mesh_interface.c nodist_alberta_movi33_SOURCES = alberta_movi.c tsc_timebar.c \ mesh_interface_common.h alberta_movi33_SOURCES = mesh_interface.c # # linker flags and libraries for all programs # alberta_grape33_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_3) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_grape33_DEPENDENCIES = # otherwise automake emits a dependency alberta_grape33_LDFLAGS = $(LDFLAGS) \ -R $(ALBERTA_LIB_PATH) \ -R $(GRAPE_LIB_PATH) \ -R $(ALBERTA_LIB_PATH) # # NOTE: GRAPE must come _before_ ALBERTA_LIBS... Caused by # GRAPE/gltools symbol-name clash # alberta_movi33_LDADD = $(GRAPE_ALL_LIB) $(ALBERTA_LIBS_3) \ $(top_builddir)/gnu-compat/libalbertagnucompat.la alberta_movi33_DEPENDENCIES = # otherwise automake emits a dependency alberta_movi33_LDFLAGS = $(LDFLAGS) \ -rpath $(ALBERTA_LIB_PATH) \ -rpath $(GRAPE_LIB_PATH) \ -rpath $(ALBERTA_LIB_PATH) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@GRAPE_INCLUDE_PATH@ \ -I@GNUCOMPAT_INCLUDE_PATH@ \ $(EXTRA_INC) # # Let "make dist" include our precious macro triangulations # EXTRA_DIST = $(wildcard Macro/macro.*) $(wildcard INIT/*.dat) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/grape/mesh/3d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/grape/mesh/3d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done alberta_grape33$(EXEEXT): $(alberta_grape33_OBJECTS) $(alberta_grape33_DEPENDENCIES) @rm -f alberta_grape33$(EXEEXT) $(alberta_grape33_LINK) $(alberta_grape33_OBJECTS) $(alberta_grape33_LDADD) $(LIBS) alberta_movi33$(EXEEXT): $(alberta_movi33_OBJECTS) $(alberta_movi33_DEPENDENCIES) @rm -f alberta_movi33$(EXEEXT) $(alberta_movi33_LINK) $(alberta_movi33_OBJECTS) $(alberta_movi33_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_grape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_movi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesh_interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsc_timebar.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # on $(ALBERTA_LIBS_$(DIM)$(DIM_OF_WORLD)) # on $(ALBERTA_LIBS_3) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/grape/mesh/3d/mesh_interface.c0000644000042300001440000002010710676724261017137 00000000000000/****************************************************************************/ /* ALBERTA: an Adaptive multi Level finite element toolbox using */ /* Bisectioning refinement and Error control by Residual */ /* Techniques */ /* */ /* file: */ /* */ /* */ /* description: */ /* */ /* */ /* history: */ /* */ /* */ /****************************************************************************/ /* */ /* authors: Alfred Schmidt and Kunibert G. Siebert */ /* Institut f"ur Angewandte Mathematik */ /* Albert-Ludwigs-Universit"at Freiburg */ /* Hermann-Herder-Str. 10 */ /* 79104 Freiburg */ /* Germany */ /* */ /* email: alfred,kunibert@mathematik.uni-freiburg.de */ /* */ /* (c) by A. Schmidt and K.G. Siebert (1996,97) */ /* */ /****************************************************************************/ #include #undef REFINE #undef COARSE #include "alberta.h" #ifndef G_CONST #define G_CONST #endif /****************************************************************************/ /* transformations between local and global coordinates */ /****************************************************************************/ static int tetra_check_inside(ELEMENT3D *el, double *coord) { int i, iret = -1; double cmin = -1.0E-5; for (i=0; i<4; i++) if (coord[i] < cmin) { cmin = coord[i]; iret = i; } return(iret); } /****************************************************************************/ static int tetra_world_to_coord(ELEMENT3D *el, const double *xyz, double *coord) { FUNCNAME("tetra_world_to_coord"); EL_INFO *el_info; double a[3][3],b[3]; int i,j; ASSURE(el, "tetra_coord_to_world: no element", return(0)); ASSURE(el_info = (EL_INFO *)el->user_data, "tetra_coord_to_world: no EL_INFO", return(0)); TEST_FLAG(FILL_COORDS, el_info); /* compute the barycentric coordinates of Point */ /* by solving the linear system: ( x0-x3 x1-x3 x2-x3 ) ( coord[0] ) = ( x - x3) ( y0-y3 y1-y3 y2-y3 ) ( coord[1] ) = ( y - y3) ( z0-z3 z1-z3 z2-z3 ) ( coord[2] ) = ( z - z3) coord[3] : = 1 - coord[0] - coord[1] - coord[2] */ for (i=0; i<3; i++) for (j=0; j<3; j++) a[j][i] = el->vertex[i][j] - el->vertex[3][j]; for (j=0; j<3; j++) b[j] = xyz[j] - el->vertex[3][j]; if(!g_solve3((void *) a, b, coord)){ printf("tetra_coord_to_world: ERROR\n"); return(-2); } coord[3] = 1. - coord[0] - coord[1] - coord[2]; return(tetra_check_inside(el,coord)); } /****************************************************************************/ static void tetra_coord_to_world(ELEMENT3D *el, const double *coord, double *world) { FUNCNAME("tetra_coord_to_world"); EL_INFO *el_info; int i, j; ASSURE(el, "tetra_coord_to_world: no element", return); ASSURE(el_info = (EL_INFO *)el->user_data, "tetra_coord_to_world: no EL_INFO", return); TEST_FLAG(FILL_COORDS, el_info); #if 0 for (j=0; j<3; j++) world[j] = coord[0] * el->vertex[0][j]; for (i=1; i<4; i++) { for (j=0; j<3; j++) world[j] += coord[i] * el->vertex[i][j]; } #else for (j=0; j<3; j++) world[j] = coord[0] * el_info->coord[0][j]; for (i=1; i<4; i++) { for (j=0; j<3; j++) world[j] += coord[i] * el_info->coord[i][j]; } #endif return; } /****************************************************************************/ /* Neighbours and Boundaries */ /****************************************************************************/ static ELEMENT3D *tetra_neighbour(ELEMENT3D *el, int pn, int ii, double *coord, double *xyz, MESH_ELEMENT_FLAGS flags) { FUNCNAME("tetra_neighbour"); MSG("not yet implemented\n"); /* traverse_neighbour(...); */ return(nil); } /****************************************************************************/ static int tetra_boundary(ELEMENT3D *el, int pn) { FUNCNAME("tetra_boundary"); EL_INFO *el_info; ASSURE(el, "tetra_boundary: no element", return(-2)); ASSURE(el_info = (EL_INFO *)el->user_data, "tetra_boundary: no EL_INFO", return(-2)); TEST_FLAG(FILL_BOUND, el_info); return el_info->face_bound[pn]; } /****************************************************************************/ /* Grape definitons for tetrahedra */ /****************************************************************************/ /* vertex indices of the polygons for a tetrahedron */ static int t_v0_e[3] = {1,3,2}, t_v1_e[3] = {0,2,3}; static int t_v2_e[3] = {0,3,1}, t_v3_e[3] = {0,1,2}; /* polygon adjacencies for a tetrahedron */ static int t_p0_e[3] = {2,1,3}, t_p1_e[3] = {3,0,2}; static int t_p2_e[3] = {1,0,3}, t_p3_e[3] = {2,0,1}; /* local coordinates of the vertices for a tetrahedron */ static double t_c0[4] = {1.,0.,0.,0.}, t_c1[4] = {0.,1.,0.,0.}; static double t_c2[4] = {0.,0.,1.,0.}, t_c3[4] = {0.,0.,0.,1.}; static const int tetra_polygon_length[4] = {3, 3, 3, 3}; static const int *tetra_vertex_e[4] = {t_v0_e,t_v1_e,t_v2_e,t_v3_e}; static const int *tetra_next_polygon_e[4] = {t_p0_e,t_p1_e,t_p2_e,t_p3_e}; static const double *tetra_coord[4] = {t_c0,t_c1,t_c2,t_c3}; static ELEMENT3D_DESCRIPTION tetra_description_even = { 0, /* dindex. cH: offset into a C-style array. Keep it at zero */ 4, /* number_of_vertices */ 4, /* number_of_polygons */ tetra_polygon_length, tetra_vertex_e, tetra_next_polygon_e, 4, tetra_coord, 1, tetra_world_to_coord, tetra_coord_to_world, tetra_check_inside, tetra_neighbour, tetra_boundary }; /* vertex indices of the polygons for a tetrahedron */ static int t_v0_o[3] = {1,2,3}, t_v1_o[3] = {0,3,2}; static int t_v2_o[3] = {0,1,3}, t_v3_o[3] = {0,2,1}; /* polygon adjacencies for a tetrahedron */ static int t_p0_o[3] = {3,1,2}, t_p1_o[3] = {2,0,3}; static int t_p2_o[3] = {3,0,1}, t_p3_o[3] = {1,0,2}; static const int *tetra_vertex_o[4] = {t_v0_o,t_v1_o,t_v2_o,t_v3_o}; static const int *tetra_next_polygon_o[4] = {t_p0_o,t_p1_o,t_p2_o,t_p3_o}; static ELEMENT3D_DESCRIPTION tetra_description_odd = { 1, 4, 4, tetra_polygon_length, tetra_vertex_o, tetra_next_polygon_o, 4, tetra_coord, 1, tetra_world_to_coord, tetra_coord_to_world, tetra_check_inside, tetra_neighbour, tetra_boundary }; /****************************************************************************/ /* common routines for triangles and tetrahedra */ /* including typedefs for: GRAPE_ELEMENT, GRAPE_MESH, F_EL_INFO, F_DATA */ /****************************************************************************/ #include "../Common/mesh_interface_common.c" /****************************************************************************/ alberta-2.0.1/add_ons/grape/mesh/Common/0000777000042300001440000000000011067147344015021 500000000000000alberta-2.0.1/add_ons/grape/mesh/Common/alberta_grape.c0000644000042300001440000001713610676724261017705 00000000000000#include #include #include #include #if FE_DIM == 2 typedef HMESH2D GRAPE_MESH; #define Grape_Mesh HMesh2d #else typedef HMESH3D GRAPE_MESH; #define Grape_Mesh HMesh3d #endif extern GRAPE_MESH *setup_grape_mesh(MESH *mesh, char *name); extern void grape_ini_f_data_d(GRAPE_MESH *, DOF_REAL_D_VEC *); extern void grape_ini_f_data(GRAPE_MESH *, DOF_REAL_VEC *); static SCENE *last_scene = nil, *first_scene = nil; static void sc_add(MESH *mesh, DOF_REAL_VEC *drv, DOF_REAL_D_VEC *drdv) { FUNCNAME("sc_add"); const char *name = nil; SCENE *scene; GRAPE_MESH *grape_mesh; TEST_EXIT(mesh,"no mesh ???\n"); TEST_EXIT(FE_DIM==mesh->dim,"Mesh dimension must be %d!\n", FE_DIM); if (drv) name = drv->name; else if (drdv) name = drdv->name; else name = mesh->name; scene = (SCENE *)GRAPE(Scene,"new-instance")(name); if (!first_scene) first_scene = scene; if (last_scene) last_scene->next_scene = scene; last_scene = scene; grape_mesh = setup_grape_mesh(mesh, (char *) mesh->name); if (drdv) grape_ini_f_data_d(grape_mesh, drdv); else if (drv) grape_ini_f_data(grape_mesh, drv); scene->object = (G_SCENE_OBJECT *) grape_mesh; return; } static void sc_graph(SCENE *sc) { if (sc) { MANAGER *mgr; #ifdef GRID_MODE GRAPHICDEVICE *grdev; grdev = (GRAPHICDEVICE *)GRAPE(GraphicDevice,"get-stddev")(); grdev->clear(); if (grdev && (grdev->grid_patch != G_GRID)) { GRAPE(grdev,"grid-patch")(G_GRID); } #endif mgr = (MANAGER *)GRAPE(Manager,"get-stdmgr")(); GRAPE(mgr,"handle")(sc); } } static void print_help(const char *funcName, FILE *f, int status) { fprintf(f, "Usage: %s [-p PATH] [OPTIONS]\n" \ " -m MESH [-s DRV] [-v DRDV] [[-m MESH1] [-s DRV1] [-v DRDV1] ...]\n" \ "\n" \ "Example:\n" \ " %s --mesh=mymesh -s temperature --vector velocity\n" \ " where \"mymesh\", \"temperature\" and \"velocity\" are file-names.\n" \ "\n" \ "If a long option shows an argument as mandatory, then it is mandatory\n" \ "for the equivalent short option also. Similarly for optional arguments.\n" \ "\n" \ "The order of the options _is_ significant in the following cases:\n" \ "`-p PATH' alters the search path for all following data-files.\n" \ "`-m MESH' specifies a new mesh for all following DRVs and DRDVs (see below)\n" \ "\n" \ "Options:\n" \ " -m, --mesh=MESH\n" \ " The file-name of an ALBERTA-mesh gnereated by the ALBERTA\n" \ " library routines `write_mesh()' or `write_mesh_xdr()'\n" \ " `-x' and `-b' options below.\n" \ " This option is mandatory and may not be omitted. This option\n" \ " may be specified multiple times. All following dof-vectors\n" \ " given by the `-s' and `-v' options must belong to the most\n" \ " recently specified mesh.\n" \ " -b, --binary\n" \ " Expect MESH, DRV and DRDV to contain data in host dependent\n" \ " byte-order, generated by `write_SOMETHING()' routines of the\n" \ " ALBERTA library (SOMETHING is `mesh', `dof_real_vec' etc.\n" \ " -x, --xdr\n" \ " This is the default and just mentioned here for completeness.\n" \ " Expect MESH, DRV and DRDV to contain data in network\n" \ " byte-order, generated by `write_SOMETHING_xdr()' routines\n" \ " of the ALBERTA library. Per convention this means big-endian\n" \ " byte-order.\n" \ " -s, --scalar=DRV\n" \ " Load the data-file DRV which must contain a DOF_REAL_VEC\n" \ " dumped to disk by `write_dof_real_vec[_xdr]()'.\n" \ " This option may be specified multiple times. The DOF_REAL_VECs\n" \ " must belong to the most recently specified mesh.\n" \ " See `-m' and `-b' above.\n" \ " -v, --vector=DRDV\n" \ " Load the data-file DRDV which must contain a DOF_REAL_D_VEC\n" \ " dumped to disk by `write_dof_real_d_vec[_xdr]()'.\n" \ " This option may be specified multiple times. The vector\n" \ " must belong to the most recently specified mesh.\n" \ " See `-m' and `-b' above.\n" \ " -p, --path=PATH\n" \ " Specify a path prefix for all following data-files. This option\n" \ " may be specified multiple times. PATH is supposed to be the\n" \ " directory containing all data-files specified by the following\n" \ " `-m', `-s' and `-v' options.\n" \ " -h, --help\n" \ " Print this help.\n", funcName, funcName); exit(status); } static const char *filename(const char *path, const char *fn) { static char name[1024]; if (!fn) return(nil); if (path == nil || path[0] == '\0') { sprintf(name, "./%s", fn); } else { const char *cp = path; while (*cp) cp++; cp--; if (*cp == '/') sprintf(name, "%s%s", path, fn); else sprintf(name, "%s/%s", path, fn); } return((const char *) name); } static struct option long_options[] = { {"help", 0, 0, 'h' }, {"binary", 0, 0, 'b' }, {"xdr", 0, 0, 'x' }, {"path", 1, 0, 'p' }, {"mesh", 1, 0, 'm' }, {"scalar", 1, 0, 's' }, {"vector", 1, 0, 'v' }, { NULL, 0, 0, '\0' } }; int main(int argc, char **argv) { FUNCNAME("main"); MESH *mesh = nil; const char *mesh_path = nil; DOF_REAL_VEC *drv = nil; DOF_REAL_D_VEC *drdv = nil; const char *fn, *path = nil; REAL dummy; int c, option_index; MESH *(*rm)(const char *, REAL *, NODE_PROJECTION *(*)(MESH *, MACRO_EL *, int)); DOF_REAL_VEC *(*rdrv)(const char *, MESH *, FE_SPACE *); DOF_REAL_D_VEC *(*rdrdv)(const char *, MESH *, FE_SPACE *); rm = read_mesh_xdr; rdrv = read_dof_real_vec_xdr; rdrdv = read_dof_real_d_vec_xdr; while (1) { c = getopt_long(argc, argv, "bhm:p:s:v:x", long_options, &option_index); if (c == -1) break; switch (c) { case 'b': rm = read_mesh; rdrv = read_dof_real_vec; rdrdv = read_dof_real_d_vec; break; case 'h': print_help(argv[0], stdout, 0); break; case 'm': mesh_path = optarg; fn = filename(path, mesh_path); MSG("reading mesh `%s'\n", fn); mesh = (*rm)(fn, &dummy, nil); TEST_EXIT(mesh,"could not read mesh `%s'!\n", fn); break; case 'p': path = optarg; break; case 's': if (mesh_path == nil) { ERROR("a mesh has to be given _FIRST_!\n"); print_help(argv[0], stderr, 1); } fn = filename(path, optarg); MSG("reading dof_real_vec `%s'\n", fn); drv = (*rdrv)(fn, mesh, nil); TEST_EXIT(drv,"could not read dof_real_vec `%s'!\n", fn); sc_add(mesh, drv, nil); break; case 'v': if (mesh_path == nil) { ERROR("a mesh has to be given _FIRST_!\n"); print_help(argv[0], stderr, 1); } fn = filename(path, optarg); MSG("reading dof_real_d_vec `%s'\n", fn); drdv = (*rdrdv)(fn, mesh, nil); TEST_EXIT(drdv,"could not read dof_real_d_vec `%s'!\n", fn); sc_add(mesh, nil, drdv); break; case 'x': rm = read_mesh_xdr; rdrv = read_dof_real_vec_xdr; rdrdv = read_dof_real_d_vec_xdr; break; default: print_help(argv[0], stderr, 1); } } if (mesh_path == nil) { ERROR("a mesh has to be given!\n\n"); print_help(argv[0], stderr, 1); } if (!drv && !drdv) { sc_add(mesh, nil, nil); } g_project_add("uif-gm"); if (first_scene) sc_graph(first_scene); return(0); } alberta-2.0.1/add_ons/grape/mesh/Common/alberta_movi.c0000644000042300001440000003433310676724261017557 00000000000000#include #undef REFINE #undef COARSE #include "alberta.h" #include #include typedef struct info INFO; struct info { int vector; /* 0: REAL 1: REAL_D */ char *name; TIMESCENE *tsc; }; #if FE_DIM == 2 typedef HMESH2D GRAPE_MESH; #define Grape_Mesh HMesh2d #else typedef HMESH3D GRAPE_MESH; #define Grape_Mesh HMesh3d #endif static void print_help(const char *funcName, FILE *f, int status) { fprintf(f, "Usage: %s START END [-p PATH] [OPTIONS]\n" \ " -m MESH [-s DRV] [-v DRDV] [[-s DRV1] [-v DRDV1] ...]\n" \ "\n" \ "Example:\n" \ " %s --mesh=mymesh 0 10 -i 5 -s u_h --vector v_h\n" \ "\n" \ " reads grid mesh000000 with scalar function u_h000000 and\n" \ " vector function v_h000000, then mesh000005 with u_h000005 and\n" \ " v_h000005, and finally mesh000010 with u_h000010 and v_h000010\n" \ "\n" \ "If a long option shows an argument as mandatory, then it is mandatory\n" \ "for the equivalent short option also. Similarly for optional arguments.\n" \ "\n" \ "The order of the options is not significant with the exception that the\n" \ "non-option arguments START and END must come _first_.\n" \ "\n" \ "Non-option arguments:\n" \ " START END\n" \ " Two integers specifying the start- and end-scene. The actual\n" \ " file names of the data-files are generated by appending a six\n" \ " digit number which loops between START and END.\n" \ " See also `-i' below.\n" \ "Options:\n" \ " -i, --increment=INC\n" \ " INC is an integers specifying the increment while reading in\n" \ " the time scenes. To read e.g. only every second time-scene\n" \ " use `-i 2'. INC defaults to 1\n" \ " -m, --mesh=MESH\n" \ " The file-name prefix of an ALBERTA-mesh gnereated by the ALBERTA\n" \ " library routines `write_mesh()' or `write_mesh_xdr()'\n" \ " `-x' and `-b' options below. The actual file name is generated\n" \ " by appending a six digit time-scene number to MESH, unless\n" \ " the `-f' option is also specified, see below.\n" \ " This option is mandatory and may not be omitted.\n" \ " -f, --fixed-mesh\n" \ " Use a single fixed mesh for all time-scenes (i.e. in the\n" \ " non-adaptive case). If `-f' is used `-m MESH' gives the actual\n" \ " file name of the mesh and not only the mesh-prefix. See `-m'\n" \ " above.\n" \ " -s, --scalar=DRV\n" \ " Load the data-files DRVXXXXXX which must contain DOF_REAL_VECs\n" \ " dumped to disk by `write_dof_real_vec[_xdr]()'.\n" \ " `XXXXXX' stands for the time-scene number.\n" \ " This option may be specified multiple times. The DOF_REAL_VECs\n" \ " must belong to the meshes specified with the `-m' option.\n" \ " See `-m', `-b', `-p' and `-i'.\n" \ " -v, --vector=DRDV\n" \ " Load the data-files DRDVXXXXXX which contain DOF_REAL_D_VECs\n" \ " dumped to disk by `write_dof_real_d_vec[_xdr]()'.\n" \ " `XXXXXX' stands for the time-scene number.\n" \ " This option may be specified multiple times. The vectors\n" \ " must belong to the meshes specified with the `-m' option.\n" \ " See `-m', `-b', `-p' and `-i'.\n" \ " -p, --path=PATH\n" \ " Specify a path prefix for all data-files. PATH is supposed to\n" \ " be the directory containing all data-files specified by the\n" \ " `-m', `-s' and `-v' options.\n" \ " -B, --Bar\n" \ " Generate a time-progress-bar when displaying the data in GRAPE.\n" \ " -b, --binary\n" \ " Expect MESH, DRV and DRDV to contain data in host dependent\n" \ " byte-order, generated by `write_SOMETHING()' routines of the\n" \ " ALBERTA library (SOMETHING is `mesh', `dof_real_vec' etc.\n" \ " -x, --xdr\n" \ " This is the default and just mentioned here for completeness.\n" \ " Expect MESH, DRV and DRDV to contain data in network\n" \ " byte-order, generated by `write_SOMETHING_xdr()' routines\n" \ " of the ALBERTA library. Per convention this means big-endian\n" \ " byte-order.\n" \ " -h, --help\n" \ " Print this help.\n", funcName, funcName); exit(status); fprintf(f, "usage: %s -i increment", funcName); fprintf(f, " [-h] [--help] [-b] [-p path] "); fprintf(f, "[-m mesh] [-s drv] [-v drdv] [[-s drv] [-v drdv]]\n"); fprintf(f, "%s reads a sequence of %dd-mesh[es] with dof_real(_d)_vectors\n", funcName, FE_DIM); fprintf(f, " and displays all data with GRAPE\n"); fprintf(f, "%s assumes data in XDR format as default\n", funcName); fprintf(f, " i.e. data has been written by write_mesh_xdr, etc.\n"); fprintf(f, "options:\n"); fprintf(f, " -h or -help: display this help\n"); fprintf(f, " -B: display time bar\n"); fprintf(f, " -f: use one fixed mesh (from non adaptive simulations)\n"); fprintf(f, " -b: switch to machine dependent binary format\n"); fprintf(f, " i.e. data has been written by write_mesh, etc.\n"); fprintf(f, " -p path: read data from path 'path'\n"); fprintf(f, " -m mesh: basename of meshes is 'mesh'; default: 'mesh'\n"); fprintf(f, " -s drv: read dof_real_vec with basename 'drv'\n"); fprintf(f, " -v file: read dof_real_d_vec with basename 'drdv'\n"); fprintf(f, " -t time step size: size for a single time step;\n"); fprintf(f, " only used with '-f' for one fixed mesh\n\n"); fprintf(f, "Example\n"); fprintf(f, "alberta_movi 0 10 -i 5 -s u_h -v v_h\n"); fprintf(f, " reads grid mesh000000 with scalar function u_h000000 and\n"); fprintf(f, " vector function v_h000000, then mesh000005 with u_h000005 and\n"); fprintf(f, " v_h000005, and finally mesh000010 with u_h000010 and v_h000010\n"); exit(status); } extern GRAPE_MESH *setup_grape_mesh(MESH *mesh, const char *name); void tsc_init(INFO *info, int n_info, int time_bar); void tsc_add(TIMESCENE *, REAL, MESH *, DOF_REAL_VEC *, DOF_REAL_D_VEC *); void tsc_timebar(TIMESCENE *, REAL, REAL); void tsc_graph(TIMESCENE *); static struct option long_options[] = { {"help", 0, 0, 'h' }, {"increment", 1, 0, 'i' }, {"binary", 0, 0, 'b' }, {"Bar", 0, 0, 'B' }, {"xdr", 0, 0, 'x' }, {"path", 1, 0, 'p' }, {"mesh", 1, 0, 'm' }, {"fixed-mesh", 0, 0, 'f' }, {"scalar", 1, 0, 's' }, {"vector", 1, 0, 'v' }, {"time-step", 1, 0, 't' }, { NULL, 0, 0, '\0' } }; int main(int argc, char **argv) { FUNCNAME("main"); MESH *mesh = nil; DOF_REAL_VEC *drv = nil; DOF_REAL_D_VEC *drdv = nil; const char *fn; REAL f_t_start = LARGE, t_start = LARGE, t_end = -LARGE, t_act; long int i, i_start, i_end, ntime, n_step = 0; INFO *info = MEM_ALLOC(10, INFO); int n = 0, n_info = 10; int i_delta = 1; const char *path = nil; const char *mesh_name = "mesh"; int time_bar = false; int fix_mesh = false; REAL timestep = 1.0e-3; int c, option_index; MESH *(*readmesh)(const char *, REAL *, NODE_PROJECTION *(*)(MESH *, MACRO_EL *, int)); DOF_REAL_VEC *(*read_drv)(const char *, MESH *, FE_SPACE *); DOF_REAL_D_VEC *(*read_drdv)(const char *, MESH *, FE_SPACE *); readmesh = read_mesh_xdr; read_drv = read_dof_real_vec_xdr; read_drdv = read_dof_real_d_vec_xdr; info[0].name = "mesh"; /* first get start and stop scene index */ if (argc < 3) { print_help(argv[0], stderr, 1); return(0); } i_start = atoi(argv[1]); i_end = atoi(argv[2]); /* then tweak optind */ #ifdef HAVE_UNSETENV unsetenv("POSIXLY_CORRECT"); /* we don't want this, see unsetenv(3) */ #endif optind = 3; while (1) { c = getopt_long(argc, argv, "Bbfhi:m:p:s:t:v:x", long_options, &option_index); if (c == -1) break; switch (c) { case 'B': time_bar = true; break; case 'b': readmesh = read_mesh; read_drv = read_dof_real_vec; read_drdv = read_dof_real_d_vec; break; case 'h': print_help(argv[0], stdout, 0); break; case 'f': fix_mesh = true; break; case 'i': i_delta = atoi(optarg); break; case 'm': mesh_name = optarg; break; case 'p': path = optarg; break; case 's': if (n == n_info) info = MEM_REALLOC(info, n_info, n_info+10, INFO); n_info += 10; info[n].vector = false; info[n].name = optarg; n++; break; case 't': timestep = atof(optarg); break; case 'v': if (n == n_info) info = MEM_REALLOC(info, n_info, n_info+10, INFO); n_info += 10; info[n].vector = true; info[n].name = optarg; n++; break; case 'x': readmesh = read_mesh_xdr; read_drv = read_dof_real_vec_xdr; read_drdv = read_dof_real_d_vec_xdr; break; default: print_help(argv[0], stderr, 1); } } MSG("start %d, end %d, delta %d\n", i_start, i_end, i_delta); TEST_EXIT(i_end >= i_start, "end < start\n"); TEST_EXIT(i_delta > 0, "delta <= 0\n"); tsc_init(info, n, time_bar); if (fix_mesh) { char name[256]; if (path) sprintf(name, "%s/%s", path, mesh_name); else sprintf(name, "%s", mesh_name); MSG("reading \"%s\"\n", name); mesh = (*readmesh)(name, &t_act, nil); TEST_EXIT(FE_DIM==mesh->dim, "Mesh dimension must be %d!\n", FE_DIM); f_t_start = t_act; } for (ntime = i_start; ntime <= i_end; ntime += i_delta) { MSG("ntime %d, end %d, delta %d\n", ntime, i_end, i_delta); if (!fix_mesh) { fn = generate_filename(path, mesh_name, ntime); MSG("reading \"%s\"\n", fn); mesh = (*readmesh)(fn, &t_act, nil); TEST_EXIT(mesh,"couldn't read mesh \"%s\"\n", fn); TEST_EXIT(FE_DIM==mesh->dim,"Mesh dimension must be %d!\n", FE_DIM); } else t_act = f_t_start+ntime*timestep; MSG("Aktuelle Zeit: %f (Zeitschrittweite: %f)\n",t_act,timestep); if (n > 0) { for (i = n-1; i >= 0; i--) { if (info[i].vector) { fn = generate_filename(path, info[i].name, ntime); MSG("reading \"%s\"\n", fn); drdv = (*read_drdv)(fn, mesh, nil); TEST_EXIT(drdv,"couldn't read dof_real_d_vec \"%s\"\n", fn); tsc_add(info[i].tsc, t_act, mesh, nil, drdv); } else { fn = generate_filename(path, info[i].name, ntime); MSG("reading \"%s\"\n", fn); drv = (*read_drv)(fn, mesh, nil); TEST_EXIT(drv,"couldn't read dof_real_vec \"%s\"\n", fn); MSG("range of %s in [%e,%e]\n", NAME(drv), dof_min(drv), dof_max(drv)); tsc_add(info[i].tsc, t_act, mesh, drv, nil); } } } else { tsc_add(info[0].tsc, t_act, mesh, nil, nil); } if (ntime == i_start) t_start = t_end = t_act; t_start = MIN(t_start, t_act); t_end = MAX(t_end, t_act); if (timestep > 0) t_act += timestep*i_delta; n_step++; } if (time_bar) { tsc_timebar(info[0].tsc, t_start, t_end); } MSG("\n"); MSG("step = %d\n", n_step-1); g_project_add("uif-gm"); tsc_graph(info[0].tsc); return(0); } /****************************************************************************/ /****************************************************************************/ static GRAPE_MESH *grape_mesh_interpol(GRAPE_MESH *mesh1, GRAPE_MESH *mesh2, double factor) { GRAPE_MESH *self, *new; self = (GRAPE_MESH *)START_METHOD(G_INSTANCE); ASSURE (self, "", END_METHOD (NULL)); if (factor < 0.5) new = mesh1; else new = mesh2; self->max_dimension_of_coord = new->max_dimension_of_coord; self->max_eindex = new->max_eindex; self->max_vindex = new->max_vindex; self->max_number_of_vertices = new->max_number_of_vertices; self->f_data = new->f_data; self->user_data = new->user_data; self->first_macro = new->first_macro; self->next_macro = new->next_macro; self->first_child = new->first_child; self->next_child = new->next_child; self->copy_element = new->copy_element; self->free_element = new->free_element; self->max_level = new->max_level; self->level_of_interest = new->level_of_interest; self->max_dindex = new->max_dindex; #if FE_DIM==2 self->dimension_of_world = new->dimension_of_world; #endif END_METHOD(self); } /****************************************************************************/ void tsc_init(INFO *info, int n_info, int time_bar) { int n; extern void def_timebar_methods(void); if (time_bar) def_timebar_methods(); GRAPE(Grape_Mesh,"add-method")("interpol", grape_mesh_interpol); for (n = 0; n < MAX(1, n_info); n++) { info[n].tsc = (TIMESCENE *)GRAPE(TimeScene,"new-instance")(info[n].name); info[n].tsc->sync = 1; if (n > 0) info[n-1].tsc->next_scene = (SCENE *) info[n].tsc; } return; } extern void grape_ini_f_data_d(GRAPE_MESH *, DOF_REAL_D_VEC *); extern void grape_ini_f_data(GRAPE_MESH *, DOF_REAL_VEC *); void tsc_add(TIMESCENE *tsc, REAL time, MESH *mesh, DOF_REAL_VEC *drv, DOF_REAL_D_VEC *drdv) { GRAPE_MESH *grape_mesh; grape_mesh = setup_grape_mesh(mesh, mesh->name); if (drdv) grape_ini_f_data_d(grape_mesh, drdv); else if (drv) grape_ini_f_data(grape_mesh, drv); if (tsc->dynamic) tsc->dynamic = (G_SCENE_OBJECT *)GRAPE(tsc->dynamic,"put") (grape_mesh, grape_mesh, time); else tsc->dynamic = (G_SCENE_OBJECT *)GRAPE(TimeStep,"put") (grape_mesh, grape_mesh, time); return; } void tsc_timebar(TIMESCENE *tsc, REAL t_start, REAL t_end) { GRAPE(tsc,"timebar-v")(t_start, t_end); } void tsc_graph(TIMESCENE *tsc) { if (tsc) { MANAGER *mgr; #ifdef GRID_MODE GRAPHICDEVICE *grdev; grdev = (GRAPHICDEVICE *)GRAPE(GraphicDevice,"get-stddev")(); grdev->clear(); if (grdev && (grdev->grid_patch != G_GRID)) { GRAPE(grdev,"grid-patch")(G_GRID); } #endif mgr = (MANAGER *)GRAPE(Manager,"get-stdmgr")(); GRAPE(mgr,"handle")(tsc); } } alberta-2.0.1/add_ons/grape/mesh/Common/mesh_interface_common.c0000644000042300001440000004624010676724261021437 00000000000000/****************************************************************************/ /* Mesh hierarchy traversal: first(), next(), ... */ /****************************************************************************/ #if FE_DIM==3 typedef HELEMENT3D GRAPE_ELEMENT; typedef HMESH3D GRAPE_MESH; typedef GENMESH3D GRAPE_GENMESH; typedef F_HEL_INFO3D F_EL_INFO; typedef F_HDATA3D F_DATA; #define Grape_Mesh HMesh3d #else typedef HELEMENT2D GRAPE_ELEMENT; typedef HMESH2D GRAPE_MESH; typedef GENMESH2D GRAPE_GENMESH; typedef F_HEL_INFO2D F_EL_INFO; typedef F_HDATA2D F_DATA; #define Grape_Mesh HMesh2d #endif static int traverse_level = -1; static FLAGS traverse_fill_flag = FILL_COORDS | FILL_BOUND | FILL_NEIGH #if FE_DIM==3 | FILL_ORIENTATION #endif | CALL_LEAF_EL; static const EL_INFO *el_info; /* coord has to be double [n][3], because hmesh in grape is always * of dimension 3 and for FE_DIM == 2 we set the third component to zero */ static double coord[N_VERTICES_MAX][3]; static int vindex[N_VERTICES_MAX]; static GRAPE_ELEMENT element; static double *vertex[N_VERTICES_MAX] = {coord[0], coord[1], coord[2], coord[3] }; /* implementation of functions */ void setup_traverse(int level, FLAGS fill_flag) { traverse_level = level; traverse_fill_flag = fill_flag; return; } /****************************************************************************/ static void fill_grape_element(void) { int i, j; for (i = 0; i < N_VERTICES(FE_DIM); i++) { vindex[i] = el_info->el->dof[i][0]; for (j = 0; j < DIM_OF_WORLD; j++) { coord[i][j] = el_info->coord[i][j]; /* double to float conv */ } } element.vertex = (double G_CONST*G_CONST*) vertex; element.vindex = vindex; #if FE_DIM == 3 if (el_info->orientation > 0) element.descr = &tetra_description_even; else element.descr = &tetra_description_odd; #else element.descr = &tria_description; #endif element.eindex = INDEX(el_info->el); element.user_data = (void *)el_info; } /****************************************************************************/ static TRAVERSE_STACK *stack = nil; /***************************************************************************/ /* returns first leaf element, which is treated like a macro element */ /* because traverse_fill_flag contains the CALL_LEAF_EL flag */ static GRAPE_ELEMENT *first_grape_element(GRAPE_GENMESH *grape_mesh, MESH_ELEMENT_FLAGS flags) { if (!stack) stack = get_traverse_stack(); el_info = traverse_first(stack, (MESH *)(grape_mesh->user_data), traverse_level, traverse_fill_flag); if (el_info) { fill_grape_element(); element.mesh = (GRAPE_GENMESH *) grape_mesh; return(&element); } else return(nil); } /****************************************************************************/ /* returns next leaf element, which is treated like a macro element */ /* because traverse_fill_flag contains the CALL_LEAF_EL flag */ static GRAPE_ELEMENT *next_grape_element(GRAPE_ELEMENT *el, MESH_ELEMENT_FLAGS flags) { if ((el_info = traverse_next(stack, (EL_INFO *)el->user_data))) { fill_grape_element(); return(&element); } else return(nil); } /* we have no children */ static GRAPE_ELEMENT *fake_child(GRAPE_ELEMENT *el,MESH_ELEMENT_FLAGS flags) { return (nil); } /* we dont want to select no child */ static GRAPE_ELEMENT *fake_select(GRAPE_ELEMENT *el,double *parent_coord, double * child_coord, MESH_ELEMENT_FLAGS flags) { return (nil); } /****************************************************************************/ static GRAPE_ELEMENT *complete_grape_element(GRAPE_ELEMENT *el, MESH_ELEMENT_FLAGS flags) { if(el_info) return(&element); else return(nil); } /* mkae copy of element is not used, because we are acting on leaf level */ static GRAPE_ELEMENT *copy_grape_element(GRAPE_ELEMENT *el, MESH_ELEMENT_FLAGS flags) { FUNCNAME("copy_grape_element"); MSG("not implemented yet!\n"); return ( nil ); } /****************************************************************************/ /* not used, because copy_element is not implemented */ static void free_grape_element(GRAPE_ELEMENT *el) { return; } /****************************************************************************/ static void f_bounds(GRAPE_ELEMENT *el, double* min, double* max, void *function_data) { (*min) = 1.0E+308; (*max) = -1.0E+308; } /****************************************************************************/ static void grape_get_vertex_estimate(GRAPE_ELEMENT *el, double *value, void *function_data) { *value = 0.0; return; } /****************************************************************************/ static double grape_get_element_estimate(GRAPE_ELEMENT *el, void *function_data) { return 0.0; } /****************************************************************************/ static void f_real(GRAPE_ELEMENT *el, int ind, double G_CONST *coord, double *val, void *function_data) { FUNCNAME("f_real"); EL_INFO *el_info = (EL_INFO *)(el->user_data); F_DATA *f_data = (F_DATA *)el->mesh->f_data; DOF_REAL_VEC *u_h; const REAL *uh_loc; const BAS_FCTS *bas_fcts; static REAL vert_coords[N_VERTICES_MAX][N_LAMBDA] = {{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}, {0.0,0.0,0.0,1.0}}; if (f_data) { u_h = (DOF_REAL_VEC *)(f_data->function_data); if (u_h) { if (u_h->fe_space && (bas_fcts = u_h->fe_space->bas_fcts)) { uh_loc = bas_fcts->get_real_vec(el_info->el, u_h, nil); if (coord) { val[0] = eval_uh(coord, uh_loc, bas_fcts); } else { if ((ind >= 0) && (ind < N_VERTICES(FE_DIM))) { val[0] = eval_uh(vert_coords[ind], uh_loc, bas_fcts); } else { MSG("invalid vertex number %d\n",ind); val[0] = 0.0; } } } else { MSG("no fe_space or bas_fcts in dof_real_vec <%s>\n", u_h->name); val[0] = 0.0; } } else { MSG("no dof_real_vec in f_data->user_data\n"); val[0] = 0.0; } } else { MSG("no f_data\n"); val[0] = 0.0; } } static void f_real_el_info(GRAPE_ELEMENT *el, F_EL_INFO *f_el_info, void *function_data) { FUNCNAME("f_real_el_info"); DOF_REAL_VEC *u_h = (DOF_REAL_VEC *)(function_data); if (u_h && u_h->fe_space && u_h->fe_space->bas_fcts) { f_el_info->polynomial_degree = u_h->fe_space->bas_fcts->degree; } else { ERROR("no uh or fe_space or bas_fcts\n"); f_el_info->polynomial_degree = 1; } return; } /****************************************************************************/ static void f_real_d(GRAPE_ELEMENT *el, int ind, double G_CONST *coord, double *val, void *function_data) { FUNCNAME("f_real_d"); EL_INFO *el_info = (EL_INFO *)(el->user_data); F_DATA *f_data = (void *)el->mesh->f_data; DOF_REAL_D_VEC *u_h; const REAL_D *uh_loc; const BAS_FCTS *bas_fcts; static REAL vert_coords[N_VERTICES_MAX][N_LAMBDA] = {{1.0,0.0,0.0,0.0}, {0.0,1.0,0.0,0.0}, {0.0,0.0,1.0,0.0}, {0.0,0.0,0.0,1.0}}; if (f_data) { u_h = (DOF_REAL_D_VEC *)(f_data->function_data); if (u_h) { if (u_h->fe_space && (bas_fcts = u_h->fe_space->bas_fcts)) { uh_loc = bas_fcts->get_real_d_vec(el_info->el, u_h, nil); if (coord) { eval_uh_d(coord, uh_loc, bas_fcts, val); } else { if ((ind >= 0) && (ind < N_VERTICES(FE_DIM))) { eval_uh_d(vert_coords[ind], uh_loc, bas_fcts, val); } else { MSG("invalid vertex number %d\n",ind); val[0] = 0.0; } } } else { MSG("no fe_space or bas_fcts in dof_real_vec <%s>\n", u_h->name); val[0] = 0.0; } } else { MSG("no dof_real_vec in f_data->user_data\n"); val[0] = 0.0; } } else { MSG("no f_data\n"); val[0] = 0.0; } } static void f_real_d_el_info(GRAPE_ELEMENT *el, F_EL_INFO *f_el_info, void *function_data) { FUNCNAME("f_real_el_info"); DOF_REAL_D_VEC *u_h = (DOF_REAL_D_VEC *)(function_data); if (u_h && u_h->fe_space && u_h->fe_space->bas_fcts) { f_el_info->polynomial_degree = u_h->fe_space->bas_fcts->degree; } else { ERROR("no uh or fe_space or bas_fcts\n"); f_el_info->polynomial_degree = 1; } return; } /****************************************************************************/ static void f_schar(GRAPE_ELEMENT *el, int ind, double G_CONST *coord, double *val, void *function_data) { FUNCNAME("f_schar"); EL_INFO *el_info = (EL_INFO *)(el->user_data); DOF **dof; const DOF_ADMIN *admin; F_DATA *f_data = (void *)el->mesh->f_data; DOF_SCHAR_VEC *sc_freiburg; int i, n0; if (f_data) { sc_freiburg = (DOF_SCHAR_VEC *)(f_data->function_data); if (sc_freiburg) { if (sc_freiburg->fe_space && (admin = sc_freiburg->fe_space->admin)) { if (admin->n_dof[VERTEX] < 1) { MSG("no vertex dofs in admin\n"); val[0] = 0.0; return; } dof = el_info->el->dof; n0 = sc_freiburg->fe_space->admin->n0_dof[VERTEX]; if (coord) { val[0] = 0.0; for (i = 0; i < N_VERTICES(FE_DIM); i++) { val[0] += coord[i] * sc_freiburg->vec[dof[i][n0]]; } } else { if ((ind >= 0) && (ind < N_VERTICES(FE_DIM))) { val[0] = sc_freiburg->vec[dof[ind][n0]]; } else { MSG("invalid vertex number %d\n",ind); val[0] = 0.0; } } } else { MSG("no fe_space or dof_admin dof_schar_vec <%s>\n", sc_freiburg->name); } } else { MSG("no dof_real_vec in f_data->user_data\n"); val[0] = 0.0; } } else { MSG("no f_data\n"); val[0] = 0.0; } } static void f_schar_el_info(GRAPE_ELEMENT *el, F_EL_INFO *f_el_info, void *function_data) { f_el_info->polynomial_degree = 1; return; } /*************************************************************************/ void grape_ini_f_data(GRAPE_MESH *grape_mesh, DOF_REAL_VEC *dof_vec) { FUNCNAME("grape_ini_f_data"); F_DATA *f_data = NULL; if (!grape_mesh) { MSG("no grape_mesh\n"); return; } if (dof_vec && dof_vec->vec) { for (f_data = (void *)grape_mesh->f_data; f_data; f_data = (void *)f_data->next) { if (f_data->function_data == dof_vec) break; } if (!f_data) for (f_data = (void *)grape_mesh->f_data; f_data; f_data = (void *)f_data->last) { if (f_data->function_data == dof_vec) break; } if (!f_data) { MSG("generate f_data for `%s'\n", dof_vec->name); f_data = (F_DATA *)g_mem_alloc(sizeof(F_DATA)); f_data->name = (char *) dof_vec->name; f_data->dimension_of_value = 1; if (strstr(dof_vec->fe_space->bas_fcts->name, "disc")) f_data->continuous_data = 0; else f_data->continuous_data = 1; f_data->f = f_real; f_data->f_el_info = f_real_el_info; f_data->next = grape_mesh->f_data; f_data->last = grape_mesh->f_data ? grape_mesh->f_data->last : nil; f_data->function_data = (void *) dof_vec; f_data->get_bounds = f_bounds; f_data->get_vertex_estimate = grape_get_vertex_estimate; f_data->get_element_estimate = grape_get_element_estimate; f_data->threshold = 0.0; #if FE_DIM == 3 f_data->geometry_threshold = 0.0; #endif f_data->hp_threshold = 0.0; f_data->hp_maxlevel = 0; grape_mesh->f_data = (GENMESH_FDATA *) f_data; } else if (grape_mesh->f_data != (GENMESH_FDATA *)f_data) { MSG("select f_data for `%s'\n", dof_vec->name); grape_mesh->f_data = (GENMESH_FDATA *)f_data; } } else { MSG("no dof_vec, or no vec\n"); } return; } void grape_ini_f_data_d(GRAPE_MESH *grape_mesh, DOF_REAL_D_VEC *dof_vec) { FUNCNAME("grape_ini_f_data_d"); F_DATA *f_data=NULL; if (!grape_mesh) { MSG("no grape_mesh\n"); return; } if (dof_vec && dof_vec->vec) { for (f_data = (void *)grape_mesh->f_data; f_data; f_data = (void *)f_data->next) { if (f_data->function_data == dof_vec) break; } if (!f_data) for (f_data = (void *)grape_mesh->f_data; f_data; f_data = (void *)f_data->last) { if (f_data->function_data == dof_vec) break; } if (!f_data) { MSG("generate f_data for `%s'\n", dof_vec->name); f_data = (F_DATA *)g_mem_alloc(sizeof(F_DATA)); f_data->name = (char *) dof_vec->name; f_data->dimension_of_value = DIM_OF_WORLD; if (strstr(dof_vec->fe_space->bas_fcts->name, "disc")) f_data->continuous_data = 0; else f_data->continuous_data = 1; f_data->f = f_real_d; f_data->f_el_info = f_real_d_el_info; f_data->next = grape_mesh->f_data; f_data->last = grape_mesh->f_data ? grape_mesh->f_data->last : nil; f_data->function_data = (void *) dof_vec; f_data->get_bounds = f_bounds; f_data->get_vertex_estimate = grape_get_vertex_estimate; f_data->get_element_estimate = grape_get_element_estimate; f_data->threshold = 0.0; #if FE_DIM == 3 f_data->geometry_threshold = 0.0; #endif f_data->hp_threshold = 0.0; f_data->hp_maxlevel = 0; grape_mesh->f_data = (GENMESH_FDATA *)f_data; } else if (grape_mesh->f_data != (GENMESH_FDATA *)f_data) { MSG("select f_data for `%s'\n", dof_vec->name); grape_mesh->f_data = (GENMESH_FDATA *)f_data; } } else { MSG("no dof_vec, or no vec\n"); } return; } void grape_ini_f_data_s_vec(GRAPE_MESH *grape_mesh, DOF_SCHAR_VEC *dof_vec) { FUNCNAME("grape_ini_f_data_s_vec"); F_DATA *f_data; if (!grape_mesh) { MSG("no grape_mesh\n"); return; } if (dof_vec && dof_vec->vec) { for (f_data = (void *)grape_mesh->f_data; f_data; f_data = (void *)f_data->next) { if (f_data->function_data == dof_vec) break; } if (!f_data) for (f_data = (void *)grape_mesh->f_data; f_data; f_data = (void *)f_data->last) { if (f_data->function_data == dof_vec) break; } if (!f_data) { MSG("generate f_data for `%s'\n", dof_vec->name); f_data = (F_DATA *)g_mem_alloc(sizeof(F_DATA)); f_data->name = (char *) dof_vec->name; f_data->dimension_of_value = 1; f_data->continuous_data = 1; f_data->f = f_schar; f_data->f_el_info = f_schar_el_info; f_data->next = grape_mesh->f_data; f_data->last = grape_mesh->f_data ? grape_mesh->f_data->last : nil; f_data->function_data = (void *) dof_vec; f_data->get_bounds = f_bounds; f_data->get_vertex_estimate = grape_get_vertex_estimate; f_data->get_element_estimate = grape_get_element_estimate; f_data->threshold = 0.0; #if FE_DIM == 3 f_data->geometry_threshold = 0.0; #endif f_data->hp_threshold = 0.0; f_data->hp_maxlevel = 0; grape_mesh->f_data = (GENMESH_FDATA *)f_data; } else if (grape_mesh->f_data != (GENMESH_FDATA *)f_data) { MSG("select f_data for `%s'\n", dof_vec->name); grape_mesh->f_data = (GENMESH_FDATA *)f_data; } } else { MSG("no dof_vec, or no vec\n"); } return; } /****************************************************************************/ /* handling of multiple functions (selection by next/last) */ /****************************************************************************/ static GRAPE_MESH *next_f_data_send(void) { GRAPE_MESH *self; self = (GRAPE_MESH *)START_METHOD(G_INSTANCE); ASSURE(self, "", END_METHOD(NULL)); if (self->f_data && self->f_data->next) { self->f_data->next->last = self->f_data; /*only to be sure...*/ self->f_data = self->f_data->next; } if (self->f_data) printf("new f_data is: %s\n", self->f_data->name); END_METHOD(self); } static GRAPE_MESH *prev_f_data_send(void) { GRAPE_MESH *self; self = (GRAPE_MESH *)START_METHOD(G_INSTANCE); ASSURE(self, "", END_METHOD(NULL)); if (self->f_data && self->f_data->last) { self->f_data->last->next = self->f_data; /*only to be sure...*/ self->f_data = self->f_data->last; } if (self->f_data) printf("new f_data is: %s\n", self->f_data->name); END_METHOD(self); } static void grape_add_methods(void) { static int first=1; if (first) { first = 0; GRAPE(Grape_Mesh,"add-method")("next-f-data-send",next_f_data_send); GRAPE(Grape_Mesh,"add-method")("prev-f-data-send",prev_f_data_send); } } /****************************************************************************/ /* convert ALBERTA mesh into GRAPE mesh */ /****************************************************************************/ GRAPE_MESH *setup_grape_mesh(MESH *mesh, char *name) { FUNCNAME("setup_grape_mesh"); GRAPE_MESH *grape_mesh; int i, j; grape_add_methods(); ASSURE((grape_mesh = (GRAPE_MESH *)GRAPE(Grape_Mesh,"new-instance")(name)), "can't get Grape Mesh instance", return(nil)); grape_mesh->max_level = 0; for(i=0; ifirst_child = fake_child; grape_mesh->next_child = fake_child; grape_mesh->first_macro = first_grape_element; grape_mesh->next_macro = next_grape_element; grape_mesh->copy_element = copy_grape_element; grape_mesh->free_element = free_grape_element; grape_mesh->select_child = fake_select; grape_mesh->complete_element = complete_grape_element; /* robert: hier lieber nitch NULL setzen, wer weiss? grape_mesh->get_lens_element_estimate = NULL; grape_mesh->get_geometry_element_estimate = NULL; grape_mesh->get_geometry_vertex_estimate = NULL; grape_mesh->set_time = NULL; grape_mesh->get_time = NULL; */ grape_mesh->max_number_of_vertices = N_VERTICES(FE_DIM); grape_mesh->max_eindex = mesh->n_hier_elements; grape_mesh->max_vindex = mesh->n_vertices; grape_mesh->max_dimension_of_coord = N_VERTICES(FE_DIM); grape_mesh->max_dindex = 1; grape_mesh->level_of_interest = grape_mesh->max_level; #if FE_DIM==2 #if (DIM_OF_WORLD > 2) || ADD_Z grape_mesh->dimension_of_world = 3; /* !!!! */ #else grape_mesh->dimension_of_world = 2; #endif #endif grape_mesh->user_data = (void *)mesh; element.mesh = (GRAPE_GENMESH *) grape_mesh; #if FE_DIM==2 element.descr = &tria_description; #else element.descr = &tetra_description_even; #endif /* adjust max_vindex such that simple algorithm is ok. (dof[v][0]) */ for (i = 0; i < mesh->n_dof_admin; i++) { if ((mesh->dof_admin[i]->n_dof[VERTEX] > 0) && (mesh->dof_admin[i]->n0_dof[VERTEX] == 0)) { grape_mesh->max_vindex = mesh->dof_admin[i]->size_used; MSG("use admin <%s> for vertex numbering, max=%d\n", NAME(mesh->dof_admin[i]), mesh->dof_admin[i]->size_used); break; } } return(grape_mesh); } /****************************************************************************/ alberta-2.0.1/add_ons/grape/mesh/Common/tsc_timebar.c0000644000042300001440000001407010676723611017401 00000000000000/* @Hdr */ #include /* @DOC symmetry8 */ /* grape-methode "timebar" * * Call : GRAPE(timescene,"timebar")(tmin,tmax,hv) * Call : GRAPE(timescene,"timebar-send")() * * Parameters : TIMESCENE *timescene; float tmin,tmax; int hv; * * Description : erzeugt neue timescene mit timebar geometrie * * Keywords : * * Author : alfred schmidt * * Copyright (c) 1995 by Universitaet Freiburg * Institut fuer Angewandte Mathematik * D-79104 Freiburg * * history : 16.02.95 neu erstellt */ /* @GRAPE METHOD(TimeScene[timebar-hv]) METHOD(TimeScene[timebar-h]) METHOD(TimeScene[timebar-v]) METHOD(TimeScene[timebar-h-send]) METHOD(TimeScene[timebar-v-send]) METHOD(Triang2d[display-timebar]) */ /* @SRC tsc_tbar.c */ static int tbar_np = 8; static int tbar_ne = 4; #define TB0 0.0 #define TB1 1.0 #define TBW 0.05 #define TBw 0.01 #define TBz -0.05 static double vx[8]= {TBW, 0.0, TBW, 0.0, TBw, 0.0, TBw, 0.0}; static double vy1[8]= {TB0, TB0, TB0, TB0, TB0, TB0, TB1, TB1}; static double vy2[8]= {TB0, TB0, TB1, TB1, TB0, TB0, TB1, TB1}; static double vz[8]= {0.0, 0.0, 0.0, 0.0, 0.0, TBz, 0.0, TBz}; static double hx1[8]= {TB0, TB0, TB0, TB0, TB0, TB0, TB1, TB1}; static double hx2[8]= {TB0, TB0, TB1, TB1, TB0, TB0, TB1, TB1}; static double hy[8]= {0.0, TBW, 0.0, TBW, 0.0, TBw, 0.0, TBw}; static double hz[8]= {0.0, 0.0, 0.0, 0.0, 0.0, TBz, 0.0, TBz}; static INT3 tbar_vertex[4] ={{0,2,3}, {0,3,1}, {4,7,6}, {4,5,7}}; static INT3 tbar_neighbour[4]={{-1,1,-1}, {-1,-1,0}, {-1,-1,3}, {-1,2,-1}}; static double s_tmin,s_tmax; static int s_horiz; TIMESCENE *timescene_hv_timebar(double tmin, double tmax, int horiz) { TIMESCENE *tsc, *tsc1; TRIANG2D *tr1, *tr2; int i,j; tsc = (TIMESCENE *)START_METHOD(G_INSTANCE); ASSURE(tsc, "can't manage classes", END_METHOD(NIL)); printf("timescene_hv_timebar: tmin=%f, tmax=%f, horiz=%d\n",tmin,tmax,horiz); s_tmin = tmin; s_tmax = tmax; s_horiz = horiz; tsc1 = (TIMESCENE *)GRAPE(TimeScene,"new-instance")("timebar"); tr1 = (TRIANG2D *)GRAPE(Triang2d,"new-instance")("timebar1"); tr2 = (TRIANG2D *)GRAPE(Triang2d,"new-instance")("timebar2"); ASSURE(tsc1 && tr1 && tr2, "can't allocate new instances", END_METHOD(NIL)); tr1->max_number_of_points = tr1->number_of_points = tbar_np; tr1->max_number_of_elements = tr1->number_of_elements = tbar_ne; tr2->max_number_of_points = tr2->number_of_points = tbar_np; tr2->max_number_of_elements = tr2->number_of_elements = tbar_ne; tr1->vertex = tr2->vertex = tbar_vertex; tr1->neighbour = tr2->neighbour = tbar_neighbour; for (i=0; i<4; i++) for (j=0; j<4; j++) tsc1->object_trans[i][j] = (i==j) ? 1.0 : 0.0; tsc1->matrix_flag = G_MATRIX_PROJECT; if (horiz) { /* horizontal */ tr1->x = hx1; tr1->y = hy; tr1->z = hz; tr2->x = hx2; tr2->y = hy; tr2->z = hz; tsc1->object_trans[0][3] = -0.5; tsc1->object_trans[1][3] = -0.5; } else { tr1->x = vx; tr1->y = vy1; tr1->z = vz; tr2->x = vx; tr2->y = vy2; tr2->z = vz; tsc1->object_trans[0][3] = 0.8; tsc1->object_trans[1][3] = -0.5; } tsc1->dynamic = (void *)GRAPE(TimeStep,"put")(tr1,tr1,tmin); tsc1->dynamic = (void *)GRAPE(tsc1->dynamic,"put")(tr2,tr2,tmax); tsc1->method_name = "display-timebar"; tsc1->sync = 1; tsc1->next_scene = tsc->next_scene; tsc->next_scene = (SCENE *)tsc1; END_METHOD(tsc1); } TIMESCENE *timescene_htimebar(double tmin, double tmax) { return(timescene_hv_timebar(tmin, tmax, 1)); } TIMESCENE *timescene_vtimebar(double tmin, double tmax) { return(timescene_hv_timebar(tmin, tmax, 0)); } TIMESCENE *timescene_hv_timebar_send(int horiz) { double tmin,tmax; TIMESCENE *tsc; TIMESTEP *step; tsc = (TIMESCENE *)START_METHOD(G_INSTANCE); ASSURE(tsc, "can't manage classes", END_METHOD(NIL)); step = (TIMESTEP *)tsc->dynamic; if (step) { tmin = 1.0E30; tmax = -1.0E30; while (step->pre_step) { step = step->pre_step; } while (step) { if (step->time < tmin) tmin = step->time; if (step->time > tmax) tmax = step->time; step = step->post_step; } } else { tmin = 0.0; tmax = 1.0; } tsc = (TIMESCENE *)GRAPE(tsc, "timebar-hv")(tmin, tmax, horiz); END_METHOD(tsc); } TIMESCENE *timescene_htimebar_send() { return(timescene_hv_timebar_send(1)); } TIMESCENE *timescene_vtimebar_send() { return(timescene_hv_timebar_send(0)); } TRIANG2D *display_timebar() { TRIANG2D *t; MATRIX44 m_backup,v_backup; static MATRIX44 id={{1.,0.,0.,0.},{0.,1.,0.,0.},{0.,0.,1.,0.},{0.,0.,0.,1.}}; GRAPHICDEVICE *dev; char s[20]; static VEC3 sp1h={0.0, -0.1, 0.0}; static VEC3 sp1v={-0.1, -0.1, 0.0}; static VEC3 sp2h={0.9, -0.1, 0.0}; static VEC3 sp2v={-0.1, 1.05, 0.0}; t = (TRIANG2D *)START_METHOD(G_INSTANCE); ASSURE(t, "can't manage classes", END_METHOD(NIL)); dev = (GRAPHICDEVICE *)GRAPE(GraphicDevice,"get-stddev")(); dev->transform(G_MODE_GET,G_MATRIX_MODEL,m_backup); dev->transform(G_MODE_GET,G_MATRIX_VIEW, v_backup); dev->transform(G_MODE_SET,G_MATRIX_MODEL,id); dev->transform(G_MODE_SET,G_MATRIX_VIEW, id); GRAPE(t,"display")(); sprintf(s,"%8.4f",s_tmin); s[8] = s[9] = 0; if (s_horiz) dev->text(sp1h, s); else dev->text(sp1v, s); sprintf(s,"%8.4f",s_tmax); s[8] = s[9] = 0; if (s_horiz) dev->text(sp2h, s); else dev->text(sp2v, s); dev->transform(G_MODE_SET,G_MATRIX_MODEL,m_backup); dev->transform(G_MODE_SET,G_MATRIX_VIEW, v_backup); END_METHOD(t); } void def_timebar_methods() { GRAPE(TimeScene,"add-method")("timebar-h-send", timescene_htimebar_send); GRAPE(TimeScene,"add-method")("timebar-v-send", timescene_vtimebar_send); GRAPE(TimeScene,"add-method")("timebar-h", timescene_htimebar); GRAPE(TimeScene,"add-method")("timebar-v", timescene_vtimebar); GRAPE(TimeScene,"add-method")("timebar-hv", timescene_hv_timebar); GRAPE(Triang2d,"add-method")("display-timebar", display_timebar); return; } alberta-2.0.1/add_ons/meshtv/0000777000042300001440000000000011067147345013046 500000000000000alberta-2.0.1/add_ons/meshtv/Makefile.am0000644000042300001440000000020510676724261015016 00000000000000SUBDIRS = if ALBERTA_1 SUBDIRS += 1d endif if ALBERTA_2 SUBDIRS += 2d endif if ALBERTA_3 SUBDIRS += 3d endif EXTRA_DIST = Common alberta-2.0.1/add_ons/meshtv/Makefile.in0000644000042300001440000004111611067146146015030 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ALBERTA_1_TRUE@am__append_1 = 1d @ALBERTA_2_TRUE@am__append_2 = 2d @ALBERTA_3_TRUE@am__append_3 = 3d subdir = add_ons/meshtv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = 1d 2d 3d DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = @ALBERTA_DEBUG@ ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) EXTRA_DIST = Common all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/meshtv/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/meshtv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/meshtv/Common/0000777000042300001440000000000011067147346014277 500000000000000alberta-2.0.1/add_ons/meshtv/Common/alberta_meshtv.c0000644000042300001440000006502210676724261017366 00000000000000/*--------------------------------------------------------------------------*/ /* alberta_meshtv: An interface from ALBERTA to the visualization package */ /* MeshTV */ /* */ /* file: alberta_meshtv.c */ /* */ /* */ /* description: This program converts ALBERTA meshes and dof_real_[d_]vecs */ /* to SILO format understood by MeshTV. */ /* Program calling syntax was adopted from albertagrape*. */ /*--------------------------------------------------------------------------*/ /* */ /* authors: Daniel Koester */ /* Institut fuer Mathematik */ /* Universitaet Augsburg */ /* Universitaetsstr. 14 */ /* D-86159 Augsburg, Germany */ /* */ /* (c) by D. Koester (2004) */ /* */ /*--------------------------------------------------------------------------*/ #include #include #include #include "silo.h" #include "alberta.h" /***************************************************************************/ /* convert_string(in): Replace all non-alphanumeric characters in "string" */ /* with underscores. */ /***************************************************************************/ static void convert_string(char *pos) { for(; *pos; pos++) if(!isalnum((int) *pos)) *pos = '_'; } /***************************************************************************/ /* add_mesh(silo, mesh): Convert given ALBERTA mesh to SILO UCD format and */ /* add the result to the output file. Return value is a pointer to the */ /* SILO name of the mesh (needed for the output of subsequent */ /* DOF_REAL_[D_]VECS). */ /***************************************************************************/ #if DIM_OF_WORLD > 1 static char *add_mesh(DBfile *silo, MESH *mesh) { FUNCNAME("add_mesh"); MACRO_DATA *data; int i,j; REAL *new_coords[DIM_OF_WORLD]; int shapesize[1]; int shapecnt[1]; #if DIM_OF_WORLD == 3 DBfacelist *facelist = NULL; #endif static int meshcount = 0; static char mesh_name[1024] = {}; char zonelist_name[1024] = {}; char facelist_name[1024] = {}; /* Step 0: Unfortunately, this stupidity turned out to be necessary. SILO */ /* demands a unique name for each object!! */ ++meshcount; if(strlen(mesh->name) > 900) ERROR_EXIT("mesh->name is too long!\n"); convert_string((char *)mesh->name); sprintf(mesh_name, "%s%d", mesh->name, meshcount); sprintf(zonelist_name, "%s_ZONELIST", mesh_name); sprintf(facelist_name, "%s_FACELIST", mesh_name); /* Step 1: convert the current mesh to a macro triangulation, which */ /* has index-based information about the current triangulation. */ /* Some checks on mesh sanity are also done by this routine. */ data = mesh2macro_data(mesh); /* Step 2: The coordinate array needs to be resorted: */ /* Instead of (c[0][0] ... c[0][DOW-1] c[1][0] ... c[1][DOW-1]...) we need */ /* (c[0][0] ... c[N][0]), (c[0][1] ... c[N][1]), ...(c[0][DOW-1]... */ for(i = 0; i < DIM_OF_WORLD; i++) { new_coords[i] = MEM_ALLOC(data->n_total_vertices, REAL); for(j = 0; j < data->n_total_vertices; j++) new_coords[i][j] = data->coords[j][i]; } /* Step 3: Write a SILO zonelist object to file "silo". */ shapesize[0] = N_VERTICES(DIM_OF_WORLD); shapecnt[0] = data->n_macro_elements; TEST_EXIT(!DBPutZonelist(silo, /* The SILO file */ zonelist_name, /* name for the zonelist object */ data->n_macro_elements, /* number of zones */ DIM_OF_WORLD, /* number of spacial dimensions */ data->mel_vertices, /* node indices */ data->n_macro_elements /* length of */ * N_VERTICES(DIM_OF_WORLD),/* data->mel_vertices */ 0, /* origin of indices in the array */ shapesize, /* array containing size of elements */ shapecnt, /* no. of elements of each shape */ 1), /* no. of shapes */ "Could not write zone list!\n"); #if DIM_OF_WORLD == 3 /* Step 4: Have SILO calculate an external face list for us. */ facelist = DBCalcExternalFacelist( data->mel_vertices, /* array of node indices */ data->n_total_vertices, /* no. of nodes in mesh */ 0, /* origin of indices */ shapesize, /* array containing size of elements */ shapecnt, /* no. of elements of each shape */ 1, /* no. of shapes */ NULL, /* material number array */ 0); /* method for calculating faces */ TEST_EXIT(facelist, "Could not calculate external face list!\n"); /* Step 5: Write the face list to the SILO file. */ TEST_EXIT(!DBPutFacelist(silo, /* The SILO file */ facelist_name, /* name of the facelist object */ facelist->nfaces, /* number of external faces */ DIM_OF_WORLD, /* number of dims in mesh */ facelist->nodelist, /* indices of all faces */ facelist->lnodelist, /* length of nodelist */ facelist->origin, /* origin of indices */ NULL, /* zone number of each face */ facelist->shapesize, /* array of face sizes */ facelist->shapecnt,/* no. of faces of each size */ facelist->nshapes, /* no. of face sizes */ NULL, /* face types, not necessary */ NULL, /* identifier for each type, unused */ 0), /* no. of face types, unused */ "Could not write face list!\n"); #endif /* Step 5: Write the mesh to the SILO file. */ TEST_EXIT(!DBPutUcdmesh(silo, mesh_name, DIM_OF_WORLD, NULL, /* ndims-length array of axis names */ (float **)new_coords, /* stupid conversion... */ data->n_total_vertices, data->n_macro_elements, zonelist_name, #if DIM_OF_WORLD < 3 NULL, #else facelist_name, #endif /* A primitive hack to get the correct data format */ (sizeof(REAL)==sizeof(double))?DB_DOUBLE:DB_FLOAT, NULL), "Could not write mesh!\n"); /* Step 6: Clean up. */ for(i = 0; i < DIM_OF_WORLD; i++) MEM_FREE(new_coords[i], data->n_total_vertices, REAL); free_macro_data(data); return(mesh_name); } #endif /***************************************************************************/ /* add_drv(silo, mesh, mesh_name, drv): Convert given ALBERTA DOF_REAL_VEC */ /* to SILO format and add the result to the output file. */ /***************************************************************************/ void add_drv(DBfile *silo, MESH *mesh, char *mesh_name, DOF_REAL_VEC *drv) { FUNCNAME("add_drv"); REAL *new_vec; static int drv_count = 0; char drv_name[1024]; int i, n0, index = 0; int is_node_centered = true; int *vert_ind = NULL; const EL_INFO *el_info = NULL; DOF **local_dof_ptr; DOF_INT_VEC *dof_vert_ind = NULL; const DOF_ADMIN *admin = drv->fe_space->admin; TRAVERSE_STACK *stack = get_traverse_stack(); /* Step 0: The same naming hysteria as above... */ ++drv_count; if(strlen(drv->name) > 900) ERROR_EXIT("drv.name is too long!\n"); convert_string((char *)drv->name); sprintf(drv_name, "%s%d", drv->name, drv_count); /* Step 1: We decide whether the values are node-centered or zone-centered */ /* based on the value of drv->fe_space->bas_fcts->ndof. */ if(drv->fe_space->bas_fcts->n_dof[VERTEX]) is_node_centered = true; else if(drv->fe_space->bas_fcts->n_dof[CENTER]) is_node_centered = false; else ERROR_EXIT("Could not determine centering type of data (n_dof[VERTEX] and n_dof[CENTER] both nil).\n"); if(is_node_centered) { new_vec = MEM_ALLOC(mesh->n_vertices, REAL); n0 = admin->n0_dof[VERTEX]; dof_vert_ind = get_dof_int_vec("vertex indices", drv->fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = 0); } else { new_vec = MEM_ALLOC(mesh->n_elements, REAL); n0 = admin->n0_dof[CENTER]; } /* Step 2: We need to copy the correct values of drv->vec into new_vec. */ for (el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); el_info; el_info=traverse_next(stack,el_info)) { local_dof_ptr = el_info->el->dof; if(is_node_centered) { for (i = 0; i < N_VERTICES(DIM_OF_WORLD); i++) if (!vert_ind[local_dof_ptr[mesh->node[VERTEX] + i][n0]]) { /* assign a global index to each vertex in the same way as above. */ vert_ind[local_dof_ptr[i][n0]] = -1; new_vec[index] = drv->vec[local_dof_ptr[i][n0]]; index++; } } else { /* just use the first CENTER dof of each element. */ new_vec[index] = drv->vec[local_dof_ptr[mesh->node[CENTER]][n0]]; index++; } } /* Just another cheap check to see if everything is alright. */ if(is_node_centered) TEST_EXIT(index == mesh->n_vertices, "Wrong no. of vertices counted!\n"); else TEST_EXIT(index == mesh->n_elements, "Wrong no. of elements counted!\n"); /* Step 3: Write the node values to the SILO file. */ TEST_EXIT(!DBPutUcdvar1(silo, drv_name, mesh_name, (float *)new_vec, index, /* length of new_vec */ NULL, /* mixed-data values, unused */ 0, /* length of mixed-data array, unused */ (sizeof(REAL)==sizeof(double))?DB_DOUBLE:DB_FLOAT, (is_node_centered ? DB_NODECENT : DB_ZONECENT), NULL), /* optlist, unused */ "Could not write DOF_REAL_VEC %s to file!\n", drv->name); /* Step 4: Clean up. */ MEM_FREE(new_vec, index, REAL); free_traverse_stack(stack); free_dof_int_vec(dof_vert_ind); } /***************************************************************************/ /* add_drdv(silo, mesh, mesh_name, drv): Convert given DOF_REAL_D_VEC */ /* to SILO format and add the result to the output file. */ /***************************************************************************/ void add_drdv(DBfile *silo, MESH *mesh, char *mesh_name, DOF_REAL_D_VEC *drdv) { FUNCNAME("add_drdv"); REAL *new_vec[DIM_OF_WORLD]; static int drdv_count = 0; char drdv_name[1024]; int i, j, n0, index = 0; int is_node_centered = true; int *vert_ind = NULL; const char *varnames[3] = {"x", "y", "z"}; const EL_INFO *el_info = NULL; DOF **local_dof_ptr; DOF_INT_VEC *dof_vert_ind = NULL; const DOF_ADMIN *admin = drdv->fe_space->admin; TRAVERSE_STACK *stack = get_traverse_stack(); /* Step 0: The same naming hysteria as above... */ ++drdv_count; if(strlen(drdv->name) > 900) ERROR_EXIT("drdv.name is too long!\n"); convert_string((char *)drdv->name); sprintf(drdv_name, "%s%d", drdv->name, drdv_count); /* Step 1: We decide whether the values are node-centered or zone-centered */ /* based on the value of drdv->fe_space->bas_fcts->ndof. */ if(drdv->fe_space->bas_fcts->n_dof[VERTEX]) is_node_centered = true; else if(drdv->fe_space->bas_fcts->n_dof[CENTER]) is_node_centered = false; else ERROR_EXIT("Could not determine centering type of data (n_dof[VERTEX] and n_dof[CENTER] both nil).\n"); if(is_node_centered) { for(i = 0; i < DIM_OF_WORLD; i++) new_vec[i] = MEM_ALLOC(mesh->n_vertices, REAL); n0 = admin->n0_dof[VERTEX]; dof_vert_ind = get_dof_int_vec("vertex indices", drdv->fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = 0); } else { for(i = 0; i < DIM_OF_WORLD; i++) new_vec[i] = MEM_ALLOC(mesh->n_elements, REAL); n0 = admin->n0_dof[CENTER]; } /* Step 2: We need to copy the correct values of drdv->vec into new_vec. */ for (el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL); el_info; el_info=traverse_next(stack,el_info)) { local_dof_ptr = el_info->el->dof; if(is_node_centered) { for (i = 0; i < N_VERTICES(DIM_OF_WORLD); i++) if (!vert_ind[local_dof_ptr[mesh->node[VERTEX] + i][n0]]) { /* assign a global index to each vertex in the same way as above. */ vert_ind[local_dof_ptr[i][n0]] = -1; for (j = 0; j < DIM_OF_WORLD; j++) new_vec[j][index] = drdv->vec[local_dof_ptr[i][n0]][j]; index++; } } else { /* just use the first CENTER dof of each element. */ for (j = 0; j < DIM_OF_WORLD; j++) new_vec[j][index] = drdv->vec[local_dof_ptr[mesh->node[CENTER]][n0]][j]; index++; } } /* Just another cheap check to see if everything is alright. */ if(is_node_centered) TEST_EXIT(index == mesh->n_vertices, "Wrong no. of vertices counted!\n"); else TEST_EXIT(index == mesh->n_elements, "Wrong no. of elements counted!\n"); /* Step 3: Write the node values to the SILO file. */ TEST_EXIT(!DBPutUcdvar(silo, drdv_name, mesh_name, DIM_OF_WORLD, (char **)varnames, (float **)new_vec, index, /* length of new_vec */ NULL, /* mixed-data values, unused */ 0, /* length of mixed-data array, unused */ (sizeof(REAL)==sizeof(double))?DB_DOUBLE:DB_FLOAT, (is_node_centered ? DB_NODECENT : DB_ZONECENT), NULL), /* optlist, unused */ "Could not write DOF_REAL_VEC %s to file!\n", drdv->name); /* Step 4: Clean up. */ for (j = 0; j < DIM_OF_WORLD; j++) MEM_FREE(new_vec[j], index, REAL); free_traverse_stack(stack); free_dof_int_vec(dof_vert_ind); } #if DIM_OF_WORLD == 1 /***************************************************************************/ /* add_curve(silo, mesh, drv): Convert given "drv" to a SILO curve object */ /* and write the result to the output file. This method of plotting does */ /* not seem to be fully supported my MeshTV at the moment. :-( */ /***************************************************************************/ static void add_curve(DBfile *silo, MESH *mesh, DOF_REAL_VEC *drv) { FUNCNAME("add_curve"); REAL *coord_vec; REAL *data_vec; static int drv_count = 0; char drv_name[1024]; int i, n0, index = 0; int is_node_centered = true; int *vert_ind = NULL; const EL_INFO *el_info = NULL; DOF **local_dof_ptr; DOF_INT_VEC *dof_vert_ind = NULL; const DOF_ADMIN *admin = drv->fe_space->admin; TRAVERSE_STACK *stack = get_traverse_stack(); /* Step 0: The same naming hysteria as above... */ ++drv_count; if(strlen(drv->name) > 900) ERROR_EXIT("drv.name is too long!\n"); convert_string((char *)drv->name); sprintf(drv_name, "%s%d", drv->name, drv_count); /* Step 1: We decide whether the values are node-centered or zone-centered */ /* based on the value of drv->fe_space->bas_fcts->ndof. */ if(drv->fe_space->bas_fcts->n_dof[VERTEX]) is_node_centered = true; else if(drv->fe_space->bas_fcts->n_dof[CENTER]) is_node_centered = false; else ERROR_EXIT("Could not determine centering type of data (n_dof[VERTEX] and n_dof[CENTER] both nil).\n"); if(is_node_centered) { coord_vec = MEM_ALLOC(mesh->n_vertices, REAL); data_vec = MEM_ALLOC(mesh->n_vertices, REAL); n0 = admin->n0_dof[VERTEX]; dof_vert_ind = get_dof_int_vec("vertex indices", drv->fe_space); GET_DOF_VEC(vert_ind, dof_vert_ind); FOR_ALL_DOFS(admin, vert_ind[dof] = 0); } else { coord_vec = MEM_ALLOC(mesh->n_elements, REAL); data_vec = MEM_ALLOC(mesh->n_elements, REAL); n0 = admin->n0_dof[CENTER]; } /* Step 2: We need to copy the correct values of drv->vec into new_vec. */ for (el_info = traverse_first(stack, mesh, -1, CALL_LEAF_EL|FILL_COORDS); el_info; el_info=traverse_next(stack,el_info)) { local_dof_ptr = el_info->el->dof; if(is_node_centered) { for (i = 0; i < 2; i++) if (!vert_ind[local_dof_ptr[mesh->node[VERTEX] + i][n0]]) { /* assign a global index to each vertex in the same way as above. */ vert_ind[local_dof_ptr[i][n0]] = -1; coord_vec[index] = el_info->coord[i][0]; data_vec[index] = drv->vec[local_dof_ptr[i][n0]]; index++; } } else { /* just use the first CENTER dof of each element. */ coord_vec[index] = 0.5 *(el_info->coord[0][0] + el_info->coord[1][0]); data_vec[index] = drv->vec[local_dof_ptr[mesh->node[CENTER]][n0]]; index++; } } /* Just another cheap check to see if everything is alright. */ if(is_node_centered) TEST_EXIT(index == mesh->n_vertices, "Wrong no. of vertices counted!\n"); else TEST_EXIT(index == mesh->n_elements, "Wrong no. of elements counted!\n"); /* Step 3: Write the node values to the SILO file. */ TEST_EXIT(!DBPutCurve(silo, drv_name, coord_vec, data_vec, (sizeof(REAL)==sizeof(double))?DB_DOUBLE:DB_FLOAT, index, /* length of vectors */ NULL), "Could not write DOF_REAL_VEC %s to file!\n", drv->name); /* Step 4: Clean up. */ MEM_FREE(data_vec, index, REAL); MEM_FREE(coord_vec, index, REAL); free_traverse_stack(stack); free_dof_int_vec(dof_vert_ind); } #endif /***************************************************************************/ /* print_help(): Print the error/help message to file "f" when calling the */ /* program "myname" from the command line. Exit with "status". */ /***************************************************************************/ static void print_help(DBfile *silo, const char *myname, FILE *f, int status) { fprintf(f, "Usage: %s [-p PATH] [OPTIONS]\n" \ " -o SILOFILE\n" \ " -m MESH [-s DRV] [-s DRV2] ... [-v DRDV] [-v DRDV2]..." \ " [-m MESH2 ...]\n" \ "\n" \ "Example:\n" \ " %s --mesh=mymesh -s temperature --vector velocity -o tvmesh\n" \ " where \"mymesh\", \"temperature\" and \"velocity\" are file-names.\n" \ "\n" \ "If a long option shows an argument as mandatory, then it is mandatory\n" \ "for the equivalent short option also. Similarly for optional arguments.\n" \ "\n" \ "The order of the options _is_ significant in the following cases:\n" \ "`-p PATH' alters the search path for all following data-files.\n" \ "`-m MESH' specifies a mesh for all following DRVs and DRDVs (see below)\n" \ "\n" \ "Options:\n" \ " -m, --mesh=MESH\n" \ " The file-name of an ALBERTA-mesh gnereated by the ALBERTA\n" \ " library routines `write_mesh()' or `write_mesh_xdr()'\n" \ " `-x' and `-b' options below.\n" \ " This option is mandatory and may not be omitted. This option\n" \ " may be specified multiple times. All following dof-vectors\n" \ " given by the `-s' and `-v' options must belong to the most\n" \ " recently specified mesh.\n" \ " NOTE: Only dim==DIM_OF_WORLD=2,3 is possible!\n" \ " -b, --binary\n" \ " Expect MESH, DRV and DRDV to contain data in host dependent\n" \ " byte-order, generated by `write_SOMETHING()' routines of the\n" \ " ALBERTA library (SOMETHING is `mesh', `dof_real_vec' etc.\n" \ " -x, --xdr\n" \ " This is the default and just mentioned here for completeness.\n" \ " Expect MESH, DRV and DRDV to contain data in network\n" \ " byte-order, generated by `write_SOMETHING_xdr()' routines\n" \ " of the ALBERTA library. Per convention this means big-endian\n" \ " byte-order.\n" \ " -s, --scalar=DRV\n" \ " Load the data-file DRV which must contain a DOF_REAL_VEC\n" \ " dumped to disk by `write_dof_real_vec[_xdr]()'.\n" \ " This option may be specified multiple times. The DOF_REAL_VECs\n"\ " must belong to the most recently specified mesh.\n" \ " See `-m' and `-b' above.\n" \ " -v, --vector=DRDV\n" \ " Load the data-file DRDV which must contain a DOF_REAL_D_VEC\n" \ " dumped to disk by `write_dof_real_d_vec[_xdr]()'.\n" \ " This option may be specified multiple times. The vector\n" \ " must belong to the most recently specified mesh.\n" \ " See `-m' and `-b' above.\n" \ " -o, --output=SILOFILE\n" \ " Specify an output file name in SILO format. Must come before\n" \ " the first mesh file, otherwise 'output.silo' is taken as\n" \ " the default value.\n" \ " -p, --path=PATH\n" \ " Specify a path prefix for all following files. This option\n" \ " may be specified multiple times. PATH is supposed to be the\n" \ " directory containing all data-files specified by the following\n"\ " `-m', `-s' and `-v' options.\n" \ " -h, --help\n" \ " Print this help.\n", myname, myname); /* Be nice and close the silo file before exiting. */ if(silo) DBClose(silo); exit(status); } static char *filename(const char *path, const char *fn) { static char name[1024]; if (!fn) return(NULL); if (path == NULL || path[0] == '\0') { sprintf(name, "./%s", fn); } else { const char *cp = path; while (*cp) cp++; cp--; if (*cp == '/') sprintf(name, "%s%s", path, fn); else sprintf(name, "%s/%s", path, fn); } return(name); } static struct option long_options[] = { {"help", 0, 0, 'h' }, {"binary", 0, 0, 'b' }, {"xdr", 0, 0, 'x' }, {"output", 1, 0, 'o' }, {"path", 1, 0, 'p' }, {"mesh", 1, 0, 'm' }, {"scalar", 1, 0, 's' }, {"vector", 1, 0, 'v' }, { NULL, 0, 0, '\0' } }; int main(int argc, char **argv) { FUNCNAME("main"); DBfile *silo = NULL; char *silo_filename = "output.silo"; MESH *mesh = NULL; char *mesh_name = NULL; char *mesh_filename = NULL; DOF_REAL_VEC *drv = NULL; DOF_REAL_D_VEC *drdv = NULL; char *fn, *path = NULL; int c, option_index; MESH *(*rm)(const char *, REAL *, NODE_PROJECTION *(*)(MESH *, MACRO_EL *, int)); DOF_REAL_VEC *(*rdrv)(const char *, MESH *, FE_SPACE *); DOF_REAL_D_VEC *(*rdrdv)(const char *, MESH *, FE_SPACE *); rm = read_mesh_xdr; rdrv = read_dof_real_vec_xdr; rdrdv = read_dof_real_d_vec_xdr; while (1) { c = getopt_long(argc, argv, "bhm:o:s:v:x", long_options, &option_index); if (c == -1) break; switch (c) { case 'b': rm = read_mesh; rdrv = read_dof_real_vec; rdrdv = read_dof_real_d_vec; break; case 'h': print_help(silo, argv[0], stdout, 0); break; case 'o': if(silo) { ERROR("an output file was already specified!\n"); print_help(silo, argv[0], stderr, 1); } silo_filename = optarg; break; case 'm': mesh_filename = optarg; fn = filename(path, mesh_filename); MSG("reading mesh `%s'\n", fn); mesh = (*rm)(fn, NULL, NULL); TEST_EXIT(mesh, "could not read mesh file `%s'!\n", fn); TEST_EXIT(mesh->dim == DIM_OF_WORLD, "mesh.dim must equal DIM_OF_WORLD == %d!\n", DIM_OF_WORLD); if(!silo) { fn = filename(path, silo_filename); MSG("Creating SILO file '%s'\n", fn); silo = DBCreate(fn, DB_CLOBBER, DB_LOCAL, NULL, DB_PDB); TEST_EXIT(silo, "could not create SILO file '%s'!\n", fn); } /* If DIM_OF_WORLD == 1, then we do not write a mesh, since this is not */ /* supported by SILO. Instead we simply use DBPutCurve. */ #if DIM_OF_WORLD > 1 MSG("adding mesh '%s' to SILO file '%s'\n", mesh_filename, silo_filename); mesh_name = add_mesh(silo, mesh); #endif break; case 'p': path = optarg; break; case 's': if (!mesh) { ERROR("a mesh has to be given before any functions!\n"); print_help(silo, argv[0], stderr, 1); } fn = filename(path, optarg); MSG("reading dof_real_vec `%s'\n", fn); drv = (*rdrv)(fn, mesh, NULL); TEST_EXIT(drv, "could not read dof_real_vec `%s'!\n", fn); MSG("adding DOF_REAL_VEC '%s' to SILO file '%s'\n", drv->name, silo_filename); #if DIM_OF_WORLD > 1 add_drv(silo, mesh, mesh_name, drv); #else add_curve(silo, mesh, drv); #endif break; case 'v': #if DIM_OF_WORLD ==1 ERROR_EXIT("A DOF_REAL_D_VEC in 1D? Please use DOF_REAL_VECs instead!\n"); #endif if (!mesh) { ERROR("a mesh has to be given before any functions!\n"); print_help(silo, argv[0], stderr, 1); } fn = filename(path, optarg); MSG("reading dof_real_d_vec `%s'\n", fn); drdv = (*rdrdv)(fn, mesh, NULL); TEST_EXIT(drdv, "could not read dof_real_d_vec `%s'!\n", fn); MSG("adding DOF_REAL_D_VEC '%s' to SILO file '%s'\n", drdv->name, silo_filename); add_drdv(silo, mesh, mesh_name, drdv); break; case 'x': rm = read_mesh_xdr; rdrv = read_dof_real_vec_xdr; rdrdv = read_dof_real_d_vec_xdr; break; default: print_help(silo, argv[0], stderr, 1); } } if (mesh_filename == NULL) { ERROR("a mesh has to be given!\n\n"); print_help(silo, argv[0], stderr, 1); } DBClose(silo); return(0); } alberta-2.0.1/add_ons/meshtv/1d/0000777000042300001440000000000011067147345013352 500000000000000alberta-2.0.1/add_ons/meshtv/1d/Makefile.am0000644000042300001440000000245110676724260015326 00000000000000AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 1 ALBERTA_DEBUG = 0 # # Names of the programs to build. # bin_PROGRAMS = alberta_meshtv1 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_meshtv1_SOURCES = alberta_meshtv.c # # linker flags and libraries for all programs # alberta_meshtv1_LDADD = $(ALBERTA_LIBS_1) $(OPENGL_LIB) $(SILO_LIB) alberta_meshtv1_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_1) alberta_meshtv1_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@SILO_INCLUDE_PATH@ \ $(EXTRA_INC) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common alberta-2.0.1/add_ons/meshtv/1d/Makefile.in0000644000042300001440000004304411067146146015336 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = alberta_meshtv1$(EXEEXT) subdir = add_ons/meshtv/1d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) nodist_alberta_meshtv1_OBJECTS = alberta_meshtv.$(OBJEXT) alberta_meshtv1_OBJECTS = $(nodist_alberta_meshtv1_OBJECTS) am__DEPENDENCIES_1 = alberta_meshtv1_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_meshtv1_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_alberta_meshtv1_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 1 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_meshtv1_SOURCES = alberta_meshtv.c # # linker flags and libraries for all programs # alberta_meshtv1_LDADD = $(ALBERTA_LIBS_1) $(OPENGL_LIB) $(SILO_LIB) alberta_meshtv1_DEPENDENCIES = # otherwise automake emits a dependency alberta_meshtv1_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@SILO_INCLUDE_PATH@ \ $(EXTRA_INC) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/meshtv/1d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/meshtv/1d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done alberta_meshtv1$(EXEEXT): $(alberta_meshtv1_OBJECTS) $(alberta_meshtv1_DEPENDENCIES) @rm -f alberta_meshtv1$(EXEEXT) $(alberta_meshtv1_LINK) $(alberta_meshtv1_OBJECTS) $(alberta_meshtv1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_meshtv.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # on $(ALBERTA_LIBS_1) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/meshtv/2d/0000777000042300001440000000000011067147345013353 500000000000000alberta-2.0.1/add_ons/meshtv/2d/Makefile.am0000644000042300001440000000245110676724261015330 00000000000000AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 2 ALBERTA_DEBUG = 0 # # Names of the programs to build. # bin_PROGRAMS = alberta_meshtv2 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_meshtv2_SOURCES = alberta_meshtv.c # # linker flags and libraries for all programs # alberta_meshtv2_LDADD = $(ALBERTA_LIBS_2) $(OPENGL_LIB) $(SILO_LIB) alberta_meshtv2_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_2) alberta_meshtv2_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@SILO_INCLUDE_PATH@ \ $(EXTRA_INC) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common alberta-2.0.1/add_ons/meshtv/2d/Makefile.in0000644000042300001440000004304411067146146015337 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = alberta_meshtv2$(EXEEXT) subdir = add_ons/meshtv/2d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) nodist_alberta_meshtv2_OBJECTS = alberta_meshtv.$(OBJEXT) alberta_meshtv2_OBJECTS = $(nodist_alberta_meshtv2_OBJECTS) am__DEPENDENCIES_1 = alberta_meshtv2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_meshtv2_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_alberta_meshtv2_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 2 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_meshtv2_SOURCES = alberta_meshtv.c # # linker flags and libraries for all programs # alberta_meshtv2_LDADD = $(ALBERTA_LIBS_2) $(OPENGL_LIB) $(SILO_LIB) alberta_meshtv2_DEPENDENCIES = # otherwise automake emits a dependency alberta_meshtv2_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@SILO_INCLUDE_PATH@ \ $(EXTRA_INC) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/meshtv/2d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/meshtv/2d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done alberta_meshtv2$(EXEEXT): $(alberta_meshtv2_OBJECTS) $(alberta_meshtv2_DEPENDENCIES) @rm -f alberta_meshtv2$(EXEEXT) $(alberta_meshtv2_LINK) $(alberta_meshtv2_OBJECTS) $(alberta_meshtv2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_meshtv.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # on $(ALBERTA_LIBS_2) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: alberta-2.0.1/add_ons/meshtv/3d/0000777000042300001440000000000011067147345013354 500000000000000alberta-2.0.1/add_ons/meshtv/3d/Makefile.am0000644000042300001440000000245110676724261015331 00000000000000AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 3 ALBERTA_DEBUG = 0 # # Names of the programs to build. # bin_PROGRAMS = alberta_meshtv3 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_meshtv3_SOURCES = alberta_meshtv.c # # linker flags and libraries for all programs # alberta_meshtv3_LDADD = $(ALBERTA_LIBS_3) $(OPENGL_LIB) $(SILO_LIB) alberta_meshtv3_DEPENDENCIES = # otherwise automake emits a dependency # on $(ALBERTA_LIBS_3) alberta_meshtv3_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@SILO_INCLUDE_PATH@ \ $(EXTRA_INC) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common alberta-2.0.1/add_ons/meshtv/3d/Makefile.in0000644000042300001440000004304411067146146015340 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = alberta_meshtv3$(EXEEXT) subdir = add_ons/meshtv/3d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alberta-dims.m4 \ $(top_srcdir)/m4/check-package.m4 \ $(top_srcdir)/m4/frameworks.m4 $(top_srcdir)/m4/grapeiface.m4 \ $(top_srcdir)/m4/set-prefix.m4 \ $(top_srcdir)/m4/simple-enable-flag.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) nodist_alberta_meshtv3_OBJECTS = alberta_meshtv.$(OBJEXT) alberta_meshtv3_OBJECTS = $(nodist_alberta_meshtv3_OBJECTS) am__DEPENDENCIES_1 = alberta_meshtv3_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(alberta_meshtv3_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_alberta_meshtv3_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) # # some sources reside in ../Common # VPATH = $(srcdir):$(srcdir)/../Common ACLOCAL = @ACLOCAL@ ALBERTA_1 = @ALBERTA_1@ ALBERTA_2 = @ALBERTA_2@ ALBERTA_3 = @ALBERTA_3@ ALBERTA_DEBUG = 0 ALBERTA_DEBUG_CFLAGS = @ALBERTA_DEBUG_CFLAGS@ ALBERTA_INCLUDE_PATH = @ALBERTA_INCLUDE_PATH@ ALBERTA_LIBS_1 = @ALBERTA_LIBS_1@ ALBERTA_LIBS_2 = @ALBERTA_LIBS_2@ ALBERTA_LIBS_3 = @ALBERTA_LIBS_3@ # # could also use @...@ below, but this way the variable can be overridden # on the "make" command line. # ALBERTA_LIB_PATH = @ALBERTA_LIB_PATH@ ALBERTA_OPTIMIZE_CFLAGS = @ALBERTA_OPTIMIZE_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_ALL_LIB = @BLAS_ALL_LIB@ BLAS_INCLUDE = @BLAS_INCLUDE@ BLAS_INCLUDE_PATH = @BLAS_INCLUDE_PATH@ BLAS_LIB = @BLAS_LIB@ BLAS_LIB_PATH = @BLAS_LIB_PATH@ BLAS_NAME = @BLAS_NAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DAXPY_F77_FUNC = @DAXPY_F77_FUNC@ DCOPY_F77_FUNC = @DCOPY_F77_FUNC@ DDOT_F77_FUNC = @DDOT_F77_FUNC@ # # Defines. @...@ is substituted by running configure. # DEFS = -DHAVE_CONFIG_H \ -DDIM_OF_WORLD=$(DIM_OF_WORLD) \ -DALBERTA_DEBUG=$(ALBERTA_DEBUG) DEPDIR = @DEPDIR@ DEXPY_F77_FUNC = @DEXPY_F77_FUNC@ DMXPY_F77_FUNC = @DMXPY_F77_FUNC@ DNRM2_F77_FUNC = @DNRM2_F77_FUNC@ DRANDN_F77_FUNC = @DRANDN_F77_FUNC@ DSCAL_F77_FUNC = @DSCAL_F77_FUNC@ DSWAP_F77_FUNC = @DSWAP_F77_FUNC@ DSYMUTIL = @DSYMUTIL@ DXPAY_F77_FUNC = @DXPAY_F77_FUNC@ DX_ALL_LIB = @DX_ALL_LIB@ DX_INCLUDE = @DX_INCLUDE@ DX_INCLUDE_PATH = @DX_INCLUDE_PATH@ DX_LIB = @DX_LIB@ DX_LIB_PATH = @DX_LIB_PATH@ DX_NAME = @DX_NAME@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FLIBS = @FLIBS@ GLTOOLS_ALL_LIB = @GLTOOLS_ALL_LIB@ GLTOOLS_INCLUDE = @GLTOOLS_INCLUDE@ GLTOOLS_INCLUDE_PATH = @GLTOOLS_INCLUDE_PATH@ GLTOOLS_LIB = @GLTOOLS_LIB@ GLTOOLS_LIB_PATH = @GLTOOLS_LIB_PATH@ GLTOOLS_NAME = @GLTOOLS_NAME@ GNUCOMPAT_INCLUDE_PATH = @GNUCOMPAT_INCLUDE_PATH@ GRAPE_ALL_LIB = @GRAPE_ALL_LIB@ GRAPE_INCLUDE = @GRAPE_INCLUDE@ GRAPE_INCLUDE_PATH = @GRAPE_INCLUDE_PATH@ GRAPE_LIB = @GRAPE_LIB@ GRAPE_LIB_PATH = @GRAPE_LIB_PATH@ GRAPE_NAME = @GRAPE_NAME@ GREP = @GREP@ GZIP_PROGRAM = @GZIP_PROGRAM@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIBTOOL = @INSTALL_LIBTOOL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ OPENGL_ALL_LIB = @OPENGL_ALL_LIB@ OPENGL_INCLUDE = @OPENGL_INCLUDE@ OPENGL_INCLUDE_PATH = @OPENGL_INCLUDE_PATH@ OPENGL_LIB = @OPENGL_LIB@ OPENGL_LIB_PATH = @OPENGL_LIB_PATH@ OPENGL_NAME = @OPENGL_NAME@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SILO_ALL_LIB = @SILO_ALL_LIB@ SILO_INCLUDE = @SILO_INCLUDE@ SILO_INCLUDE_PATH = @SILO_INCLUDE_PATH@ SILO_LIB = @SILO_LIB@ SILO_LIB_PATH = @SILO_LIB_PATH@ SILO_NAME = @SILO_NAME@ STRIP = @STRIP@ TAR_PROGRAM = @TAR_PROGRAM@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_ALL_LIBS = @X_ALL_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_exec_prefix = @expanded_exec_prefix@ expanded_prefix = @expanded_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(ALBERTA_OPTIMIZE_CFLAGS) # # Dimension of surrounding world DIM_OF_WORLD = 3 # # the sources (and headers) for the programs. The "nodist" prefix lets # "make dist" ignore these files. The resources reside in # $(srcdir)/../Common, hence "nodist". # nodist_alberta_meshtv3_SOURCES = alberta_meshtv.c # # linker flags and libraries for all programs # alberta_meshtv3_LDADD = $(ALBERTA_LIBS_3) $(OPENGL_LIB) $(SILO_LIB) alberta_meshtv3_DEPENDENCIES = # otherwise automake emits a dependency alberta_meshtv3_LDFLAGS = $(LDFLAGS) -R $(ALBERTA_LIB_PATH) # # Include paths. # INCLUDES = -I$(top_srcdir) \ -I$(srcdir)/../Common \ -I@ALBERTA_INCLUDE_PATH@ \ -I@SILO_INCLUDE_PATH@ \ $(EXTRA_INC) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu add_ons/meshtv/3d/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu add_ons/meshtv/3d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done alberta_meshtv3$(EXEEXT): $(alberta_meshtv3_OBJECTS) $(alberta_meshtv3_DEPENDENCIES) @rm -f alberta_meshtv3$(EXEEXT) $(alberta_meshtv3_LINK) $(alberta_meshtv3_OBJECTS) $(alberta_meshtv3_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alberta_meshtv.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # on $(ALBERTA_LIBS_3) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: