[petsc-users] Setting up a PETSc section for field-split

Luc Berger-Vergiat lb2653 at columbia.edu
Fri Jan 24 17:10:40 CST 2014


Hi all,
I want to use PETSc as a solver for an FEM problem: modelization of 
shear bands using a 4 fields mixed formulation.

So far I am just trying to set up a two fields in a Petsc section, 
assign dof too each field and then set up the section to pass it to a 
DM. I am taking this approach because in general I want for fieldsplit 
to work purely on the algebraic level without knowledge of boundary 
conditions or geometry.

As of now I have issues when I try to assign a point and its associated 
degree of freedom to a field using: PetscSectionSetFieldDof.
Is this the correct way to associate a dof/point to a field?

I attached an example code and its makefile.

-- 
Best,
Luc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DMshell_ex1.c
Type: text/x-csrc
Size: 2070 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140124/5be2832e/attachment-0001.c>
-------------- next part --------------
CFLAGS                =
FFLAGS                =
CPPFLAGS        =
FPPFLAGS        =
LOCDIR          = /home/luc/research/simulations/Petsc_DM/
EXAMPLESC       = DMshell_ex1.c
MANSEC          = DM
SUBMANSEC       = DMDA

include ${PETSC_DIR}/conf/variables
include ${PETSC_DIR}/conf/rules


ex1: DMshell_ex1.o   chkopts
	-${CLINKER} -o ex1 DMshell_ex1.o  ${PETSC_DM_LIB}
	${RM} -f DMshell_ex1.o


More information about the petsc-users mailing list