Re: [deal.II] Mixed codimensionality

2023-10-27 Thread Daniel Arndt
Alex,

If you can formulate your problem/approach in a way (iteratively?) that you
could solve separately on the three triangulations (using input from the
solution on the other triangulations), that might be easier.
On the other hand, if you only want one system matrix you would identify
matching dofs manually and merge the system matrices manually.
Maybe, someone else has better ideas and more experience than me. I'm still
curious how your full weak form looks like.

Best,
Daniel


On Fri, Oct 27, 2023 at 1:42 PM Alex Quinlan 
wrote:

> Hi Daniel,
>
> Thanks for the response.  I am essentially using the approach in Step-8,
> where I am seeking a vector-valued displacement solution using FE_System.
> So, I've been using:
>
> dealii::FESystem<3>(FE_Q<3>(1), 3 )
> and
> dealii::FESystem<2,3>(FE_Q<2,3>(1), 3 )
>
>
> Based on your suggestion, I am picturing doing something like this:
>
> // Shared Objects
> AffineConstraints constraints;
> SparsityPatternsparsity_pattern;
> SparseMatrix system_matrix;
> Vector solution;// This is the solution vector
> Vector system_rhs;  // This is the load / right-hand-side vector
>
> // Dimension dependent objects
> // 3D
> Triangulation<3,3>   triangulation_3D;
> DoFHandler<3,3>  dof_handler_3D;
> FESystem<3,3>fe_3D;
>
> // 2D
> Triangulation<2,3>   triangulation_2D;
> DoFHandler<2,3>  dof_handler_2D;
> FESystem<2,3>fe_2D;
>
> // 1D
> Triangulation<1,3>   triangulation_1D;
> DoFHandler<1,3>  dof_handler_1D;
> FESystem<1,3>fe_1D;
>
> Then I need to proceed with each of these triangulations, and *somehow*
> link them together within the system_matrix and system_rhs.
>
> I have been building the system matrix using this line for each cell in
> the dof_handler.active_cell_iterators:
>
> constraints.distribute_local_to_global(  cell_matrix, cell_rhs,
> local_dof_indices,
>  system_matrix, system_rhs);
>
> I see two challenges using this:
> 1)  keeping track of the dof_indices across 3 dof_handlers so they can be
> added to the correct place in the system_matrix
> 2) Connecting the triangulations within the system matrix.
>
>
> Have I understood your suggestion correctly?  Do you forsee any other
> challenges?
>
> Thanks very much,
> Alex
>
> --
> 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/7b15f86c-0069-42c9-b7ed-4bde752ee07bn%40googlegroups.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/CAOYDWbJ4%3DYfq4F3mwEf8co64Gs__dqFu8oTBGofTnr3dxKE8Mg%40mail.gmail.com.


Re: [deal.II] Mixed codimensionality

2023-10-27 Thread Alex Quinlan
Hi Daniel, 

Thanks for the response.  I am essentially using the approach in Step-8, 
where I am seeking a vector-valued displacement solution using FE_System.  
So, I've been using:

dealii::FESystem<3>(FE_Q<3>(1), 3 )
and
dealii::FESystem<2,3>(FE_Q<2,3>(1), 3 )


Based on your suggestion, I am picturing doing something like this:

// Shared Objects
AffineConstraints constraints;
SparsityPatternsparsity_pattern;
SparseMatrix system_matrix;
Vector solution;// This is the solution vector
Vector system_rhs;  // This is the load / right-hand-side vector

// Dimension dependent objects
// 3D
Triangulation<3,3>   triangulation_3D;
DoFHandler<3,3>  dof_handler_3D;
FESystem<3,3>fe_3D;

// 2D
Triangulation<2,3>   triangulation_2D;
DoFHandler<2,3>  dof_handler_2D;
FESystem<2,3>fe_2D;

// 1D
Triangulation<1,3>   triangulation_1D;
DoFHandler<1,3>  dof_handler_1D;
FESystem<1,3>fe_1D;

Then I need to proceed with each of these triangulations, and *somehow* 
link them together within the system_matrix and system_rhs.

I have been building the system matrix using this line for each cell in the 
dof_handler.active_cell_iterators:

constraints.distribute_local_to_global(  cell_matrix, cell_rhs, 
local_dof_indices,   
 system_matrix, system_rhs);

I see two challenges using this:
1)  keeping track of the dof_indices across 3 dof_handlers so they can be 
added to the correct place in the system_matrix
2) Connecting the triangulations within the system matrix.


Have I understood your suggestion correctly?  Do you forsee any other 
challenges?

Thanks very much,
Alex

-- 
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/7b15f86c-0069-42c9-b7ed-4bde752ee07bn%40googlegroups.com.


[deal.II] Re: Function to obtain the cell(s) that belong to a certain vertex

2023-10-27 Thread Sebastian Kinnewig

Dear Bruno,

Awesome! That is exactly what I was looking for.
Thank you very much :)

Best,
Sebastian
bruno.t...@gmail.com schrieb am Freitag, 27. Oktober 2023 um 18:01:29 UTC+2:

> Sebastian,
>
> Take a look at GridTools::find_cells_adjacent_to_vertex() 
> 
>
> Best,
>
> Bruno
>
> On Friday, October 27, 2023 at 11:51:48 AM UTC-4 sebastian...@gmail.com 
> wrote:
>
>> Hello, 
>>
>> I am searching for a function in deal.II that returns the cell(s) to 
>> which a given vertex belongs based on the vertex global_vertex_index. Does 
>> such a function exist?
>>
>> Best,
>> Sebastian
>>
>

-- 
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/dea33a64-541e-4ea9-960f-a7568c5e18a8n%40googlegroups.com.


[deal.II] Re: Function to obtain the cell(s) that belong to a certain vertex

2023-10-27 Thread Bruno Turcksin
Sebastian,

Take a look at GridTools::find_cells_adjacent_to_vertex() 


Best,

Bruno

On Friday, October 27, 2023 at 11:51:48 AM UTC-4 sebastian...@gmail.com 
wrote:

> Hello, 
>
> I am searching for a function in deal.II that returns the cell(s) to which 
> a given vertex belongs based on the vertex global_vertex_index. Does such a 
> function exist?
>
> Best,
> Sebastian
>

-- 
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/9c18248a-d991-42c0-97f3-273a5b8ea320n%40googlegroups.com.


[deal.II] Function to obtain the cell(s) that belong to a certain vertex

2023-10-27 Thread Sebastian Kinnewig
Hello, 

I am searching for a function in deal.II that returns the cell(s) to which 
a given vertex belongs based on the vertex global_vertex_index. Does such a 
function exist?

Best,
Sebastian

-- 
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/6dd9e301-db6b-443c-8a01-ff18e21a6d76n%40googlegroups.com.


[deal.II] Re: dealii installation error-oneapi

2023-10-27 Thread Bruno Turcksin
ninghui,

Can you share 
/media/ninghui/Aspect/dealii-candi-oneapi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeOutput.log
 
and 
/media/ninghui/Aspect/dealii-candi-oneapi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeError.log.

Best,

Bruno

On Tuesday, October 17, 2023 at 8:27:33 PM UTC-4 nh3242...@gmail.com wrote:

> Hi, all
>
> Hello everyone!
> I had some problems when using candi to compile and install dealii. The 
> mkl+oneapi component is selected.
>
> --
> 3.1.0/lib/intel64/libmkl_gnu_thread.so;/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/libmkl_core.so;/usr/lib/gcc/x86_64-linux-gnu/11/libgomp.
>  
> so;-lm;-ldl
> --
> -- DEAL_II_WITH_LAPACK successfully set up with external dependencies.
> --
> -- Include 
> /media/ninghui/Aspect/dealii-candi-oneapi/tmp/unpack/deal.II-v9.5.1/cmake/configure/configure_10_mpi.cmake
> -- Found MPI_C: /opt/intel/oneapi/mpi/2021.9.0/lib/release/libmpi.so 
> (found version "3.1")
> -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR 
> MPI_CXX_WORKS)
> -- Found MPI_Fortran: /opt/intel/oneapi/mpi/2021.9.0/bin/mpif90 (found 
> version "3.1")
> -- Could NOT find MPI (missing: MPI_CXX_FOUND) (found version "3.1")
> -- Found MPI_MPI_H
> -- Performing Test MPI_UNDERLINKAGE_OK
> -- Performing Test MPI_UNDERLINKAGE_OK - Success
> -- Processing MPI variables and targets
> -- Unable to process MPI
> -- DEAL_II_WITH_MPI has unmet external dependencies.
> CMake Error at cmake/configure/configure_10_mpi.cmake:68 (message):
>   
>
>Could not find any suitable mpi library!
>
>   
>
>Please ensure that an mpi library is installed on your computer
>
>and set MPI_CXX_COMPILER to the appropriate mpi wrappers:
>
>$ cmake -DMPI_CXX_COMPILER=".../mpicxx" <...>
>
>Or with additional C and Fortran wrappers (recommended!):
>
>$ cmake -DMPI_C_COMPILER=".../mpicc"\
>-DMPI_CXX_COMPILER=".../mpicxx"\
>-DMPI_Fortran_COMPILER=".../mpif90"\
><...>
>
> Call Stack (most recent call first):
>   
>  
> /media/ninghui/Aspect/dealii-candi-oneapi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeTmp/evaluate_expression.tmp:1
>  
> (feature_MPI_error_message)
>cmake/macros/macro_evaluate_expression.cmake:30 (include)
>cmake/macros/macro_configure_feature.cmake:275 (evaluate_expression)
>cmake/configure/configure_10_mpi.cmake:83 (configure_feature)
>cmake/macros/macro_verbose_include.cmake:19 (include)
>CMakeLists.txt:120 (verbose_include)
>
>
> -- Configuring incomplete, errors occurred!
> See also 
> "/media/ninghui/Aspect/dealii-candi-oneapi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeOutput.log".
> See also 
> "/media/ninghui/Aspect/dealii-candi-oneapi/tmp/build/deal.II-v9.5.1/CMakeFiles/CMakeError.log".
> Failure with exit status: 1
> Exit message: There was a problem configuring dealii v9.5.1.
>
> ---
> But I checked that mpicxx exists
> $ which mpicxx
> /opt/intel/oneapi/mpi/2021.9.0/bin/mpicxx
> $ mpicc --version 
> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
> Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> Any advice would be greatly appreciated.
> good luck!
> ninghui
>

-- 
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/c522f502-2dfa-4b66-8aab-f018063b0631n%40googlegroups.com.


Re: [deal.II] Mixed codimensionality

2023-10-27 Thread Daniel Arndt
Alex,

FiniteElements in deal.II are used with a Triangulation and DoFHandler of
the same dimension and space dimension.
>From your sketch, it seems like the Triangulation for your 3 types of
finite elements is (expectedly) different. Thus, it doesn't make much sense
to combine those in a FESystem.
It's probably better to define three separate Triangulations and use the
respective finite element classes for them. The tricky would likely be
getting the constraints between them right.
What does your weak form look like anyway?

Best,
Daniel

On Fri, Oct 27, 2023 at 11:13 AM Alex Quinlan 
wrote:

> Dear all,
>
> I've been working with deal.ii in the solid mechanics field for both 3D
> and 2D cases.
> I am now being asked by my colleagues to develop a model that can combine
> elements of different dimensionality.  This is approach is already
> implemented in my colleagues' abaqus models, and so we're looking to
> replicate the functionality in deal.ii.
>
> The elements to be combined would be FE_System elements of type:
> - 3D volumetric element in 3D space 
> - 2D planar element in 3D space 
> - 1D linear element in 3D space 
>
> I've attached a sketch of an application that might use this.
>
> From what I've seen, deal.ii does not like to mix 's.  Does anyone
> have thoughts on how I might go about implementing a model with these
> elements?  If I need to modify or implement new functionalities, could you
> estimate the magnitude of time required to make changes? (i.e. days, weeks,
> months)
>
> I realize that there are alternative methods to represent the physical
> system that could avoid this problem.  However, I am essentially being
> asked to automate the conversion from existing abaqus input files into
> deal.ii.  I appreciate any ideas you all might have.
>
> Thanks,
> Alex
>
> --
> 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/a7ff55e9-b406-403b-b176-75690c2d121en%40googlegroups.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/CAOYDWbKx-ju%2BJpJMcdW3Amtg2-NCEFU05Pm_uEtq8wJyqSW4DA%40mail.gmail.com.


[deal.II] Mixed codimensionality

2023-10-27 Thread Alex Quinlan
Dear all,

I've been working with deal.ii in the solid mechanics field for both 3D and 
2D cases.
I am now being asked by my colleagues to develop a model that can combine 
elements of different dimensionality.  This is approach is already 
implemented in my colleagues' abaqus models, and so we're looking to 
replicate the functionality in deal.ii.

The elements to be combined would be FE_System elements of type:
- 3D volumetric element in 3D space 
- 2D planar element in 3D space 
- 1D linear element in 3D space 

I've attached a sketch of an application that might use this.  

>From what I've seen, deal.ii does not like to mix 's.  Does anyone 
have thoughts on how I might go about implementing a model with these 
elements?  If I need to modify or implement new functionalities, could you 
estimate the magnitude of time required to make changes? (i.e. days, weeks, 
months)

I realize that there are alternative methods to represent the physical 
system that could avoid this problem.  However, I am essentially being 
asked to automate the conversion from existing abaqus input files into 
deal.ii.  I appreciate any ideas you all might have. 

Thanks,
Alex

-- 
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/a7ff55e9-b406-403b-b176-75690c2d121en%40googlegroups.com.