[deal.II] Re: Docker question - bash: cmake: command not found

2018-08-07 Thread 程迪
Hi Shawn,

I think `docker exec -u root -it  bash` would help 
you get root privilege and install cmake.

On Friday, July 13, 2018 at 2:21:28 PM UTC-4, Yuxiang Wang wrote:
>
> (re-post from https://github.com/dealii/docker-files/issues/17)
>
> Hi all,
>
>
> Quick question - after I used this docker image:
>
>
> docker run -v %cd%:/home/dealii/shared -it 
> dealii/dealii:9.0.0-gcc-mpi-fulldepsspack-debugrelease
>
>
> And if I run cmake CMakeLists.txt, it reports:
>
>
> bash: cmake: command not found
>
>
> It seems that cmake is not installed. And if I do sudo apt-get install 
> cmake it says bash: sudo: command not found; if I do su it asks for a 
> password that I don't know.
>
>
> Could you please help?
>
>
> Thanks,
> Shawn
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] How to use intellisense to parse dealii code using visual studio remotely?

2018-08-07 Thread 程迪
Hi, everyone.

I am trying to use visual studio 2017 linux dev workloads to compile and 
debug tutorial step1 remotely on docker container. I want to use 
intellisense of vs to help me. But I cannot figure out how.

Here is my steps:

1. I followed 
(https://docs.microsoft.com/en-us/cpp/linux/download-install-and-setup-the-linux-development-workload)
 
to install and configured visual studio 2017 CE

2. I installed docker engine on windows using virtualbox and boot2docker. 
And I recreated the docker machine to use more cpus.
# stop`default` docker machine
docker-machine stop default
# delet`default` docker machine,and all images
docker-machine rm default
# create `default` docker machine
docker-machine create -d virtualbox --virtualbox-cpu-count=4 
--virtualbox-memory=4096 --virtualbox-disk-size=5 default
# Restart docker
docker-machine stop
exit
3. create a docker container:
docker run --name dealii_vs -w /home/dealii -i -t -d -v 
/c/Users/cheng:/home/dealii/shared -p 192.168.99.100:8022:22  -p 
192.168.99.100:8023-8025:8023-8025 --cap-add=SYS_PTRACE dealii/dealii:latest
# --cap-add=SYS_PTRACE is necessary for gdbserver.
docker exec -u root -it dealii_vs bash # use root to do something inside
4. configure inside of the docker container
apt-get update 
apt-get install openssh-server gdb gdbserver zip vim-nox -y  # download 
some software, vim-nox is not necessary.
# newer cmake, vs2017 need cmake 3.8+
wget https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh
# install to /opt/cmake/3.12.0
mkdir -p /opt/cmake/3.12.0
./cmake-3.12.0-Linux-x86_64.sh --skip-license --prefix=/opt/cmake/3.12.0 
--exclude-subdir

# modify sshd to auto load some env_vars.
# vs 2017 is using ssh to run commands remotely in `non-interactive` shell, 
which won't load `~/.bashrc` or docker's `ENV`
# however, opensshd has an option to load some env_vars even in 
`non-interactive` 
shell
cat >>/etc/ssh/sshd_config CrossPlatform>ConnectionManager by 
default.
"remoteMachineName": "192.168.99.100",  
"configurationType": "Debug",
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
# cmake location
"cmakeExecutable": "/opt/cmake/3.12.0/bin/cmake",
"buildRoot": 
"${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": 
"${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"remoteBuildRoot": 
"/var/tmp/build/${workspaceHash}/build/${name}",
"remoteInstallRoot": 
"/var/tmp/build/${workspaceHash}/install/${name}",
"remoteCopySources": true,
"remoteCopySourcesOutputVerbosity": "Normal",
"remoteCopySourcesConcurrentCopies": "10",
# rsync is buggy, use sftp
"remoteCopySourcesMethod": "sftp",
"remoteCopyBuildOutput": false,
# pass -DDEAL_II_DIR=/home/dealii/dealii-master here or pass it by 
`~/.ssh/environment`
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ]
},

6. I tried to figure out what header and libs dealii tutorial code is 
using, however, OMG:

$ make VERBOSE=1
/usr/bin/cmake -H/home/dealii/shared/dealII/examples/step-1 
-B/home/dealii/shared/dealII/examples/step-1 --check-build-system 
CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start 
/home/dealii/shared/dealII/examples/step-1/CMakeFiles 
/home/dealii/shared/dealII/examples/step-1/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/dealii/shared/dealII/examples/step-1'
make -f CMakeFiles/step-1.dir/build.make CMakeFiles/step-1.dir/depend
make[2]: Entering directory '/home/dealii/shared/dealII/examples/step-1'
cd /home/dealii/shared/dealII/examples/step-1 && /usr/bin/cmake -E 
cmake_depends "Unix Makefiles" /home/dealii/shared/dealII/examples/step-1 
/home/dealii/shared/dealII/examples/step-1 
/home/dealii/shared/dealII/examples/step-1 
/home/dealii/shared/dealII/examples/step-1 
/home/dealii/shared/dealII/examples/step-1/CMakeFiles/step-1.dir/DependInfo.cmake
 
--color=
make[2]: Leaving directory '/home/dealii/shared/dealII/examples/step-1'
make -f CMakeFiles/step-1.dir/build.make CMakeFiles/step-1.dir/build
make[2]: Entering directory '/home/dealii/shared/dealII/examples/step-1'
[ 50%] Building CXX object CMakeFiles/step-1.dir/step-1.cc.o
/usr/bin/mpicxx   -DDEBUG -DTBB_DO_ASSERT=1 -DTBB_USE_DEBUG -isystem 
/home/dealii/dealii-master/include -isystem 
/home/dealii/dealii-master/include/deal.II/bundled -isystem 
/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent 
-isystem 
/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include 
-isystem /usr/lib/openmpi/include -isystem /usr/lib/openmpi/include/openmpi 
-isystem /home/dealii/libs/parmetis-4.0.3/include -isystem 

Re: [deal.II] UMAT subroutine in dealii.

2018-08-07 Thread Wolfgang Bangerth

On 08/07/2018 03:31 AM, Mahesh Prasad wrote:


Thank you for the suggestions. I have already looked through the 
"Applications" and found that "PRISMS-Plasticity" is working on similar lines 
(Crystal Plasticity FEM).
The nature of the problem is : Multi-scale simulations using Crystal 
Plasticity FEM.


Over the years we have developed the UMAT subroutine that describes our 
material models. So, instead of implementing them from scratch in dealii we 
would like to have an interface that communicates between the UMAT and 
dealii.  So, my question is: Has anyone tried to link the UMAT subroutines 
with dealii ? i.e., The UMAT (fortran 90) has to be called at each integration 
point. If not, How do I go about linking the fortran code with dealii ?


Mahesh,
since few of us will be familiar with how exactly ABAQUS interfaces with 
externally written routines, can you explain what these UMAT functions take as 
input, and which information they return?


I suspect that they probably receive the strain as input and return the stress 
as output, but it would be good to know for sure. It may also be that it's the 
derivative tensor, of course, which may actually be more useful in practice.


Best
 WB

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] projecting values of the solution on the boundary

2018-08-07 Thread Alberto Salvadori
Dear community,

I am asking some advices on the following issue. I am solving a simple 
problem, say a Poisson problem in the unknown field u, and a more involved 
problem separately. This second problem requires the values of u in the 
Neumann boundary conditions.

Accordingly, I guess one could solve the Laplacian first and calculate the 
numerical solution for u, say un. Afterwards one builds a solver for the 
more complex operator and in the Neumann part of the code - that may look 
like this for parallel::shared triangulations:

  for (unsigned int face_number=0; 
face_number::faces_per_cell; 
++face_number)

if (

cell->face(face_number)->at_boundary()

&&

cell->face(face_number)->boundary_id() == 2// Neumann 
boundaries

)

{

  

  fe_face_values.reinit (cell, face_number);

  

  // define points and normals

  

  std::vector< Point >points  = 
fe_face_values.get_quadrature_points();

  std::vector< Tensor<1,dim> > normals = 
fe_face_values.get_all_normal_vectors();

  

  // calculate neumann values

  

  for (unsigned int q_point=0; q_point mech_neumann_value;

neumann_bc_for_mech.bc_value( points[q_point], 
normals[q_point], mech_neumann_value );


 .

 

one needs the value of the field un at points  points[q_point] to be passed 
to neumann_bc_for_mech.bc_value.
Which is an effective way to calculate this amount ?

Thank you.

Alberto


-- 


Informativa sulla Privacy: http://www.unibs.it/node/8155 


-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] UMAT subroutine in dealii.

2018-08-07 Thread Mahesh Prasad
Dear Jean-Paul,

Thank you for the suggestions. I have already looked through the 
"Applications" and found that "PRISMS-Plasticity" is working on similar 
lines (Crystal Plasticity FEM).
The nature of the problem is : Multi-scale simulations using Crystal 
Plasticity FEM. 

Over the years we have developed the UMAT subroutine that describes our 
material models. So, instead of implementing them from scratch in dealii we 
would like to have an interface that communicates between the UMAT and 
dealii.  So, my question is: Has anyone tried to link the UMAT subroutines 
with dealii ? i.e., The UMAT (fortran 90) has to be called at each 
integration point. If not, How do I go about linking the fortran code with 
dealii ?

Thank you!
Mahesh Prasad.



On Monday, August 6, 2018 at 8:13:23 PM UTC+2, Jean-Paul Pelteret wrote:
>
> Dear Mahesh,
>
> If you browse through both the tutorials 
>  and the code-gallery 
> contributions , 
> you will notice that deal.II is completely agnostic about which finite 
> element formulation you wish to implement and the concept of a material 
> model (constitutive law) associated with the governing equations. So you 
> have complete freedom as to how you would want to implement a material law. 
> There are also a few application frameworks based on deal.II (see the 
> “Applications” tab at the top of the homepage ) that 
> would presumably offer some interface between user defined material models 
> and their framework, but if your interest lies in using one of these codes 
> then you would have to investigate this more deeply yourself.
>
> If you could give more details as to what the nature of the problem that 
> you’re trying to implement is, then maybe someone with experience in this 
> specific topic could share some further insights with you.
>
> Best,
> Jean-Paul
>
> On 06 Aug 2018, at 19:08, Mahesh Prasad  > wrote:
>
> Hello everyone,
>
> I am making a transition from ABAQUS to dealii. But they are many open 
> questions. Among them the most important one is User defined materials.
> I would like to know if anyone has worked / still working in implementing 
> UMAT subroutine within dealii ? 
>
> Best regards,
> Mahesh Prasad.
>
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+un...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.