Commit 4c4cdc9a authored by Patrik Leidenberger's avatar Patrik Leidenberger

Add H5Fed.

parent 8f31d8dd
......@@ -3,6 +3,31 @@
/COPYRIGHT -text
/ChangeLog -text
/GNUmakefile.orig -text
H5Fed/applications/gmsh2h5fed.cc -text
H5Fed/applications/gmsh2h5fed.hh -text
H5Fed/applications/makefile.am -text
H5Fed/autogen.sh -text
H5Fed/configure.ac -text
H5Fed/grids/cube0.geo -text
H5Fed/grids/cube0.msh -text
H5Fed/grids/cubeincube.geo -text
H5Fed/grids/cubeincube.msh -text
H5Fed/grids/sphere.geo -text
H5Fed/grids/sphere.msh -text
H5Fed/libsrc/gmsh/gmsh.cc -text
H5Fed/libsrc/gmsh/gmsh.hh -text
H5Fed/libsrc/gmsh/gmshconst.hh -text
H5Fed/libsrc/gmsh/gmshgrammar.hh -text
H5Fed/libsrc/gmsh/gmshsemanticaction.hh -text
H5Fed/libsrc/gmsh/makefile.am -text
H5Fed/libsrc/h5fed/h5fed.cc -text
H5Fed/libsrc/h5fed/h5fed.hh -text
H5Fed/libsrc/h5fed/h5fedconst.hh -text
H5Fed/libsrc/h5fed/makefile.am -text
H5Fed/libsrc/makefile.am -text
H5Fed/libsrc/stdincl/nonsciconst.h -text
H5Fed/libsrc/stdincl/physicomath.h -text
H5Fed/makefile.am -text
/Makefile.am -text
/Makefile.orig -text
/NEWS -text
......
This diff is collapsed.
// rights - 2006-, copyright benedikt oswald and patrick leidenberger, all rights reserved
// project - phidias3d
// file name - phidias3d.h
// file type - c++ header file
// objective - header file for the phidias3d visualization postprocessor
// modified - 2006 jun 26, creation, benedikt oswald
// modified - 2006 jun 28,
// modified - 2006 jul 30, Add include for command line argument parser
// with boost::program_options, pl.
// inheritance -
// feature - implements the phidias3d visualization postprocessor; the features
// feature - will be (1) read VTK legacy formatted files (2) read HDF5/ELECTROMAGNETIC
// feature - structures files (3) export VTK legacy formatted files (4) export
// feature - data, both meshes and fields, throught the Renderman Interface
// feature - routines.
// required software -
/* include standard header files */
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <iostream>
#include <iterator>
#include <math.h>
/* Include the files for rlog. */
#include <rlog/rlog.h>
#include <rlog/rloglocation.h>
#include <rlog/Error.h>
#include <rlog/RLogChannel.h>
#include <rlog/StdioNode.h>
// Include this if you want to log the time.
#include <rlog/RLogTime.h>
// Include the boost program program_options to parse the comand line
// options.
#include <boost/program_options.hpp>
/* include standard proprietary header files */
#include <nonsciconst.h>
#include <physicomath.h>
//#include <ristream.h>
#include <gmsh.hh>
// Include the Hdf5FiniteElementData API.
#ifdef HAVE_HDF5
// Include the Hdf5FiniteElementData API.
#include <h5fed.hh>
// Include h5fed specific constants.
#include <h5fedconst.hh>
#else
#warning No hdf5 lib found!!
#endif
#ifndef PHIDIAS3D_H_
#define PHIDIAS3D_H_
using namespace physicomath;
using namespace nonsciconst;
using namespace gmshtohdf5fed;
#endif /*PHIDIAS3D_H_*/
## Makefile.am -- process this file with automake to produce Makefile.in
##
## authors - benedikt oswald and patrick leidenberger
## modified - 2006 aug 21, patrick leidenberger, creation
## modified - 2006 aug 23, pl, adaped to changed directory structure.
## modified - 2006 aug 25, pl, adaped to changed directory structure.
#
## objective - automake input file for the gmsh directory
## project - gmsh2h5fed
noinst_PROGRAMS = gmsh2h5fed
gmsh2h5fed_SOURCES = gmsh2h5fed.cc
gmsh2h5fed_DEPENDENCIES = ../libsrc/stdincl/nonsciconst.h \
../libsrc/stdincl/physicomath.h \
../libsrc/gmsh/gmsh.hh \
../libsrc/gmsh/gmsh.cc \
../libsrc/gmsh/gmshconst.hh \
../libsrc/gmsh/gmshgrammar.hh \
../libsrc/gmsh/gmshsemanticaction.hh \
../libsrc/h5fed/h5fed.hh \
../libsrc/h5fed/h5fed.cc
gmsh2h5fed_LDADD = @GMSH2H5FED_LIBS@
#AM_CPPFLAGS = @AM_CPPFLAGS@
libtoolize -f && \
aclocal && \
autoconf && \
autoheader && \
automake --add-missing && \
CC='mpicc' F9X='mpif90' CXX='mpiCC' ./configure --with-rlog=$HOME/extlib/rlog-1.3.7 --with-boost='' --with-hdf5=$HOME/extlib/hdf5-1.6.5 &&\
make clean && \
make all
## Process this file with autoconf to produce a configure script
##
## author - benedikt oswald and patrick leidenberger
## modified - 2006 aug 21, pl, creation.
## modified - 2006 aug 24, pl, add h5fed path.
##
## to do : The rlog lib needs a -DRLOG_COMPONENT="some name", I don't know
## how tho do this so that the quotation marks are in the output
## stream as well, pl, 2006 jul 04.
##
## objective - develop input file for GNU autotools/configure
## project - H5Fed
##
AC_PREREQ(2.59)
AC_COPYRIGHT([This configure script is copyright by Benedikt Oswald and Patrick Leidenberger, 2006])
AC_INIT([gmshtohdf5fed], [1.0], [in case of problems mail to: benedikt.oswald@psi.ch or patrick.leidenberger@psi.ch])
# library creation
AC_PROG_LIBTOOL
# standard macros
AC_CONFIG_AUX_DIR(./)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([./config.h:./config.in])
# set cppflags to zero
CPPFLAGS=""
CFFLAGS=""
CXXFLAGS=""
# provide include directories
AC_SUBST([AM_CPPFLAGS], '-I$(top_srcdir)/libsrc/stdincl -I$(top_srcdir)/libsrc/gmsh -I$(top_srcdir)/libsrc/h5fed')
AC_SUBST([GMSH2H5FED_LIBS],'$(top_srcdir)/libsrc/gmsh/libgmsh.la $(top_srcdir)/libsrc/h5fed/libh5fed.la')
# Make available external libraries
AC_ARG_WITH(boost,
AC_HELP_STRING([--with-boost=PREFIX],
[prefix where the Boost libraries and include files are to be found]),
[BOOST_PREFIX=$withval
LDFLAGS="-lz -lboost_program_options "])
AC_ARG_WITH(rlog,
AC_HELP_STRING([--with-rlog=PREFIX],
[prefix where the rlog libraries and include files are to be found]),
[RLOG_PREFIX=$withval
CPPFLAGS="-I"$RLOG_PREFIX"/include "${CPPFLAGS}
LDFLAGS=$RLOG_PREFIX"/lib/librlog.la "${LDFLAGS}])
AC_ARG_ENABLE(rlog-debug,
AC_HELP_STRING([--disable-rlog-debug],
[disable the debug output channel of rlog]),
[],
[CFFLAGS="-DUSE_RLOG_DEBUG_CHANNEL "${CFFLAGS}
CXXFLAGS="-DUSE_RLOG_DEBUG_CHANNEL "${CXXFLAGS}])
AC_ARG_ENABLE(rlog-error,
AC_HELP_STRING([--disable-rlog-error],
[disable the error output channel of rlog]),
[],
[CFFLAGS="-DUSE_RLOG_ERROR_CHANNEL "${CFFLAGS}
CXXFLAGS="-DUSE_RLOG_ERROR_CHANNEL "${CXXFLAGS}])
AC_ARG_ENABLE(rlog-info,
AC_HELP_STRING([--disable-rlog-info],
[disable the info output channel of rlog]),
[],
[CFFLAGS="-DUSE_RLOG_INFO_CHANNEL "${CFFLAGS}
CXXFLAGS="-DUSE_RLOG_INFO_CHANNEL "${CXXFLAGS}])
AC_ARG_ENABLE(rlog-warning,
AC_HELP_STRING([--disable-rlog-warning],
[disable the warning output channel of rlog]),
[],
[CFFLAGS="-DUSE_RLOG_WARNING_CHANNEL "${CFFLAGS}
CXXFLAGS="-DUSE_RLOG_WARNING_CHANNEL "${CXXFLAGS}])
AC_ARG_WITH(hdf5,
AC_HELP_STRING([--with-hdf5=PREFIX],
[prefix to hdf5 libraries and include files]),
[HDF5_PREFIX=$withval
CPPFLAGS="-DHAVE_HDF5 -I"$HDF5_PREFIX"/include "${CPPFLAGS}
LDFLAGS="-L"$HDF5_PREFIX"/lib -lhdf5 "${LDFLAGS}])
# LDFLAGS=$HDF5_PREFIX"/lib/libhdf5.la "${LDFLAGS}])
# Set C/C++ compiler flags.
CPPFLAGS=${CPPFLAGS}
CFFLAGS="-g3 "${CFFLAGS}
CXXFLAGS="-g3 "${CXXFLAGS}
AM_INIT_AUTOMAKE([1.9 foreign])
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL([install])
AC_CONFIG_FILES([makefile
applications/makefile
libsrc/makefile
libsrc/gmsh/makefile
libsrc/h5fed/makefile])
AC_OUTPUT
// rights - 2002-2005, benedikt oswald,
// project - aq
// file name - cube0.geo
// file type - GMSH script file
// objective - model cube fundamental cube
// modified - 2005 jan 25, benedikt oswald, creation
// modified - 2005 jan 25, benedikt oswald, added background hexahedron, subsurface hexahedron
// modified - 2005 feb 01, benedikt oswald, adapted to the simple.geo problem
// modified - 2005 mar 08, benedikt oswald, adapted to the cube in cube geometry
// modified - 2005 mar 22, benedikt oswald, adapted to model fundamental cube
// inheritance -
// feature - models fundamental cube, used for benchmark calculations of a Hertzian dipole
// feature - radiating into free space; the model uses standard physical domain tags;
// 1 modeling constants
lcl1=0.50; // characteristic length in fractions of lambda@1 GHz for air domain
lcl2=0.50; // characteristic length in fractions of lambda@1 GHz for air domain
lambda=0.30; // wavelength of electromagntic wave at a frequency of 1 GHz
lx=2.0; // x dim of computational domain
ly=2.0; // y dim of computational domain
lz=2.0; // z dim of computational domain
cx=0.5*lx; // calculate center of computational domain
cy=0.5*ly; // calculate center of computational domain
cz=0.5*lz; // calculate center of computational domain
// 1.2 Define physical material domains
vacuum=609; // physical entity vacuum
air=709; // physical entity air
subsurface=809; // physical entity subsurface
pml=1301; // physical entity pml material
icelens=4001; // physical entity icelens
vacuum_background_bnd=12701; // boundary to background, i.e. vacuum
interelement_bnd=12702; // interior boundary, separating different material domains
// 2 Define cubes
// 2.1.1 Define points of cube
p0=newp; Point(p0) = {0.0, 0.0, 0.0, lambda * lcl1};
p1=newp; Point(p1) = { lx, 0.0, 0.0, lambda * lcl1};
p2=newp; Point(p2) = { lx, ly, 0.0, lambda * lcl1};
p3=newp; Point(p3) = {0.0, ly, 0.0, lambda * lcl1};
p4=newp; Point(p4) = {0.0, 0.0, lz, lambda * lcl1};
p5=newp; Point(p5) = { lx, 0.0, lz, lambda * lcl1};
p6=newp; Point(p6) = { lx, ly, lz, lambda * lcl1};
p7=newp; Point(p7) = {0.0, ly, lz, lambda * lcl1};
// 2.1.3 Define lines of cube
// lower xy plane
li0=newl; Line(li0) = {p0,p1};
li1=newl; Line(li1) = {p1,p2};
li2=newl; Line(li2) = {p2,p3};
li3=newl; Line(li3) = {p3,p0};
// upper xy plane
li4=newl; Line(li4) = {p4,p5};
li5=newl; Line(li5) = {p5,p6};
li6=newl; Line(li6) = {p6,p7};
li7=newl; Line(li7) = {p7,p4};
// vertical lines
li8=newl; Line(li8) = {p0,p4};
li9=newl; Line(li9) = {p1,p5};
li10=newl; Line(li10) = {p2,p6};
li11=newl; Line(li11) = {p3,p7};
// 2.1.5 Define line 6 line loops for the 6 faces of the cube
lloop0= newreg; Line Loop(lloop0) = { li0, li1, li2, li3};
lloop1= newreg; Line Loop(lloop1) = { li4, li5, li6, li7};
lloop2= newreg; Line Loop(lloop2) = { li0, li9, -li4, -li8 };
lloop3= newreg; Line Loop(lloop3) = { li1, li10, -li5, -li9};
lloop4= newreg; Line Loop(lloop4) = { li2, li11, -li6, -li10};
lloop5= newreg; Line Loop(lloop5) = { li3, li8, -li7, -li11};
// 2.1.7 define plane surfaces for the cube
s0=news; Plane Surface(s0) = {lloop0};
s1=news; Plane Surface(s1) = {lloop1};
s2=news; Plane Surface(s2) = {lloop2};
s3=news; Plane Surface(s3) = {lloop3};
s4=news; Plane Surface(s4) = {lloop4};
s5=news; Plane Surface(s5) = {lloop5};
// 2.1.9 Define surface loops required for volume definition of the cube
sloop0=newreg; Surface Loop(sloop0) ={s0,s1,s2,s3,s4,s5};
// 2.1.10 Define volume of the cube
v0=newv; Volume(v0) = {sloop0};
// 3.0 define physical entitites
Physical Point(vacuum_background_bnd) = {p0:p7};
Physical Line(vacuum_background_bnd) = {li0:li11};
Physical Surface(vacuum_background_bnd) = {s0:s5};
Physical Volume(air) = {v0};
This diff is collapsed.
// rights - 2002-2005, benedikt oswald,
// project - aq
// file name - cubeincube.geo
// file type - GMSH script file
// objective - model cube in a cube mesh, useful for PML booundary conditions
// modified - 2005 jan 25, benedikt oswald, creation
// modified - 2005 jan 25, benedikt oswald, added background hexahedron, subsurface hexahedron
// modified - 2005 feb 01, benedikt oswald, adapted to the simple.geo problem
// modified - 2005 mar 08, benedikt oswald, adapted to the cube in cube geometry
// inheritance -
// feature - models a cube in a cube mesh, useful for PML booundary conditions;
// feature - the PML boundary model is based on a 3D region with special electromagnetic
// feature - material properties which guarantee, in theory, perfect absorption of incident
// feature - electromagnetic waves independent of the angle between the wave vector
// feature - and the boundary; in order to model the PML material domain a separate mesh
// feature - region is created so that there is a clean boundary between the PML and
// feature - and the air region.
// 1 modeling constants
lcair=0.90; // characteristic length in fractions of lambda@1 GHz for air domain
lcpml=0.70; // characteristic length in fractions of lambda@1 GHz for PML region
lambda=0.30; // wavelength of electromagntic wave at a frequency of 1 GHz
lx=1.0; // x dim of computational domain
ly=1.0; // y dim of computational domain
lz=1.0; // z dim of computational domain
cx=0.5*lx; // calculate center of computational domain
cy=0.5*ly; // calculate center of computational domain
cz=0.5*lz; // calculate center of computational domain
lpmlxl=0.1; // thickness of PML region
lpmlxh=0.1; // thickness of PML region
lpmlyl=0.1; // thickness of PML region
lpmlyh=0.1; // thickness of PML region
lpmlzl=0.1; // thickness of PML region
lpmlzh=0.1; // thickness of PML region
xminic=lpmlxl; // x min of inner cube
xmaxic=lx-lpmlxh; // x max of inner cube
yminic=lpmlyl; // y min of inner cube
ymaxic=ly-lpmlyh; // y max of inner cube
zminic=lpmlzl; // z min of inner cube
zmaxic=lz-lpmlzh; // z max of inner cube
// 1.2 Define physical material domains
vacuum=609; // physical entity vacuum
air=709; // physical entity air
pml=1301; // physical entity pml material
icelens=4001; // physical entity icelens
vacuum_background_bnd=12701; // boundary to background, i.e. vacuum
interelement_bnd=12702; // interior boundary, separating different material domains
// 2 Define cubes
// 2.1.1 Define points of outer cube
p0=newp; Point(p0) = {0.0, 0.0, 0.0, lambda * lcpml};
p1=newp; Point(p1) = { lx, 0.0, 0.0, lambda * lcpml};
p2=newp; Point(p2) = { lx, ly, 0.0, lambda * lcpml};
p3=newp; Point(p3) = {0.0, ly, 0.0, lambda * lcpml};
p4=newp; Point(p4) = {0.0, 0.0, lz, lambda * lcpml};
p5=newp; Point(p5) = { lx, 0.0, lz, lambda * lcpml};
p6=newp; Point(p6) = { lx, ly, lz, lambda * lcpml};
p7=newp; Point(p7) = {0.0, ly, lz, lambda * lcpml};
// 2.1.2 Define points of inner cube
p100=newp; Point(p100) = {xminic, yminic, zminic, lambda * lcair};
p101=newp; Point(p101) = {xmaxic, yminic, zminic, lambda * lcair};
p102=newp; Point(p102) = {xmaxic, ymaxic, zminic, lambda * lcair};
p103=newp; Point(p103) = {xminic, ymaxic, zminic, lambda * lcair};
p104=newp; Point(p104) = {xminic, yminic, zmaxic, lambda * lcair};
p105=newp; Point(p105) = {xmaxic, yminic, zmaxic, lambda * lcair};
p106=newp; Point(p106) = {xmaxic, ymaxic, zmaxic, lambda * lcair};
p107=newp; Point(p107) = {xminic, ymaxic, zmaxic, lambda * lcair};
// 2.1.3 Define lines of outer cube
// lower xy plane
li0=newl; Line(li0) = {p0,p1};
li1=newl; Line(li1) = {p1,p2};
li2=newl; Line(li2) = {p2,p3};
li3=newl; Line(li3) = {p3,p0};
// upper xy plane
li4=newl; Line(li4) = {p4,p5};
li5=newl; Line(li5) = {p5,p6};
li6=newl; Line(li6) = {p6,p7};
li7=newl; Line(li7) = {p7,p4};
// vertical lines
li8=newl; Line(li8) = {p0,p4};
li9=newl; Line(li9) = {p1,p5};
li10=newl; Line(li10) = {p2,p6};
li11=newl; Line(li11) = {p3,p7};
// 2.1.4 Define lines of outer cube
// lower xy plane
li100=newl; Line(li100) = {p100,p101};
li101=newl; Line(li101) = {p101,p102};
li102=newl; Line(li102) = {p102,p103};
li103=newl; Line(li103) = {p103,p100};
// upper xy plane
li104=newl; Line(li104) = {p104,p105};
li105=newl; Line(li105) = {p105,p106};
li106=newl; Line(li106) = {p106,p107};
li107=newl; Line(li107) = {p107,p104};
// vertical lines
li108=newl; Line(li108) = {p100,p104};
li109=newl; Line(li109) = {p101,p105};
li110=newl; Line(li110) = {p102,p106};
li111=newl; Line(li111) = {p103,p107};
// 2.1.5 Define line 6 line loops for the 6 faces of outer cube
lloop0= newreg; Line Loop(lloop0) = { li0, li1, li2, li3};
lloop1= newreg; Line Loop(lloop1) = { li4, li5, li6, li7};
lloop2= newreg; Line Loop(lloop2) = { li0, li9, -li4, -li8 };
lloop3= newreg; Line Loop(lloop3) = { li1, li10, -li5, -li9};
lloop4= newreg; Line Loop(lloop4) = { li2, li11, -li6, -li10};
lloop5= newreg; Line Loop(lloop5) = { li3, li8, -li7, -li11};
// 2.1.6 Define line 6 line loops for the 6 faces of inner cube
lloop100= newreg; Line Loop(lloop100) = { li100, li101, li102, li103};
lloop101= newreg; Line Loop(lloop101) = { li104, li105, li106, li107};
lloop102= newreg; Line Loop(lloop102) = { li100, li109, -li104, -li108 };
lloop103= newreg; Line Loop(lloop103) = { li101, li110, -li105, -li109};
lloop104= newreg; Line Loop(lloop104) = { li102, li111, -li106, -li110};
lloop105= newreg; Line Loop(lloop105) = { li103, li108, -li107, -li111};
// 2.1.7 define plane surfaces for outer cube
s0=news; Plane Surface(s0) = {lloop0};
s1=news; Plane Surface(s1) = {lloop1};
s2=news; Plane Surface(s2) = {lloop2};
s3=news; Plane Surface(s3) = {lloop3};
s4=news; Plane Surface(s4) = {lloop4};
s5=news; Plane Surface(s5) = {lloop5};
// 2.1.8 define plane surfaces for inner cube
s100=news; Plane Surface(s100) = {lloop100};
s101=news; Plane Surface(s101) = {lloop101};
s102=news; Plane Surface(s102) = {lloop102};
s103=news; Plane Surface(s103) = {lloop103};
s104=news; Plane Surface(s104) = {lloop104};
s105=news; Plane Surface(s105) = {lloop105};
// 2.1.9 Define surface loops required for volume definition of outer cube
sloop0=newreg; Surface Loop(sloop0) ={s0,s1,s2,s3,s4,s5};
// 2.1.9 Define surface loops required for volume definition of inner cube
sloop100=newreg; Surface Loop(sloop100) ={s100,s101,s102,s103,s104,s105};
// 2.1.10 Define volume of outer cube
v0=newv; Volume(v0) = {sloop0,sloop100};
// 2.1.11 Define volume of inner cube
v100=newv; Volume(v100) = {sloop100};
// 3.0 define physical entitites
Physical Point(vacuum_background_bnd) = {p0,p1,p2,p3,p4,p5,p6,p7};
Physical Line(vacuum_background_bnd) = {li0,li1,li2,li3,li4,li5,li6,li7,li8,li9,li10,li11};
//Physical Line Loop(vacuum_background_bnd) = {lloop0,lloop1,lloop2,lloop3,lloop4,lloop5};
Physical Surface(vacuum_background_bnd) = {s0,s1,s2,s3,s4,s5};
//Physical Surface Loop(vacuum_background_bnd) = {sloop0};
Physical Volume(pml) = {v0};
Physical Point(interelement_bnd) = {p100,p101,p102,p103,p104,p105,p106,p107};
Physical Line(interelement_bnd) = {li100,li101,li102,li103,li104,li105,li106,li107,li108,li109,li110,li111};
//Physical Line Loop(interelement_bnd) = {lloop100,lloop101,lloop102,lloop103,lloop104,lloop105};
Physical Surface(interelement_bnd) = {s100,s101,s102,s103,s104,s105};
//Physical Surface Loop(interelement_bnd) = {sloop100};
Physical Volume(air) = {v100};
This diff is collapsed.
// rights - 2002-2005, benedikt oswald,
// project - aq
// file name - sphere.geo
// file type - GMSH script file
// objective - model cube in a cube, 2 spherical objects mesh to investigate sub lambda resolution capability
// modified - 2005 jan 25, benedikt oswald, creation
// modified - 2005 jan 25, benedikt oswald, added background hexahedron, subsurface hexahedron
// modified - 2005 feb 01, benedikt oswald, adapted to the simple.geo problem
// modified - 2005 mar 08, benedikt oswald, adapted to the cube in cube geometry
// modified - 2005 mar 09, benedikt oswald, adapted to cube in cube and spherical particle configuration
// modified - 2005 mar 11, benedikt oswald, adapted to investigation of sub-lambda resolution capability
// modified - 2005 mar 22, benedikt oswald, adapted to be based on reference background medium subLambda310.geo
// modified - 2005 mar 23, benedikt oswald, adapted to model a microresonator geometry
// modified - 2005 mar 29, benedikt oswald, adapted to model a high quality sphere for a Hertzian dipole benchmark
// modified - 2005
// inheritance -
// feature - models a microresonator geometry; a dielectric sphere within an air sphere; the dielectric
// feature - sphere will be excited by a Hertzian dipole in the vicinity of the sphere;
// feature -
// 1 modeling constants
lcair=1.20; // characteristic length in fractions of lambda@1 GHz for air domain
lcsubsurface=1.20; // characteristic length in fractions of lambda@1 GHz for subsurface domain
lcil1=0.80; // characteristic length in fractions of lambda@1 GHz for icelens region
lcil2=0.40; // characteristic length in fractions of lambda@1 GHz for icelens 2 region
lambda=3.0e-1; // wavelength of electromagntic wave at a frequency of 1 GHz
lx=3.0; // x dim of computational domain
ly=3.0; // y dim of computational domain
lz=2.0; // z dim of computational domain
cx=0.5*lx; // calculate center of computational domain
cy=0.5*ly; // calculate center of computational domain
cz=0.5*lz; // calculate center of computational domain
dxl=0.3; // thickness of PML region
dxh=0.3; // thickness of PML region
dyl=0.3; // thickness of PML region
dyh=0.3; // thickness of PML region
dzl=0.30; // thickness of PML region
dzh=0.60; // thickness of PML region
xminic=dxl; // x min of inner cube
xmaxic=lx-dxh; // x max of inner cube
yminic=dyl; // y min of inner cube
ymaxic=ly-dyh; // y max of inner cube
zminic=dzl; // z min of inner cube
zmaxic=lz-dzh; // z max of inner cube
dsx=0.10; // x distance separating the two spherical scatterers
dsy=0.00; // y distance separating the two spherical scatterers
dsz=0.00; // z distance separating the two spherical scatterers
r1=1.0; // radius of air sphere
ilcx=0.0; // x center of air sphere
ilcy=0.0; // y center of
ilcz=0.0; // z center of
r2=2.0e-6; // radius of dielectric sphere
il2cx=0.0; // x center of dielectric sphere
il2cy=0.0; // y center of dielectric sphere
il2cz=0.0; // z center of dielectric sphere
// 1.2 Define physical material domains
vacuum=609; // physical entity vacuum
air=709; // physical entity air
subsurface=809; // physical entity subsurface
pml=1301; // physical entity pml material
icelens1=4001; // physical entity icelens
icelens2=4003; // physical entity icelens 2
dielsphere=4005; // physical entity dielectric sphere
vacuum_background_bnd=12701; // boundary to background, i.e. vacuum
air_soil_bnd=12702; // interior boundary, separating air and subsurface material
soil_icelens1_bnd=12703; // interior boundary, separating background subsurface from icelens particle
soil_icelens2_bnd=12705; // interior boundary, separating background subsurface from icelens 2 particle
dielectric_sphere_bnd=12707; // interior boundary, separting air background from dielectric sphere
// 2.2.1 Define air sphere 1
ilp1 = newp; Point(ilp1) = {ilcx, ilcy, ilcz, lcil1 * lambda} ;
ilp2 = newp; Point(ilp2) = {ilcx+r1, ilcy, ilcz, lcil1 * lambda} ;
ilp3 = newp; Point(ilp3) = {ilcx, ilcy+r1, ilcz, lcil1 * lambda} ;
ilp4 = newp; Point(ilp4) = {ilcx, ilcy, ilcz+r1, lcil1 * lambda} ;
ilp5 = newp; Point(ilp5) = {ilcx-r1, ilcy, ilcz, lcil1 * lambda} ;
ilp6 = newp; Point(ilp6) = {ilcx, ilcy-r1, ilcz, lcil1 * lambda} ;
ilp7 = newp; Point(ilp7) = {ilcx, ilcy, ilcz-r1, lcil1 * lambda} ;
ilc1 = newreg; Circle(ilc1) = {ilp2,ilp1,ilp7};
ilc2 = newreg; Circle(ilc2) = {ilp7,ilp1,ilp5};
ilc3 = newreg; Circle(ilc3) = {ilp5,ilp1,ilp4};
ilc4 = newreg; Circle(ilc4) = {ilp4,ilp1,ilp2};
ilc5 = newreg; Circle(ilc5) = {ilp2,ilp1,ilp3};
ilc6 = newreg; Circle(ilc6) = {ilp3,ilp1,ilp5};
ilc7 = newreg; Circle(ilc7) = {ilp5,ilp1,ilp6};
ilc8 = newreg; Circle(ilc8) = {ilp6,ilp1,ilp2};
ilc9 = newreg; Circle(ilc9) = {ilp7,ilp1,ilp3};
ilc10 = newreg; Circle(ilc10) = {ilp3,ilp1,ilp4};
ilc11 = newreg; Circle(ilc11) = {ilp4,ilp1,ilp6};
ilc12 = newreg; Circle(ilc12) = {ilp6,ilp1,ilp7};
// We need non-plane surfaces to define the spherical icelens:
// here we use ruled surfaces, which can have 3 or 4
// sides:
ill1 = newreg; Line Loop(ill1) = {ilc5,ilc10,ilc4}; ilruls1=newreg; Ruled Surface(ilruls1) = {ill1};
ill2 = newreg; Line Loop(ill2) = {ilc9,-ilc5,ilc1}; ilruls2=newreg; Ruled Surface(ilruls2) = {ill2};
ill3 = newreg; Line Loop(ill3) = {ilc12,-ilc8,-ilc1}; ilruls3=newreg; Ruled Surface(ilruls3) = {ill3};
ill4 = newreg; Line Loop(ill4) = {ilc8,-ilc4,ilc11}; ilruls4=newreg; Ruled Surface(ilruls4) = {ill4};
ill5 = newreg; Line Loop(ill5) = {-ilc10,ilc6,ilc3}; ilruls5=newreg; Ruled Surface(ilruls5) = {ill5};
ill6 = newreg; Line Loop(ill6) = {-ilc11,-ilc3,ilc7}; ilruls6=newreg; Ruled Surface(ilruls6) = {ill6};
ill7 = newreg; Line Loop(ill7) = {-ilc2,-ilc7,-ilc12};ilruls7=newreg; Ruled Surface(ilruls7) = {ill7};
ill8 = newreg; Line Loop(ill8) = {-ilc6,-ilc9,ilc2}; ilruls8=newreg; Ruled Surface(ilruls8) = {ill8};
ilsloop0 = newreg;
Surface Loop(ilsloop0) = {ill8+1,ill5+1,ill1+1,ill2+1,ill3+1,ill7+1,ill6+1,ill4+1};
// 2.3.3 Define volume of air sphere
vil1=newv; Volume(vil1) = {ilsloop0};
// 3.0 define physical entitites
Physical Point(vacuum_background_bnd) = {ilp1,ilp2,ilp3,ilp4,ilp5,ilp6,ilp7};
Physical Surface(vacuum_background_bnd) = {ilruls1,ilruls2,ilruls3,ilruls4,ilruls5,ilruls6,ilruls7,ilruls8};
Physical Volume(air) = {vil1};
This diff is collapsed.
// rights - 2006-, copyright patrick leidenberger and benedikt oswald,
// all rights reserved
// project - gmsh2h5fed
// file name - gmsh.cc
// file type - c++ implementation file
// objective - implement class for readind gmsh data files