Commit 910a1b51 authored by Chris Cantwell's avatar Chris Cantwell

Merge branch 'master' into feature/viscoelastic-ALE

Conflicts:
	library/SpatialDomains/Conditions.h
parents 60f9e75f 88446ec9
This diff is collapsed.
SET(GSMPI_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/build
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
......
# Use NIST_SPARSE_BLAS_ADDITIONAL_INCLUDE_DIRS to add additional search directories.
SET(NIST_SPARSE_BLAS_SEARCH_PATHS
${NIST_SPARSE_BLAS_ADDITIONAL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty/spblastk0.9b/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/spblastk0.9b/lib
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(NIST_SPARSE_BLAS NAMES sbtk PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})
FIND_LIBRARY(NIST_SPARSE_BLAS_DEBUG NAMES sbtk-g PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})
GET_FILENAME_COMPONENT(NIST_SPARSE_BLAS_LIB_PATH ${NIST_SPARSE_BLAS} PATH CACHE)
SET(NIST_SPARSE_BLAS_INCLUDE_DIR ${NIST_SPARSE_BLAS_LIB_PATH}/../include CACHE FILEPATH "Sparse matrix solve include directory.")
MARK_AS_ADVANCED(NIST_SPARSE_BLAS)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS_DEBUG)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS_INCLUDE_DIR)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS_LIB_PATH)
IF (NIST_SPARSE_BLAS)
SET(NIST_SPARSE_BLAS_FOUND ON)
ENDIF (NIST_SPARSE_BLAS)
IF (NIST_SPARSE_BLAS_FOUND)
IF (NOT NIST_SPARSE_BLAS_FIND_QUIETLY)
MESSAGE(STATUS "Found NIST Sparse Blas")
ENDIF (NOT NIST_SPARSE_BLAS_FIND_QUIETLY)
ELSE(NIST_SPARSE_BLAS_FOUND)
IF (NIST_SPARSE_BLAS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find NIST sparse blas library.")
ENDIF (NIST_SPARSE_BLAS_FIND_REQUIRED)
ENDIF (NIST_SPARSE_BLAS_FOUND)
SET(XXT_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/build
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
......
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(get_git_head_revision _refspecvar _hashvar)
set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}")
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
# We have reached the root directory, we are not in git
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
return()
endif()
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
endwhile()
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()
if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
endfunction()
function(git_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
# TODO sanitize
#if((${ARGN}" MATCHES "&&") OR
# (ARGN MATCHES "||") OR
# (ARGN MATCHES "\\;"))
# message("Please report the following error to the project!")
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
#endif()
#message(STATUS "Arguments to execute_process: ${ARGN}")
execute_process(COMMAND
"${GIT_EXECUTABLE}"
describe
${hash}
${ARGN}
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
set(HEAD_HASH "${HEAD_REF}")
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()
......@@ -51,13 +51,6 @@ INCLUDE(${NEKTAR++_ROOT_DIR}/FindLoki.cmake)
SET(TINYXML_ADDITIONAL_INCLUDE_DIRS "@TINYXML_BASE@")
INCLUDE(${NEKTAR++_ROOT_DIR}/FindTinyXml.cmake)
SET(NIST_SPARSE_BLAS_ADDITIONAL_INCLUDE_DIRS "@NIST_SPARSE_BLAS_INCLUDE_DIR@")
SET(NIST_SPARSE_BLAS "@NIST_SPARSE_BLAS@")
SET(NIST_SPARSE_BLAS_DEBUG "@NIST_SPARSE_BLAS_DEBUG@")
SET(NIST_SPARSE_BLAS_INCLUDE_DIR "@NIST_SPARSE_BLAS_INCLUDE_DIR@")
SET(NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT "@NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT@")
MARK_AS_ADVANCED(NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT)
SET(NEKTAR_USE_ACML "@NEKTAR_USE_ACML@")
SET(ACML_USE_SHARED_LIBRARIES "@ACML_USE_SHARED_LIBRARIES@")
SET(ACML_USE_OPENMP_LIBRARIES "@ACML_USE_OPENMP_LIBRARIES@")
......@@ -163,7 +156,7 @@ IF(NEKTAR_USE_ARPACK)
ENDIF(NEKTAR_USE_ARPACK)
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LOKI_INCLUDE_DIR} ${TINYXML_BASE} ${NIST_SPARSE_BLAS_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LOKI_INCLUDE_DIR} ${TINYXML_BASE} )
SET(NEKTAR_PACKAGE_GENERATOR "@NEKTAR_PACKAGE_GENERATOR@")
SET(NEKTAR_USING_BLAS "@NEKTAR_USING_BLAS@")
......
......@@ -47,10 +47,6 @@ MACRO(SET_LAPACK_LINK_LIBRARIES name)
ENDIF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT AND NIST_SPARSE_BLAS_FOUND )
TARGET_LINK_LIBRARIES(${name} ${NIST_SPARSE_BLAS} )
ENDIF( NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT AND NIST_SPARSE_BLAS_FOUND )
IF( NEKTAR_USE_METIS )
TARGET_LINK_LIBRARIES(${name} optimized ${METIS_LIB} debug
${METIS_LIB} )
......@@ -118,9 +114,14 @@ MACRO(SET_COMMON_PROPERTIES name)
"${CMAKE_CXX_FLAGS_DEBUG} -fpermissive")
ENDIF()
ENDIF( NOT MSVC)
# Define version
SET_PROPERTY(TARGET ${name}
APPEND PROPERTY COMPILE_DEFINITIONS
NEKTAR_VERSION=\"${NEKTAR_VERSION}\")
SET(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -DNEKTAR_RELEASE")
"${CMAKE_CXX_FLAGS_RELEASE} -DNEKTAR_RELEASE")
ENDIF(NOT ${CMAKE_CXX_FLAGS_DEBUG} MATCHES ".*DNEKTAR_DEBUG.*")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
......@@ -225,10 +226,8 @@ ENDMACRO(ADD_NEKTAR_EXECUTABLE name component sources)
MACRO(ADD_NEKTAR_LIBRARY name component type)
ADD_LIBRARY(${name} ${type} ${ARGN})
# NIST Sparse BLAS only static, so link into Nektar libraries directly.
TARGET_LINK_LIBRARIES( ${name} ${NIST_SPARSE_BLAS} ${METIS_LIB})
ADD_DEPENDENCIES(${name} spblastk0.9b modmetis-5.1.0 boost tinyxml
zlib-1.2.7)
TARGET_LINK_LIBRARIES( ${name} ${METIS_LIB} )
ADD_DEPENDENCIES(${name} modmetis-5.1.0 boost tinyxml zlib-1.2.7)
SET_PROPERTY(TARGET ${name} PROPERTY FOLDER ${component})
IF (NEKTAR_USE_MPI)
TARGET_LINK_LIBRARIES( ${name} ${GSMPI_LIBRARY} ${XXT_LIBRARY})
......@@ -264,3 +263,11 @@ MACRO(ADD_NEKTAR_TEST name)
ADD_TEST(NAME ${dir}_${name}
COMMAND Tester ${CMAKE_CURRENT_SOURCE_DIR}/Tests/${name}.tst)
ENDMACRO(ADD_NEKTAR_TEST)
MACRO(ADD_NEKTAR_TEST_LENGTHY name)
IF (NEKTAR_TEST_ALL)
GET_FILENAME_COMPONENT(dir ${CMAKE_CURRENT_SOURCE_DIR} NAME)
ADD_TEST(NAME ${dir}_${name}
COMMAND Tester ${CMAKE_CURRENT_SOURCE_DIR}/Tests/${name}.tst)
ENDIF(NEKTAR_TEST_ALL)
ENDMACRO(ADD_NEKTAR_TEST_LENGTHY)
......@@ -29,10 +29,10 @@ IF( NEKTAR_USE_MPI )
IF (THIRDPARTY_BUILD_GSMPI)
EXTERNALPROJECT_ADD(
gsmpi-1.1.1
gsmpi-1.2
PREFIX ${TPSRC}
URL ${TPURL}/gsmpi-1.1.1.tar.bz2
URL_MD5 48a6006437e094f6cccce65dcf79f967
URL ${TPURL}/gsmpi-1.2.tar.bz2
URL_MD5 35901be16791bfdeafa9c4d0e06d189b
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND
${CMAKE_COMMAND}
......@@ -40,7 +40,7 @@ IF( NEKTAR_USE_MPI )
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
${TPSRC}/src/gsmpi-1.1.1
${TPSRC}/src/gsmpi-1.2
)
SET(GSMPI_LIBRARY gsmpi CACHE FILEPATH
"GSMPI path" FORCE)
......
......@@ -6,8 +6,8 @@ IF (THIRDPARTY_BUILD_METIS)
EXTERNALPROJECT_ADD(
modmetis-5.1.0
PREFIX ${TPSRC}
URL ${TPURL}/modmetis-5.1.0.tar.bz2
URL_MD5 "8f8313a768e4611d1748d10f88f3d702"
URL ${TPURL}/modmetis-5.1.0_1.tar.bz2
URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
......
OPTION(THIRDPARTY_BUILD_NIST_SPBLASTK
"Build NIST Sparse BLAS" ON)
IF (THIRDPARTY_BUILD_NIST_SPBLASTK)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
spblastk0.9b
PREFIX ${TPSRC}
URL ${TPURL}/spblastk0.9b.tar.bz2
URL_MD5 "93469940f03554939a4600f431eb4d99"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
${TPSRC}/src/spblastk0.9b
)
SET(NIST_SPARSE_BLAS sbtk CACHE FILEPATH
"Path to NIST Sparse BLAS." FORCE)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
MESSAGE(STATUS "Build NIST Sparse BLAS: ${TPSRC}/dist/lib/lib${NIST_SPARSE_BLAS}.a")
ELSE (THIRDPARTY_BUILD_NIST_SPBLASTK)
INCLUDE(FindNistSparseBlas)
ENDIF (THIRDPARTY_BUILD_NIST_SPBLASTK)
......@@ -54,8 +54,8 @@ EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
......@@ -76,6 +76,7 @@ MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = NO
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
CITE_BIB_FILES = doxygen.bib
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
......@@ -95,6 +96,7 @@ INPUT = ./ \
../../../library/SpatialDomains/ \
../../../library/LocalRegions/ \
../../../library/MultiRegions/ \
../../../library/SolverUtils/ \
../../../solvers/ \
../../../utilities/
INPUT_ENCODING = UTF-8
......@@ -144,7 +146,7 @@ FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = NO
REFERENCED_BY_RELATION = YES
......@@ -166,7 +168,8 @@ HTML_OUTPUT = ../code
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET = doxygen.css
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET = doxygen-fixed-width.css
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_DOCSET = NO
......
body {
background-color: #CCC;
color: black;
margin: 0;
}
div.contents {
margin-bottom: 10px;
padding: 12px;
margin-left: auto;
margin-right: auto;
width: 960px;
background-color: white;
border-radius: 8px;
}
#titlearea {
background-color: white;
}
hr.footer {
display: none;
}
.footer {
background-color: #AAA;
}
@article{CaYaKiPeSh13,
title={High-order spectral/< i> hp</i> element discretisation for reaction-diffusion problems on surfaces: Application to cardiac electrophysiology},
author={Cantwell, CD and Yakovlev, S and Kirby, RM and Peters, NS and Sherwin, SJ},
journal={Journal of Computational Physics},
year={2013},
publisher={Elsevier}
}
......@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
// ////////////////////////////////////////////////////////////////
// Set up Hexahedron vertex coordinates
// VertexComponent (const int coordim, const int vid, double x,
// PointGeom (const int coordim, const int vid, double x,
// double y, double z)
const int nVerts = 8;
......@@ -149,9 +149,9 @@ int main(int argc, char *argv[])
};
// Populate the list of verts
VertexComponentSharedPtr verts[8];
PointGeomSharedPtr verts[8];
for( int i = 0; i < nVerts; ++i ) {
verts[i] = MemoryManager<VertexComponent>
verts[i] = MemoryManager<PointGeom>
::AllocateSharedPtr(three, i, point[i][0],
point[i][1], point[i][2]);
}
......@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
// Populate the list of edges
SegGeomSharedPtr edges[nEdges];
for( int i = 0; i < nEdges; ++i ) {
VertexComponentSharedPtr vertsArray[2];
PointGeomSharedPtr vertsArray[2];
for( int j = 0; j < 2; ++j ) {
vertsArray[j] = verts[vertexConnectivity[i][j]];
}
......@@ -237,18 +237,20 @@ int main(int argc, char *argv[])
//---------------------------------------------
// Project onto Expansion
lhe->FwdTrans( solution, lhe->UpdateCoeffs() );
Array<OneD, NekDouble> phys (Qx * Qy * Qz);
Array<OneD, NekDouble> coeffs(lhe->GetNcoeffs());
lhe->FwdTrans( solution, coeffs );
//---------------------------------------------
//-------------------------------------------
// Backward Transform Solution to get projected values
lhe->BwdTrans( lhe->GetCoeffs(), lhe->UpdatePhys() );
lhe->BwdTrans( coeffs, phys );
//-------------------------------------------
//--------------------------------------------
// Calculate L_p error
cout << "L infinity error: " << lhe->Linf(solution) << endl;
cout << "L 2 error: " << lhe->L2 (solution) << endl;
cout << "L infinity error: " << lhe->Linf(phys, solution) << endl;
cout << "L 2 error: " << lhe->L2 (phys, solution) << endl;
//--------------------------------------------
//-------------------------------------------
......@@ -258,7 +260,7 @@ int main(int argc, char *argv[])
t[1] = 0.5;
t[2] = 0.5;
NekDouble numericSolution = lhe->PhysEvaluate(t);
NekDouble numericSolution = lhe->PhysEvaluate(t, phys);
solution[0] = Hex_sol( t[0], t[1], t[2], P, Q, R,
bType_x, bType_y, bType_z );
......
......@@ -113,18 +113,20 @@ int main(int argc, char *argv[])
//---------------------------------------------
// Project onto Expansion
E->FwdTrans( sol, E->UpdateCoeffs() );
Array<OneD, NekDouble> coeffs(E->GetNcoeffs());
Array<OneD, NekDouble> phys (ntotquad);
E->FwdTrans( sol, coeffs );
//---------------------------------------------
//-------------------------------------------
// Backward Transform Solution to get projected values
E->BwdTrans( E->GetCoeffs(), E->UpdatePhys() );
E->BwdTrans( coeffs, phys );
//-------------------------------------------
//--------------------------------------------
// Calculate L_p error
cout << "L infinity error: " << E->Linf(sol) << endl;
cout << "L 2 error: " << E->L2 (sol) << endl;
cout << "L infinity error: " << E->Linf(phys, sol) << endl;
cout << "L 2 error: " << E->L2 (phys, sol) << endl;
//--------------------------------------------
//-------------------------------------------
......@@ -139,7 +141,7 @@ int main(int argc, char *argv[])
exact_sol = Hex_sol( t[0], t[1], t[2], nummodes0, nummodes1, nummodes2,
bType, bType, bType);
NekDouble numericSolution = E->PhysEvaluate(t);
NekDouble numericSolution = E->PhysEvaluate(t, phys);
cout << "Numeric solution = " << numericSolution << endl;
cout << "Exact solution = " << exact_sol << endl;
cout << "Difference at x = ( "
......
......@@ -118,10 +118,10 @@ int main(int argc, char *argv[])
// ////////////////////////////////////////////////////////////////////////////////////
// Populate the list of verts
// VertexComponent (const int coordim, const int vid, double x, double y, double z)
VertexComponentSharedPtr verts[6];
// PointGeom (const int coordim, const int vid, double x, double y, double z)
PointGeomSharedPtr verts[6];
for(int i=0; i < nVerts; ++i){
verts[i] = MemoryManager<VertexComponent>::
verts[i] = MemoryManager<PointGeom>::
AllocateSharedPtr( three, i, point[i][0], point[i][1], point[i][2] );
}
......@@ -140,7 +140,7 @@ int main(int argc, char *argv[])
// Populate the list of edges
SegGeomSharedPtr edges[nEdges];
for(int i=0; i < nEdges; ++i){
VertexComponentSharedPtr vertsArray[2];
PointGeomSharedPtr vertsArray[2];
for(int j=0; j<2; ++j){
vertsArray[j] = verts[vertexConnectivity[i][j]];
}
......@@ -228,19 +228,21 @@ int main(int argc, char *argv[])
}
//---------------------------------------------
// Project onto Expansion
lpr->FwdTrans( solution, lpr->UpdateCoeffs() );
// Project onto Expansion
Array<OneD, NekDouble> phys (Qx * Qy * Qz);
Array<OneD, NekDouble> coeffs(lpr->GetNcoeffs());
lpr->FwdTrans( solution, coeffs );
//---------------------------------------------
//-------------------------------------------
// Backward Transform Solution to get projected values
lpr->BwdTrans( lpr->GetCoeffs(), lpr->UpdatePhys() );