Commit 673b7a22 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Passing of MeshDependentData via SharedPointer

parent d0b56013
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ class advectionProblem:
      using typename BaseType::DofVectorType;
      using typename BaseType::DofVectorPointer;
      using typename BaseType::MeshDependentDataType;
      using typename BaseType::MeshDependentDataPointer; 
      
      static String getTypeStatic();

@@ -49,7 +50,7 @@ class advectionProblem:
      bool setInitialCondition( const Config::ParameterContainer& parameters,
                                const MeshPointer& mesh,
                                DofVectorPointer& dofs,
                                MeshDependentDataType& meshDependentData );
                                MeshDependentDataPointer& meshDependentData );

      template< typename Matrix >
      bool setupLinearSystem( const MeshPointer& mesh,
@@ -59,7 +60,7 @@ class advectionProblem:
                         const IndexType& step,
                         const MeshPointer& mesh,
                         DofVectorPointer& dofs,
                         MeshDependentDataType& meshDependentData );
                         MeshDependentDataPointer& meshDependentData );

      IndexType getDofs( const MeshPointer& mesh ) const;

@@ -71,7 +72,7 @@ class advectionProblem:
                           const MeshPointer& mesh,
                           DofVectorPointer& _u,
                           DofVectorPointer& _fu,
                           MeshDependentDataType& meshDependentData );
                           MeshDependentDataPointer& meshDependentData );

      template< typename Matrix >
      void assemblyLinearSystem( const RealType& time,
@@ -80,7 +81,7 @@ class advectionProblem:
                                 DofVectorPointer& dofs,
                                 Matrix& matrix,
                                 DofVectorPointer& rightHandSide,
                                 MeshDependentDataType& meshDependentData );
                                 MeshDependentDataPointer& meshDependentData );

   protected:

+4 −4
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ advectionProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOperator >
setInitialCondition( const Config::ParameterContainer& parameters,
                     const MeshPointer& mesh,
                     DofVectorPointer& dofs,
                     MeshDependentDataType& meshDependentData )
                     MeshDependentDataPointer& meshDependentData )
{
   std::cout << "vaules adding";
   typedef typename MeshType::Cell Cell;
@@ -221,7 +221,7 @@ makeSnapshot( const RealType& time,
              const IndexType& step,
              const MeshPointer& mesh,
              DofVectorPointer& dofs,
              MeshDependentDataType& meshDependentData )
              MeshDependentDataPointer& meshDependentData )
{
   std::cout << std::endl << "Writing output at time " << time << " step " << step << "." << std::endl;
   this->bindDofs( mesh, dofs );
@@ -243,7 +243,7 @@ getExplicitRHS( const RealType& time,
                const MeshPointer& mesh,
                DofVectorPointer& _u,
                DofVectorPointer& _fu,
                MeshDependentDataType& meshDependentData )
                MeshDependentDataPointer& meshDependentData )
{
   /****
    * If you use an explicit solver like Euler or Merson, you
@@ -310,7 +310,7 @@ assemblyLinearSystem( const RealType& time,
                      DofVectorPointer& _u,
                      Matrix& matrix,
                      DofVectorPointer& b,
                      MeshDependentDataType& meshDependentData )
                      MeshDependentDataPointer& meshDependentData )
{
   /*LinearSystemAssembler< Mesh,
                             MeshFunctionType,
+7 −6
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ class eulerProblem:
      using typename BaseType::DofVectorType;
      using typename BaseType::DofVectorPointer;
      using typename BaseType::MeshDependentDataType;
      using typename BaseType::MeshDependentDataPointer;

      typedef typename DifferentialOperator::Continuity Continuity;
      typedef typename DifferentialOperator::Momentum Momentum;
@@ -55,7 +56,7 @@ class eulerProblem:
      bool setInitialCondition( const Config::ParameterContainer& parameters,
                                const MeshPointer& mesh,
                                DofVectorPointer& dofs,
                                MeshDependentDataType& meshDependentData );
                                MeshDependentDataPointer& meshDependentData );

      template< typename Matrix >
      bool setupLinearSystem( const MeshPointer& mesh,
@@ -65,7 +66,7 @@ class eulerProblem:
                         const IndexType& step,
                         const MeshPointer& mesh,
                         DofVectorPointer& dofs,
                         MeshDependentDataType& meshDependentData );
                         MeshDependentDataPointer& meshDependentData );

      IndexType getDofs( const MeshPointer& mesh ) const;

@@ -77,7 +78,7 @@ class eulerProblem:
                           const MeshPointer& mesh,
                           DofVectorPointer& _u,
                           DofVectorPointer& _fu,
                           MeshDependentDataType& meshDependentData );
                           MeshDependentDataPointer& meshDependentData );

      template< typename Matrix >
      void assemblyLinearSystem( const RealType& time,
@@ -86,13 +87,13 @@ class eulerProblem:
                                 DofVectorPointer& dofs,
                                 Matrix& matrix,
                                 DofVectorPointer& rightHandSide,
                                 MeshDependentDataType& meshDependentData );
                                 MeshDependentDataPointer& meshDependentData );
      
      bool postIterate( const RealType& time,
                        const RealType& tau,
                        const MeshPointer& mesh,
                        DofVectorPointer& dofs,
                        MeshDependentDataType& meshDependentData );
                        MeshDependentDataPointer& meshDependentData );

   protected:

+5 −5
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ eulerProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOperator >::
setInitialCondition( const Config::ParameterContainer& parameters,
                     const MeshPointer& mesh,
                     DofVectorPointer& dofs,
                     MeshDependentDataType& meshDependentData )
                     MeshDependentDataPointer& meshDependentData )
{
  std::cout << std::endl << "get conditions from CML";
   typedef typename MeshType::Cell Cell;
@@ -191,7 +191,7 @@ makeSnapshot( const RealType& time,
              const IndexType& step,
              const MeshPointer& mesh,
              DofVectorPointer& dofs,
              MeshDependentDataType& meshDependentData )
              MeshDependentDataPointer& meshDependentData )
{
  std::cout << std::endl << "Writing output at time " << time << " step " << step << "." << std::endl;
   this->bindDofs( mesh, dofs );
@@ -250,7 +250,7 @@ getExplicitRHS( const RealType& time,
                const MeshPointer& mesh,
                DofVectorPointer& _u,
                DofVectorPointer& _fu,
                MeshDependentDataType& meshDependentData )
                MeshDependentDataPointer& meshDependentData )
{
    std::cout << "explicitRHS" << std::endl;
    typedef typename MeshType::Cell Cell;
@@ -329,7 +329,7 @@ assemblyLinearSystem( const RealType& time,
                      DofVectorPointer& _u,
                      Matrix& matrix,
                      DofVectorPointer& b,
                      MeshDependentDataType& meshDependentData )
                      MeshDependentDataPointer& meshDependentData )
{
/*   LinearSystemAssembler< Mesh,
                             MeshFunctionType,
@@ -361,7 +361,7 @@ postIterate( const RealType& time,
             const RealType& tau,
             const MeshPointer& mesh,
             DofVectorPointer& dofs,
             MeshDependentDataType& meshDependentData )
             MeshDependentDataPointer& meshDependentData )
{
   //velocity
   this->velocity->setMesh( mesh );
+7 −6
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ class eulerProblem:
      using typename BaseType::DofVectorType;
      using typename BaseType::DofVectorPointer;
      using typename BaseType::MeshDependentDataType;
      using typename BaseType::MeshDependentDataPointer;

      typedef typename DifferentialOperator::Continuity Continuity;
      typedef typename DifferentialOperator::MomentumX MomentumX;
@@ -56,7 +57,7 @@ class eulerProblem:
      bool setInitialCondition( const Config::ParameterContainer& parameters,
                                const MeshPointer& mesh,
                                DofVectorPointer& dofs,
                                MeshDependentDataType& meshDependentData );
                                MeshDependentDataPointer& meshDependentData );

      template< typename Matrix >
      bool setupLinearSystem( const MeshPointer& mesh,
@@ -66,7 +67,7 @@ class eulerProblem:
                         const IndexType& step,
                         const MeshPointer& mesh,
                         DofVectorPointer& dofs,
                         MeshDependentDataType& meshDependentData );
                         MeshDependentDataPointer& meshDependentData );

      IndexType getDofs( const MeshPointer& mesh ) const;

@@ -78,7 +79,7 @@ class eulerProblem:
                           const MeshPointer& mesh,
                           DofVectorPointer& _u,
                           DofVectorPointer& _fu,
                           MeshDependentDataType& meshDependentData );
                           MeshDependentDataPointer& meshDependentData );

      template< typename Matrix >
      void assemblyLinearSystem( const RealType& time,
@@ -87,13 +88,13 @@ class eulerProblem:
                                 DofVectorPointer& dofs,
                                 Matrix& matrix,
                                 DofVectorPointer& rightHandSide,
                                 MeshDependentDataType& meshDependentData );
                                 MeshDependentDataPointer& meshDependentData );

      bool postIterate( const RealType& time,
                        const RealType& tau,
                        const MeshPointer& mesh,
                        DofVectorPointer& dofs,
                        MeshDependentDataType& meshDependentData );
                        MeshDependentDataPointer& meshDependentData );

   protected:

Loading