Skip to content

Commit

Permalink
Merge integration-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed Mar 21, 2011
2 parents 2208ff2 + 986c9eb commit 9c1be41
Show file tree
Hide file tree
Showing 102 changed files with 12,439 additions and 3,357 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ data
CMake
docs/html
docs/latex
.metadata
*.kdev4
.cproject
.project
nbproject
eclipse-style
.settings
51 changes: 33 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ list (APPEND CMAKE_MODULE_PATH "${Dohp_SOURCE_DIR}/CMake")
# Normally PETSc is built with MPI, if not, use CC=mpicc, etc
find_package (PETSc REQUIRED)
find_package (ITAPS COMPONENTS MESH GEOM REL)
find_path (MEMCHECK_HEADER valgrind/memcheck.h)
if (MEMCHECK_HEADER)
set (dUSE_VALGRIND TRUE)
endif ()

#find_package (Doxygen)

option (dUSE_DEBUG "Compile Dohp with extra debugging" ON)
option (dUSE_PARALLEL_HDF5 "Write HDF5 files in parallel" OFF)
option (Dohp_BUILD_TESTS "Build tests" ON)
option (Dohp_BUILD_TOOLS "Build tools" ON)
option (Dohp_BUILD_SANDBOX "Build programs in sandbox" OFF)
option (PEDANTIC_WARNINGS "Compile with pedantic warnings" ON)
option (BUILD_SHARED_LIBS "Build shared Dohp libraries" ON)
if (Dohp_BUILD_TESTS)
option (Dohp_TESTS_MALLOC_DUMP "Run all tests with -malloc_dump" ON)
mark_as_advanced (Dohp_TESTS_MALLOC_DUMP)
endif ()
option (Dohp_BUILD_TOOLS "Build tools" ON)
option (Dohp_BUILD_SANDBOX "Build programs in sandbox" OFF)
option (Dohp_PEDANTIC_WARNINGS "Compile with pedantic warnings" ON)
option (Dohp_WERROR "Treat warnings as errors (-Werror)" OFF)
option (BUILD_SHARED_LIBS "Build shared Dohp libraries" ON)

add_definitions (-std=c99)

Expand All @@ -24,16 +33,19 @@ if (Dohp_BUILD_TESTS)
set (Dohp_DATA_DIR "${Dohp_SOURCE_DIR}/data")
endif (Dohp_BUILD_TESTS)

if (PEDANTIC_WARNINGS)
set (DEFAULT_PEDANTIC_FLAGS "-pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wconversion -Wlogical-op -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wmissing-field-initializers -Wvariadic-macros -Wunsafe-loop-optimizations -Wvolatile-register-var -Wstrict-aliasing -funit-at-a-time -Wno-sign-conversion")
if (Dohp_PEDANTIC_WARNINGS)
set (DEFAULT_PEDANTIC_FLAGS "-pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wconversion -Wlogical-op -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wmissing-field-initializers -Wvariadic-macros -Wunsafe-loop-optimizations -Wvolatile-register-var -Wstrict-aliasing -funit-at-a-time -Wno-sign-conversion")
#set (DEFAULT_PEDANTIC_FLAGS "-Wunreachable-code -Wfloat-equal -Wc++-compat")
#set (DEFAULT_PEDANTIC_FLAGS "-pedantic -Wall -Wextra -Winline -Wshadow -Wconversion -Wlogical-op -Wmissing-prototypes -Wvla")
#set (DEFAULT_PEDANTIC_FLAGS "${DEFAULT_PEDANTIC_FLAGS} -Wno-sign-conversion -Wwrite-strings -Wstrict-aliasing -Wcast-align -fstrict-aliasing")
#set (DEFAULT_PEDANTIC_FLAGS "${DEFAULT_PEDANTIC_FLAGS} -Wdisabled-optimization -funit-at-a-time")
#set (DEFAULT_PEDANTIC_FLAGS "${DEFAULT_PEDANTIC_FLAGS} -Wpadded")
set (PEDANTIC_FLAGS ${DEFAULT_PEDANTIC_FLAGS} CACHE STRING "Compiler flags to enable pedantic warnings")
add_definitions (${PEDANTIC_FLAGS})
endif (PEDANTIC_WARNINGS)
set (Dohp_PEDANTIC_FLAGS ${DEFAULT_PEDANTIC_FLAGS} CACHE STRING "Compiler flags to enable pedantic warnings")
add_definitions (${Dohp_PEDANTIC_FLAGS})
endif ()
if (Dohp_WERROR)
add_definitions (-Werror)
endif ()

configure_file (${Dohp_SOURCE_DIR}/dohpconfig.h.in
${Dohp_BINARY_DIR}/include/dohpconfig.h @ONLY)
Expand All @@ -49,22 +61,25 @@ add_definitions (${PETSC_DEFINITIONS})
set (Dohp_DEPENDENT_LIBRARIES "${ITAPS_REL_LIBRARIES}" "${ITAPS_MESH_LIBRARIES}" "${ITAPS_GEOM_LIBRARIES}" "${PETSC_LIBRARIES}")
set (Dohp_LIBRARIES dohp ${Dohp_DEPENDENT_LIBRARIES})

set (ARCHIVE_OUTPUT_DIRECTORY ${Dohp_BINARY_DIR}/lib CACHE PATH "Output directory for Dohp archives")
set (LIBRARY_OUTPUT_DIRECTORY ${Dohp_BINARY_DIR}/lib CACHE PATH "Output directory for Dohp libraries")
set (RUNTIME_OUTPUT_DIRECTORY ${Dohp_BINARY_DIR}/bin CACHE PATH "Output directory for Dohp executables")
mark_as_advanced (ARCHIVE_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Dohp_BINARY_DIR}/lib CACHE PATH "Output directory for Dohp archives")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Dohp_BINARY_DIR}/lib CACHE PATH "Output directory for Dohp libraries")
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Dohp_BINARY_DIR}/bin CACHE PATH "Output directory for Dohp executables")
mark_as_advanced (CMAKE_ARCHIVE_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_RUNTIME_OUTPUT_DIRECTORY)

set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Convenience for testing
macro (dohp_link_executable name source)
function (dohp_link_executable name source)
add_executable (${name} ${source})
target_link_libraries (${name} dohp)
endmacro ()
macro (dohp_add_test name np)
add_test ("${name}" "${Dohp_TestWithReference}" "${PETSC_MPIEXEC}" "${np}" "${CMAKE_CURRENT_SOURCE_DIR}/refout/${name}.refout" ${ARGN})
endmacro()
endfunction ()
function (dohp_add_test name np)
if (Dohp_TESTS_MALLOC_DUMP)
set (extra_args "-malloc_dump")
endif ()
add_test ("${name}" "${Dohp_TestWithReference}" "${PETSC_MPIEXEC}" "${np}" "${CMAKE_CURRENT_SOURCE_DIR}/refout/${name}.refout" ${ARGN} ${extra_args})
endfunction ()
set (Dohp_TestWithReference "${Dohp_SOURCE_DIR}/TestWithReference.sh")

add_subdirectory (include)
Expand Down
1 change: 1 addition & 0 deletions dohpconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

#cmakedefine dUSE_DEBUG
#cmakedefine dUSE_PARALLEL_HDF5
#cmakedefine dUSE_VALGRIND

#endif
57 changes: 33 additions & 24 deletions include/dohp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@

#include "dohptype.h"
#include <stdint.h>
#include <petsc.h>
#include <petscsys.h>

#if defined dUSE_VALGRIND && 0
# include <valgrind/memcheck.h>
# define dMakeMemUndefined(mem,bytes) do { \
if (VALGRIND_MAKE_MEM_UNDEFINED((mem),(bytes))) dERROR(PETSC_COMM_SELF,PETSC_ERR_LIB,"Valgrind returned an error"); \
} while (0)
#else
# define dMakeMemUndefined(mem,bytes) do { \
if (dMemzero((mem),(bytes))) dERROR(PETSC_COMM_SELF,PETSC_ERR_MEMC,"Memory " #mem " is corrupt"); \
} while (0)
#endif

#define dSTATUS_UNOWNED (dEntStatus)0x1
#define dSTATUS_SHARED (dEntStatus)0x2
Expand All @@ -14,17 +25,18 @@
#define dEntTopoToITAPS(dtopo,itopo) (*(itopo) = (dtopo), 0)
#define dEntTypeToITAPS(dtype,itype) (*(itype) = (dtype), 0)

#define dCHK(err) if (PetscUnlikely(err)) return PetscError(__LINE__,__func__,__FILE__,__SDIR__,(err),0," ")
#define dERROR(n,...) return PetscError(__LINE__,__func__,__FILE__,__SDIR__,(n),1,__VA_ARGS__)
#define dCHK(err) do {if (PetscUnlikely(err)) return PetscError(PETSC_COMM_SELF,__LINE__,__func__,__FILE__,__SDIR__,(err),PETSC_ERROR_REPEAT," ");} while (0)
#define dERROR(comm,n,...) return PetscError((comm),__LINE__,__func__,__FILE__,__SDIR__,(n),PETSC_ERROR_INITIAL,__VA_ARGS__)

#define dPrintf PetscPrintf
#define dMemcpy(a,b,c) PetscMemcpy(a,b,c)
#define dMemzero(a,b) PetscMemzero(a,b)
#define dValidHeader(a,b,c) PetscValidHeaderSpecific(a,b,c)

#define dValidPointer(a,b) \
{ if (!(a)) dERROR(PETSC_ERR_ARG_NULL,"Null Pointer: Parameter # %d",(b)); \
if ((size_t)a & 3) dERROR(PETSC_ERR_ARG_BADPTR,"Invalid Pointer: Parameter # %d",(b));} \
#define dValidPointer(a,b) do { \
if (!(a)) dERROR(PETSC_COMM_SELF,PETSC_ERR_ARG_NULL,"Null Pointer: Parameter # %d",(b)); \
if ((size_t)a & 3) dERROR(PETSC_COMM_SELF,PETSC_ERR_ARG_BADPTR,"Invalid Pointer: Parameter # %d",(b)); \
} while (0)

#define dMalloc(a,b) PetscMalloc(a,b)
#define dNew(a,b) PetscNew(a,b)
Expand All @@ -34,7 +46,7 @@
#define dMallocM(n,t,p) (dMalloc((n)*sizeof(t),(p)))
#define dMallocA(n,p) (dMalloc((n)*sizeof(**(p)),(p)))
#define dCalloc(n,p) (dMalloc((n),(p)) || dMemzero(*(p),(n)))
#define dCallocA(n,p) (dCalloc((n)*sizeof(p),(p)))
#define dCallocA(n,p) (dCalloc((n)*sizeof(**(p)),(p)))

#define dValidPointer2(a,b,c,d) (dValidPointer((a),(b)) || dValidPointer((c),(d)))
#define dValidPointer3(a,b,c,d,e,f) (dValidPointer2((a),(b),(c),(d)) || dValidPointer((e),(f)))
Expand All @@ -44,8 +56,8 @@
#define dValidPointer7(a,b,c,d,e,f,g,h,i,j,k,l,m,n) (dValidPointer6((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l)) || dValidPointer((m),(n)))

#define dValidPointerSpecific(p,t,a) \
{if (!p) dERROR(PETSC_ERR_ARG_BADPTR,"Null Pointer: Parameter # %d",(a)); \
if ((size_t)(p) % sizeof(*(p))) dERROR(PETSC_ERR_ARG_BADPTR,"Insufficient alignment for pointer to %s: Parameter # %d should have %ld alignment",(t),(a),sizeof(*(p)));}
{if (!p) dERROR(PETSC_COMM_SELF,PETSC_ERR_ARG_BADPTR,"Null Pointer: Parameter # %d",(a)); \
if ((size_t)(p) % sizeof(*(p))) dERROR(PETSC_COMM_SELF,PETSC_ERR_ARG_BADPTR,"Insufficient alignment for pointer to %s: Parameter # %d should have %ld alignment",(t),(a),sizeof(*(p)));}
#define dValidPointerSpecific2(p0,t0,a0,p1,t1,a1) {dValidPointerSpecific(p0,t0,a0); dValidPointerSpecific(p1,t1,a1);}
#define dValidPointerSpecific3(p0,t0,a0,p1,t1,a1,p2,t2,a2) \
{dValidPointerSpecific(p0,t0,a0); dValidPointerSpecific2(p1,t1,a1,p2,t2,a2);}
Expand All @@ -64,10 +76,12 @@
#define dValidScalarPointer(p,a) dValidPointerSpecific((p),"dScalar",(a))
#define dValidRealPointer(p,a) dValidPointerSpecific((p),"dReal",(a))

#define dNonNullElse(a,b) ((a)?(a):(b))
#define dStrlen(s,l) PetscStrlen((s),(l))
extern dErr dObjectGetComm(dObject obj,MPI_Comm *comm);

extern dErr dRealTableView(dInt m,dInt n,const dReal mat[],const char *name,dViewer viewer);
extern dErr dRealTableView(dInt m,dInt n,const dReal mat[],dViewer viewer,const char *format,...);
extern dErr dIntTableView(dInt m,dInt n,const dInt mat[],dViewer viewer,const char *format,...);

static inline dInt dMaxInt(dInt a,dInt b) { return (a > b) ? a : b; }
static inline dInt dMinInt(dInt a,dInt b) { return (a < b) ? a : b; }
Expand Down Expand Up @@ -97,20 +111,15 @@ static inline void dTensorSymUncompress3(const dScalar Du[6],dScalar Dv[9])
/* stdbool.h has small (1 byte) bools, PETSc uses an enum which has few size guarantees, so we use it directly and keep
* it out of our public interface (which is why these typedefs are here and not in dohptype.h).
**/
typedef PetscTruth dTruth;
typedef PetscTruth dBool;
typedef PetscBool dBool;
#define dTRUE PETSC_TRUE
#define dFALSE PETSC_FALSE

#define dMAX_PATH_LEN PETSC_MAX_PATH_LEN
#define dNAME_LEN 256
#define dSTR_LEN 256

#if defined(__GNUC__)
# define dUNUSED __attribute__((unused))
#else
# define dUNUSED
#endif
#define dUNUSED PETSC_UNUSED

#define dCACHE_LINE 64l /* my cache lines are 64 bytes long */
#define dRPCL dCACHE_LINE/sizeof(dReal)
Expand Down Expand Up @@ -194,29 +203,29 @@ static inline void *dNextAlignedAddr(size_t alignment,void *ptr)

#if defined(PETSC_USE_DEBUG)
# define dFunctionBegin \
{ \
do { \
if (petscstack && (petscstack->currentsize < PETSCSTACKSIZE)) { \
petscstack->function[petscstack->currentsize] = __func__; \
petscstack->file[petscstack->currentsize] = __FILE__; \
petscstack->directory[petscstack->currentsize] = __SDIR__; \
petscstack->line[petscstack->currentsize] = __LINE__; \
petscstack->currentsize++; \
}}
}} while (0)
# define dFunctionReturn(a) \
{ \
do { \
PetscStackPop; \
return(a);}
return(a);} while (0)

# define dFunctionReturnVoid() \
{ \
do { \
PetscStackPop; \
return;}
return;} while (0)
#else
# define dFunctionBegin do { } while (0)
# define dFunctionReturn(a) return (a)
# define dFunctienReturnVoid() return
#endif

#define dASSERT(cond) if (!(cond)) { dERROR(1,"Assertion failed: " #cond); }
#define dASSERT(cond) if (!(cond)) { dERROR(PETSC_COMM_SELF,1,"Assertion failed: " #cond); }

#endif
65 changes: 57 additions & 8 deletions include/dohpfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

dEXTERN_C_BEGIN

extern dCookie dFSROT_COOKIE;
extern dClassId dFSROT_CLASSID;

typedef struct _p_dFS *dFS;
typedef struct _p_dFSRotation *dFSRotation;
typedef struct _n_dRuleset *dRuleset;
typedef struct _n_dRulesetIterator *dRulesetIterator;

/** User-provided constraint function.
* @param ctx User context
Expand All @@ -44,9 +46,13 @@ typedef enum {
} dFSBStatus;

typedef enum {dFS_HOMOGENEOUS, dFS_INHOMOGENEOUS} dFSHomogeneousMode;

typedef enum {dFS_CLOSURE, dFS_INTERIOR} dFSClosureMode;
typedef enum {dFS_ROTATE_FORWARD, dFS_ROTATE_REVERSE} dFSRotateMode;

extern const char *const dFSHomogeneousModes[];
extern const char *const dFSClosureModes[];
extern const char *const dFSRotateModes[];

#define dFSType char *

#define dFSCONT "cont"
Expand All @@ -58,25 +64,61 @@ extern dErr dFSGetJacobi(dFS,dJacobi*);
extern dErr dFSSetRuleTag(dFS,dJacobi,dMeshTag);
extern dErr dFSSetDegree(dFS,dJacobi,dMeshTag);
extern dErr dFSSetBlockSize(dFS,dInt);
extern dErr dFSGetBlockSize(dFS,dInt*);
extern dErr dFSSetFieldName(dFS,dInt,const char*);
extern dErr dFSRegisterBoundary(dFS,dInt,dFSBStatus,dFSConstraintFunction,void*);
extern dErr dFSRegisterBoundarySet(dFS,dMeshESH,dFSBStatus,dFSConstraintFunction,void*);
extern dErr dFSSetFromOptions(dFS);
extern dErr dFSSetType(dFS,const dFSType);
extern dErr dFSSetOrderingType(dFS,const MatOrderingType);
extern dErr dFSCreateExpandedVector(dFS,Vec*);
extern dErr dFSCreateGlobalVector(dFS,Vec*);
extern dErr dFSExpandedToLocal(dFS,Vec,Vec,InsertMode);
extern dErr dFSLocalToExpanded(dFS,Vec,Vec,InsertMode);
extern dErr dFSInhomogeneousDirichletCommit(dFS fs,Vec gc);
extern dErr dFSRotateGlobal(dFS,Vec,dFSRotateMode,dFSHomogeneousMode);
extern dErr dFSGetElements(dFS,dInt*,dInt*restrict*,s_dRule*restrict*,s_dEFS*restrict*,dInt*restrict*,dReal(*restrict*)[3]);
extern dErr dFSRestoreElements(dFS,dInt*,dInt*restrict*,s_dRule*restrict*,s_dEFS*restrict*,dInt*restrict*,dReal(*restrict*)[3]);
extern dErr dFSGetWorkspace(dFS,const char[],dReal(*restrict*)[3],dReal(*restrict*)[3][3],dReal*restrict*,dScalar*restrict*,dScalar*restrict*,dScalar*restrict*,dScalar*restrict*);
extern dErr dFSRestoreWorkspace(dFS,const char[],dReal(*restrict*)[3],dReal(*restrict*)[3][3],dReal*restrict*,dScalar*restrict*,dScalar*restrict*,dScalar*restrict*,dScalar*restrict*);
#if 0
extern dErr dFSGetElements(dFS,dInt*,dInt*restrict*,dRule*restrict*,dEFS*restrict*,dInt*restrict*,dReal(*restrict*)[3]);
extern dErr dFSRestoreElements(dFS,dInt*,dInt*restrict*,dRule*restrict*,dEFS*restrict*,dInt*restrict*,dReal(*restrict*)[3]);
#endif
extern dErr dFSMatSetValuesBlockedExpanded(dFS,Mat,dInt,const dInt[],dInt,const dInt[],const dScalar[],InsertMode);
extern dErr dFSGetMatrix(dFS,const MatType,Mat*);
extern dErr dFSSetOptionsPrefix(dFS,const char[]);
extern dErr dFSBuildSpace(dFS);
extern dErr dFSGetSubElementMeshSize(dFS,dInt*,dInt*,dInt *);
extern dErr dFSGetSubElementMesh(dFS,dInt nelem,dInt nvtx,dEntTopology topo[],dInt off[],dInt ind[]);
extern dErr dFSGetDomain(dFS,dMeshESH*);

extern dErr dFSGetPreferredQuadratureRuleSet(dFS,dMeshESH,dEntType,dEntTopology,dQuadratureMethod,dRuleset*);
extern dErr dFSGetEFS(dFS,dRuleset,dInt*,const dEFS**);
extern dErr dFSRestoreEFS(dFS,dRuleset,dInt*,const dEFS**);
extern dErr dRulesetGetMaxQ(dRuleset rset,dInt *maxQ,dInt *maxnpatches,dInt *maxQelem);
extern dErr dRulesetGetSize(dRuleset rset,dInt *size);
extern dErr dRulesetGetWorkspace(dRuleset rset,dScalar **q,dScalar **cjac,dScalar **cjinv,dScalar **jw,dInt dof,...);
extern dErr dRulesetRestoreWorkspace(dRuleset rset,dScalar **q,dScalar **cjac,dScalar **cjinv,dScalar **jw,dInt dof,...);
extern dErr dRulesetDestroy(dRuleset);

extern dErr dRulesetCreateIterator(dRuleset rset,dFS cfs,dRulesetIterator *iter);
extern dErr dRulesetIteratorDestroy(dRulesetIterator);
extern dErr dRulesetIteratorAddFS(dRulesetIterator it,dFS fs);
extern dErr dRulesetIteratorStart(dRulesetIterator it,Vec X,...);
extern dErr dRulesetIteratorNextPatch(dRulesetIterator it);
extern bool dRulesetIteratorHasPatch(dRulesetIterator it);
extern dErr dRulesetIteratorSetupElement(dRulesetIterator it);
extern dErr dRulesetIteratorGetPatch(dRulesetIterator it,dRule *rule,dEFS *efs,dScalar **ex,dScalar **ey,...);
extern dErr dRulesetIteratorGetPatchSpace(dRulesetIterator it,dScalar **cjinv,dReal **jw,dScalar **u,dScalar **du,dScalar **v,dScalar **dv,...);
extern dErr dRulesetIteratorRestorePatchSpace(dRulesetIterator it,dScalar **cjinv,dReal **jw,dScalar **u,dScalar **du,dScalar **v,dScalar **dv,...);
extern dErr dRulesetIteratorCommitPatch(dRulesetIterator it,dScalar *v,...);
extern dErr dRulesetIteratorGetPatchApplied(dRulesetIterator it,dInt *Q,const dReal **jw,dScalar **u,dScalar **du,dScalar **v,dScalar **dv,...);
extern dErr dRulesetIteratorCommitPatchApplied(dRulesetIterator it,InsertMode imode,const dScalar *v,const dScalar *dv,...);
extern dErr dRulesetIteratorGetPatchExplicit(dRulesetIterator it,dInt *P,const dReal **interp,const dReal **deriv,...);
extern dErr dRulesetIteratorGetPatchAssembly(dRulesetIterator it,dInt *P,const dInt **rowcol,const dReal **interp,const dReal **deriv,...);
extern dErr dRulesetIteratorRestorePatchAssembly(dRulesetIterator it,dInt *P,const dInt **rowcol,const dReal **interp,const dReal **deriv,...);
extern dErr dRulesetIteratorGetElement(dRulesetIterator it,dRule *rule,dEFS *efs,dScalar **ex,dScalar **ey,...);
extern dErr dRulesetIteratorGetMatrixSpaceSplit(dRulesetIterator it,dScalar **K,...);
extern dErr dRulesetIteratorFinish(dRulesetIterator);
extern dErr dRulesetIteratorAddStash(dRulesetIterator it,dInt patchbytes,dInt nodebytes);
extern dErr dRulesetIteratorGetStash(dRulesetIterator,void *patchstash,void *nodestash);

extern dErr dFSDestroy(dFS);
extern dErr dFSView(dFS,dViewer);
Expand All @@ -99,8 +141,15 @@ extern dErr dFSRotationApplyLocal(dFSRotation,Vec,dFSRotateMode,dFSHomogeneousMo
extern dErr dFSSetRotation(dFS,dFSRotation);
extern dErr dFSGetRotation(dFS,dFSRotation*);

extern dErr dFSGetCoordinates(dFS,Vec*);
extern dErr dFSGetGeometryVector(dFS,Vec*);
extern dErr dFSGetCoordinateFS(dFS,dFS*);
extern dErr dFSGetGeometryVectorExpanded(dFS,Vec*);
extern dErr dFSGetGeometryVectorGlobal(dFS,Vec*);

extern dErr dFSGetNodalCoordinateFS(dFS,dFS*);
extern dErr dFSGetNodalCoordinatesExpanded(dFS,Vec*);
extern dErr dFSGetNodalCoordinatesGlobal(dFS,Vec*);

extern dErr dFSRedimension(dFS,dInt,dFSClosureMode,dFS*);

/** The Q1 stuff doesn't really belong here, but it is used at the same level of abstraction and I'm too lazy to
* separate it out yet. This macro is a rather dirty way to avoid a bunch of code duplication without much runtime cost.
Expand Down

0 comments on commit 9c1be41

Please sign in to comment.