Hi Vinayak, If you do not manually initialize member variables in a constructor, they are automatically initialized with their default constructor (i.e. one which takes no arguments). However, the FESystem class is such that the default constructor is manually deleted, and so can't be constructed without explicitly passing in some arguments. In order to get your code to compile, you'll need to call a non-default constructor for your FESystem member variable in the constructor of Network.
See the FESystem documentation or step-8 ( https://www.dealii.org/current/doxygen/deal.II/step_8.html#ElasticProblemElasticProblemconstructor) for an example of how to properly construct an FESystem object. On Tue, May 16, 2023, 9:12 AM Vinayak Vijay <vinayak....@gmail.com> wrote: > Hello, > > I am trying to initialise FESystem in a class called "Network" (definition > present in a header file), however when i am getting the following error: > > In constructor ‘Network::Network(const string&)’: > /home/Network.cpp:21:57: error: use of deleted function > ‘dealii::FESystem<dim, spacedim>::FESystem() [with int dim = 1; int > spacedim = 3]’ > 21 | Network::Network(const std::string ¶meter_file) > | ^ > In file included from /home/Network.h:16, > from /home/Network.cpp:1: > /home/user/spack/opt/spack/linux-ubuntu20.04-icelake/gcc-9.4.0/dealii-9.4.2-4haiezd5dty7b537inhxmeebwxllx4gs/include/deal.II/fe/fe_system.h:215:3: > note: declared here > 215 | FESystem() = delete; > > I am not able to figure out the error. Can someone help? > > Thanks > Vinayak > > -- > 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/de162421-9d6d-4722-a3e6-6c92fa316319n%40googlegroups.com > <https://groups.google.com/d/msgid/dealii/de162421-9d6d-4722-a3e6-6c92fa316319n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CALTw5sZZB6Ey8O_3sUh67oj25BkatbNdKb_AS1qwzW%2B3onD%3DkQ%40mail.gmail.com.