Merge branch 'develop' into cmake

Conflicts:
	src/Makefile
This commit is contained in:
Paul Romano 2014-01-17 19:40:39 -05:00
commit 60db2adf4a
9 changed files with 173 additions and 13 deletions

View file

@ -1,4 +1,4 @@
Copyright (c) 2011-2013 Massachusetts Institute of Technology
Copyright (c) 2011-2014 Massachusetts Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View file

@ -39,7 +39,7 @@ master_doc = 'index'
# General information about the project.
project = u'OpenMC'
copyright = u'2011-2013, Massachusetts Institute of Technology'
copyright = u'2011-2014, Massachusetts Institute of Technology'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the

View file

@ -4,7 +4,7 @@
License Agreement
=================
Copyright © 2011-2013 Massachusetts Institute of Technology
Copyright © 2011-2014 Massachusetts Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View file

@ -46,7 +46,7 @@ to locate ACE format cross section libraries if the user has not specified the
<cross_sections> tag in
.I settings.xml\fP.
.SH LICENSE
Copyright \(co 2011-2013 Massachusetts Institute of Technology.
Copyright \(co 2011-2014 Massachusetts Institute of Technology.
.PP
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View file

@ -58,7 +58,6 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
if(openmp)
set(f90flags "-fopenmp ${f90flags}")
set(ldflags "-fopenmp ${ldflags}")
add_definitions(-DOPENMP)
endif()
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
@ -78,7 +77,6 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
if(openmp)
set(f90flags "-openmp ${f90flags}")
set(ldflags "-openmp ${ldflags}")
add_definitions(-DOPENMP)
endif()
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
@ -112,7 +110,7 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "XL")
set(f90flags "-O3 ${f90flags}")
endif()
if(openmp)
set(f90flags "-qsmp=omp -WF,-DOPENMP ${f90flags}")
set(f90flags "-qsmp=omp ${f90flags}")
set(ldflags "-qsmp=omp ${ldflags}")
endif()

View file

@ -50,7 +50,7 @@ contains
! Write version information
write(UNIT=OUTPUT_UNIT, FMT=*) &
' Copyright: 2011-2013 Massachusetts Institute of Technology'
' Copyright: 2011-2014 Massachusetts Institute of Technology'
write(UNIT=OUTPUT_UNIT, FMT=*) &
' License: http://mit-crpg.github.io/openmc/license.html'
write(UNIT=OUTPUT_UNIT, FMT='(6X,"Version:",8X,I1,".",I1,".",I1)') &

View file

@ -74,6 +74,7 @@ module FoX_dom
public :: createAttribute
public :: createEntityReference
public :: getElementsByTagName
public :: getChildrenByTagName
public :: getElementById
public :: importNode

View file

@ -349,6 +349,7 @@ module m_dom_dom
public :: createEntityReference
public :: createEmptyEntityReference
public :: getElementsByTagName
public :: getChildrenByTagName
public :: importNode
public :: createElementNS
public :: createAttributeNS
@ -6908,6 +6909,166 @@ endif
end function getElementsByTagName
function getChildrenByTagName(doc, tagName, name, ex)result(list)
type(DOMException), intent(out), optional :: ex
type(Node), pointer :: doc
character(len=*), intent(in), optional :: tagName, name
type(NodeList), pointer :: list
type(NodeListPtr), pointer :: nll(:), temp_nll(:)
type(Node), pointer :: arg, this, treeroot
logical :: doneChildren, doneAttributes, allElements
integer :: i, i_tree
if (.not.associated(doc)) then
if (getFoX_checks().or.FoX_NODE_IS_NULL<200) then
call throw_exception(FoX_NODE_IS_NULL, "getElementsByTagName", ex)
if (present(ex)) then
if (inException(ex)) then
return
endif
endif
endif
endif
if (doc%nodeType==DOCUMENT_NODE) then
if (present(name).or..not.present(tagName)) then
if (getFoX_checks().or.FoX_INVALID_NODE<200) then
call throw_exception(FoX_INVALID_NODE, "getElementsByTagName", ex)
if (present(ex)) then
if (inException(ex)) then
return
endif
endif
endif
endif
elseif (doc%nodeType==ELEMENT_NODE) then
if (present(name).or..not.present(tagName)) then
if (getFoX_checks().or.FoX_INVALID_NODE<200) then
call throw_exception(FoX_INVALID_NODE, "getElementsByTagName", ex)
if (present(ex)) then
if (inException(ex)) then
return
endif
endif
endif
endif
else
if (getFoX_checks().or.FoX_INVALID_NODE<200) then
call throw_exception(FoX_INVALID_NODE, "getElementsByTagName", ex)
if (present(ex)) then
if (inException(ex)) then
return
endif
endif
endif
endif
if (doc%nodeType==DOCUMENT_NODE) then
arg => getDocumentElement(doc)
else
arg => doc
endif
allocate(list)
allocate(list%nodes(0))
list%element => doc
if (present(name)) list%nodeName => vs_str_alloc(name)
if (present(tagName)) list%nodeName => vs_str_alloc(tagName)
allElements = (str_vs(list%nodeName)=="*")
if (doc%nodeType==DOCUMENT_NODE) then
nll => doc%docExtras%nodelists
elseif (doc%nodeType==ELEMENT_NODE) then
nll => doc%ownerDocument%docExtras%nodelists
endif
allocate(temp_nll(size(nll)+1))
do i = 1, size(nll)
temp_nll(i)%this => nll(i)%this
enddo
temp_nll(i)%this => list
deallocate(nll)
if (doc%nodeType==DOCUMENT_NODE) then
doc%docExtras%nodelists => temp_nll
elseif (doc%nodeType==ELEMENT_NODE) then
doc%ownerDocument%docExtras%nodelists => temp_nll
endif
treeroot => arg
i_tree = 0
doneChildren = .false.
doneAttributes = .false.
this => treeroot
do
if (.not.doneChildren.and..not.(getNodeType(this)==ELEMENT_NODE.and.doneAttributes)) then
if (this%nodeType==ELEMENT_NODE) then
if ((allElements .or. str_vs(this%nodeName)==tagName) &
.and..not.(getNodeType(doc)==ELEMENT_NODE.and.associated(this, arg))) &
call append(list, this)
doneAttributes = .true.
endif
else
if (getNodeType(this)==ELEMENT_NODE.and..not.doneChildren) then
doneAttributes = .true.
else
endif
endif
if (.not.doneChildren) then
if (getNodeType(this)==ELEMENT_NODE.and..not.doneAttributes) then
if (getLength(getAttributes(this))>0) then
this => item(getAttributes(this), 0)
else
doneAttributes = .true.
endif
elseif (hasChildNodes(this) .and. .not. associated(getParentNode(this), treeroot)) then
this => getFirstChild(this)
doneChildren = .false.
doneAttributes = .false.
else
doneChildren = .true.
doneAttributes = .false.
endif
else ! if doneChildren
if (associated(this, treeroot)) exit
if (getNodeType(this)==ATTRIBUTE_NODE) then
if (i_tree<getLength(getAttributes(getOwnerElement(this)))-1) then
i_tree= i_tree+ 1
this => item(getAttributes(getOwnerElement(this)), i_tree)
doneChildren = .false.
else
i_tree= 0
this => getOwnerElement(this)
doneAttributes = .true.
doneChildren = .false.
endif
elseif (associated(getNextSibling(this))) then
this => getNextSibling(this)
doneChildren = .false.
doneAttributes = .false.
else
this => getParentNode(this)
endif
endif
enddo
end function getChildrenByTagName
function importNode(doc , arg, deep , ex)result(np)
type(DOMException), intent(out), optional :: ex
type(Node), pointer :: doc

View file

@ -72,7 +72,7 @@ contains
! node name. This should only be used for checking a single occurance of a
! sub-element node. To check for sub-element nodes that repeat, use
! get_node_list and get_list_size. This is to minimize number of calls
! to getElementsByTagName.
! to getChildrenByTagName.
!===============================================================================
function check_for_node(ptr, node_name) result(found)
@ -94,7 +94,7 @@ contains
if (associated(temp_ptr)) return
! Check for a sub-element
elem_list => getElementsByTagName(ptr, trim(node_name))
elem_list => getChildrenByTagName(ptr, trim(node_name))
! Get the length of the list
if (getLength(elem_list) == 0) then
@ -124,7 +124,7 @@ contains
found_ = .false.
! Check for a sub-element
elem_list => getElementsByTagName(in_ptr, trim(node_name))
elem_list => getChildrenByTagName(in_ptr, trim(node_name))
! Get the length of the list
if (getLength(elem_list) == 0) return
@ -149,7 +149,7 @@ contains
type(NodeList), pointer, intent(out) :: out_ptr
! Check for a sub-element
out_ptr => getElementsByTagName(in_ptr, trim(node_name))
out_ptr => getChildrenByTagName(in_ptr, trim(node_name))
end subroutine get_node_list
@ -525,7 +525,7 @@ contains
if (associated(out_ptr)) return
! Check for a sub-element
elem_list => getElementsByTagName(in_ptr, trim(node_name))
elem_list => getChildrenByTagName(in_ptr, trim(node_name))
! Get the length of the list
if (getLength(elem_list) == 0) then