Re: [deal.II] Use Gmsh to import external grid calculation elasticity problem

2020-11-09 Thread Nick Wang
Uh, what I want to do is to use deal.ii to simulate our own model, 
Before using deal.ii , I used some numerical simulation software like 
abaqus.
However, it will be very difficult to use abaqus to simulate seepage flow 
and multiphase coupling.
I tried to use deal to build a simple model to deepen my understanding of 
this software.
So on the basis of step-8, I imported an external mesh model,
On this basic elastic equation, I tried to add some loads to analyze the 
deformation characteristics of this model like abaqus
Then further modify the constitutive equation, like an elastoplastic 
problem...
So I am trying to add a point load(parallel load) anywhere on the model 
first but I don't know how to achieve it.

Thanks,

Nick
在2020年11月10日星期二 UTC+8 下午12:49:46 写道:

> On 11/9/20 8:11 PM, Nick Wang wrote:
> > 
> > But I am still confused as to how I should add some load? Attach my code.
> > 
> > template 
> > void create_point_source_vector(const std::vector>& points,
> > std::vector>& values)
> > {
> > Point point_1;
> > point_1(0) = 0.5;
> > point_1(1) = 0.3;
> > 
> > values[point_1][1] = -10.0;
> > 
> > }
>
>
> Nick -- it's not clear to me what precisely you want to do here. You set 
> the 
> coordinates of one point, and then you try to set an element of a vector 
> (though you will get a compiler error because the point_1 can't be the 
> index 
> into values[...]). Can you write out in mathematical or otherwise concise 
> terms what you are trying to do?
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/67f2d436-7b33-4a5c-b211-ec275d006626n%40googlegroups.com.


Re: [deal.II] Use Gmsh to import external grid calculation elasticity problem

2020-11-09 Thread Wolfgang Bangerth

On 11/9/20 8:11 PM, Nick Wang wrote:


But I am still confused as to how I should add some load? Attach my code.

template 
void create_point_source_vector(const std::vector>& points,
std::vector>& values)
{
Point point_1;
point_1(0) = 0.5;
point_1(1) = 0.3;

values[point_1][1] = -10.0;

}



Nick -- it's not clear to me what precisely you want to do here. You set the 
coordinates of one point, and then you try to set an element of a vector 
(though you will get a compiler error because the point_1 can't be the index 
into values[...]). Can you write out in mathematical or otherwise concise 
terms what you are trying to do?


Best
 W.

--

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/cc64b7ee-d007-2d31-d2c3-3f2cc186efa9%40colostate.edu.


Re: [deal.II] Use Gmsh to import external grid calculation elasticity problem

2020-11-09 Thread Nick Wang
Thanks, Wolfgang, I think reading some PDE knowledge materials would help 
me to solve the constitutive equation problems.

I try to read the create_point_source_vector()  class in deal.ii 
https://www.dealii.org/9.2.0/doxygen/deal.II/namespaceVectorTools.html#ac4e531baa71a5183079fd2083aa7d723

But I am still confused as to how I should add some load? Attach my code.

template 
void create_point_source_vector(const std::vector>& points,
std::vector>& values)
{
Point point_1;
point_1(0) = 0.5;
point_1(1) = 0.3;

values[point_1][1] = -10.0;

}

It seems to be useless...
在2020年11月10日星期二 UTC+8 上午8:32:16 写道:

>
> Nick,
>
> > If I want to modify the constitutive equation based on step-8, but I 
> can't 
> > understand the expression you described in step8, like this.
> > 
> > [...]
> > 
> > Which aspect of knowledge should I learn if I want to modify the 
> constitutive 
> > equation.
>
> This is a question that goes beyond what we can provide here. You are in 
> essence saying that you don't know how to read a partial differential 
> equation. I would suggest you take a course on PDEs (or read a book on the 
> theory of partial differential equations) or at least a course on 
> mechanics 
> that covers how these equations are derived and what they mean.
>
> If your goal is modeling of materials, there are many books on solid 
> mechanics.
>
>
> > Or can I export the .inp file in Abaqus modeling and directly calculate 
> it in 
> > Deal.ii? Does Deal.ii support such operations?
>
> It's not that easy, but it's also not going to be useful to you: If you 
> don't 
> understand how constitutive equations are posed and what the different 
> pieces 
> mean, how do you expect to find out whether something is correct or not 
> *even 
> if you could magically import them into deal.II*? Doing "something" with a 
> code (whether that is ABAQUS or deal.II) doesn't mean that what you get is 
> correct or useful -- being able to tell whether something is correct or 
> useful 
> requires understanding, which requires sufficient theoretical background.
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f88ecde1-7cc1-4679-80f7-0235a5f7180an%40googlegroups.com.


Re: [deal.II] Use Gmsh to import external grid calculation elasticity problem

2020-11-09 Thread Wolfgang Bangerth



Nick,

If I want to modify the constitutive equation based on step-8, but I can't 
understand the expression you described in step8, like this.


[...]

Which aspect of knowledge should I learn if I want to modify the constitutive 
equation.


This is a question that goes beyond what we can provide here. You are in 
essence saying that you don't know how to read a partial differential 
equation. I would suggest you take a course on PDEs (or read a book on the 
theory of partial differential equations) or at least a course on mechanics 
that covers how these equations are derived and what they mean.


If your goal is modeling of materials, there are many books on solid mechanics.


Or can I export the .inp file in Abaqus modeling and directly calculate it in 
Deal.ii? Does Deal.ii support such operations?


It's not that easy, but it's also not going to be useful to you: If you don't 
understand how constitutive equations are posed and what the different pieces 
mean, how do you expect to find out whether something is correct or not *even 
if you could magically import them into deal.II*? Doing "something" with a 
code (whether that is ABAQUS or deal.II) doesn't mean that what you get is 
correct or useful -- being able to tell whether something is correct or useful 
requires understanding, which requires sufficient theoretical background.


Best
 W.

--

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/62163ab2-cdad-93f7-b05d-98c99a493904%40colostate.edu.


Re: [deal.II] Adding new obj target

2020-11-09 Thread Zachary Streeter
Thanks Wolfgang,

I think you are correct!  I just tried to use petsc_full_matrix instead and 
it linked no problem!

On Monday, November 9, 2020 at 5:25:30 PM UTC-6 Wolfgang Bangerth wrote:

> On 11/9/20 2:49 PM, Daniel Arndt wrote:
> > 
> > Undefined symbols for architecture x86_64:
> >   "dealii::PETScWrappers::SparseMatrix::SparseMatrix(int const&, 
> bool)", 
> > referenced from:
>
> There is no such function -- the linker tells you that, but it's unclear 
> to me 
> how it is referenced in test::Operator::Operator(int const &).
>
> I think that what is happening is that you are trying to call
> template 
> explicit SparseMatrix(const SparsityPatternType _pattern,
> const bool preset_nonzero_locations = true);
> with an int instead of a sparsity pattern as first argument. That's not 
> going 
> to work.
>
> Best
> W.
> -- 
> 
> Wolfgang Bangerth email: bang...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/ab604e0a-80a7-48ce-a838-979037ef8eban%40googlegroups.com.


Re: [deal.II] Adding new obj target

2020-11-09 Thread Wolfgang Bangerth

On 11/9/20 2:49 PM, Daniel Arndt wrote:


Undefined symbols for architecture x86_64:
   "dealii::PETScWrappers::SparseMatrix::SparseMatrix(int const&, bool)", 
referenced from:


There is no such function -- the linker tells you that, but it's unclear to me 
how it is referenced in test::Operator::Operator(int const &).


I think that what is happening is that you are trying to call
template 
explicit SparseMatrix(const SparsityPatternType _pattern,
  const bool preset_nonzero_locations = true);
with an int instead of a sparsity pattern as first argument. That's not going 
to work.


Best
 W.
--

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3f32ee67-f971-7d89-676c-f43e7c6ebaf1%40colostate.edu.


Re: [deal.II] Adding new obj target

2020-11-09 Thread Zachary Streeter
Ah sorry, yes I have done that already.  Sorry for forgetting that 
detail... 

If it should work assuming I have added my new directory in 
source/CMakeLists.txt, maybe my implementation is the problem.  Though, I 
wouldn't know why since it fails at linking.

On Monday, November 9, 2020 at 3:49:21 PM UTC-6 d.arnd...@gmail.com wrote:

> Zachary,
>
> You also need to make sure that CMake actually sees that your new source 
> directory. In particular, you should add a line saying
>
> ADD_SUBDIRECTORY(Test)
>
> to source/CMakeLists.txt.
>
> Best,
> Daniel
>
> Am Mo., 9. Nov. 2020 um 11:35 Uhr schrieb Zachary 42! <
> zachary...@gmail.com>:
>
>> Hi folks,
>>
>> I am trying to add another include/source directory and subsequent obj to 
>> dealii for potential future contributions to dealii.  Though I am having 
>> linking errors because my new obj needs to link agains the lac_obj (need 
>> Trilinos and other interfaces).  I thought the ADD_DEPENDICIES in the 
>> source/CMakeLists.txt file is where this is taking care of but apparently 
>> not.  I am following the exact same CMakeLists.txt files as in the other 
>> source/dirs but I am still getting the undefined symbols error due to 
>> object targets not apparently linking together.
>>
>> [ 80%] Linking CXX shared library ../lib/libdealii.dylib
>> Undefined symbols for architecture x86_64:
>>   "dealii::PETScWrappers::SparseMatrix::SparseMatrix(int const&, 
>> bool)", referenced from:
>>   test::Operator::Operator(int const&) in Operator.cc.o
>>   test::Operator::Operator(int const&, std::__1::basic_string> std::__1::char_traits, std::__1::allocator > const&) in 
>> Operator.cc.o
>> ld: symbol(s) not found for architecture x86_64
>>
>> So looks like the obj_lac needs to link with the obj_test and it doesn’t 
>> appear to be…
>>
>> Here is my source/Test/CMakeLists.txt file which builds fine:
>>
>> INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
>>
>> SET(_src
>>   Operator.cc
>>   )
>>
>> SET(_n_includes_per_unity_file 20)
>>
>> IF(DEAL_II_UNITY_BUILD)
>>   LIST(SORT _unity_include_src)
>> ENDIF()
>>
>> SETUP_SOURCE_LIST("${_unity_include_src}"
>>   "${_separate_src}"
>>   ${_n_includes_per_unity_file}
>>   _src
>>   )
>>
>> FILE(GLOB _header
>>   ${CMAKE_SOURCE_DIR}/include/test/*.h
>>   )
>>
>> DEAL_II_ADD_LIBRARY(obj_test OBJECT ${_src} ${_header})
>>
>> I didn’t change anything in the souce/CMakeLists.txt file.
>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/DE13C37A-F916-4295-AE97-685F856C5291%40gmail.com
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2a6875d0-e597-46ad-9fd3-fa4b24e6ff0cn%40googlegroups.com.


Re: [deal.II] Adding new obj target

2020-11-09 Thread Daniel Arndt
Zachary,

You also need to make sure that CMake actually sees that your new source
directory. In particular, you should add a line saying

ADD_SUBDIRECTORY(Test)

to source/CMakeLists.txt.

Best,
Daniel

Am Mo., 9. Nov. 2020 um 11:35 Uhr schrieb Zachary 42! <
zacharyloui...@gmail.com>:

> Hi folks,
>
> I am trying to add another include/source directory and subsequent obj to
> dealii for potential future contributions to dealii.  Though I am having
> linking errors because my new obj needs to link agains the lac_obj (need
> Trilinos and other interfaces).  I thought the ADD_DEPENDICIES in the
> source/CMakeLists.txt file is where this is taking care of but apparently
> not.  I am following the exact same CMakeLists.txt files as in the other
> source/dirs but I am still getting the undefined symbols error due to
> object targets not apparently linking together.
>
> [ 80%] Linking CXX shared library ../lib/libdealii.dylib
> Undefined symbols for architecture x86_64:
>   "dealii::PETScWrappers::SparseMatrix::SparseMatrix(int const&,
> bool)", referenced from:
>   test::Operator::Operator(int const&) in Operator.cc.o
>   test::Operator::Operator(int const&, std::__1::basic_string std::__1::char_traits, std::__1::allocator > const&) in
> Operator.cc.o
> ld: symbol(s) not found for architecture x86_64
>
> So looks like the obj_lac needs to link with the obj_test and it doesn’t
> appear to be…
>
> Here is my source/Test/CMakeLists.txt file which builds fine:
>
> INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
>
> SET(_src
>   Operator.cc
>   )
>
> SET(_n_includes_per_unity_file 20)
>
> IF(DEAL_II_UNITY_BUILD)
>   LIST(SORT _unity_include_src)
> ENDIF()
>
> SETUP_SOURCE_LIST("${_unity_include_src}"
>   "${_separate_src}"
>   ${_n_includes_per_unity_file}
>   _src
>   )
>
> FILE(GLOB _header
>   ${CMAKE_SOURCE_DIR}/include/test/*.h
>   )
>
> DEAL_II_ADD_LIBRARY(obj_test OBJECT ${_src} ${_header})
>
> I didn’t change anything in the souce/CMakeLists.txt file.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/DE13C37A-F916-4295-AE97-685F856C5291%40gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2Bt10X7z8k%3DyWj2yxMRAhDmdvhTOi1%2B9We%2B%2BAu4%3D-w-iw%40mail.gmail.com.


[deal.II] Adding new obj target

2020-11-09 Thread Zachary 42!
Hi folks,

I am trying to add another include/source directory and subsequent obj to 
dealii for potential future contributions to dealii.  Though I am having 
linking errors because my new obj needs to link agains the lac_obj (need 
Trilinos and other interfaces).  I thought the ADD_DEPENDICIES in the 
source/CMakeLists.txt file is where this is taking care of but apparently not.  
I am following the exact same CMakeLists.txt files as in the other source/dirs 
but I am still getting the undefined symbols error due to object targets not 
apparently linking together.

[ 80%] Linking CXX shared library ../lib/libdealii.dylib
Undefined symbols for architecture x86_64:
  "dealii::PETScWrappers::SparseMatrix::SparseMatrix(int const&, bool)", 
referenced from:
  test::Operator::Operator(int const&) in Operator.cc.o
  test::Operator::Operator(int const&, std::__1::basic_string, std::__1::allocator > const&) in 
Operator.cc.o
ld: symbol(s) not found for architecture x86_64

So looks like the obj_lac needs to link with the obj_test and it doesn’t appear 
to be…

Here is my source/Test/CMakeLists.txt file which builds fine:

INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})

SET(_src
  Operator.cc
  )

SET(_n_includes_per_unity_file 20)

IF(DEAL_II_UNITY_BUILD)
  LIST(SORT _unity_include_src)
ENDIF()

SETUP_SOURCE_LIST("${_unity_include_src}"
  "${_separate_src}"
  ${_n_includes_per_unity_file}
  _src
  )

FILE(GLOB _header
  ${CMAKE_SOURCE_DIR}/include/test/*.h
  )

DEAL_II_ADD_LIBRARY(obj_test OBJECT ${_src} ${_header})

I didn’t change anything in the souce/CMakeLists.txt file.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/DE13C37A-F916-4295-AE97-685F856C5291%40gmail.com.


Re: [deal.II] Use Gmsh to import external grid calculation elasticity problem

2020-11-09 Thread Nick Wang
[image: Snipaste_1.png]

在2020年11月9日星期一 UTC+8 下午4:12:07 写道:

> Thanks, Wolfgang, I would like to try it later.
>
> If I want to modify the constitutive equation based on step-8, but I can't 
> understand the expression you described in step8, like this.
>
>
>
> Which aspect of knowledge should I learn if I want to modify the 
> constitutive equation.
> Or can I export the .inp file in Abaqus modeling and directly calculate it 
> in Deal.ii? Does Deal.ii support such operations?
>
> Thanks,
>
> Best wishes,
>
> Nick
> 在2020年11月9日星期一 UTC+8 上午9:27:35 写道:
>
>> On 11/7/20 4:16 AM, Nick Wang wrote: 
>> > I have another question to ask, whether point load can be applied in 
>> deal.ii, 
>> > according to the steps I have learned, I can only apply range load 
>> temporarily 
>>
>> You can use the function VectorTools::create_point_source_vector() 
>>
>> https://www.dealii.org/7.3.0/doxygen/deal.II/namespaceVectorTools.html#ad03b858b1a3b59003a76f6224e67efc7
>>  
>> You might also want to look into the implementation of the function if 
>> you 
>> need to implement a slightly different situation. 
>>
>> Best 
>> W. 
>>
>> -- 
>>  
>> Wolfgang Bangerth email: bang...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/721e5532-022d-4944-8b41-6dd1a0b4b544n%40googlegroups.com.


Re: [deal.II] Use Gmsh to import external grid calculation elasticity problem

2020-11-09 Thread Nick Wang
Thanks, Wolfgang, I would like to try it later.

If I want to modify the constitutive equation based on step-8, but I can't 
understand the expression you described in step8, like this.



Which aspect of knowledge should I learn if I want to modify the 
constitutive equation.
Or can I export the .inp file in Abaqus modeling and directly calculate it 
in Deal.ii? Does Deal.ii support such operations?

Thanks,

Best wishes,

Nick
在2020年11月9日星期一 UTC+8 上午9:27:35 写道:

> On 11/7/20 4:16 AM, Nick Wang wrote:
> > I have another question to ask, whether point load can be applied in 
> deal.ii, 
> > according to the steps I have learned, I can only apply range load 
> temporarily
>
> You can use the function VectorTools::create_point_source_vector()
>
> https://www.dealii.org/7.3.0/doxygen/deal.II/namespaceVectorTools.html#ad03b858b1a3b59003a76f6224e67efc7
> You might also want to look into the implementation of the function if you 
> need to implement a slightly different situation.
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/825f66d0-07e9-4f39-9645-16817cf2f430n%40googlegroups.com.