Commit b02bf808 authored by Elia Merzari's avatar Elia Merzari

Merge branch 'develop' of xgitlab.cels.anl.gov:nek5000/moon into develop

parents 1ecd8e5a 62d52e5f
### makefile automatically created by makenek 10/07/2016 14:44:21 ###
### makefile automatically created by makenek 10/17/2016 18:29:51 ###
BINNAME=nek5000
LIBNAME=libnek5000.a
CASENAME:=eddy_uv
CASEDIR:=/Users/rahaman/repos/moon/examples/hello_nek
CASENAME:=rod12
CASEDIR:=/Users/rahaman/repos/moon/examples/coupled_heat_conduction
S:=/Users/rahaman/repos/Nek5000/core
S2:=/Users/rahaman/repos/Nek5000/core/cmt
J:=/Users/rahaman/repos/Nek5000/jl
......@@ -15,12 +15,12 @@ IFAMG_DUMP:=false
IFNEKNEK:=false
IFMOAB:=false
MOAB_DIR:=
F77:=mpif77
CC:=mpicc
F77:=mpif77 -Wa,-q -Wl,-no_compact_unwind
CC:=mpicc -Wl,-no_compact_unwind
P:=-fdefault-real-8 -fdefault-double-8 -x f77-cpp-input
PPPO=
PPS= PTRSIZE8 MPI MPI LONGINT8 UNDERSCORE GLOBAL_LONG_LONG
G:=-Wa,-q
G:=
OPT_FLAGS_STD=
USR:=
USR_LFLAGS:=
......
eddy_uv
/Users/rahaman/repos/moon/examples/hello_nek
rod12
/Users/rahaman/repos/moon/examples/coupled_heat_conduction
......@@ -3,7 +3,7 @@ C
C HCUBE array dimensions
C
parameter (ldim=3)
parameter (lx1=5,ly1=lx1,lz1=lx1,lelt=240,lelv=lelt)
parameter (lx1=5,ly1=lx1,lz1=lx1,lelt=480,lelv=lelt)
parameter (lxd=8,lyd=lxd,lzd=lxd)
parameter (lelx=1,lely=1,lelz=1)
......
......@@ -157,7 +157,8 @@ $(app_LIB): $(app_objects) $(app_plugin_deps) $(app_HEADER) $(depend_libs)
$(app_EXEC): $(app_LIBS) $(mesh_library) $(main_object) $(nek_LIB) $(nek_OBJ)
@echo "Linking Executable "$@"..."
@$(libmesh_LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link --quiet $(libmesh_CXX) $(libmesh_CXXFLAGS) -o $@ $(main_object) $(nek_LIB) $(nek_OBJ) $(app_LIBS) $(libmesh_LIBS) $(libmesh_LDFLAGS) $(EXTERNAL_FLAGS) $(ADDITIONAL_LIBS)
@echo "$(libmesh_LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link --quiet $(libmesh_CXX) -Wl,-no_compact_unwind $(libmesh_CXXFLAGS) -o $@ $(main_object) $(nek_LIB) $(nek_OBJ) $(app_LIBS) $(libmesh_LIBS) $(libmesh_LDFLAGS) $(EXTERNAL_FLAGS) $(ADDITIONAL_LIBS)"
@$(libmesh_LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link --quiet $(libmesh_CXX) -Wl,-no_compact_unwind $(libmesh_CXXFLAGS) -o $@ $(main_object) $(nek_LIB) $(nek_OBJ) $(app_LIBS) $(libmesh_LIBS) $(libmesh_LDFLAGS) $(EXTERNAL_FLAGS) $(ADDITIONAL_LIBS)
# Clang static analyzer
sa:: $(app_analyzer)
......@@ -42,6 +42,11 @@ extern "C" {
nzd;
} dimn_;
// DIMN common block
extern struct {
double flux_moose, temp_nek;
} test_passing_;
// subroutine nek_init(intracomm)
void nek_init_(int &);
......
#!/bin/bash
# Nek5000 build config file
# (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC
# source path
SOURCE_ROOT="$HOME/repos/moon/src/Nek5000"
SOURCE_ROOT_CORE="$SOURCE_ROOT/core"
SOURCE_ROOT_JL="$SOURCE_ROOT/jl"
SOURCE_ROOT_CMT="$SOURCE_ROOT/core/cmt"
# Fortran compiler
F77="mpif77 -Wa,-q -Wl,-no_compact_unwind"
# C compiler
CC="mpicc -Wl,-no_compact_unwind"
# pre-processor symbol list
# (set PPLIST=? to get a list of available symbols)
#PPLIST="?"
# OPTIONAL SETTINGS
# -----------------
# enable MPI (default true)
#IFMPI="false"
# enable CMT (default false)
#IFCMT="true"
# auxilliary files to compile
# NOTE: source files have to located in the same directory as makenek
# a makefile_usr.inc has to be provided containing the build rules
#USR="foo.o"
# linking flags
#USR_LFLAGS="-L/usr/lib -lfoo"
# generic compiler flags
#G="-g"
# optimization flags
#OPT_FLAGS_STD=""
#OPT_FLAGS_MAG=""
# enable AMG coarse grid solver (default XXT)
#IFAMG="true"
#IFAMG_DUMP="true"
# CVODE path
#CVODE_DIR=$HOME/cvode/lib
# MOAB/iMESH path
#MOAB_DIR="$HOME/moab"
# For linking to MOAB, the following might be needed:
# NOTE: compiler specific, use the appropriate one depending on your compiler
# GNU:
# USR_LFLAGS="-lmpi_cxx -lstdc++"
# Intel:
# USR_LFLAGS="-cxxlib"
# PGI:
# USR_LFLAGS="-pgcpplibs"
# USR_LFLAGS=" -lmpi_cxx -lstdc++"
# enable VisIt in situ
# Note: you can override the lib and include paths. VISIT_LIB and VISIT_INC
# If VISIT_STOP is set the simulation will stop after first step and wait
# for VisIt to connect.
#IFVISIT=true
#VISIT_INSTALL="/path/to/visit/current/linux-x86_64/"
#VISIT_STOP=true
###############################################################################
# DONT'T TOUCH WHAT FOLLOWS !!!
###############################################################################
# assign version tag
mver=1
# overwrite source path with optional 2nd argument
if [ -d $2 ] && [ $# -eq 2 ]; then
SOURCE_ROOT="$2"
echo "change source code directory to: ", $SOURCE_ROOT
SOURCE_ROOT_CORE="$SOURCE_ROOT/core"
SOURCE_ROOT_JL="$SOURCE_ROOT/jl"
SOURCE_ROOT_CMT="$SOURCE_ROOT/core/cmt"
fi
# do some checks and create makefile
source $SOURCE_ROOT_CORE/makenek.inc
# compile
make -j4 -f makefile 2>&1 | tee compiler.out
exit 0
nek_SOURCE_ROOT := ${HOME}/repos/Nek5000
nek_CASENAME := eddy_uv
nek_OBJ := obj/eddy_uv.o
nek_CASENAME := rod12
nek_OBJ := obj/rod12.o
nek_LIB := libnek5000.a
$(nek_OBJ): run_makenek SESSION.NAME
......
......@@ -13,23 +13,19 @@
/****************************************************************/
#include "BCFunction.h"
#include "NekInterface.h"
template<>
InputParameters validParams<BCFunction>()
{
InputParameters params = validParams<Function>();
//params.addParam<Real>("alpha", 1.0, "The value of alpha");
return params;
}
// BCFunction::BCFunction(const InputParameters & parameters) :
// Function(parameters),
// _alpha(getParam<Real>("alpha"))
// {}
BCFunction::BCFunction(const InputParameters & parameters) : Function(parameters) {}
Real
BCFunction::value(Real /*t*/, const Point & p)
{
return 0.0;
return test_passing_.temp_nek;
}
......@@ -21,14 +21,15 @@ PerfLog Moose::perf_log("HeatConduction");
int main(int argc, char *argv[])
{
// Initialize Nek and print some values from common block
std::cout << "Hello, Nek!" << std::endl;
//std::cout << "Hello, Nek!" << std::endl;
int intracomm=0;
nek_init_(intracomm);
std::cout << "nelv = " << dimn_.nelv << std::endl;
std::cout << "nx1 = " << dimn_.nx1 << std::endl;
std::cout << "ny1 = " << dimn_.ny1 << std::endl;
std::cout << "nz1 = " << dimn_.nz1 << std::endl;
std::cout << "Goodbye, Nek!" << std::endl;
std::cout << "test_passing_.temp_nek = " << test_passing_.temp_nek << std::endl;
//std::cout << "nelv = " << dimn_.nelv << std::endl;
//std::cout << "nx1 = " << dimn_.nx1 << std::endl;
//std::cout << "ny1 = " << dimn_.ny1 << std::endl;
//std::cout << "nz1 = " << dimn_.nz1 << std::endl;
//std::cout << "Goodbye, Nek!" << std::endl;
// Initialize MPI, solvers and MOOSE
MooseInit init(argc, argv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment