From b9972b9ed09a0aa6caccfb5a6c3f889580342db7 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Fri, 7 Jul 2023 14:19:12 -0600 Subject: [PATCH 01/18] Update index.md with quick links at top --- docs/index.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/index.md b/docs/index.md index cce6780f..78d588d9 100755 --- a/docs/index.md +++ b/docs/index.md @@ -16,9 +16,19 @@ title: LaGriT - Home
- Take the Tutorial + LaGriT Manual
- + +
+
+ LaGriT Tutorial +
+ +
+
+ PyLaGriT Manual +
+ @@ -69,12 +79,6 @@ incorporating uncertainty in system geometry and automatic mesh generation. -## Documentation - - -- [LaGriT Manual](pages/manual.md) -- [PyLaGriT Manual](/pylagrit/original/index.html) - ## About LaGriT From 0724f698ea1ffe1d85f65cd27565e4ed66493965 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Fri, 7 Jul 2023 14:30:00 -0600 Subject: [PATCH 02/18] Update index.md broken link --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 78d588d9..5d6f7057 100755 --- a/docs/index.md +++ b/docs/index.md @@ -26,7 +26,7 @@ title: LaGriT - Home From 94da59820423f39cb5f2fd902f73b5c64c9fe069 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Fri, 7 Jul 2023 14:48:17 -0600 Subject: [PATCH 03/18] Update development.md contacts --- docs/pages/development.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/pages/development.md b/docs/pages/development.md index c7750b70..087ea465 100755 --- a/docs/pages/development.md +++ b/docs/pages/development.md @@ -1,7 +1,11 @@ LaGriT Code Development Team ---------------------------- -[Carl W. Gable](http://www.lanl.gov/expertise/profiles/view/carl-gable), Geological Applications +[Carl W. Gable](http://www.lanl.gov/search-capabilities/profiles/carl-gable.shtml) Author (Retired from LANL) + +[Terry Miller](http://www.lanl.gov/search-capabilities/profiles/terry-miller.shtml) Support + +[Jeffrey De'Haven Hyman](http://www.lanl.gov/search-capabilities/profiles/jeffrey-hyman.shtml) Applications [Tinka Gammel](http://public.lanl.gov/jtg/) @@ -9,13 +13,11 @@ Denise George (Retired) [Andrew Kuprat](http://www.pnnl.gov/science/staff/staff_info.asp?staff_num=7019) -[Terry Miller](http://www.lanl.gov/expertise/profiles/view/terry-miller) - Frank A. Ortega -[Harold Trease](http://www.sysbio.org/resources/staff/trease.stm) +[Harold Trease](http://www.sysbio.org/resources/staff/trease.stm) Retired from LANL -[Lynn Trease](http://www.sysbio.org/resources/staff/l-trease.stm) +[Lynn Trease](http://www.sysbio.org/resources/staff/l-trease.stm) Retired from LANL Robert B. Walker From affb3420b8c079bf7fcb4c3f33152d0a0d6f7a28 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Fri, 7 Jul 2023 15:28:31 -0600 Subject: [PATCH 04/18] Update build.md regarding cmake --- docs/pages/docs/build.md | 42 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/docs/pages/docs/build.md b/docs/pages/docs/build.md index 268dadd2..97eb28f8 100755 --- a/docs/pages/docs/build.md +++ b/docs/pages/docs/build.md @@ -11,20 +11,22 @@ Tags: Manual Building an executable and running LaGriT The executable is built by linking a driver routine with the code and utility libraries. The driver routine must contain a call to initLaGriT and a call to control_command_lg and must contain a subroutine called -user_sub.  The input arguments to initLaGriT are: +user_sub.  + +The input arguments to initLaGriT are: **mode** - set to 'noisy' for output to be echoed to the screen - set to 'silent' for no echo **log_file** - name of log file (if ' ' or '-def-' use default name which -is logx3dgen)  This file will contain a list of commands. +is lagrit.log)  This file will contain a list of commands. **batch_file** - name of batch file (if ' ' or '-def-' use default name -which is outx3dgen). This file will contain a list of commands and the +which is lagrit.out). This file will contain a list of commands and the error, warning and informational messages generated by the command. User_sub is used to implement user commands, see [User Commands](writing.md). -A sample driver routine is listed below: +A sample Fortran driver routine is listed below (C++ examples are in examples/liblagrit/):
 program adrivgen
@@ -82,11 +84,31 @@ C    For example
 
 ### Sample build scripts
 
-LaGriT can be compiled on most modern machines including Linux, Mac, and WINDOWS.
+LaGriT can be compiled on most modern machines including Linux, Mac, and WINDOWS. LaGriT uses cmake to build with or without external libraries such as Seacas Exodus. 
+
+The most recent instructions can be found on the github pages.
+
+
+Simple install, build, and test: [LaGriT Github README](https://github.com/lanl/LaGriT/README.md)
+
+Build options and instructions for developers: [LaGriT Github cmake README](https://github.com/lanl/LaGriT/cmake/README.md)
+
+
+
+### Running LaGriT
 
-*Note examples may be out of date, see [LaGriT Github](https://github.com/lanl/LaGriT)*
+To execute, use standard unix file redirection for standard input and
+output. LaGriT will produce two additional files, lagrit.out and
+lagrit.log. The user can change the names of these files by supplying new
+names as arguments in the call to initLaGriT before compiling.  These files contain
+detailed output information and the list of commands respectively.
+LaGriT may also be run interactively in which case the user will be
+prompted to enter commands at the machine prompt.
 
+    lagrit < lagrit_command_file
+    
 
+### The following are examples to build old releases (pre V3.2) but may be helpful on older machines.
 
 **Sun OS and Sun Solaris forte version 7 compiler:**
 
@@ -185,10 +207,4 @@ where fdate.f is
 
 
 
-To execute, use standard unix file redirection for standard input and
-output. LaGriT will produce two additional files, outx3dgen and
-logx3dgen. The names of these files can be changed by supplying the
-names as arguments in the call to initLaGriT.  These files contain
-detailed output information and the list of commands respectively.
-LaGriT may also be run interactively in which case the user will be
-prompted to enter commands from the workstation.
+

From 75f7406dfe896e978b7b6ab8a187a87f4e070231 Mon Sep 17 00:00:00 2001
From: Terry Miller 
Date: Fri, 7 Jul 2023 15:44:27 -0600
Subject: [PATCH 05/18] Update build.md links to github

---
 docs/pages/docs/build.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/pages/docs/build.md b/docs/pages/docs/build.md
index 97eb28f8..309d3a2b 100755
--- a/docs/pages/docs/build.md
+++ b/docs/pages/docs/build.md
@@ -89,9 +89,9 @@ LaGriT can be compiled on most modern machines including Linux, Mac, and WINDOWS
 The most recent instructions can be found on the github pages.
 
 
-Simple install, build, and test: [LaGriT Github README](https://github.com/lanl/LaGriT/README.md)
+Simple install, build, and test: [LaGriT Github README](https://github.com/lanl/LaGriT/blob/master/README.md)  
 
-Build options and instructions for developers: [LaGriT Github cmake README](https://github.com/lanl/LaGriT/cmake/README.md)
+Build options and instructions for developers: [LaGriT Github cmake README](https://github.com/lanl/LaGriT/blob/master/cmake/README.md)
 
 
 

From e3345ad775581f8460ecd0d7521a7aecd497a49a Mon Sep 17 00:00:00 2001
From: Terry Miller 
Date: Fri, 7 Jul 2023 15:54:38 -0600
Subject: [PATCH 06/18] Update build.md WINDOWS under dev

---
 docs/pages/docs/build.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/pages/docs/build.md b/docs/pages/docs/build.md
index 309d3a2b..9af7e492 100755
--- a/docs/pages/docs/build.md
+++ b/docs/pages/docs/build.md
@@ -84,7 +84,7 @@ C    For example
 
 ### Sample build scripts
 
-LaGriT can be compiled on most modern machines including Linux, Mac, and WINDOWS. LaGriT uses cmake to build with or without external libraries such as Seacas Exodus. 
+LaGriT can be compiled on most modern machines including Linux, and Mac. WINDOWS is still under development, but pre-cmake versions were successful under Cygwin. LaGriT now uses cmake to build with or without external libraries such as Seacas Exodus. 
 
 The most recent instructions can be found on the github pages.
 

From bc1ba76cb3444927d197b168b5ac71e11cd48543 Mon Sep 17 00:00:00 2001
From: Terry Miller 
Date: Tue, 11 Jul 2023 11:45:37 -0600
Subject: [PATCH 07/18] Added README.md and modified files in this
 documentation directory to clarify these files are pre-2019 from mercurial
 and web page documentation. Current documentation is in the docs directory.

---
 documentation/INSTALL.md   |  10 +-
 documentation/README.md    |  12 +++
 documentation/Versions.txt |   5 +-
 documentation/build.md     | 204 +++++++++++++++++++++++++++++++++++++
 documentation/build_win.md |  11 +-
 5 files changed, 238 insertions(+), 4 deletions(-)
 create mode 100644 documentation/README.md
 create mode 100755 documentation/build.md

diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md
index ff361ccb..d2e2d06d 100755
--- a/documentation/INSTALL.md
+++ b/documentation/INSTALL.md
@@ -1,9 +1,15 @@
-# Building LaGriT V3.32 and older
+# Building with make for LaGriT V3.32 and pre-2019 and older
 ----------------------------------------------
 
-**New build instructions apply to V3.33 and newer, see https://github.com/lanl/LaGriT/README.md**
 
 LaGriT installation is intended to be as straightforward as possible for Linux and macOS systems. If you encounter any problems with the build process, submit a ticket on the [Issues page](https://github.com/lanl/LaGriT/issues).
+The files in this directory used the make system to build on linux, mac, and WINDOWS.
+
+## New build instructions apply to V3.33 with cmake
+
+Newer codes use C++ to Fortran wrappers that are easier to build with cmake. Building with Exodus is also made easier with cmake.  See https://github.com/lanl/LaGriT/README.md
+
+# Old instructions for Building LaGriT V3.32 and pre-2019 codes. 
 
 If you are on Windows, see Section 4.0 on this page for more information.
 
diff --git a/documentation/README.md b/documentation/README.md
new file mode 100644
index 00000000..18996698
--- /dev/null
+++ b/documentation/README.md
@@ -0,0 +1,12 @@
+## LaGriT: Los Alamos Grid Toolbox old Documentation ##
+
+The files in this directory were from LaGriT during the transition from Mercurial version control and the html web pages, moved to github version control and github pages for documentation.
+
+Most these files and command descriptions were created before 2017, though there are some updates to the build process included in these pages that may be helpful for older machines.
+
+
+See current documentation located at the top directory and manual pages under docs.
+
+**LANL Software: LA-CC-15-069  No. C15097**
+
+
diff --git a/documentation/Versions.txt b/documentation/Versions.txt
index a03505a0..cf1357f4 100755
--- a/documentation/Versions.txt
+++ b/documentation/Versions.txt
@@ -1,5 +1,8 @@
-=======================================================================
+This documentation is from web based pages before github and pre-2017
+See current version notes under docs/pages/release_notes
+Visit manual pages at https://lanl.github.io/LaGriT/pages/release.html
 
+=======================================================================
 Latest code in github is the dev version in Ubuntu 14 modules:
 module unload lagrit
 module load lagrit/3.2.0/dev/gcc-4.8.4
diff --git a/documentation/build.md b/documentation/build.md
new file mode 100755
index 00000000..0abf9363
--- /dev/null
+++ b/documentation/build.md
@@ -0,0 +1,204 @@
+---
+Title: "Manual - Building an Executable"
+Tags: Manual Building an executable and running LaGriT
+---
+
+
+# Building an executable with LaGriT 
+
+------
+
+The executable is built by linking a driver routine with the code and
+utility libraries. The driver routine must contain a call to initLaGriT
+and a call to control_command_lg and must contain a subroutine called
+user_sub.  
+
+The input arguments to initLaGriT are:
+
+**mode** - set to 'noisy' for output to be echoed to the screen - set to
+'silent' for no echo
+
+**log_file** - name of log file (if ' ' or '-def-' use default name which
+is logx3dgen)  This file will contain a list of commands.
+
+**batch_file** - name of batch file (if ' ' or '-def-' use default name
+which is outx3dgen). This file will contain a list of commands and the
+error, warning and informational messages generated by the command.
+User_sub is used to implement user commands, see [User Commands](writing.md).
+
+A sample Fortran driver routine is listed below.
+
+
+program adrivgen
+
+C PURPOSE LaGriT driver
+
+     implicit none
+     integer ierror_return
+     
+     call initLaGriT('noisy',' ',' ')
+     
+     call control_command_lg(ierror_return)
+     
+     stop
+     end
+     
+C Subroutine user_sub
+C
+C PURPOSE 
+C      Process user supplied commands
+C
+C INPUT ARGUMENTS 
+C
+C      imsgin - integer array of tokens returned by parser
+C      xmsgin - real array of tokens returned by parser
+C      cmsgin - character array of tokens returned by parser
+C      msgtyp - int array of token types returned by parser
+C      nwds - number of tokens returned by parser
+C
+C OUTPUT ARGUMENTS 
+C
+C      ierr1 - 0 for successful completion - -1 otherwise
+     subroutine user_sub(imsgin,xmsgin,cmsgin,msgtyp,nwds,ierr1)
+
+     character*32 cmsgin(nwds)
+     integer imsgin(nwds),msgtyp(nwds)
+     integer nwds,ierr1,lenc
+     real*8 xmsgin(nwds)
+     
+C    set default error return to fail
+     ierr1=-1
+     
+C    Insert code here to handle user coded subroutines
+C    For example
+
+     if(cmsgin(1).eq.'my_cmnd') then
+       call my_rtn(imsgin,xmsgin,cmsgin,msgtyp,nwds,ierr1)
+     else
+       ierr1=-1
+     endif
+     
+     return
+     end    
+
+ +### Sample build scripts + +LaGriT can be compiled on most modern machines including Linux, and Mac. WINDOWS is still under development, but pre-cmake versions were successful under Cygwin. LaGriT now uses cmake to build with or without external libraries such as Seacas Exodus. + +The most recent instructions can be found on the github pages. +Simple install, build, and test: [LaGriT Github README](https://github.com/lanl/LaGriT/blob/master/README.md) + +### Running LaGriT + +To execute, use standard unix file redirection for standard input and +output. LaGriT will produce two additional files, lagrit.out and +lagrit.log. The user can change the names of these files by supplying new +names as arguments in the call to initLaGriT before compiling.  These files contain +detailed output information and the list of commands respectively. +LaGriT may also be run interactively in which case the user will be +prompted to enter commands at the machine prompt. + + lagrit < lagrit_command_file + + +### The following are examples to build old releases (pre V3.2) but may be helpful on older machines. + +**Sun OS and Sun Solaris forte version 7 compiler:** + + f90 -O2 -lf77compat -o LaGriTgen adrivgen.f libLaGriT.a libutil.a + +if the user wishes to link in user subroutines that contain CRAY type +pointer statements, these routines must be compiled using the f77 +compiler and then the .o files linked in with f90: + + + f77 -c -O2 user_routines.f + f90 -O2 -lf77compat -o LaGriTgen adrivgen.f user_routines.o + libLaGriT.a libutil.a + +older sun compilers: + + f90 -O2 -o LaGriTgen adrivgen.f libLaGriT.a libutil.a + +**IBM RISC** + + xlf -g -o LaGriTgen -qintlog -qcharlen=500 -brename:.fdate,.fdate_ + adrivgen.f + libLaGriT.a libutil.a + +**SGI** + + f90 -O2 -n32 -r10000 -o LaGriTgen adrivgen.f libLaGriT.a libutil.a + +Compile for 64 bit I8 SGI: + + f90 -O2 -64 -i8 -o LaGriTgen adrivgen.f  libLaGriT.a libutil. + +**HP:** + + f90 +U77 -R8 -lm -o LaGriTgen adrivgen.f libLaGriT.a libutil.a + +**DEC COMPAQ compiler** + + fort -i8 -O -fast -pipeline -transform_loops -o LaGriTgen  + adrivgen.f  libLaGriT.a libutil.a + +**ABSOFT compiler**: + + f90 -YTEXT_NAMES=LCS  -o LaGriTgen adrivgen.f fdate.f libLaGriT.a + libutila. -lm -lu77 + +where fdate.f is +
+    subroutine fdate(string)
+    character*(*) string
+    call fdate_(string)
+    return
+    end
+
+ +**LINUX** + + if ($OSTYPE == 'Linux') then + set OSTAG = _lin + set F77FLAG = "-c -f -m32 -YEXT_NAMES=ASIS" + set F90FLAG = "-m32 -YEXT_NAMES=ASIS" + set LINKFLAG = "-lm -lU77" + set F90DIR = /opt/absoft10.0/bin + + else if ($OSTYPE == 'Darwin') then + set OSTAG = _mac + set F77FLAG = "-c -f -N113 -N90 -B19 -q" + set F90FLAG = "" + set LINKFLAG = " -lU77" + set F90DIR = /Applications/Absoft/bin + + else if ($OSTYPE == 'SunOS') then + set OSTAG = _sun + source /n/env/local.forte.7 + set F77FLAG = -c + set F90FLAG = "-lf77compat " + set LINKFLAG = " " + set F90DIR = /n/local_SunOS/forte7/SUNWspro/bin + + else + echo 'OS $OSTYPE not recognized ' + exit 1 + endif + + set FFILES = "lagrit_main.f lagrit_fdate.f" + set OFILES = "lagrit_main.o lagrit_fdate.o" + set binname = lagrit$OSTAG$COPT + set binname_date = lagrit$OSTAG$COPT$DATETAG + set liblagrit = lagrit$OSTAG$COPT.a + set libutil = util$OSTAG$COPT.a + 'rm' -f *.o + + $F90DIR/f77 $CFLAG $F77FLAG $FFILES + $F90DIR/f90 $CFLAG $F90FLAG -o $binname $OFILES $LAGRIT_LIBS/$liblagrit $UTIL_LIBS/$libutil $LINKFLAG + + + + + diff --git a/documentation/build_win.md b/documentation/build_win.md index 5b33fab5..39ecd752 100755 --- a/documentation/build_win.md +++ b/documentation/build_win.md @@ -1,4 +1,13 @@ -# Building LaGriT on Windows +# Old build instructions for Windows with CYGWIN +---------------------------------------------- + +LaGriT V3.3 uses C++ to Fortran wrappers that are easier to build with cmake. Building with Exodus is also made easier with cmake. +Though build with cmake works for linux and mac, WINDOWS with new cmake method is still under development. + +See https://github.com/lanl/LaGriT/README.md + +# Building LaGriT on Windows (pre-V3.3) + ## 1. Installing Cygwin Get the latest version of Cygwin for your operating system: https://cygwin.com/install.html From d0c973dd5b388a03464d06c2c192e18471bdc297 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Fri, 8 Dec 2023 11:45:28 -0700 Subject: [PATCH 08/18] Update README.md Updates to build process --- cmake/README.md | 87 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 16 deletions(-) diff --git a/cmake/README.md b/cmake/README.md index ceb61df9..51a63b1c 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -1,31 +1,48 @@ -# CMake Build System +# LaGriT and ExodusII with cmake -The CMake build system is a way of enabling LaGriT to -be cross-platform, cross-architecture, and cross-compiler. +The CMake build system is a way of enabling LaGriT to be cross-platform, cross-architecture, and cross-compiler. This page is a verbose description of building LaGriT and includes instructions for building the optional library for ExodusII. + +The CMake build is controlled by CMakeLists.txt and files in directory /cmake + +The ExodusII libraries can be built using install-exodus.sh +For additional help on ExodusII, see instructions at https://github.com/sandialabs/seacas +**Note for Exodus with LaGriT, FORTRAN must be set to YES** -See Build and Install Instructions: https://github.com/lanl/LaGriT#readme There's a really good tutorial-overview on CMake here, it covers how to handle multiple build configurations: https://cliutils.gitlab.io/modern-cmake/ -## Code Development +## Download LaGriT -You can build as Debug (-g) or as Release with the CMake flag "-D CMAKE_BUILD_TYPE=[Debug|Release]". -There's two stages in CMake; the 'configure' stage (where you run 'cmake ..') and the build stage (where you run 'make' using the Makefile created by cmake) - -The build type can only be set in the configure stage. One way to handle building both Debug and release is to make two build directories. Here's a short guide: https://riptutorial.com/cmake/example/7357/switching-between-build-types--e-g--debug-and-release +Download the repo by running: -You can set cmake and make to show verbose screen reporting. These are run from your buld directory with the following options: ``` -cmake -D CMAKE_FIND_DEBUG_MODE=ON .. -make VERBOSE=1 +$ git clone https://github.com/lanl/LaGriT.git +$ cd LaGriT/ ``` -For LANL developers, you may need to generate a token to use as password. See instructions at https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token +## Build ExodusII (optional) + +See instructions in install-exodus.sh +LaGriT will use libs and files located in TPLs/seacas + +Expected libs and include files: + +``` +lib/libexodus.a lib/libexoIIv2for32.a lib/libhdf5_hl.a lib/libnetcdf.a +lib/libexodus_for.a lib/libhdf5.a lib/libhdf5_tools.a lib/libz.a +include/exodus_config.h include/exodusII.h include/exodusII.inc include/exodusII_par.h +include/netcdf.h include/hdf5.h +``` ## Create your build directory: +You can build as Debug (-g) or as Release with the CMake flag "-D CMAKE_BUILD_TYPE=[Debug|Release]". +There's two stages in CMake; the 'configure' stage (where you run 'cmake ..') and the build stage (where you run 'make' using the Makefile created by cmake) + +The build type can only be set in the configure stage (with cmake) and will apply to all files in your build directory. If you make a change to cmake, you will need to run in a new directory, or remove all the files and directories created with your previous cmake configuration. + Setup a work directory for dev and debug work (example using name "debug"). Use cmake to create Makefiles and build files. You will do this only once. Compile the lagrit executable using 'make' or 'make VERBOSE=1' @@ -36,8 +53,14 @@ make ``` Run ./lagrit and type command **test** which creates hex mesh and reports expected values. + +For debugging the build process, set cmake and make to show verbose screen reporting. These are run from your build directory with the following options: +``` +cmake -D CMAKE_FIND_DEBUG_MODE=ON .. +make VERBOSE=1 +``` -## Modify code +## Modify code and update **lagrit** executable Modify code by working with lagrit source files in LaGriT/src Do not add any non-code develpment files in the /src directory, they may be detected and attempted to use during compile time. @@ -55,7 +78,7 @@ make -### Example Directory structure for development: +### Example Directory structure for developers: ``` LaGriT/ @@ -132,8 +155,11 @@ make[2]: Leaving directory '/project/eesdev/tam/LaGriT/build' [100%] Built target lagrit ``` +## Automatic Configurations + +This is work performed by cmake and is usually not modified. Cmake is used to do some automatic file edits that depend on the machine or platform you are using. -## Header File configuration +### Header File configuration CMake automatically configures two header files: @@ -164,3 +190,32 @@ configure_file( The variable above - `@PROJECT_VERSION_MAJOR@` is an instrinsic CMake variable. You can define your own. For example, CMake code within `SetBitSize.cmake` configures the `lg_util/src/mm2000.h.in` file. +### C-Fortran Compatibility + +LaGriT codes include both Fortran and C/C++ code files. The driver routines are Fortran, the C/C++ files use wrapper functions and definitions set by cmake before code is compiled. These are set during the configuration and should not need to be modified unless new routines are added. + +cmake writes fc_mangle.h for c-fortran routines. This file handles the symbol mangling for routines declared in src/lg_f_interface.h include file. For more information on this method visit https://www.netlib.org/lapack/lawnspdf/lawn270.pdf + +The C++ wrapper routines need to be listed in CMakeLists.txt: + +``` +FortranCInterface_HEADER( + ${SRC_CORE}/fc_mangle.h + SYMBOLS + INITLAGRIT # syntax: + DOTASK + CMO_GET_NAME + CMO_GET_INFO + CMO_GET_INTINFO + FC_CMO_GET_INT + FC_CMO_GET_VINT + FC_CMO_GET_DOUBLE + FC_CMO_GET_VDOUBLE + FPASS_TYPES + INSIDE_TET + LINESEG_TRI) +``` + + + + From 0075940b6688efab231b14fa2a24d3b845a40cff Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Fri, 8 Dec 2023 11:50:59 -0700 Subject: [PATCH 09/18] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index fca13983..f9cf429b 100755 --- a/README.md +++ b/README.md @@ -28,8 +28,6 @@ $ cd LaGriT/ ### Building LaGriT ### --- -#### Building LaGriT - long version - [Building LaGriT with cmake and exodus](cmake/README.md) From 08d4d081fc63c513ad9f07561fa3f7a62d32c063 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Wed, 13 Dec 2023 17:54:53 -0700 Subject: [PATCH 10/18] Update lagrit_release_notes_V3.330.md --- .../lagrit_release_notes_V3.330.md | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/pages/release_notes/lagrit_release_notes_V3.330.md b/docs/pages/release_notes/lagrit_release_notes_V3.330.md index 39832be3..b7963ac0 100755 --- a/docs/pages/release_notes/lagrit_release_notes_V3.330.md +++ b/docs/pages/release_notes/lagrit_release_notes_V3.330.md @@ -1,17 +1,17 @@ -LaGriT Release Notes +LaGriT V3.3.3 Release Notes ==================== -This page describes version updates for V3.3.3 release. This release updates code to prepare for major capabiltiy and build improvements planned for next year. This release includes minor bug -fixes, error reporting, and improvements to the LaGriT test suite. +This page describes version updates for V3.3.3 release. This release updates code to prepare for major capabiltiy improvements planned for next year. This release includes minor bug +fixes, error reporting, and improvements to the LaGriT test suite and builds using cmake. See Issues for a full list. Previous release LaGriT v3.3.2 Apr 16, 2019 -### Major Change in Build - -This release includes a merge from Daniel Livingston's branch for Windows development. This includes new build scripts and associated files that use cmake to compile, build, and test LaGriT based on the OS platform. The new instructions are included in the README.md. ### Enhancements: + +- New C++ routines and Fortran drivers for poisson disk capabilities under development. See command createpts/poisson_disk +- New files and additions to cmake files to interface C++ codes to lagrit fortran routines. - read/gocad for 3D .so and 2D .ts files. See test/level01/read_gocad for file examples. - AVS UCD pnt format added to make it easy for Paraview to read and view points. - GMV option ipolydat = no is now the default, files will have smaller size without voronoi polygons included @@ -20,12 +20,21 @@ This release includes a merge from Daniel Livingston's branch for Windows develo - The manual and command pages were heavily edited to remove old directories and files, to update command syntax, and to add examples and demos. - bug fixes mainly to improve lagrit reporting and error reporting. -- test directories cleaned, extra files removed, binary replaced with ascii files +- test scripts and organization improved, level01 (always), level02 (for TPLs), level03 (dev only) + +### Major Change in Build + +This release includes new build scripts and associated files that use cmake to compile, build, and test LaGriT based on the OS platform. + +These cmake scripts do not always use the latest features, instead favoring readability and straightforward statements to help with debugging and troubleshooting. The cmake and install scripts are commented with suggestions and the build documentation has added details for all steps. See README.md and links on that page. +- Cmake is controlled by CMakeLists.txt and settings found in /cmake files. +- The LaGriT build is fairly simple without ExodusII and is suggested if you do not need to write exodus files. +- For issues with exodus builds, see added documentation and comments in install install-exodus.sh ### Known Issues: --This release compiles with GNU Fortran 7.5 compiler, but may exit on exceptions not caught in old portions of code. +- This release compiles with GNU Fortran 7.5 compiler, but may exit on exceptions not caught in old portions of code. Avoid this by using the flag -ffpe-trap=invalid,zero,overflow,underflow,denormal - Builds with compiler gfortran v5 or greater can generate run-time signal exceptions such as IEEE_DNORMAL. Most exceptions have been tracked down and fixed according to picky compiler suggestions. These exceptions have not changed the behavior of the code. Exceptions will continue to be fixed as they show up. From 9729129e9f003d35df9f6be2046da9396945b5d8 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Mon, 18 Dec 2023 11:25:57 -0700 Subject: [PATCH 11/18] Add instructions to use SSH clone for git push/pull --- cmake/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmake/README.md b/cmake/README.md index 51a63b1c..5aa5d6f8 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -14,13 +14,22 @@ There's a really good tutorial-overview on CMake here, it covers how to handle m ## Download LaGriT -Download the repo by running: +Download the repo as shown under the Code button on git. +For developers, be sure to use SSH version to clone. ``` -$ git clone https://github.com/lanl/LaGriT.git +$ git clone git@github.com:lanl/LaGriT.git $ cd LaGriT/ ``` +If SSH Key needed, generate a key for your machine. +[See GitHub Docs for SSH Key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) +``` +Generate a SSH key (NOT RSA) in your .ssh directory. +ssh-keygen -t ed25519 -C "email.lanl.gov" +Copy contents of id_ed25519.pub into your SSH Keys on github (under settings). +``` + ## Build ExodusII (optional) See instructions in install-exodus.sh From 54adbb73fccae9c7a297d910f39a2363672a49db Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Mon, 18 Dec 2023 12:05:12 -0700 Subject: [PATCH 12/18] min max typos --- docs/pages/docs/commands/cmo/cmo_addatt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/docs/commands/cmo/cmo_addatt.md b/docs/pages/docs/commands/cmo/cmo_addatt.md index 9ccac646..c7f7f74e 100755 --- a/docs/pages/docs/commands/cmo/cmo_addatt.md +++ b/docs/pages/docs/commands/cmo/cmo_addatt.md @@ -194,10 +194,10 @@ See also the command [**`QUALITY`**](../QUALITY.md) for adding attributes such a **ang_mind_solid** / `att_name`
create a scalar element attribute and fill it with the minimum solid angle (degrees) of the element -**ang_maxd_solid** / `att_name`
create a scalar element attribute and fill it with the minimum solid angle (radian) of the element +**ang_minr_solid** / `att_name`
create a scalar element attribute and fill it with the minimum solid angle (radian) of the element -**ang_minr_solid** / `att_name`
create a scalar element attribute and fill it with the maximum solid angle (degrees) of the element +**ang_maxd_solid** / `att_name`
create a scalar element attribute and fill it with the maximum solid angle (degrees) of the element **ang_maxr_solid** / `att_name`
create a scalar element attribute and fill it with the maximum solid angle (radian) of the element From 7109fa05f4b9af972636f2e2ea7caa753a1d4557 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Mon, 18 Dec 2023 13:36:12 -0700 Subject: [PATCH 13/18] Running the script will FIX Exodus cmake files for a successful linux build --- install-exodus.sh | 73 +++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/install-exodus.sh b/install-exodus.sh index f7e7d212..1744c361 100755 --- a/install-exodus.sh +++ b/install-exodus.sh @@ -3,7 +3,7 @@ # Seacas Contact Gregory Sjaardema gsjaardema@gmail.com # # LaGriT does not need full full seacas but does require -# exodus and associated libs: +# exodus and associated libs with FORTRAN=YES # libexodus.a libexoIIv2for32.a libhdf5_hl.a libnetcdf.a # libexodus_for.a libhdf5.a libhdf5_tools.a libz.a # Preferable to use versions newer than July 2022 @@ -23,6 +23,37 @@ cd ${SEACAS_INSTALL_DIR} git clone https://github.com/sandialabs/seacas.git cd seacas && export ACCESS=`pwd` +# ---------------------------------------------------------------------------------------- +# Checkout a seacas tag that is known to work +# This is no longer needed for a linux build +# git reset --hard v2023-11-27 +# ---------------------------------------------------------------------------------------- +# Suggestions from Greg to fix Exodus possible build errors +# +# Add options to TPLs/seacas/TPL/netcdf/runcmake.sh +# +# cmake .. -DCMAKE_C_COMPILER:FILEPATH=${CC} \ +# -DENABLE_PNETCDF:BOOL=${MPI} \ +# ADD THESE OPTIONS: +# -DENABLE_PLUGINS:BOOL=OFF \ +# -DENABLE_MULTIFILTERS:BOOL=NO \ +# -DENABLE_NCZARR_FILTERS:BOOL=OFF \ +# -DENABLE_TESTS:BOOL=OFF \ +# +# FIX ERROR during lagrit build: routines or libs not found +# Modify ../cmake-exodus to add curl for linux systems +# Modify line (may leave curl off for some sytems, needed for linux) +# +# EXTRA_LIB="-DSeacas_EXTRA_LINK_FLAGS=z;dl -DSEACASExodus_ENABLE_SHARED:BOOL=OFF" +# to add curl +# EXTRA_LIB="-DSeacas_EXTRA_LINK_FLAGS=curl;z;dl -DSEACASExodus_ENABLE_SHARED:BOOL=OFF" +# ---------------------------------------------------------------------------------------- + + +# FIX TPL/netcdf/runcmake.sh and cmake-exodus as described above +sed -i '69i \ -DENABLE_PLUGINS:BOOL=OFF \\\n -DENABLE_MULTIFILTERS:BOOL=NO \\\n -DENABLE_NCZARR_FILTERS:BOOL=OFF \\\n -DENABLE_TESTS:BOOL=OFF \\' TPL/netcdf/runcmake.sh +sed -ie 's/DSeacas_EXTRA_LINK_FLAGS=z;dl/DSeacas_EXTRA_LINK_FLAGS=curl;z;dl/g' cmake-exodus + # Special handling for Cygwin if [[ `uname -s` == *"CYGWIN"* ]]; then BUILD=NO ./install-tpl.sh; @@ -35,52 +66,14 @@ fi; # These flags are recommended for LaGriT CGNS=NO MATIO=NO GNU_PARALLEL=NO FMT=NO SHARED=NO NEEDS_ZLIB=YES ./install-tpl.sh -# IF ERROR: couldn't build NetCDF. exiting -# -# EDIT TPLs/seacas/TPL/netcdf/runcmake.sh to add options: -# -# cmake .. -DCMAKE_C_COMPILER:FILEPATH=${CC} \ -# -DBUILD_SHARED_LIBS:BOOL=${SHARED} \ -# -DBUILD_TESTING:BOOL=OFF \ -# -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \ -# -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -# -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -# -DENABLE_PNETCDF:BOOL=${MPI} \ -# ADD THESE LINES (without the pound character): -# -DENABLE_PLUGINS:BOOL=OFF \ -# -DENABLE_MULTIFILTERS:BOOL=NO \ -# -DENABLE_NCZARR_FILTERS:BOOL=OFF \ -# -DENABLE_TESTS:BOOL=OFF \ -# -# run again: -# cd TPLs/seacas && export ACCESS=`pwd` -# CGNS=NO MATIO=NO GNU_PARALLEL=NO FMT=NO SHARED=NO NEEDS_ZLIB=YES ./install-tpl.sh -# # Result: lib/libhdf5.a lib/libhdf5_hl.a lib/libhdf5_tools.a lib/libnetcdf.a # # ==== RUN CMAKE ==================================== -# You can edit the cmake-exodus file to adjust compilers and settings -# FORTRAN must be set to YES cd $ACCESS mkdir build && cd build FORTRAN=YES SHARED=NO ../cmake-exodus -# ERROR during lagrit build: routines or libs not found -# Best to edit this line before building lagrit when error will occur -# -# EDIT ../cmake-exodus -# -# Modify line (may leave curl off for some sytems, needed for linux) -# EXTRA_LIB="-DSeacas_EXTRA_LINK_FLAGS=z;dl -DSEACASExodus_ENABLE_SHARED:BOOL=OFF" -# to add curl -# EXTRA_LIB="-DSeacas_EXTRA_LINK_FLAGS=curl;z;dl -DSEACASExodus_ENABLE_SHARED:BOOL=OFF" -# -# REMOVE broken cmake files: from seacas: rm -fr build -# rerun: -# mkdir build && cd build -# FORTRAN=YES SHARED=NO ../cmake-exodus -# # result: # -- Build files have been written to: TPLs/seacas/build # HAVE_NETCDF: YES @@ -100,7 +93,7 @@ make && make install # include/exodus_config.h include/exodusII.h include/exodusII.inc include/exodusII_par.h # include/netcdf.h include/hdf5.h # -# Once Exodus is installed, use the following commands to build from LaGriT top: +# Once Exodus is installed, use the following commands to build lagrit executable: # # mkdir build/ && cd build/ # cmake .. -DLAGRIT_BUILD_EXODUS=ON From b72fe9d1b1d2f9be774482bd5a3ccc83ce631619 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Mon, 18 Dec 2023 17:00:07 -0700 Subject: [PATCH 14/18] poisson_disk documentation --- docs/pages/docs/commands/createpts.md | 4 + .../commands/createpts/createpts_poisson.md | 191 ++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100755 docs/pages/docs/commands/createpts/createpts_poisson.md diff --git a/docs/pages/docs/commands/createpts.md b/docs/pages/docs/commands/createpts.md index e3611992..c01e9c40 100755 --- a/docs/pages/docs/commands/createpts.md +++ b/docs/pages/docs/commands/createpts.md @@ -16,6 +16,10 @@ This command adds points to a mesh object. For some special cases, it will also **[createpts/interp](createpts/createpts_interp.md)** Creates points by linear interpolation between two point sets. + +**[createpts/poisson_disk](createpts/createpts_poisson.md)** Create uniform or variable spaced vertices inside a pllygon using Poisson Disk sampling. + + **[createpts/sphere](createpts/cresphere.md)** Create points for a sphere. **[createpts/random](createpts/CRTPTRZRAN.md)** Add random points within region. diff --git a/docs/pages/docs/commands/createpts/createpts_poisson.md b/docs/pages/docs/commands/createpts/createpts_poisson.md new file mode 100755 index 00000000..779f5a21 --- /dev/null +++ b/docs/pages/docs/commands/createpts/createpts_poisson.md @@ -0,0 +1,191 @@ +--- +title: CREATEPTS/POISSON_DISK +tags: createpts poisson_disk +--- + +# CREATEPTS/POISSON_DISK + +------- + +Create a uniform or variable spaced points on/in a 2D planar polygon (convex or nonconvex) using Poisson Disk sampling. Optionally connect the vertices using Delaunay triangulation. + + +The 3D option for poisson_disk is under development and will be available in a future release. + + +## SYNTAX + +
+createpts /poisson_disk / [2d_polygon | 3d_box] / mo_out / mo_polygon / h_spacing_scalar / [connect | no_connect] / [user_resolution.mlgi] / [ poisson_seed integer ] [ number_of_samples integer ] [ resample_sweeps integer ]
+ 
+
+ +### Argument 3 Geometry Options + +**`2d_polygon`** character type indicating geometry for a 2D planar polygon, convex or nonconvex, in the XY plane. If the polygon you wish to distribute points in is not in XY plane, user must rotate it into XY plane.If the polygon is nonconvex, the algorithm may alter some small features depending on the details of the polygon and the user controlled input parameters. See examples below. + +**`3d_box`** character type indicating geometry for 3D orthogonal box defined by (x,y,z) minimum and (x,y,z) maximum. (Under Development) + +### Argument 4 and 5 Mesh Object Names + + +`mo_out` name of output mesh object. This user defined mesh object will contain the vertex distribution or triangulation created by the poisson_disk algorithm. + + +`mo_polygon` name of input mesh object that contains a 2D planar polygon in the XY plane. + +### Argument 6 Spacing + +`h_spacing_scalar` of type real. In the case of uniform resolution, this user provided real number defines the target spacing between vertices created by the Poisson-Disk algorithm. If the mesh is connected, the triangle edges will be approximately equal to `h_spacing_scalar`. In the case of variable resolution, `h_spacing_scalar` is used as a multiplier in the function defined in `user_resolution.mlgi`. + +### Argument 7 Output Options + +**`connect`** will connect the vertices generated by Poisson disk algorithm connected. The output mesh object `mo_out` will be a Delaunay triangulation. + + +**`no_connect`** the output mesh object `mo_out` will contain the vertices generated by Poisson disk algorithm without triangle connectivity. + + +### Optional Resolution Arguments + +Default if this option is not used, the mesh will be uniform resolution defined by Argument 6 `h_spacing_scalar`. + +`user_resolution.mlgi` is the name of a LaGriT control file for user defined resolution. +The control file defines a function h(x,y) that will be used to control vertex spacing in a variable resolution mesh. See examples below. + +When the variable option is utilized, internal to the module a mesh object, ** mo_poi_h_field**, with a real scalar attribute, **h_field_att**, is created. By default for uniform resolution, **h_field_att**, is set to a constant value of `h_spacing_scalar`, however, when this option is exercised, the user must fill *h_field_att* with their own scalar field h(x,y). In addition, internal to the code the command: +```define / POI_H_FACTOR / h_spacing_scalar``` +so one can access the value of `h_spacing_scalar` by using the variable **POI_H_FACTOR** in the LaGriT control file `user_resolution.mlgi` for setting variable resolution. + +### Advanced Options + +There are three optional parameters that are for advanced users only. They are keyword driven and can come in any order beginning as token 8 or 9. The user can specify none, one, two, or all three keyword driven parameters. + + +**`poisson_seed`*** (integer default 1) is the seed for the random number generator. If once runs this module with the same input, by default each run will give the same result. However, if the user would like to produce multiple realizations with the same input (same input polygon, same resolution, etc.) but a different output mesh, then the user can change the value of poisson_seed for each realization. + + +**`number_of_samples`** (integer default:10) Number of new candidate points that are sampled around an accepted node. Lower values reduce overall sampling time, but can lead to holes in the final point distribution. Higher value lead to better density and converge but takes more time. + + +**`resample_sweeps`** (integer default:1) Number of additional sampling attempts in the domain. If there exists holes in the point distribution, increasing this value should fill in these holes. + +It is suggested that the user should have the minimum value of h(x,y)= `h_spacing_scalar`, and then vary resolution by setting values greater than `h_spacing_scalar`. If one intends to have high resolution near objects and features and lower resolution away from the objects, then use of the compute/distance_field is a good way to define h(x,y). + +#### Advanced Option Examples + +
+createpts / poisson_disk / 2d_polygon / mo_poisson_pts / mo_polygon &
+      / 0.01 / connect / user_h_field_att.mlgi &
+      poisson_seed 3 / resample_sweeps 4 / number_of_samples 20
+
+createpts / poisson_disk / 2d_polygon / mo_poisson_pts / mo_polygon &
+      / 0.01 / connect / user_h_field_att.mlgi &
+      poisson_seed 3
+
+createpts / poisson_disk / 2d_polygon / mo_poisson_pts / mo_polygon &
+      / 0.01 / connect / poisson_seed 3
+
+ +
+ +## EXAMPLES for Uniform and User Defined Resolutions + +**Polygon input file: polygon_unit_square.poly** +``` +4 0 0 0 0 +1 -0.5 -0.5 0 +2 0.5 -0.5 0 +3 0.5 0.5 0 +4 -0.5 0.5 0 +``` + +**LaGriT control file** +``` +# +# Mesh a unit square with uniform and variable resolution tringles. +# +# Read polygon from a file. +# +read / avs / unit_square.poly / mo_polygon +# +# Uniform resolution, unit square polygon, vertex spacing 0.05: +# + +createpts / poisson_disk / 2d_polygon / mo_poisson_pts / mo_polygon & + / 0.05 / connect + +dump / avs / output01_unit_square_uniform.inp / mo_poisson_pts +cmo / delete / mo_poisson_pts +# +# Variable resolution, unit square polygon, vertex spacing 0.01: +# +# WIDTH_FACTOR is used in user_h_field_att.mlgi +# + +define / WIDTH_FACTOR / 10.0 +createpts / poisson_disk / 2d_polygon / mo_poisson_pts / mo_polygon & + / 0.01 / connect / user_h_field_att.mlgi + +dump / avs / output02_unit_square_var.inp / mo_poisson_pts +cmo / delete / mo_poisson_pts + +define / WIDTH_FACTOR / 20.0 +createpts / poisson_disk / 2d_polygon / mo_poisson_pts / mo_polygon & + / 0.01 / connect / user_h_field_att.mlgi + +dump / avs / output03_unit_square_var.inp / mo_poisson_pts +cmo / delete / mo_poisson_pts + +finish +``` + +**Variable resolution defined in LaGriT control file: user_h_field_att.mlgi** + +Used in the example above, the resolution is set using the X coordinate (xic), the user defined POI_H_FACTOR = h_spacing_scalar = 0.01, and a floor function to ensure no values are below h_spacing_scalar. + +``` +##################################################### +# User defined h field function assignment +##################################################### +# +# h_field_att is already set to POI_H_FACTOR +# +define / MO_H_FIELD / mo_poi_h_field +# +# x**2 +math / power / MO_H_FIELD / h_field_att / 1,0,0 / & + MO_H_FIELD / xic / 2.0 +cmo/printatt/MO_H_FIELD/h_field_att/minmax +# sqrt(x**2) +math / power / MO_H_FIELD / h_field_att / 1,0,0 / & + MO_H_FIELD / h_field_att / 0.5 +cmo / printatt/MO_H_FIELD/h_field_att/minmax +# POI_H_FACTOR*sqrt(x**2) +math/multiply/MO_H_FIELD/h_field_att/1,0,0/ & + MO_H_FIELD/h_field_att/ POI_H_FACTOR +math/multiply/MO_H_FIELD/h_field_att/1,0,0/ & + MO_H_FIELD/h_field_att/ WIDTH_FACTOR +cmo / printatt/MO_H_FIELD/h_field_att/minmax +math / floor / MO_H_FIELD/h_field_att/1,0,0/ & + MO_H_FIELD/h_field_att/POI_H_FACTOR +cmo/printatt/MO_H_FIELD/h_field_att/minmax +cmo / status / brief +# +# As a diagnostic one can output MO_H_FIELD and view +# the h(x,y) attribute that will be used to set resolution. +# +dump / avs / h_field_out.inp / MO_H_FIELD +# +finish + +``` + + + + + + + +  + From f287c89718f8b142ce3948c547cb64fc34205d49 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Mon, 18 Dec 2023 17:06:09 -0700 Subject: [PATCH 15/18] Update createpts_poisson.md --- docs/pages/docs/commands/createpts/createpts_poisson.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/pages/docs/commands/createpts/createpts_poisson.md b/docs/pages/docs/commands/createpts/createpts_poisson.md index 779f5a21..c030a325 100755 --- a/docs/pages/docs/commands/createpts/createpts_poisson.md +++ b/docs/pages/docs/commands/createpts/createpts_poisson.md @@ -20,13 +20,13 @@ The 3D option for poisson_disk is under development and will be available in a f
-### Argument 3 Geometry Options +### Argument 3. Geometry Options **`2d_polygon`** character type indicating geometry for a 2D planar polygon, convex or nonconvex, in the XY plane. If the polygon you wish to distribute points in is not in XY plane, user must rotate it into XY plane.If the polygon is nonconvex, the algorithm may alter some small features depending on the details of the polygon and the user controlled input parameters. See examples below. **`3d_box`** character type indicating geometry for 3D orthogonal box defined by (x,y,z) minimum and (x,y,z) maximum. (Under Development) -### Argument 4 and 5 Mesh Object Names +### Argument 4. and 5. Mesh Object Names `mo_out` name of output mesh object. This user defined mesh object will contain the vertex distribution or triangulation created by the poisson_disk algorithm. @@ -34,11 +34,11 @@ The 3D option for poisson_disk is under development and will be available in a f `mo_polygon` name of input mesh object that contains a 2D planar polygon in the XY plane. -### Argument 6 Spacing +### Argument 6. Spacing `h_spacing_scalar` of type real. In the case of uniform resolution, this user provided real number defines the target spacing between vertices created by the Poisson-Disk algorithm. If the mesh is connected, the triangle edges will be approximately equal to `h_spacing_scalar`. In the case of variable resolution, `h_spacing_scalar` is used as a multiplier in the function defined in `user_resolution.mlgi`. -### Argument 7 Output Options +### Argument 7. Output Options **`connect`** will connect the vertices generated by Poisson disk algorithm connected. The output mesh object `mo_out` will be a Delaunay triangulation. From cd3bcbf8fcc2ba501dfa0624ed6c2ddadc635c98 Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Tue, 19 Dec 2023 11:15:28 -0700 Subject: [PATCH 16/18] Update README.md --- cmake/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/README.md b/cmake/README.md index 5aa5d6f8..155d0a42 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -45,6 +45,14 @@ include/exodus_config.h include/exodusII.h include/exodusII.inc include/ex include/netcdf.h include/hdf5.h ``` +Once the ExodusII is successful, build LaGriT as usual but with the EXODUS flag: + +``` +mkdir build/ && cd build/ +cmake .. -DCMAKE_BUILD_TYPE=Debug -DLAGRIT_BUILD_EXODUS=ON +make +``` + ## Create your build directory: You can build as Debug (-g) or as Release with the CMake flag "-D CMAKE_BUILD_TYPE=[Debug|Release]". From ae55144035aa2a02184ea84bdedfe215f8e858ad Mon Sep 17 00:00:00 2001 From: Terry Miller Date: Tue, 19 Dec 2023 11:41:37 -0700 Subject: [PATCH 17/18] typo --- docs/pages/docs/commands/createpts.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/pages/docs/commands/createpts.md b/docs/pages/docs/commands/createpts.md index c01e9c40..e236af89 100755 --- a/docs/pages/docs/commands/createpts.md +++ b/docs/pages/docs/commands/createpts.md @@ -17,8 +17,7 @@ This command adds points to a mesh object. For some special cases, it will also **[createpts/interp](createpts/createpts_interp.md)** Creates points by linear interpolation between two point sets. -**[createpts/poisson_disk](createpts/createpts_poisson.md)** Create uniform or variable spaced vertices inside a pllygon using Poisson Disk sampling. - +**[createpts/poisson_disk](createpts/createpts_poisson.md)** Use Poisson Disk sampling to create uniform or variable spaced points inside a polygon. **[createpts/sphere](createpts/cresphere.md)** Create points for a sphere. From dd5db6962fef138f32152e4f9c8a89c41148d471 Mon Sep 17 00:00:00 2001 From: Erica Hinrichs Date: Tue, 19 Dec 2023 14:30:14 -0700 Subject: [PATCH 18/18] Small edits to fix implicit declaration errors. --- lg_util/src/gmvwritef.c | 33 +++++++++++++++++++++++++++++++++ src/matrix_values_compress.c | 3 +++ src/metis_lg.c | 3 +++ 3 files changed, 39 insertions(+) mode change 100755 => 100644 lg_util/src/gmvwritef.c mode change 100755 => 100644 src/matrix_values_compress.c mode change 100755 => 100644 src/metis_lg.c diff --git a/lg_util/src/gmvwritef.c b/lg_util/src/gmvwritef.c old mode 100755 new mode 100644 index 5b1034a3..2d311766 --- a/lg_util/src/gmvwritef.c +++ b/lg_util/src/gmvwritef.c @@ -47,6 +47,39 @@ #include #include +/* Declare Functions */ +gmvwriteopenfile(); +gmvwriteclosefile(); +gmvwriteclosefile(); +gmvwritenodedata(); +gmvwritenodedata(); +gmvwritenodedatastruct(); +gmvwritecellheader(); +gmvwritecellheader(); +gmvwritecelldata(); +gmvwritegeneralcelldata(); +gmvwritematerialheader(); +gmvwritematerialname(); +gmvwritematerialids(); +gmvwritevelocitydata(); +gmvwritenodedatalstruct(); +gmvwritevariableheader(); +gmvwritevariablenamedata(); +gmvwritevariableendvars(); +gmvwriteflagheader(); +gmvwriteflagname(); +gmvwriteflagtype(); +gmvwriteflagdata(); +gmvwriteflagendflag(); +gmvwritepolygonsheader(); +gmvwritepolygonsdata(); +gmvwritepolygonsendpoly(); +gmvwritetracersheader(); +gmvwritetracersnamedata(); +gmvwritetracersendtrace(); +gmvwriteprobtime(); +gmvwritecycleno(); + /************************************************************************/ void fgmvwriteopenfile_(char filnam[]) { diff --git a/src/matrix_values_compress.c b/src/matrix_values_compress.c old mode 100755 new mode 100644 index 748f3280..e2e71860 --- a/src/matrix_values_compress.c +++ b/src/matrix_values_compress.c @@ -37,6 +37,9 @@ #include #include +/* function declaration */ +time(); + /********************************skiplist.h******************************/ diff --git a/src/metis_lg.c b/src/metis_lg.c old mode 100755 new mode 100644 index a5d37d68..0c8ed62e --- a/src/metis_lg.c +++ b/src/metis_lg.c @@ -68,6 +68,9 @@ All metis routines are concatenated below. */ #include "metis.h" +/* function declaration */ +SelectQueueOneWay(); + /************************************************************************* * This function is my wrapper around free, allows multiple pointers **************************************************************************/