Skip to content

Commit 2fc4a12

Browse files
committed
bddc - initial version of bddc example
1 parent edfeb50 commit 2fc4a12

File tree

15 files changed

+1520
-62
lines changed

15 files changed

+1520
-62
lines changed

examples/petsc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.a
44
/area
55
/petsc-area
6+
/bddc
67
/bps
78
/petsc-bps
89
/bpsraw

examples/petsc/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LDLIBS = $(call pkgconf, --libs-only-l $(PETSc.pc) $(ceed.pc)) -lm
3737
OBJDIR := build
3838
SRCDIR := src
3939

40-
all: area bps bpsraw bpssphere multigrid
40+
all: area bddc bps bpsraw bpssphere multigrid
4141

4242
utils.c := $(sort $(wildcard $(SRCDIR)/*.c))
4343
utils.o = $(utils.c:%.c=$(OBJDIR)/%.o)
@@ -49,7 +49,13 @@ area.o = $(area.c:%.c=$(OBJDIR)/%.o)
4949
area: $(area.o) libutils.a | $(PETSc.pc) $(ceed.pc)
5050
$(call quiet,LINK.o) $(CEED_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
5151

52-
bps.c := bps.c
52+
bddc.c := bddc.c
53+
bddc.c := bddc.c $(utils.c)
54+
bddc.o = $(bddc.c:%.c=$(OBJDIR)/%.o)
55+
bddc: $(bddc.o) libutils.a | $(PETSc.pc) $(ceed.pc)
56+
$(call quiet,LINK.o) $(CEED_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
57+
58+
bps.c := bps.c $(utils.c)
5359
bps.o = $(bps.c:%.c=$(OBJDIR)/%.o)
5460
bps: $(bps.o) libutils.a | $(PETSc.pc) $(ceed.pc)
5561
$(call quiet,LINK.o) $(CEED_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
@@ -92,7 +98,7 @@ print: $(PETSc.pc) $(ceed.pc)
9298
@true
9399

94100
clean:
95-
$(RM) -r $(OBJDIR) *.vtu area bps bpsraw bpssphere multigrid libutils.a
101+
$(RM) -r $(OBJDIR) *.vtu area bddc bps bpsraw bpssphere multigrid libutils.a
96102

97103
$(PETSc.pc):
98104
$(if $(wildcard $@),,$(error \

examples/petsc/area.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ int main(int argc, char **argv) {
162162
}
163163

164164
// Create DM
165-
ierr = SetupDMByDegree(dm, degree, num_comp_u, topo_dim, false,
166-
(BCFunction)NULL);
165+
ierr = SetupDMByDegree(dm, degree, num_comp_u, topo_dim, true,
166+
false, (BCFunction)NULL);
167167
CHKERRQ(ierr);
168168

169169
// Create vectors

0 commit comments

Comments
 (0)