Skip to content

Add unit test to help with Jens DofObject issue #9

Merged
merged 3 commits into from Dec 13, 2012

4 participants

@benkirk
libMesh - C++ Finite Element Library member
benkirk commented Dec 13, 2012

Partially just to test the pull request process & workflow, but also useful.

I have added a
-D__LIBMESH_IS_UNIT_TESTING__

preprocessor macro that is defined when compiling the unit tests. This allows us to enable certain class constructors or utility get/set methods that we probably otherwise would not want public - see for example the dof_object.h patch contained in this request.

I created a unit test to set exacty the buffer he is reporting, and as I suspected the new VariableGroups patch is working as expected.

Hmm....

Problem must lie elsewhere.

@benkirk
libMesh - C++ Finite Element Library member
benkirk commented Dec 13, 2012

Specifically, when I run

$ make -C tests check

I get this:

Debugging DofObject buffer
 https://sourceforge.net/mailarchive/forum.php?thread_name=50C8EE7C.8090405%40gmail.com&forum_name=libmesh-users
 [ 2 8 257 0 257 96 257 192 257 0 ]
aobject.dof_number(0,0,0)=0
aobject.dof_number(0,1,0)=96
aobject.dof_number(0,2,0)=192
aobject.dof_number(1,0,0)=0
 [ 2 8 257 1 257 97 257 193 257 1 ]
aobject.dof_number(0,0,0)=1
aobject.dof_number(0,1,0)=97
aobject.dof_number(0,2,0)=193
aobject.dof_number(1,0,0)=1

Which is exactly as expected.

@roystgnr
libMesh - C++ Finite Element Library member
@benkirk
libMesh - C++ Finite Element Library member
@roystgnr
libMesh - C++ Finite Element Library member
@jwpeterson
libMesh - C++ Finite Element Library member
@benkirk
libMesh - C++ Finite Element Library member
@benkirk benkirk merged commit b379636 into libMesh:master Dec 13, 2012
@jwpeterson
libMesh - C++ Finite Element Library member
@jwpeterson
libMesh - C++ Finite Element Library member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.